so that we needn't run DCE after this pass.
Details
Diff Detail
Event Timeline
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp | ||
---|---|---|
632–633 | Is this reuse going to cause problems with your garbage collection? When you go to recusively delete UserChain you'll encounter this reused (and now live) instruction and deletion will stop there. However, deeper in the UserChain[] it seems like you could still have dead instructions. The problem would be is that these dead instructions are no longer in the expression tree for UserChain.back() | |
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll | ||
1 | Should any extra checks be added to verify we're removing dead code? |
removeConstOffset stops reusing instructions in UserChain
This ensures RecursivelyDeleteTriviallyDeadInstructions(UserChain.back()) can
remove all dead instructions in UserChain.
Added a -gep-reassociate-verify-no-dead-code flag to detect dead code. This flag is supposed to be used in test only.
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll | ||
---|---|---|
1 | Good catch! Fixed by cloning BO even if it can be reused. |
Is this reuse going to cause problems with your garbage collection? When you go to recusively delete UserChain you'll encounter this reused (and now live) instruction and deletion will stop there. However, deeper in the UserChain[] it seems like you could still have dead instructions. The problem would be is that these dead instructions are no longer in the expression tree for UserChain.back()