[Mesa-dev] [PATCH 6/6] nv50/ir: run DCE backwards

Ilia Mirkin imirkin at alum.mit.edu
Mon Jan 25 19:57:34 PST 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Jan 25, 2016 at 9:57 AM, Karol Herbst <nouveau at karolherbst.de> wrote:
> reduces Pass rerun by around 40%
>
> Signed-off-by: Karol Herbst <nouveau at karolherbst.de>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> index 09a1c64..284a62c 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> @@ -3226,10 +3226,10 @@ DeadCodeElim::buryAll(Program *prog)
>  bool
>  DeadCodeElim::visit(BasicBlock *bb)
>  {
> -   Instruction *next;
> +   Instruction *prev;
>
> -   for (Instruction *i = bb->getFirst(); i; i = next) {
> -      next = i->next;
> +   for (Instruction *i = bb->getExit(); i; i = prev) {
> +      prev = i->prev;
>        if (i->isDead()) {
>           ++deadCount;
>           delete_Instruction(prog, i);
> --
> 2.7.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list