From 850420cd14a1cd4c765cf8a46e47670b912f7bbc Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 29 Jan 2015 23:09:37 +0000 Subject: [PATCH] x86: Remove the W64ALLOCA pseudo This is just an alias for CALL64pcrel32, and we can just use that opcode with explicit defs in the MI. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227508 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86FrameLowering.cpp | 2 +- lib/Target/X86/X86ISelLowering.cpp | 4 ++-- lib/Target/X86/X86InstrControl.td | 12 ------------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp index 4cccfa26be4..37ac4651e84 100644 --- a/lib/Target/X86/X86FrameLowering.cpp +++ b/lib/Target/X86/X86FrameLowering.cpp @@ -415,7 +415,7 @@ void X86FrameLowering::getStackProbeFunction(const MachineFunction &MF, if (STI.is64Bit()) CallOp = MF.getTarget().getCodeModel() == CodeModel::Large ? X86::CALL64r - : X86::W64ALLOCA; + : X86::CALL64pcrel32; else CallOp = X86::CALLpcrel32; diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 3247299f00a..bb6c919d03c 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -21070,7 +21070,7 @@ X86TargetLowering::EmitLoweredWinAlloca(MachineInstr *MI, // ___chkstk(Mingw64): // Clobbers R10, R11, RAX and EFLAGS. // Updates RSP. - BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA)) + BuildMI(*BB, MI, DL, TII->get(X86::CALL64pcrel32)) .addExternalSymbol("___chkstk") .addReg(X86::RAX, RegState::Implicit) .addReg(X86::RSP, RegState::Implicit) @@ -21080,7 +21080,7 @@ X86TargetLowering::EmitLoweredWinAlloca(MachineInstr *MI, } else { // __chkstk(MSVCRT): does not update stack pointer. // Clobbers R10, R11 and EFLAGS. - BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA)) + BuildMI(*BB, MI, DL, TII->get(X86::CALL64pcrel32)) .addExternalSymbol("__chkstk") .addReg(X86::RAX, RegState::Implicit) .addReg(X86::EFLAGS, RegState::Define | RegState::Implicit); diff --git a/lib/Target/X86/X86InstrControl.td b/lib/Target/X86/X86InstrControl.td index 7baff19e51a..e1c36a82119 100644 --- a/lib/Target/X86/X86InstrControl.td +++ b/lib/Target/X86/X86InstrControl.td @@ -278,18 +278,6 @@ let isCall = 1, Uses = [RSP], SchedRW = [WriteJump] in { "lcall{q}\t{*}$dst", [], IIC_CALL_FAR_MEM>; } -let isCall = 1, isCodeGenOnly = 1 in - // __chkstk(MSVC): clobber R10, R11 and EFLAGS - // ___chkstk_ms(Mingw64): clobber R10, R11 and EFLAGS - // ___chkstk(Mingw64): clobber R10, R11, RAX and EFLAGS, and update RSP. - let Defs = [RAX, R10, R11, RSP, EFLAGS], - Uses = [RSP] in { - def W64ALLOCA : Ii32PCRel<0xE8, RawFrm, - (outs), (ins i64i32imm_pcrel:$dst), - "call{q}\t$dst", [], IIC_CALL_RI>, - Requires<[IsWin64]>, Sched<[WriteJump]>; - } - let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, isCodeGenOnly = 1, Uses = [RSP], usesCustomInserter = 1, SchedRW = [WriteJump] in { -- 2.34.1