projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb80b6e
)
Don't delete volatile loads. Doing so is not safe.
author
Owen Anderson
<resistor@mac.com>
Mon, 23 Jul 2007 22:05:54 +0000
(22:05 +0000)
committer
Owen Anderson
<resistor@mac.com>
Mon, 23 Jul 2007 22:05:54 +0000
(22:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40448
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/FastDLE.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/FastDLE.cpp
b/lib/Transforms/Scalar/FastDLE.cpp
index 001f834b5f0bdb80ef28b76ff857abc0a6484912..74712ad83fe0f6a41c1aa0f232f4c5b73e78d3b8 100644
(file)
--- a/
lib/Transforms/Scalar/FastDLE.cpp
+++ b/
lib/Transforms/Scalar/FastDLE.cpp
@@
-69,6
+69,12
@@
bool FDLE::runOnBasicBlock(BasicBlock &BB) {
for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) {
// If we find a store or a free...
if (LoadInst* L = dyn_cast<LoadInst>(BBI)) {
+ // We can't delete volatile loads
+ if (L->isVolatile()) {
+ lastLoad[L->getPointerOperand()] = L;
+ continue;
+ }
+
Value* pointer = L->getPointerOperand();
LoadInst*& last = lastLoad[pointer];