[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp
    Brian Gaeke 
    gaeke at cs.uiuc.edu
       
    Tue Jul 27 14:11:30 PDT 2004
    
    
  
Changes in directory llvm/lib/Target/SparcV9:
SparcV9PreSelection.cpp updated: 1.37 -> 1.38
---
Log message:
This was the only user of TargetInstrInfo::ConstantTypeMustBeLoaded().
---
Diffs of the changes:  (+5 -1)
Index: llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp:1.37 llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp:1.38
--- llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp:1.37	Tue Jul 27 12:43:23 2004
+++ llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp	Tue Jul 27 16:11:20 2004
@@ -154,6 +154,10 @@
     }
 }
 
+static inline bool ConstantTypeMustBeLoaded(const Type* CVT) {
+  assert(CVT->isPrimitiveType() || isa<PointerType>(CVT));
+  return !(CVT->isIntegral() || isa<PointerType>(CVT));
+}
 
 //------------------------------------------------------------------------------
 // Instruction visitor methods to perform instruction-specific operations
@@ -177,7 +181,7 @@
     // load-time constant: factor it out so we optimize as best we can
     Instruction* computeConst = DecomposeConstantExpr(CE, insertBefore);
     I.setOperand(opNum, computeConst); // replace expr operand with result
-  } else if (instrInfo.ConstantTypeMustBeLoaded(CV)) {
+  } else if (ConstantTypeMustBeLoaded(CV->getType())) {
     // load address of constant into a register, then load the constant
     // this is now done during instruction selection
     // the constant will live in the MachineConstantPool later on
    
    
More information about the llvm-commits
mailing list