diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-01-25 01:18:18 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-01-25 01:18:18 +0000 |
commit | 4d67a2e85a39c798faf77e79076cde827c82c237 (patch) | |
tree | 7aec992a93f2eb3a14f0998c4a755eb42d835fb0 /llvm/lib/Analysis/TargetTransformInfo.cpp | |
parent | 955231ddf6cbb54f0931b78eb6e9b3f18438b5d4 (diff) | |
download | bcm5719-llvm-4d67a2e85a39c798faf77e79076cde827c82c237.tar.gz bcm5719-llvm-4d67a2e85a39c798faf77e79076cde827c82c237.zip |
Revert "Add Constant Hoisting Pass" (r200034)
This commit caused -Woverloaded-virtual warnings. The two new
TargetTransformInfo::getIntImmCost functions were only added to the superclass,
and to the X86 subclass. The other targets were not updated, and the
warning highlighted this by pointing out that e.g. ARMTTI::getIntImmCost was
hiding the two new getIntImmCost variants.
We could pacify the warning by adding "using TargetTransformInfo::getIntImmCost"
to the various subclasses, or turning it off, but I suspect that it's wrong to
leave the functions unimplemnted in those targets. The default implementations
return TCC_Free, which I don't think is right e.g. for ARM.
llvm-svn: 200058
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetTransformInfo.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index decb9aec4d9..360c4f5f1b1 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -158,16 +158,6 @@ 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); } @@ -551,17 +541,7 @@ struct NoTTI LLVM_FINAL : ImmutablePass, TargetTransformInfo { } unsigned getIntImmCost(const APInt &Imm, Type *Ty) const LLVM_OVERRIDE { - 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; + return 1; } unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE { |