[PATCH] D31032: [LoadCombine] Avoid analysing dead basic blocks

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 13:24:26 PDT 2017


davide requested changes to this revision.
davide added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Transforms/Scalar/LoadCombine.cpp:71
+    AU.addRequired<DominatorTreeWrapperPass>();
+    AU.addPreserved<DominatorTreeWrapperPass>();
     AU.addPreserved<GlobalsAAWrapperPass>();
----------------
I'm not an expert on LoadCombine but I think this preserve is correct because LoadCombine doesn't do any cross-BB combining or modifies the CFG structure. That said, if what I say is correct, I expect `setPreserveCFG` to preserve the DominatorTree already? Can you please double check?


================
Comment at: test/Transforms/LoadCombine/deadcode.ll:1
+; RUN: opt < %s -load-combine -disable-output
+
----------------
Can you add a CHECK line, to make sure we leave the block alone?


https://reviews.llvm.org/D31032





More information about the llvm-commits mailing list