mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Revert "Revert "Add Constant Hoisting Pass" (r200034)"
This reverts commit r200058 and adds the using directive for ARMTargetTransformInfo to silence two g++ overload warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200062 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -158,6 +158,16 @@ unsigned TargetTransformInfo::getIntImmCost(const APInt &Imm, Type *Ty) const {
|
||||
return PrevTTI->getIntImmCost(Imm, Ty);
|
||||
}
|
||||
|
||||
unsigned TargetTransformInfo::getIntImmCost(unsigned Opcode, const APInt &Imm,
|
||||
Type *Ty) const {
|
||||
return PrevTTI->getIntImmCost(Opcode, Imm, Ty);
|
||||
}
|
||||
|
||||
unsigned TargetTransformInfo::getIntImmCost(Intrinsic::ID IID, const APInt &Imm,
|
||||
Type *Ty) const {
|
||||
return PrevTTI->getIntImmCost(IID, Imm, Ty);
|
||||
}
|
||||
|
||||
unsigned TargetTransformInfo::getNumberOfRegisters(bool Vector) const {
|
||||
return PrevTTI->getNumberOfRegisters(Vector);
|
||||
}
|
||||
@@ -541,7 +551,17 @@ struct NoTTI LLVM_FINAL : ImmutablePass, TargetTransformInfo {
|
||||
}
|
||||
|
||||
unsigned getIntImmCost(const APInt &Imm, Type *Ty) const LLVM_OVERRIDE {
|
||||
return 1;
|
||||
return TCC_Basic;
|
||||
}
|
||||
|
||||
unsigned getIntImmCost(unsigned Opcode, const APInt &Imm,
|
||||
Type *Ty) const LLVM_OVERRIDE {
|
||||
return TCC_Free;
|
||||
}
|
||||
|
||||
unsigned getIntImmCost(Intrinsic::ID IID, const APInt &Imm,
|
||||
Type *Ty) const LLVM_OVERRIDE {
|
||||
return TCC_Free;
|
||||
}
|
||||
|
||||
unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE {
|
||||
|
Reference in New Issue
Block a user