mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Remove some dead vars and some useless namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -143,13 +143,8 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
 | 
				
			|||||||
      rv = (CI->getRawValue() - MCE.getCurrentPCValue()) / 4;
 | 
					      rv = (CI->getRawValue() - MCE.getCurrentPCValue()) / 4;
 | 
				
			||||||
    } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
 | 
					    } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
 | 
				
			||||||
      unsigned Reloc;
 | 
					      unsigned Reloc;
 | 
				
			||||||
      bool isLocal = false;
 | 
					 | 
				
			||||||
      if (MI.getOpcode() == V9::CALL) {
 | 
					      if (MI.getOpcode() == V9::CALL) {
 | 
				
			||||||
        Reloc = V9::reloc_pcrel_call;
 | 
					        Reloc = V9::reloc_pcrel_call;
 | 
				
			||||||
#if 0   // FIXME: No need to emit stubs for internal functions.
 | 
					 | 
				
			||||||
        if (!GV->hasExternalLinkage() && isa<Function>(GV))
 | 
					 | 
				
			||||||
          isLocal = true;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
      } else if (MI.getOpcode() == V9::SETHI) {
 | 
					      } else if (MI.getOpcode() == V9::SETHI) {
 | 
				
			||||||
        if (MO.isHiBits64())
 | 
					        if (MO.isHiBits64())
 | 
				
			||||||
          Reloc = V9::reloc_sethi_hh;
 | 
					          Reloc = V9::reloc_sethi_hh;
 | 
				
			||||||
@@ -168,8 +163,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
 | 
				
			|||||||
        assert(0 && "Unknown relocation!");
 | 
					        assert(0 && "Unknown relocation!");
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      MCE.addRelocation(MachineRelocation(MCE.getCurrentPCOffset(), Reloc, GV,
 | 
					      MCE.addRelocation(MachineRelocation(MCE.getCurrentPCOffset(), Reloc, GV));
 | 
				
			||||||
                                          0, isLocal));
 | 
					 | 
				
			||||||
      rv = 0;
 | 
					      rv = 0;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      std::cerr << "ERROR: PC relative disp unhandled:" << MO << "\n";
 | 
					      std::cerr << "ERROR: PC relative disp unhandled:" << MO << "\n";
 | 
				
			||||||
@@ -306,8 +300,5 @@ void SparcV9CodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace llvm {
 | 
					 | 
				
			||||||
#include "SparcV9CodeEmitter.inc"
 | 
					#include "SparcV9CodeEmitter.inc"
 | 
				
			||||||
} // End llvm namespace
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user