mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 22:50:47 +00:00
PTX: Cleanup unused code in the PTXMFInfoExtract pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140374 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c19e12d28
commit
04b5ebc74c
@ -52,37 +52,6 @@ bool PTXMFInfoExtract::runOnMachineFunction(MachineFunction &MF) {
|
||||
PTXMachineFunctionInfo *MFI = MF.getInfo<PTXMachineFunctionInfo>();
|
||||
MachineRegisterInfo &MRI = MF.getRegInfo();
|
||||
|
||||
DEBUG(dbgs() << "******** PTX FUNCTION LOCAL VAR REG DEF ********\n");
|
||||
|
||||
DEBUG(dbgs()
|
||||
<< "PTX::NoRegister == " << PTX::NoRegister << "\n"
|
||||
<< "PTX::NUM_TARGET_REGS == " << PTX::NUM_TARGET_REGS << "\n");
|
||||
|
||||
DEBUG(for (unsigned reg = PTX::NoRegister + 1;
|
||||
reg < PTX::NUM_TARGET_REGS; ++reg)
|
||||
if (MRI.isPhysRegUsed(reg))
|
||||
dbgs() << "Used Reg: " << reg << "\n";);
|
||||
|
||||
// FIXME: This is a slow linear scanning
|
||||
for (unsigned reg = PTX::NoRegister + 1; reg < PTX::NUM_TARGET_REGS; ++reg)
|
||||
if (MRI.isPhysRegUsed(reg) &&
|
||||
//!MFI->isRetReg(reg) &&
|
||||
(MFI->isKernel() || !MFI->isArgReg(reg)))
|
||||
MFI->addLocalVarReg(reg);
|
||||
|
||||
// Notify MachineFunctionInfo that I've done adding local var reg
|
||||
MFI->doneAddLocalVar();
|
||||
|
||||
DEBUG(for (PTXMachineFunctionInfo::reg_iterator
|
||||
i = MFI->argRegBegin(), e = MFI->argRegEnd();
|
||||
i != e; ++i)
|
||||
dbgs() << "Arg Reg: " << *i << "\n";);
|
||||
|
||||
DEBUG(for (PTXMachineFunctionInfo::reg_iterator
|
||||
i = MFI->localVarRegBegin(), e = MFI->localVarRegEnd();
|
||||
i != e; ++i)
|
||||
dbgs() << "Local Var Reg: " << *i << "\n";);
|
||||
|
||||
// Generate list of all virtual registers used in this function
|
||||
for (unsigned i = 0; i < MRI.getNumVirtRegs(); ++i) {
|
||||
unsigned Reg = TargetRegisterInfo::index2VirtReg(i);
|
||||
|
Loading…
Reference in New Issue
Block a user