[llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h

Vikram Adve vadve at cs.uiuc.edu
Tue Jul 29 15:31:02 PDT 2003


Changes in directory llvm/include/llvm/Target:

TargetInstrInfo.h updated: 1.48 -> 1.49

---
Log message:

Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.


---
Diffs of the changes:

Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.48 llvm/include/llvm/Target/TargetInstrInfo.h:1.49
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.48	Fri Jul 25 12:58:41 2003
+++ llvm/include/llvm/Target/TargetInstrInfo.h	Tue Jul 29 15:30:20 2003
@@ -14,6 +14,7 @@
 class MachineInstr;
 class TargetMachine;
 class Value;
+class Type;
 class Instruction;
 class Constant;
 class Function;
@@ -299,6 +300,21 @@
   // Create* methods below should be moved to a machine code generation class
   // 
   virtual MachineOpCode getNOPOpCode() const { abort(); }
+
+  // Get the value of an integral constant in the form that must
+  // be put into the machine register.  The specified constant is interpreted
+  // as (i.e., converted if necessary to) the specified destination type.  The
+  // result is always returned as an uint64_t, since the representation of
+  // int64_t and uint64_t are identical.  The argument can be any known const.
+  // 
+  // isValidConstant is set to true if a valid constant was found.
+  // 
+  virtual uint64_t ConvertConstantToIntType(const TargetMachine &target,
+                                            const Value *V,
+                                            const Type *destType,
+                                            bool  &isValidConstant) const {
+    abort();
+  }
 
   // Create an instruction sequence to put the constant `val' into
   // the virtual register `dest'.  `val' may be a Constant or a





More information about the llvm-commits mailing list