diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-11-06 08:34:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-11-06 08:34:29 +0000 |
| commit | 0136101e37fc653ac94eddf6d365bcf801c1bc5f (patch) | |
| tree | 062c55920399f713afae6f7c3f3cea0cfb8d0a0b /llvm/lib/Transforms/TransformInternals.h | |
| parent | 4031cdde5741d6285706718ff7741af56048b7fd (diff) | |
| download | bcm5719-llvm-0136101e37fc653ac94eddf6d365bcf801c1bc5f.tar.gz bcm5719-llvm-0136101e37fc653ac94eddf6d365bcf801c1bc5f.zip | |
Fix bugs
llvm-svn: 1152
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.h')
| -rw-r--r-- | llvm/lib/Transforms/TransformInternals.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/TransformInternals.h b/llvm/lib/Transforms/TransformInternals.h index 5c753c506c0..94af20099ea 100644 --- a/llvm/lib/Transforms/TransformInternals.h +++ b/llvm/lib/Transforms/TransformInternals.h @@ -29,6 +29,14 @@ extern const TargetData TD; bool losslessCastableTypes(const Type *T1, const Type *T2); +// isFirstClassType - Return true if a value of the specified type can be held +// in a register. +// +static inline bool isFirstClassType(const Type *Ty) { + return Ty->isPrimitiveType() || Ty->isPointerType(); +} + + // ReplaceInstWithValue - Replace all uses of an instruction (specified by BI) // with a value, then remove and delete the original instruction. // @@ -51,7 +59,7 @@ struct ValueMapCache { // Operands mapped - Contains an entry if the first value (the user) has had // the second value (the operand) mapped already. // - set<pair<const User*, const Value*> > OperandsMapped; + set<const User*> OperandsMapped; // Expression Map - Contains an entry from the old value to the new value of // an expression that has been converted over. @@ -75,10 +83,7 @@ void ConvertUsersType(Value *V, Value *NewVal, ValueMapCache &VMC); class ValueHandle : public Instruction { ValueHandle(const ValueHandle &); // DO NOT IMPLEMENT public: - ValueHandle(Value *V) : Instruction(Type::VoidTy, UserOp1, "") { - Operands.push_back(Use(V, this)); - } - + ValueHandle(Value *V); ~ValueHandle(); virtual Instruction *clone() const { abort(); return 0; } |

