oops, forgot to load GP for indirect calls, though the old code now commented
[oota-llvm.git] / lib / Analysis / AliasSetTracker.cpp
index 4b36f4089c21cf2c343175af0d4a190d166c592c..9ae4044b0e01297aa78f350a67d814c5d0b594de 100644 (file)
@@ -1,14 +1,14 @@
 //===- AliasSetTracker.cpp - Alias Sets Tracker implementation-------------===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the AliasSetTracker and AliasSet classes.
-// 
+//
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Analysis/AliasSetTracker.h"
@@ -53,7 +53,7 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST) {
     CallSites.insert(CallSites.end(), AS.CallSites.begin(), AS.CallSites.end());
     AS.CallSites.clear();
   }
-  
+
   AS.Forward = this;  // Forward across AS now...
   addRef();           // AS is now pointing to us...
 
@@ -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;
 }
 
@@ -503,7 +506,7 @@ void AliasSet::print(std::ostream &OS) const {
     for (unsigned i = 0, e = CallSites.size(); i != e; ++i) {
       if (i) OS << ", ";
       WriteAsOperand(OS, CallSites[i].getCalledValue());
-    }      
+    }
   }
   OS << "\n";
 }