[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Reid Spencer
reid at x10sys.com
Fri Jan 12 15:30:47 PST 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
TargetLowering.cpp updated: 1.85 -> 1.86
---
Log message:
Move a function out of line.
---
Diffs of the changes: (+21 -0)
TargetLowering.cpp | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.85 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.86
--- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.85 Fri Jan 12 16:51:10 2007
+++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Fri Jan 12 17:30:31 2007
@@ -1741,3 +1741,24 @@
DAG.getConstant(magics.s-1, getShiftAmountTy()));
}
}
+
+MVT::ValueType TargetLowering::getValueType(const Type *Ty) const {
+ switch (Ty->getTypeID()) {
+ default: assert(0 && "Unknown type!");
+ case Type::VoidTyID: return MVT::isVoid;
+ case Type::IntegerTyID:
+ switch (cast<IntegerType>(Ty)->getBitWidth()) {
+ default: assert(0 && "Invalid width for value type");
+ case 1: return MVT::i1;
+ case 8: return MVT::i8;
+ case 16: return MVT::i16;
+ case 32: return MVT::i32;
+ case 64: return MVT::i64;
+ }
+ break;
+ case Type::FloatTyID: return MVT::f32;
+ case Type::DoubleTyID: return MVT::f64;
+ case Type::PointerTyID: return PointerTy;
+ case Type::PackedTyID: return MVT::Vector;
+ }
+}
More information about the llvm-commits
mailing list