summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-24 20:48:32 +0000
committerChris Lattner <sabre@nondot.org>2003-02-24 20:48:32 +0000
commit4869f3700e07d41bcc34f0b292161727db550716 (patch)
tree770746e7080004b495798ea83c801a2d50540f20 /llvm/lib/Transforms/Scalar
parent7606fb65c0f9dded7e1aa3f6be143e1deba19119 (diff)
downloadbcm5719-llvm-4869f3700e07d41bcc34f0b292161727db550716.tar.gz
bcm5719-llvm-4869f3700e07d41bcc34f0b292161727db550716.zip
Rename Instruction::hasSideEffects() -> mayWriteToMemory()
llvm-svn: 5620
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/ADCE.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp
index 24ccee60344..e7bc1357ffe 100644
--- a/llvm/lib/Transforms/Scalar/ADCE.cpp
+++ b/llvm/lib/Transforms/Scalar/ADCE.cpp
@@ -154,7 +154,7 @@ bool ADCE::doADCE() {
BBI != BBE; ++BBI) {
BasicBlock *BB = *BBI;
for (BasicBlock::iterator II = BB->begin(), EI = BB->end(); II != EI; ) {
- if (II->hasSideEffects() || II->getOpcode() == Instruction::Ret) {
+ if (II->mayWriteToMemory() || II->getOpcode() == Instruction::Ret) {
markInstructionLive(II);
++II; // Increment the inst iterator if the inst wasn't deleted
} else if (isInstructionTriviallyDead(II)) {
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 4212e6ae69f..df0a64188f3 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -74,7 +74,7 @@ unsigned Reassociate::getRank(Value *V) {
if (I->getOpcode() == Instruction::PHINode ||
I->getOpcode() == Instruction::Alloca ||
I->getOpcode() == Instruction::Malloc || isa<TerminatorInst>(I) ||
- I->hasSideEffects())
+ I->mayWriteToMemory()) // Cannot move inst if it writes to memory!
return RankMap[I->getParent()];
unsigned &CachedRank = InstRankMap[I];
OpenPOWER on IntegriCloud