Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

lldProject
ActivePublic

Details

Description

LLVM Linker

Recent Activity

Mon, Sep 18

MaskRay added a comment to D48929: [ELF] Update addends in non-allocatable sections for REL targets when creating a relocatable output..

Note that the interaction with --compress-debug-sections={zlib,zstd} is not handled in this patch. For relocatable linking of .rel.debug_* sections, the implicit addends are not applied to the output.
I am trying to figure out a solution.

Writer<ELFT>::run
  maybeCompress
    OutputSection::writeTo
      InputSection::writeTo
        relocate  # relocations is empty
  writeSections
    OutputSection::writeTo
      InputSection::writeTo
        if SHT_REL copyRelocations
          addReloc R_ABS
        elif non-compress relocate
          relocateNonAllocForRelocatable handle R_ABS
Mon, Sep 18, 10:48 PM · Restricted Project, lld
Herald added a project to D48929: [ELF] Update addends in non-allocatable sections for REL targets when creating a relocatable output.: Restricted Project.

Note that the interaction with --compress-debug-sections={zlib,zstd} is not handled in this patch. For relocatable linking of .rel.debug_* sections, the implicit addends are not applied to the output.
I am trying to figure out a solution.

Mon, Sep 18, 9:19 PM · Restricted Project, lld

Thu, Aug 31

amyk closed D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Thu, Aug 31, 6:45 AM · lld, Restricted Project, Restricted Project, Restricted Project

Mon, Aug 28

MaskRay accepted D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

LGTM if you want to either backport this to release/17.x or consider this risky and revert the prior patch just in release/17.x :)

Mon, Aug 28, 12:51 PM · lld, Restricted Project, Restricted Project, Restricted Project
sfertile accepted D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

LGTM.

Mon, Aug 28, 11:20 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 23 2023

amyk added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 23 2023, 9:46 PM · lld, Restricted Project, Restricted Project, Restricted Project
amyk updated the diff for D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

Address Nemanja's comment by masking out bits 16-31 for both D-Form/DS-Forms.
Builds and tests successfully on both main and release/17.x.

Aug 23 2023, 9:46 PM · lld, Restricted Project, Restricted Project, Restricted Project
nemanjai added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 23 2023, 1:39 PM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 22 2023

amyk updated the diff for D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

Address comment to make hexadecimals lowercase.

Aug 22 2023, 4:04 PM · lld, Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 22 2023, 12:38 PM · lld, Restricted Project, Restricted Project, Restricted Project
amyk added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 22 2023, 11:27 AM · lld, Restricted Project, Restricted Project, Restricted Project
amyk updated the diff for D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

Address review comments:

  • Update checks for ppc64-tls-ie.s
  • Mask out all of the XO bits for DS-Form
Aug 22 2023, 11:27 AM · lld, Restricted Project, Restricted Project, Restricted Project
sfertile added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 22 2023, 10:04 AM · lld, Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

LGTM from my viewpoint if a PowerPC reviewer looks ok as well.

Aug 22 2023, 9:18 AM · lld, Restricted Project, Restricted Project, Restricted Project
nemanjai added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 22 2023, 8:53 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 21 2023

sfertile added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 21 2023, 7:58 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 20 2023

nemanjai added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 20 2023, 4:17 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 19 2023

amyk added a comment to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

I've addressed all of the current comments, with the exception of Nemanja's comment on using a different mask for the DS-Form case (since we're still currently discussing that and I have asked for some clarification).

Aug 19 2023, 10:21 PM · lld, Restricted Project, Restricted Project, Restricted Project
amyk updated the diff for D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
  • Remove extra parentheses in PPC64.cpp
  • Update test cases to have more unique names
  • Make getPPCDSFormOp() return 0 for the default case
Aug 19 2023, 10:21 PM · lld, Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 19 2023, 7:05 PM · lld, Restricted Project, Restricted Project, Restricted Project
amyk added a comment to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

We will need to decide if we should backport this fix or if we should pull the original patch (which also has additional patches dependent on it that are in v17 as well).

Yes, rG598cccea80f5614869bf0dda4d09d68b2c64423c is also dependent on the original patch.

Aug 19 2023, 11:04 AM · lld, Restricted Project, Restricted Project, Restricted Project
amyk added a comment to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

As Nemanja suggests, I will also apply this patch to the LLVM 17 release branch to test.

Aug 19 2023, 8:09 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 18 2023

nemanjai added a comment to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

This patch fixes a regression caused by a patch that is in v17. We will need to decide if we should backport this fix or if we should pull the original patch (which also has additional patches dependent on it that are in v17 as well). I think this patch is obvious enough to be backported, but I'll defer the final decision on that to @MaskRay once this is approved.
@amyk Perhaps it would help to perform a thorough test with the approved version of this patch applied to v17 to ensure it is safe to backport.

Aug 18 2023, 11:55 PM · lld, Restricted Project, Restricted Project, Restricted Project
amyk added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 18 2023, 10:40 PM · lld, Restricted Project, Restricted Project, Restricted Project
amyk updated the diff for D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.

Update getPPCDFormOp() to return the D-Form opcodes in the most significant bits (like getPPCDSFormOp().

Aug 18 2023, 10:40 PM · lld, Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 18 2023, 9:43 AM · lld, Restricted Project, Restricted Project, Restricted Project
nemanjai added inline comments to D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 18 2023, 4:28 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 17 2023

amyk requested review of D158197: [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec.
Aug 17 2023, 9:19 AM · lld, Restricted Project, Restricted Project, Restricted Project

Aug 15 2023

MaskRay abandoned D142547: [LLD] cleans up context and symbol table to allow multiple invocations to lld::elf::linker().
Aug 15 2023, 10:58 PM · lld, Restricted Project, Restricted Project
MaskRay commandeered D142547: [LLD] cleans up context and symbol table to allow multiple invocations to lld::elf::linker().

Obsoleted by D119049

Aug 15 2023, 10:58 PM · lld, Restricted Project, Restricted Project

Jul 18 2023

ormris added a comment to D123805: [lld] A Unified LTO Bitcode Frontend.

Thanks!

Jul 18 2023, 4:22 PM · Restricted Project, lld, Restricted Project
ormris closed D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 18 2023, 4:20 PM · Restricted Project, lld, Restricted Project
ormris updated the diff for D123805: [lld] A Unified LTO Bitcode Frontend.

Final changes

Jul 18 2023, 4:11 PM · Restricted Project, lld, Restricted Project
ormris added inline comments to D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 18 2023, 4:10 PM · Restricted Project, lld, Restricted Project
MaskRay accepted D123805: [lld] A Unified LTO Bitcode Frontend.

LG, with the last few nits :)

Jul 18 2023, 3:51 PM · Restricted Project, lld, Restricted Project
ormris updated the diff for D123805: [lld] A Unified LTO Bitcode Frontend.

Address comments

Jul 18 2023, 3:39 PM · Restricted Project, lld, Restricted Project
ormris added inline comments to D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 18 2023, 3:39 PM · Restricted Project, lld, Restricted Project
MaskRay added inline comments to D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 18 2023, 2:30 PM · Restricted Project, lld, Restricted Project

Jul 17 2023

ormris updated the summary of D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 17 2023, 1:57 PM · Restricted Project, lld, Restricted Project
ormris updated the summary of D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 17 2023, 1:56 PM · Restricted Project, lld, Restricted Project
ormris added inline comments to D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 17 2023, 1:47 PM · Restricted Project, lld, Restricted Project
ormris updated the diff for D123805: [lld] A Unified LTO Bitcode Frontend.

Address comments. Description update incoming...

Jul 17 2023, 1:46 PM · Restricted Project, lld, Restricted Project
ormris retitled D123805: [lld] A Unified LTO Bitcode Frontend from [WIP][lld] A Unified LTO Bitcode Frontend to [lld] A Unified LTO Bitcode Frontend.
Jul 17 2023, 12:13 PM · Restricted Project, lld, Restricted Project
MaskRay added a comment to D123805: [lld] A Unified LTO Bitcode Frontend.

ping

Jul 17 2023, 11:54 AM · Restricted Project, lld, Restricted Project
MaskRay added inline comments to D123805: [lld] A Unified LTO Bitcode Frontend.
Jul 17 2023, 11:53 AM · Restricted Project, lld, Restricted Project
ormris added a comment to D123805: [lld] A Unified LTO Bitcode Frontend.

ping

Jul 17 2023, 9:15 AM · Restricted Project, lld, Restricted Project

Jul 15 2023

dtcxzyw abandoned D155326: [Clang][lld][RISCV] Passing 'mattr' to lld/llvmgold.
Jul 15 2023, 4:10 AM · Restricted Project, Restricted Project, Restricted Project, lld

Jul 14 2023

craig.topper added a comment to D155326: [Clang][lld][RISCV] Passing 'mattr' to lld/llvmgold.

Why do you believe this is better than encoding it in the module's IR like the ABI?

  • There is no module-level metadata for target CPU and sub-target features. So I just think that this patch is better than merging from func-level attributes like D142191.
  • Clang passes -plugin-opt=mcpu to lld. Then lld builds lto::Config using codegen::getCPUStr and codegen::getMAttrs (both get the result from command args). It is taken for granted that clang passes -plugin-opt=mattr down to lld.

If we introduce top-level fields like target cpu and target features, we should modify a lot of things (clang/llvm/lld). It can take a long time to migrate (like opaque pointers).

Jul 14 2023, 1:11 PM · Restricted Project, Restricted Project, Restricted Project, lld
craig.topper added a comment to D155326: [Clang][lld][RISCV] Passing 'mattr' to lld/llvmgold.

-mattr is a different syntax than -march that users are used to. Why would we want to expose that? There was previously a proposal for doing this automatically https://reviews.llvm.org/D132843

Jul 14 2023, 1:09 PM · Restricted Project, Restricted Project, Restricted Project, lld
dtcxzyw added a comment to D155326: [Clang][lld][RISCV] Passing 'mattr' to lld/llvmgold.

Why do you believe this is better than encoding it in the module's IR like the ABI?

Jul 14 2023, 12:57 PM · Restricted Project, Restricted Project, Restricted Project, lld