mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211689 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e5582cc15
commit
2fc4d9923f
@ -530,10 +530,9 @@ int MachineFrameInfo::CreateStackObject(uint64_t Size, unsigned Alignment,
|
||||
///
|
||||
int MachineFrameInfo::CreateSpillStackObject(uint64_t Size,
|
||||
unsigned Alignment) {
|
||||
Alignment =
|
||||
clampStackAlignment(!getFrameLowering()->isStackRealignable() ||
|
||||
!RealignOption,
|
||||
Alignment, getFrameLowering()->getStackAlignment());
|
||||
Alignment = clampStackAlignment(
|
||||
!getFrameLowering()->isStackRealignable() || !RealignOption, Alignment,
|
||||
getFrameLowering()->getStackAlignment());
|
||||
CreateStackObject(Size, Alignment, true);
|
||||
int Index = (int)Objects.size() - NumFixedObjects - 1;
|
||||
ensureMaxAlignment(Alignment);
|
||||
@ -548,10 +547,9 @@ int MachineFrameInfo::CreateSpillStackObject(uint64_t Size,
|
||||
int MachineFrameInfo::CreateVariableSizedObject(unsigned Alignment,
|
||||
const AllocaInst *Alloca) {
|
||||
HasVarSizedObjects = true;
|
||||
Alignment =
|
||||
clampStackAlignment(!getFrameLowering()->isStackRealignable() ||
|
||||
!RealignOption,
|
||||
Alignment, getFrameLowering()->getStackAlignment());
|
||||
Alignment = clampStackAlignment(
|
||||
!getFrameLowering()->isStackRealignable() || !RealignOption, Alignment,
|
||||
getFrameLowering()->getStackAlignment());
|
||||
Objects.push_back(StackObject(0, Alignment, 0, false, false, Alloca));
|
||||
ensureMaxAlignment(Alignment);
|
||||
return (int)Objects.size()-NumFixedObjects-1;
|
||||
@ -571,10 +569,9 @@ int MachineFrameInfo::CreateFixedObject(uint64_t Size, int64_t SPOffset,
|
||||
// object is 16-byte aligned.
|
||||
unsigned StackAlign = getFrameLowering()->getStackAlignment();
|
||||
unsigned Align = MinAlign(SPOffset, StackAlign);
|
||||
Align =
|
||||
clampStackAlignment(!getFrameLowering()->isStackRealignable() ||
|
||||
!RealignOption,
|
||||
Align, getFrameLowering()->getStackAlignment());
|
||||
Align = clampStackAlignment(!getFrameLowering()->isStackRealignable() ||
|
||||
!RealignOption,
|
||||
Align, getFrameLowering()->getStackAlignment());
|
||||
Objects.insert(Objects.begin(), StackObject(Size, Align, SPOffset, Immutable,
|
||||
/*isSS*/ false,
|
||||
/*Alloca*/ nullptr));
|
||||
@ -852,8 +849,7 @@ static bool CanShareConstantPoolEntry(const Constant *A, const Constant *B,
|
||||
|
||||
// For now, only support constants with the same size.
|
||||
uint64_t StoreSize = TD->getTypeStoreSize(A->getType());
|
||||
if (StoreSize != TD->getTypeStoreSize(B->getType()) ||
|
||||
StoreSize > 128)
|
||||
if (StoreSize != TD->getTypeStoreSize(B->getType()) || StoreSize > 128)
|
||||
return false;
|
||||
|
||||
Type *IntTy = IntegerType::get(A->getContext(), StoreSize*8);
|
||||
|
@ -997,9 +997,9 @@ bool X86FrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
|
||||
// Push GPRs. It increases frame size.
|
||||
unsigned Opc = STI.is64Bit() ? X86::PUSH64r : X86::PUSH32r;
|
||||
for (unsigned i = CSI.size(); i != 0; --i) {
|
||||
unsigned Reg = CSI[i-1].getReg();
|
||||
if (!X86::GR64RegClass.contains(Reg) &&
|
||||
!X86::GR32RegClass.contains(Reg))
|
||||
unsigned Reg = CSI[i - 1].getReg();
|
||||
|
||||
if (!X86::GR64RegClass.contains(Reg) && !X86::GR32RegClass.contains(Reg))
|
||||
continue;
|
||||
// Add the callee-saved register as live-in. It's killed at the spill.
|
||||
MBB.addLiveIn(Reg);
|
||||
@ -1024,8 +1024,9 @@ bool X86FrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
|
||||
// Add the callee-saved register as live-in. It's killed at the spill.
|
||||
MBB.addLiveIn(Reg);
|
||||
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg);
|
||||
TII.storeRegToStackSlot(MBB, MI, Reg, true, CSI[i-1].getFrameIdx(),
|
||||
RC, TRI);
|
||||
|
||||
TII.storeRegToStackSlot(MBB, MI, Reg, true, CSI[i - 1].getFrameIdx(), RC,
|
||||
TRI);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1050,9 +1051,9 @@ bool X86FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
|
||||
if (X86::GR64RegClass.contains(Reg) ||
|
||||
X86::GR32RegClass.contains(Reg))
|
||||
continue;
|
||||
|
||||
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg);
|
||||
TII.loadRegFromStackSlot(MBB, MI, Reg, CSI[i].getFrameIdx(),
|
||||
RC, TRI);
|
||||
TII.loadRegFromStackSlot(MBB, MI, Reg, CSI[i].getFrameIdx(), RC, TRI);
|
||||
}
|
||||
|
||||
// POP GPRs.
|
||||
|
Loading…
x
Reference in New Issue
Block a user