/// by referencing its sub-register AX.
bool isTruncateFree(Type *Ty1, Type *Ty2) const;
- /// \brief Return true if it's free to zero extend a value of type Ty1 to type
- /// Ty2. e.g. on x86-64, all instructions that define 32-bit values implicit
- /// zero-extend the result out to 64 bits.
- bool isZExtFree(Type *Ty1, Type *Ty2) const;
-
/// \brief Return true if it is profitable to hoist instruction in the
/// then/else to before if.
bool isProfitableToHoist(Instruction *I) const;
int64_t BaseOffset, bool HasBaseReg,
int64_t Scale, unsigned AddrSpace) = 0;
virtual bool isTruncateFree(Type *Ty1, Type *Ty2) = 0;
- virtual bool isZExtFree(Type *Ty1, Type *Ty2) = 0;
virtual bool isProfitableToHoist(Instruction *I) = 0;
virtual bool isTypeLegal(Type *Ty) = 0;
virtual unsigned getJumpBufAlignment() = 0;
bool isTruncateFree(Type *Ty1, Type *Ty2) override {
return Impl.isTruncateFree(Ty1, Ty2);
}
- bool isZExtFree(Type *Ty1, Type *Ty2) override {
- return Impl.isZExtFree(Ty1, Ty2);
- }
bool isProfitableToHoist(Instruction *I) override {
return Impl.isProfitableToHoist(I);
}
return getTLI()->isTruncateFree(Ty1, Ty2);
}
- bool isZExtFree(Type *Ty1, Type *Ty2) const {
- return getTLI()->isZExtFree(Ty1, Ty2);
- }
-
bool isProfitableToHoist(Instruction *I) {
return getTLI()->isProfitableToHoist(I);
}
return TTIImpl->isTruncateFree(Ty1, Ty2);
}
-bool TargetTransformInfo::isZExtFree(Type *Ty1, Type *Ty2) const {
- return TTIImpl->isZExtFree(Ty1, Ty2);
-}
-
bool TargetTransformInfo::isProfitableToHoist(Instruction *I) const {
return TTIImpl->isProfitableToHoist(I);
}