return PrevTTI->isLoweredToCall(F);
}
-bool TargetTransformInfo::getUnrollingPreferences(
+void TargetTransformInfo::getUnrollingPreferences(Loop *L,
UnrollingPreferences &UP) const {
- return PrevTTI->getUnrollingPreferences(UP);
+ PrevTTI->getUnrollingPreferences(L, UP);
}
bool TargetTransformInfo::isLegalAddImmediate(int64_t Imm) const {
return PrevTTI->getAddressComputationCost(Tp, IsComplex);
}
+unsigned TargetTransformInfo::getReductionCost(unsigned Opcode, Type *Ty,
+ bool IsPairwise) const {
+ return PrevTTI->getReductionCost(Opcode, Ty, IsPairwise);
+}
+
namespace {
struct NoTTI : ImmutablePass, TargetTransformInfo {
return true;
}
- virtual bool getUnrollingPreferences(UnrollingPreferences &) const {
- return false;
- }
+ void getUnrollingPreferences(Loop *, UnrollingPreferences &) const { }
bool isLegalAddImmediate(int64_t Imm) const {
return false;
unsigned getAddressComputationCost(Type *Tp, bool) const {
return 0;
}
+
+ unsigned getReductionCost(unsigned, Type *, bool) const {
+ return 1;
+ }
};
} // end anonymous namespace