[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalConstifier.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Feb 27 12:10:01 PST 2004


Changes in directory llvm/lib/Transforms/IPO:

GlobalConstifier.cpp updated: 1.1 -> 1.2

---
Log message:

setcond instructions don't have aliasing implications.


---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/Transforms/IPO/GlobalConstifier.cpp
diff -u llvm/lib/Transforms/IPO/GlobalConstifier.cpp:1.1 llvm/lib/Transforms/IPO/GlobalConstifier.cpp:1.2
--- llvm/lib/Transforms/IPO/GlobalConstifier.cpp:1.1	Wed Feb 25 15:34:36 2004
+++ llvm/lib/Transforms/IPO/GlobalConstifier.cpp	Fri Feb 27 12:09:25 2004
@@ -20,7 +20,7 @@
 
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Constants.h"
-#include "llvm/iMemory.h"
+#include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Pass.h"
 #include "Support/Debug.h"
@@ -57,7 +57,7 @@
     } else if (Instruction *I = dyn_cast<Instruction>(*UI)) {
       if (I->getOpcode() == Instruction::GetElementPtr) {
         if (isStoredThrough(I)) return true;
-      } else if (!isa<LoadInst>(*UI))
+      } else if (!isa<LoadInst>(*UI) && !isa<SetCondInst>(*UI))
         return true;  // Any other non-load instruction might store!
     } else {
       // Otherwise must be a global or some other user.





More information about the llvm-commits mailing list