diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-24 18:25:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-24 18:25:27 +0000 |
commit | c1f9206c8c43d9c136b04eaa675525d57ac8af91 (patch) | |
tree | 38f952db22e6efda6bcf8e53baad0a50cab29525 /llvm/lib/Transforms/TransformInternals.h | |
parent | 364437e6a394d6a528c3b1301200753215742210 (diff) | |
download | bcm5719-llvm-c1f9206c8c43d9c136b04eaa675525d57ac8af91.tar.gz bcm5719-llvm-c1f9206c8c43d9c136b04eaa675525d57ac8af91.zip |
Make the levelraise pass be well behaved w.r.t the TargetData that the current
PassMAnager provides.
llvm-svn: 5896
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.h')
-rw-r--r-- | llvm/lib/Transforms/TransformInternals.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/TransformInternals.h b/llvm/lib/Transforms/TransformInternals.h index 867dd5d4abe..9f6eb7954bc 100644 --- a/llvm/lib/Transforms/TransformInternals.h +++ b/llvm/lib/Transforms/TransformInternals.h @@ -15,14 +15,6 @@ #include <map> #include <set> -// TargetData Hack: Eventually we will have annotations given to us by the -// backend so that we know stuff about type size and alignments. For now -// though, just use this, because it happens to match the model that GCC uses. -// -// FIXME: This should use annotations -// -extern const TargetData TD; - static inline int64_t getConstantValue(const ConstantInt *CPI) { if (const ConstantSInt *CSI = dyn_cast<ConstantSInt>(CPI)) return CSI->getValue(); @@ -49,6 +41,7 @@ static inline const CompositeType *getPointedToComposite(const Type *Ty) { // const Type *ConvertableToGEP(const Type *Ty, Value *V, std::vector<Value*> &Indices, + const TargetData &TD, BasicBlock::iterator *BI = 0); @@ -112,14 +105,18 @@ struct ValueMapCache { }; -bool ExpressionConvertableToType(Value *V, const Type *Ty, ValueTypeCache &Map); -Value *ConvertExpressionToType(Value *V, const Type *Ty, ValueMapCache &VMC); +bool ExpressionConvertableToType(Value *V, const Type *Ty, ValueTypeCache &Map, + const TargetData &TD); +Value *ConvertExpressionToType(Value *V, const Type *Ty, ValueMapCache &VMC, + const TargetData &TD); // ValueConvertableToType - Return true if it is possible bool ValueConvertableToType(Value *V, const Type *Ty, - ValueTypeCache &ConvertedTypes); + ValueTypeCache &ConvertedTypes, + const TargetData &TD); -void ConvertValueToNewType(Value *V, Value *NewVal, ValueMapCache &VMC); +void ConvertValueToNewType(Value *V, Value *NewVal, ValueMapCache &VMC, + const TargetData &TD); // getStructOffsetType - Return a vector of offsets that are to be used to index @@ -135,6 +132,6 @@ void ConvertValueToNewType(Value *V, Value *NewVal, ValueMapCache &VMC); // const Type *getStructOffsetType(const Type *Ty, unsigned &Offset, std::vector<Value*> &Offsets, - bool StopEarly = true); + const TargetData &TD, bool StopEarly = true); #endif |