mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Split TargetLowering into a CodeGen and a SelectionDAG part.
This fixes some of the cycles between libCodeGen and libSelectionDAG. It's still a complete mess but as long as the edges consist of virtual call it doesn't cause breakage. BasicTTI did static calls and thus broke some build configurations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -26,7 +26,7 @@ using namespace llvm;
|
||||
namespace {
|
||||
|
||||
class BasicTTI : public ImmutablePass, public TargetTransformInfo {
|
||||
const TargetLowering *TLI;
|
||||
const TargetLoweringBase *TLI;
|
||||
|
||||
/// Estimate the overhead of scalarizing an instruction. Insert and Extract
|
||||
/// are set if the result needs to be inserted and/or extracted from vectors.
|
||||
@ -37,7 +37,7 @@ public:
|
||||
llvm_unreachable("This pass cannot be directly constructed");
|
||||
}
|
||||
|
||||
BasicTTI(const TargetLowering *TLI) : ImmutablePass(ID), TLI(TLI) {
|
||||
BasicTTI(const TargetLoweringBase *TLI) : ImmutablePass(ID), TLI(TLI) {
|
||||
initializeBasicTTIPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ INITIALIZE_AG_PASS(BasicTTI, TargetTransformInfo, "basictti",
|
||||
char BasicTTI::ID = 0;
|
||||
|
||||
ImmutablePass *
|
||||
llvm::createBasicTargetTransformInfoPass(const TargetLowering *TLI) {
|
||||
llvm::createBasicTargetTransformInfoPass(const TargetLoweringBase *TLI) {
|
||||
return new BasicTTI(TLI);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ bool BasicTTI::isLegalICmpImmediate(int64_t imm) const {
|
||||
bool BasicTTI::isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
|
||||
int64_t BaseOffset, bool HasBaseReg,
|
||||
int64_t Scale) const {
|
||||
TargetLowering::AddrMode AM;
|
||||
TargetLoweringBase::AddrMode AM;
|
||||
AM.BaseGV = BaseGV;
|
||||
AM.BaseOffs = BaseOffset;
|
||||
AM.HasBaseReg = HasBaseReg;
|
||||
|
Reference in New Issue
Block a user