mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Use cached subtarget rather than looking it up on the
TargetMachine again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b7cd35b171
commit
c720405b2a
@ -57,7 +57,7 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM,
|
||||
GCModuleInfo *gmi)
|
||||
: Fn(F), Target(TM), STI(TM.getSubtargetImpl()), Ctx(mmi.getContext()),
|
||||
MMI(mmi), GMI(gmi) {
|
||||
if (TM.getSubtargetImpl()->getRegisterInfo())
|
||||
if (STI->getRegisterInfo())
|
||||
RegInfo = new (Allocator) MachineRegisterInfo(this);
|
||||
else
|
||||
RegInfo = nullptr;
|
||||
@ -72,15 +72,13 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM,
|
||||
getStackAlignment(AttributeSet::FunctionIndex));
|
||||
|
||||
ConstantPool = new (Allocator) MachineConstantPool(TM);
|
||||
Alignment =
|
||||
TM.getSubtargetImpl()->getTargetLowering()->getMinFunctionAlignment();
|
||||
Alignment = STI->getTargetLowering()->getMinFunctionAlignment();
|
||||
|
||||
// FIXME: Shouldn't use pref alignment if explicit alignment is set on Fn.
|
||||
if (!Fn->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
|
||||
Attribute::OptimizeForSize))
|
||||
Alignment = std::max(
|
||||
Alignment,
|
||||
TM.getSubtargetImpl()->getTargetLowering()->getPrefFunctionAlignment());
|
||||
Alignment = std::max(Alignment,
|
||||
STI->getTargetLowering()->getPrefFunctionAlignment());
|
||||
|
||||
FunctionNumber = FunctionNum;
|
||||
JumpTableInfo = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user