From 82da52299c7f25c6856c1cd5e3e46bbb40427ffb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Sep 2005 19:31:44 +0000 Subject: [PATCH] This code is no longer needed, it is moved to the target-indep code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23332 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Alpha/AlphaISelPattern.cpp | 24 ------------------------ lib/Target/X86/X86ISelPattern.cpp | 25 ------------------------- 2 files changed, 49 deletions(-) diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index 8a377d056a1..1a20b2951df 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/lib/Target/Alpha/AlphaISelPattern.cpp @@ -116,8 +116,6 @@ public: CCInvMap.clear(); } - virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF); - unsigned SelectExpr(SDOperand N); void Select(SDOperand N); @@ -135,28 +133,6 @@ public: }; } -void AlphaISel::EmitFunctionEntryCode(Function &Fn, MachineFunction &MF) { - // If this function has live-in values, emit the copies from pregs to vregs at - // the top of the function, before anything else. - MachineBasicBlock *BB = MF.begin(); - if (MF.livein_begin() != MF.livein_end()) { - SSARegMap *RegMap = MF.getSSARegMap(); - for (MachineFunction::livein_iterator LI = MF.livein_begin(), - E = MF.livein_end(); LI != E; ++LI) { - const TargetRegisterClass *RC = RegMap->getRegClass(LI->second); - if (RC == Alpha::GPRCRegisterClass) { - BuildMI(BB, Alpha::BIS, 2, LI->second).addReg(LI->first) - .addReg(LI->first); - } else if (RC == Alpha::FPRCRegisterClass) { - BuildMI(BB, Alpha::CPYS, 2, LI->second).addReg(LI->first) - .addReg(LI->first); - } else { - assert(0 && "Unknown regclass!"); - } - } - } -} - static bool isSIntImmediate(SDOperand N, int64_t& Imm) { // test for constant if (ConstantSDNode *CN = dyn_cast(N)) { diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp index deddd1ddf31..536f2645a46 100644 --- a/lib/Target/X86/X86ISelPattern.cpp +++ b/lib/Target/X86/X86ISelPattern.cpp @@ -1156,31 +1156,6 @@ static void EmitSpecialCodeForMain(MachineBasicBlock *BB, } void ISel::EmitFunctionEntryCode(Function &Fn, MachineFunction &MF) { - // If this function has live-in values, emit the copies from pregs to vregs at - // the top of the function, before anything else. - MachineBasicBlock *BB = MF.begin(); - if (MF.livein_begin() != MF.livein_end()) { - SSARegMap *RegMap = MF.getSSARegMap(); - for (MachineFunction::livein_iterator LI = MF.livein_begin(), - E = MF.livein_end(); LI != E; ++LI) { - const TargetRegisterClass *RC = RegMap->getRegClass(LI->second); - if (RC == X86::R8RegisterClass) { - BuildMI(BB, X86::MOV8rr, 1, LI->second).addReg(LI->first); - } else if (RC == X86::R16RegisterClass) { - BuildMI(BB, X86::MOV16rr, 1, LI->second).addReg(LI->first); - } else if (RC == X86::R32RegisterClass) { - BuildMI(BB, X86::MOV32rr, 1, LI->second).addReg(LI->first); - } else if (RC == X86::RFPRegisterClass) { - BuildMI(BB, X86::FpMOV, 1, LI->second).addReg(LI->first); - } else if (RC == X86::RXMMRegisterClass) { - BuildMI(BB, X86::MOVAPDrr, 1, LI->second).addReg(LI->first); - } else { - assert(0 && "Unknown regclass!"); - } - } - } - - // If this is main, emit special code for main. if (Fn.hasExternalLinkage() && Fn.getName() == "main") EmitSpecialCodeForMain(BB, MF.getFrameInfo());