[llvm] r344714 - [TI removal] Switch MergeFunctions to directly use Instruction API.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 17 17:37:37 PDT 2018
Author: chandlerc
Date: Wed Oct 17 17:37:37 2018
New Revision: 344714
URL: http://llvm.org/viewvc/llvm-project?rev=344714&view=rev
Log:
[TI removal] Switch MergeFunctions to directly use Instruction API.
Modified:
llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=344714&r1=344713&r2=344714&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Wed Oct 17 17:37:37 2018
@@ -608,7 +608,7 @@ void MergeFunctions::filterInstsUnrelate
LLVM_DEBUG(BI->print(dbgs()));
LLVM_DEBUG(dbgs() << "\n");
}
- } else if (dyn_cast<TerminatorInst>(BI) == GEntryBlock->getTerminator()) {
+ } else if (BI->isTerminator() && &*BI == GEntryBlock->getTerminator()) {
LLVM_DEBUG(dbgs() << " Will Include Terminator: ");
LLVM_DEBUG(BI->print(dbgs()));
LLVM_DEBUG(dbgs() << "\n");
More information about the llvm-commits
mailing list