[LLVMbugs] [Bug 13783] New: LDTLSCleanup pass leaves live physregs behind

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 6 11:05:07 PDT 2012


             Bug #: 13783
           Summary: LDTLSCleanup pass leaves live physregs behind
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: stoklund at 2pi.dk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The LDTLSCleanup looks like a special-purpose CSE pass for TLS_base_addr
instructions. It leaves a lot of live physreg copies behind, preventing good
register allocation:

        %vreg6<def> = MOVPC32r 0, %ESP<imp-use>; GR32:%vreg6
        %vreg0<def,tied1> = ADD32ri %vreg6<tied0>, <es:_GLOBAL_OFFSET_TABLE_>
        %EBX<def> = COPY %vreg0; GR32_NOSP:%vreg0
        TLS_base_addr32 %noreg, 1, %EBX, <ga:@j>[TF=9], %noreg, ...
        %vreg5<def> = COPY %EAX; GR32:%vreg5
        %vreg1<def> = COPY %EAX; GR32:%vreg1
        %vreg2<def> = MOV32rm %vreg1, 1, %noreg, <ga:@j>[TF=13], %noreg
        %EBX<def> = COPY %vreg0; GR32_NOSP:%vreg0
        %EAX<def> = COPY %vreg5; GR32:%vreg5
        %vreg3<def> = COPY %EAX; GR32:%vreg3

Local dynamic TLS should use the normal CSE utilities.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list