diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-07-29 20:30:20 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-07-29 20:30:20 +0000 |
| commit | f128c11bdd3e4bae6253ba1d3416ccdc1f9d5dca (patch) | |
| tree | 136ab79b1e31e9fb4e71ea5d3347a8df20efbf50 | |
| parent | f8049f93c2830e8138d35105468a6a4e56b05e80 (diff) | |
| download | bcm5719-llvm-f128c11bdd3e4bae6253ba1d3416ccdc1f9d5dca.tar.gz bcm5719-llvm-f128c11bdd3e4bae6253ba1d3416ccdc1f9d5dca.zip | |
Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.
llvm-svn: 7398
| -rw-r--r-- | llvm/include/llvm/Target/TargetInstrInfo.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/include/llvm/Target/TargetInstrInfo.h b/llvm/include/llvm/Target/TargetInstrInfo.h index 8e8e0c08992..604aa59d3db 100644 --- a/llvm/include/llvm/Target/TargetInstrInfo.h +++ b/llvm/include/llvm/Target/TargetInstrInfo.h @@ -14,6 +14,7 @@ class MachineInstr; class TargetMachine; class Value; +class Type; class Instruction; class Constant; class Function; @@ -300,6 +301,21 @@ public: // 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 // GlobalValue, viz., the constant address of a global variable or function. |

