diff options
author | Karol Herbst <[email protected]> | 2016-01-27 18:25:07 +0100 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-01-28 15:34:29 -0500 |
commit | 3aa681449ed030ba8b9c56f0a6f2b08bd1fb15a6 (patch) | |
tree | 310cfafd18edb967c14dc4d863cbc654531e4780 /src/gallium | |
parent | 978ae28ca279354852a586b202e705db3d596041 (diff) |
nv50/ir: run DCE backwards
Reduces calls up to 50%
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 6 |
1 files 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 b2c9fdfc7a4..bda9c7d0c52 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -3187,10 +3187,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); |