mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Delete all functions that are no longer needed in MipsFunctionInfo, including
the ones that get or set the frame index for the $gp save slot. Remove the piece of code in MipsFunctionInfo::getGlobalBaseReg() which returns GP. This function should always return a virtual register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,10 +22,6 @@ static cl::opt<bool>
|
||||
FixGlobalBaseReg("mips-fix-global-base-reg", cl::Hidden, cl::init(true),
|
||||
cl::desc("Always use $gp as the global base register."));
|
||||
|
||||
bool MipsFunctionInfo::globalBaseRegFixed() const {
|
||||
return FixGlobalBaseReg;
|
||||
}
|
||||
|
||||
bool MipsFunctionInfo::globalBaseRegSet() const {
|
||||
return GlobalBaseReg;
|
||||
}
|
||||
@@ -37,9 +33,6 @@ unsigned MipsFunctionInfo::getGlobalBaseReg() {
|
||||
|
||||
const MipsSubtarget &ST = MF.getTarget().getSubtarget<MipsSubtarget>();
|
||||
|
||||
if (FixGlobalBaseReg && ST.isABI_O32()) // $gp is the global base register.
|
||||
return GlobalBaseReg = Mips::GP;
|
||||
|
||||
const TargetRegisterClass *RC = ST.isABI_N64() ?
|
||||
(const TargetRegisterClass*)&Mips::CPU64RegsRegClass :
|
||||
(const TargetRegisterClass*)&Mips::CPURegsRegClass;
|
||||
|
Reference in New Issue
Block a user