[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrSelection.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 12 12:09:02 PST 2004


Changes in directory llvm/lib/Target/Sparc:

SparcInstrSelection.cpp updated: 1.129 -> 1.130

---
Log message:

Eliminate use of ConstantHandling itf


---
Diffs of the changes:  (+4 -5)

Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.129 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.130
--- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.129	Sun Dec 28 03:46:33 2003
+++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp	Mon Jan 12 12:08:18 2004
@@ -12,7 +12,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Constants.h"
-#include "llvm/ConstantHandling.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Instructions.h"
 #include "llvm/Intrinsics.h"
@@ -56,7 +55,7 @@
 
 
 // Check for a constant 0.
-inline bool
+static inline bool
 IsZero(Value* idx)
 {
   return (idx == ConstantSInt::getNullValue(idx->getType()));
@@ -896,9 +895,9 @@
   Value* constOp;
   if (isa<Constant>(lval) && isa<Constant>(rval)) {
     // both operands are constant: evaluate and "set" in dest
-    Constant* P = ConstantFoldBinaryInstruction(Instruction::Mul,
-                                                cast<Constant>(lval),
-                                                cast<Constant>(rval));
+    Constant* P = ConstantExpr::get(Instruction::Mul,
+                                    cast<Constant>(lval),
+                                    cast<Constant>(rval));
     target.getInstrInfo().CreateCodeToLoadConst(target,F,P,destVal,mvec,mcfi);
   }
   else if (isa<Constant>(rval))         // rval is constant, but not lval





More information about the llvm-commits mailing list