summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2018-08-26 09:51:22 +0000
committerChandler Carruth <chandlerc@gmail.com>2018-08-26 09:51:22 +0000
commit9ae926b973e42633f7bc7db39b33241dbb9f2158 (patch)
tree032f0dabf8a90e9c14cd3f96b32ec6cc117609e0 /llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
parentd38d9505d1bf380a67bccc6f5a29019394c1fd43 (diff)
downloadbcm5719-llvm-9ae926b973e42633f7bc7db39b33241dbb9f2158.tar.gz
bcm5719-llvm-9ae926b973e42633f7bc7db39b33241dbb9f2158.zip
[IR] Replace `isa<TerminatorInst>` with `isTerminator()`.
This is a bit awkward in a handful of places where we didn't even have an instruction and now we have to see if we can build one. But on the whole, this seems like a win and at worst a reasonable cost for removing `TerminatorInst`. All of this is part of the removal of `TerminatorInst` from the `Instruction` type hierarchy. llvm-svn: 340701
Diffstat (limited to 'llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index 0e430eab6b2..6e858d61fef 100644
--- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -398,7 +398,7 @@ Instruction *MemCpyOptPass::tryMergingIntoMemset(Instruction *StartInst,
MemsetRanges Ranges(DL);
BasicBlock::iterator BI(StartInst);
- for (++BI; !isa<TerminatorInst>(BI); ++BI) {
+ for (++BI; !BI->isTerminator(); ++BI) {
if (!isa<StoreInst>(BI) && !isa<MemSetInst>(BI)) {
// If the instruction is readnone, ignore it, otherwise bail out. We
// don't even allow readonly here because we don't want something like:
OpenPOWER on IntegriCloud