[PATCH] D40146: [JumpThreading] Preservation of DT and LVI across the pass
Brian Rzycki via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 14:27:54 PST 2017
brzycki reopened this revision.
brzycki added a comment.
This revision is now accepted and ready to land.
This patch caused a build break when attempting to use -fmodules due to a cyclic header dependency chain. I've refactored the patch to no longer use DeferredDominance.h (the code now lives as a class in Dominators.h). I also moved one of the methods into Dominators.cpp that needed Constants.h and Instructions.h. @sebpop and @kuhar could you please review again?
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:289
auto AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
+ DeferredDominance *DDT = new DeferredDominance(*DT);
std::unique_ptr<BlockFrequencyInfo> BFI;
----------------
kuhar wrote:
> One remark: why new here instead of just putting it on the stack? If you need to pass the ownership around, who deallocates it?
Ah, I forgot I had that. This is stale code from an older attempt at working the class into JumpThreading. I'll fix it in the next diff. Thanks for catching this.
Repository:
rL LLVM
https://reviews.llvm.org/D40146
More information about the llvm-commits
mailing list