[PATCH] D31023: [ADCE] Remove redundent code [NFC]
Tobias Grosser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 21:11:42 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL297929: [ADCE] Remove redundent code [NFC] (authored by grosser).
Changed prior to commit:
https://reviews.llvm.org/D31023?vs=91971&id=91973#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31023
Files:
llvm/trunk/lib/Transforms/Scalar/ADCE.cpp
Index: llvm/trunk/lib/Transforms/Scalar/ADCE.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/ADCE.cpp
+++ llvm/trunk/lib/Transforms/Scalar/ADCE.cpp
@@ -262,25 +262,6 @@
continue;
auto *BB = BBInfo.BB;
if (!PDT.getNode(BB)) {
- markLive(BBInfo.Terminator);
- continue;
- }
- for (auto *Succ : successors(BB))
- if (!PDT.getNode(Succ)) {
- markLive(BBInfo.Terminator);
- break;
- }
- }
-
- // Mark blocks live if there is no path from the block to the
- // return of the function or a successor for which this is true.
- // This protects IDFCalculator which cannot handle such blocks.
- for (auto &BBInfoPair : BlockInfo) {
- auto &BBInfo = BBInfoPair.second;
- if (BBInfo.terminatorIsLive())
- continue;
- auto *BB = BBInfo.BB;
- if (!PDT.getNode(BB)) {
DEBUG(dbgs() << "Not post-dominated by return: " << BB->getName()
<< '\n';);
markLive(BBInfo.Terminator);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31023.91973.patch
Type: text/x-patch
Size: 1033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/b26276a4/attachment.bin>
More information about the llvm-commits
mailing list