mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[SparcV9]: Do not emit .register directives for global registers that are clobbered by calls but not used in the function itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -88,7 +88,7 @@ void SparcAsmPrinter::EmitFunctionBodyStart() {
|
||||
const unsigned globalRegs[] = { SP::G2, SP::G3, SP::G6, SP::G7, 0 };
|
||||
for (unsigned i = 0; globalRegs[i] != 0; ++i) {
|
||||
unsigned reg = globalRegs[i];
|
||||
if (!MRI.isPhysRegUsed(reg))
|
||||
if (MRI.use_empty(reg))
|
||||
continue;
|
||||
EmitGlobalRegisterDecl(reg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user