Skip to content

LDTLSCleanup pass leaves live physregs behind #14155

@stoklund

Description

@stoklund
mannequin
Bugzilla Link 13783
Version trunk
OS All
CC @zmodem

Extended Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions