[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Jun 10 21:09:01 PDT 2004
Changes in directory llvm/lib/Target/SparcV9:
SparcV9InstrInfo.cpp updated: 1.65 -> 1.66
---
Log message:
Turn loads of ConstantPointerNulls into loads of zero... don't spill
them into the constant pool.
---
Diffs of the changes: (+6 -0)
Index: llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp:1.65 llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp:1.66
--- llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp:1.65 Wed Jun 2 00:54:42 2004
+++ llvm/lib/Target/SparcV9/SparcV9InstrInfo.cpp Thu Jun 10 21:03:48 2004
@@ -74,6 +74,12 @@
return (uint64_t) CB->getValue();
}
+ // ConstantPointerNull: it's really just a big, shiny version of zero.
+ if (const ConstantPointerNull *CPN = dyn_cast<ConstantPointerNull>(V)) {
+ isValidConstant = true;
+ return 0;
+ }
+
// For other types of constants, some conversion may be needed.
// First, extract the constant operand according to its own type
if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
More information about the llvm-commits
mailing list