summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instruction.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-12-05 21:03:28 +0000
committerDuncan Sands <baldrick@free.fr>2007-12-05 21:03:28 +0000
commitabba5e218c930f15753fa305479b16d141ebd751 (patch)
tree897315d582d0279a3281fa6c2e836c26587079ea /llvm/lib/VMCore/Instruction.cpp
parent2968476c2d5a8c0430b6276ef58d9d15d02b33ba (diff)
downloadbcm5719-llvm-abba5e218c930f15753fa305479b16d141ebd751.tar.gz
bcm5719-llvm-abba5e218c930f15753fa305479b16d141ebd751.zip
Commit 44487 broke bootstrap of llvm-gcc-4.2. It is
not yet clear why, but in the meantime work around the problem by making less use of readnone/readonly info. llvm-svn: 44626
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r--llvm/lib/VMCore/Instruction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index 9b208854ba1..7fc6245f6da 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/lib/VMCore/Instruction.cpp
@@ -13,6 +13,7 @@
#include "llvm/Type.h"
#include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h" // FIXME: remove
#include "llvm/Function.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/LeakDetector.h"
@@ -208,6 +209,8 @@ bool Instruction::mayWriteToMemory() const {
case Instruction::VAArg:
return true;
case Instruction::Call:
+ if (!isa<IntrinsicInst>(this))
+ return true; // FIXME: workaround gcc bootstrap breakage
return !cast<CallInst>(this)->onlyReadsMemory();
case Instruction::Load:
return cast<LoadInst>(this)->isVolatile();
OpenPOWER on IntegriCloud