mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 09:45:00 +00:00
[SparcV9]: Do not emit .register directives for global registers that are clobbered by calls but not used in the function itself.
llvm-svn: 195574
This commit is contained in:
parent
0c27a5ac2c
commit
73dd53211d
@ -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);
|
||||
}
|
||||
|
@ -380,8 +380,6 @@ define signext i32 @ret_nozext(i32 signext %a0) {
|
||||
; CHECK-LABEL: test_register_directive
|
||||
; CHECK: .register %g2, #scratch
|
||||
; CHECK: .register %g3, #scratch
|
||||
; CHECK: .register %g6, #ignore
|
||||
; CHECK: .register %g7, #ignore
|
||||
; CHECK: add %i0, 2, %g2
|
||||
; CHECK: add %i0, 3, %g3
|
||||
define i32 @test_register_directive(i32 %i0) {
|
||||
|
Loading…
Reference in New Issue
Block a user