aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2021-05-17 14:10:00 -0700
committerPhilip Reames <listmail@philipreames.com>2021-05-17 14:47:02 -0700
commitb6320eeb8622f05e4a5d4c7f5420523357490fca (patch)
tree3a92e3c7721a90b8d078415130480ac033f1146b /llvm/lib/Transforms/Utils/LoopVersioning.cpp
parentceb1ac9812cb0972cfa34cecc5e5704ae2a22063 (diff)
downloadllvm-b6320eeb8622f05e4a5d4c7f5420523357490fca.zip
llvm-b6320eeb8622f05e4a5d4c7f5420523357490fca.tar.gz
llvm-b6320eeb8622f05e4a5d4c7f5420523357490fca.tar.bz2
Do actual DCE in LoopUnroll (try 3)
Recommitting after fixing a bug found post commit. Amusingly, try 1 had been correct, and by reverting to incorporate last minute review feedback, I introduce the bug. Oops. :) The problem was that recursively deleting an instruction can delete instructions beyond the current iterator (via a dead phi), thus invalidating iteration. Test case added in LoopUnroll/dce.ll to cover this case. LoopUnroll does a limited DCE pass after unrolling, but if you have a chain of dead instructions, it only deletes the last one. Improve the code to recursively delete all trivially dead instructions. Differential Revision: https://reviews.llvm.org/D102511
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
0 files changed, 0 insertions, 0 deletions