summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-25 05:49:37 +0000
committerChris Lattner <sabre@nondot.org>2005-03-25 05:49:37 +0000
commit8d9f3735cd7cd5845b36e59da2be6cb4ffd6c3cb (patch)
treecce5eb5cd226897ef491c17f7c68a0466fb98cc0 /llvm/lib
parentb99c93c93bc4058d3e3f1270aad520a9ebc535b3 (diff)
downloadbcm5719-llvm-8d9f3735cd7cd5845b36e59da2be6cb4ffd6c3cb.tar.gz
bcm5719-llvm-8d9f3735cd7cd5845b36e59da2be6cb4ffd6c3cb.zip
Treat free operations as volatile, since they cannot be moved. This fixes
Transforms/LICM/2005-03-24-LICM-Aggregate-Crash.ll llvm-svn: 20830
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/AliasSetTracker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index 4b36f4089c2..73baf4a1b1e 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -288,6 +288,9 @@ bool AliasSetTracker::add(FreeInst *FI) {
bool NewPtr;
AliasSet &AS = addPointer(FI->getOperand(0), ~0,
AliasSet::Mods, NewPtr);
+
+ // Free operations are volatile ops (cannot be moved).
+ AS.setVolatile();
return NewPtr;
}
OpenPOWER on IntegriCloud