<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lld, branch users/optimisan/amdgpu-pre-sched2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>RuntimeLibcalls: Fix dropping first libcall entry (#147461)</title>
<updated>2025-07-08T12:09:24+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-07-08T12:09:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2d3d0e502dfdf697f552ddb61268be860e2a5be6'/>
<id>2d3d0e502dfdf697f552ddb61268be860e2a5be6</id>
<content type='text'>
Fixes regression reported after #144973, which happened to
be acosf.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes regression reported after #144973, which happened to
be acosf.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld][WebAssembly] Abide by configured page size for memory imports (#146916)</title>
<updated>2025-07-07T16:40:09+00:00</updated>
<author>
<name>Nick Fitzgerald</name>
<email>fitzgen@gmail.com</email>
</author>
<published>2025-07-07T16:40:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=463b3cb93fd83553f266994018f98f31854f4542'/>
<id>463b3cb93fd83553f266994018f98f31854f4542</id>
<content type='text'>
This was an oversight in
https://github.com/llvm/llvm-project/pull/128942 where I forgot to add
the configured page size to the `WasmLimits` in the import we emit when
importing a memory.

Fixes: #146713</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was an oversight in
https://github.com/llvm/llvm-project/pull/128942 where I forgot to add
the configured page size to the `WasmLimits` in the import we emit when
importing a memory.

Fixes: #146713</pre>
</div>
</content>
</entry>
<entry>
<title>[LLD] Fix crash on parsing ':ALIGN' in linker script (#146723)</title>
<updated>2025-07-06T17:22:50+00:00</updated>
<author>
<name>Parth</name>
<email>partharora99160808@gmail.com</email>
</author>
<published>2025-07-06T17:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=923a3cc160a14e61bd2847f9b011bb4d6ce4fc71'/>
<id>923a3cc160a14e61bd2847f9b011bb4d6ce4fc71</id>
<content type='text'>
The linker was crashing due to stack overflow when parsing ':ALIGN' in
an output section description. This commit fixes the linker script
parser so that the crash does not happen.

The root cause of the stack overflow is how we parse expressions
(readExpr) in linker script and the behavior of ScriptLexer::expect(...)
utility. ScriptLexer::expect does not do anything if errors have already
been encountered during linker script parsing. In particular, it never
increments the current token position in the script file, even if the
current token is the same as the expected token. This causes an infinite
call cycle on parsing an expression such as '(4096)' when an error has
already been encountered.

readExpr() calls readPrimary()
readPrimary() calls readParenExpr()

readParenExpr():

  expect("("); // no-op, current token still points to '('
  Expression *E = readExpr(); // The cycle continues...

Closes #146722

Signed-off-by: Parth Arora &lt;partaror@qti.qualcomm.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linker was crashing due to stack overflow when parsing ':ALIGN' in
an output section description. This commit fixes the linker script
parser so that the crash does not happen.

The root cause of the stack overflow is how we parse expressions
(readExpr) in linker script and the behavior of ScriptLexer::expect(...)
utility. ScriptLexer::expect does not do anything if errors have already
been encountered during linker script parsing. In particular, it never
increments the current token position in the script file, even if the
current token is the same as the expected token. This causes an infinite
call cycle on parsing an expression such as '(4096)' when an error has
already been encountered.

readExpr() calls readPrimary()
readPrimary() calls readParenExpr()

readParenExpr():

  expect("("); // no-op, current token still points to '('
  Expression *E = readExpr(); // The cycle continues...

Closes #146722

Signed-off-by: Parth Arora &lt;partaror@qti.qualcomm.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang][AArch64] Remove redundant tune args to the backend (#146896)</title>
<updated>2025-07-05T06:36:13+00:00</updated>
<author>
<name>Tomer Shafir</name>
<email>tomer.shafir8@gmail.com</email>
</author>
<published>2025-07-05T06:36:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65e11f600db346321fde400832c86a12e4ee5882'/>
<id>65e11f600db346321fde400832c86a12e4ee5882</id>
<content type='text'>
This change removes unnecessary tune args to the AArch64 backend. The
AArch64 backend automatically handles `tune-cpu` and adds the necessar
y features based on the models from TableGen.

It follows this fix: https://github.com/llvm/llvm-project/pull/146260
where updating a subtarget feature didn't fail the frontend test because
both the toolchain and the test suffered from a coordinated error.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change removes unnecessary tune args to the AArch64 backend. The
AArch64 backend automatically handles `tune-cpu` and adds the necessar
y features based on the models from TableGen.

It follows this fix: https://github.com/llvm/llvm-project/pull/146260
where updating a subtarget feature didn't fail the frontend test because
both the toolchain and the test suffered from a coordinated error.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld][WebAssembly] Add missing relocation types to the --compress-relocations path (#144578)</title>
<updated>2025-07-02T20:57:42+00:00</updated>
<author>
<name>SingleAccretion</name>
<email>62474226+SingleAccretion@users.noreply.github.com</email>
</author>
<published>2025-07-02T20:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=497060fae5c3a93978306eb565e8d0ebc116f6c7'/>
<id>497060fae5c3a93978306eb565e8d0ebc116f6c7</id>
<content type='text'>
Fixes https://github.com/llvm/llvm-project/issues/110045.

Reloc list reference:
```
+ Already handled
A Added in this change
= Not applicable / expected (though technically legal, e. g. you can relocate v128.const...)

+ R_WASM_FUNCTION_INDEX_LEB,      0
+ R_WASM_TABLE_INDEX_SLEB,        1
= R_WASM_TABLE_INDEX_I32,         2
+ R_WASM_MEMORY_ADDR_LEB,         3
+ R_WASM_MEMORY_ADDR_SLEB,        4
= R_WASM_MEMORY_ADDR_I32,         5
+ R_WASM_TYPE_INDEX_LEB,          6
+ R_WASM_GLOBAL_INDEX_LEB,        7
= R_WASM_FUNCTION_OFFSET_I32,     8
= R_WASM_SECTION_OFFSET_I32,      9
+ R_WASM_TAG_INDEX_LEB,          10
A R_WASM_MEMORY_ADDR_REL_SLEB,   11
A R_WASM_TABLE_INDEX_REL_SLEB,   12
= R_WASM_GLOBAL_INDEX_I32,       13
+ R_WASM_MEMORY_ADDR_LEB64,      14
+ R_WASM_MEMORY_ADDR_SLEB64,     15
= R_WASM_MEMORY_ADDR_I64,        16
A R_WASM_MEMORY_ADDR_REL_SLEB64, 17
+ R_WASM_TABLE_INDEX_SLEB64,     18
= R_WASM_TABLE_INDEX_I64,        19
+ R_WASM_TABLE_NUMBER_LEB,       20
A R_WASM_MEMORY_ADDR_TLS_SLEB,   21
= R_WASM_FUNCTION_OFFSET_I64,    22
= R_WASM_MEMORY_ADDR_LOCREL_I32, 23
A R_WASM_TABLE_INDEX_REL_SLEB64, 24
A R_WASM_MEMORY_ADDR_TLS_SLEB64, 25
= R_WASM_FUNCTION_INDEX_I32,     26
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/llvm/llvm-project/issues/110045.

Reloc list reference:
```
+ Already handled
A Added in this change
= Not applicable / expected (though technically legal, e. g. you can relocate v128.const...)

+ R_WASM_FUNCTION_INDEX_LEB,      0
+ R_WASM_TABLE_INDEX_SLEB,        1
= R_WASM_TABLE_INDEX_I32,         2
+ R_WASM_MEMORY_ADDR_LEB,         3
+ R_WASM_MEMORY_ADDR_SLEB,        4
= R_WASM_MEMORY_ADDR_I32,         5
+ R_WASM_TYPE_INDEX_LEB,          6
+ R_WASM_GLOBAL_INDEX_LEB,        7
= R_WASM_FUNCTION_OFFSET_I32,     8
= R_WASM_SECTION_OFFSET_I32,      9
+ R_WASM_TAG_INDEX_LEB,          10
A R_WASM_MEMORY_ADDR_REL_SLEB,   11
A R_WASM_TABLE_INDEX_REL_SLEB,   12
= R_WASM_GLOBAL_INDEX_I32,       13
+ R_WASM_MEMORY_ADDR_LEB64,      14
+ R_WASM_MEMORY_ADDR_SLEB64,     15
= R_WASM_MEMORY_ADDR_I64,        16
A R_WASM_MEMORY_ADDR_REL_SLEB64, 17
+ R_WASM_TABLE_INDEX_SLEB64,     18
= R_WASM_TABLE_INDEX_I64,        19
+ R_WASM_TABLE_NUMBER_LEB,       20
A R_WASM_MEMORY_ADDR_TLS_SLEB,   21
= R_WASM_FUNCTION_OFFSET_I64,    22
= R_WASM_MEMORY_ADDR_LOCREL_I32, 23
A R_WASM_TABLE_INDEX_REL_SLEB64, 24
A R_WASM_MEMORY_ADDR_TLS_SLEB64, 25
= R_WASM_FUNCTION_INDEX_I32,     26
```</pre>
</div>
</content>
</entry>
<entry>
<title>[Test] Account for spaces in paths in the new dtlto/files.test (#146749)</title>
<updated>2025-07-02T18:20:09+00:00</updated>
<author>
<name>bd1976bris</name>
<email>Ben.Dunbobbin@sony.com</email>
</author>
<published>2025-07-02T18:20:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da01257c3a16b728718f9bde8bbe435678d96fd8'/>
<id>da01257c3a16b728718f9bde8bbe435678d96fd8</id>
<content type='text'>
This uses LIT substitutions in a response file that could contain spaces
in paths. This caused a failure on a build bot where the path to the
system Python executable was "C:\Program Files\Python310\python.exe", as
reported in #142757.

Add appropriate quoting to fix the issue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses LIT substitutions in a response file that could contain spaces
in paths. This caused a failure on a build bot where the path to the
system Python executable was "C:\Program Files\Python310\python.exe", as
reported in #142757.

Add appropriate quoting to fix the issue.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix lld crash caused by dynamic bit offset patch (#146701)</title>
<updated>2025-07-02T17:30:34+00:00</updated>
<author>
<name>Tom Tromey</name>
<email>tromey@adacore.com</email>
</author>
<published>2025-07-02T17:30:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cbfc10260cfeab7ede763bffad4c71d9ae20abd2'/>
<id>cbfc10260cfeab7ede763bffad4c71d9ae20abd2</id>
<content type='text'>
PR #141106 changed the debuginfo metdata to allow dynamic bit offsets
and sizes. This caused a crash in lld when using LTO.

The problem is that lazyLoadOneMetadata assumes that the metadata in
question can be cast to MDNode; but in the typical case where the offset
is a constant, this is not true.

This patch changes this spot to allow non-MDNodes through.

The included test case comes from the report in #141106.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR #141106 changed the debuginfo metdata to allow dynamic bit offsets
and sizes. This caused a crash in lld when using LTO.

The problem is that lazyLoadOneMetadata assumes that the metadata in
question can be cast to MDNode; but in the typical case where the offset
is a constant, this is not true.

This patch changes this spot to allow non-MDNodes through.

The included test case comes from the report in #141106.</pre>
</div>
</content>
</entry>
<entry>
<title>[DTLTO][LLD][ELF] Add support for Integrated Distributed ThinLTO (#142757)</title>
<updated>2025-07-02T15:12:27+00:00</updated>
<author>
<name>bd1976bris</name>
<email>bd1976llvm@gmail.com</email>
</author>
<published>2025-07-02T15:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b4e79398de5e6f5c4603c40d279a95dd57d0950'/>
<id>3b4e79398de5e6f5c4603c40d279a95dd57d0950</id>
<content type='text'>
This patch introduces support for Integrated Distributed ThinLTO (DTLTO)
in ELF LLD.

DTLTO enables the distribution of ThinLTO backend compilations via
external distribution systems, such as Incredibuild, during the
traditional link step: https://llvm.org/docs/DTLTO.html.

It is expected that users will invoke DTLTO through the compiler driver
(e.g., Clang) rather than calling LLD directly. A Clang-side interface
for DTLTO will be added in a follow-up patch.

Note: Bitcode members of archives (thin or non-thin) are not currently
supported. This will be addressed in a future change. As a consequence
of this lack of support, this patch is not sufficient to allow for
self-hosting an LLVM build with DTLTO. Theoretically,
--start-lib/--end-lib could be used instead of archives in a self-host
build. However, it's unclear how --start-lib/--end-lib can be easily
used with the LLVM build system.

Testing:
- ELF LLD `lit` test coverage has been added, using a mock distributor
  to avoid requiring Clang.
- Cross-project `lit` tests cover integration with Clang.

For the design discussion of the DTLTO feature, see: #126654.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces support for Integrated Distributed ThinLTO (DTLTO)
in ELF LLD.

DTLTO enables the distribution of ThinLTO backend compilations via
external distribution systems, such as Incredibuild, during the
traditional link step: https://llvm.org/docs/DTLTO.html.

It is expected that users will invoke DTLTO through the compiler driver
(e.g., Clang) rather than calling LLD directly. A Clang-side interface
for DTLTO will be added in a follow-up patch.

Note: Bitcode members of archives (thin or non-thin) are not currently
supported. This will be addressed in a future change. As a consequence
of this lack of support, this patch is not sufficient to allow for
self-hosting an LLVM build with DTLTO. Theoretically,
--start-lib/--end-lib could be used instead of archives in a self-host
build. However, it's unclear how --start-lib/--end-lib can be easily
used with the LLVM build system.

Testing:
- ELF LLD `lit` test coverage has been added, using a mock distributor
  to avoid requiring Clang.
- Cross-project `lit` tests cover integration with Clang.

For the design discussion of the DTLTO feature, see: #126654.</pre>
</div>
</content>
</entry>
<entry>
<title>[LLD][COFF] Disallow importing DllMain from import libraries (#146610)</title>
<updated>2025-07-02T12:53:18+00:00</updated>
<author>
<name>Alexandre Ganea</name>
<email>alex_toresh@yahoo.fr</email>
</author>
<published>2025-07-02T12:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e63de82d904c2364c84489894eeb81fb9c08a023'/>
<id>e63de82d904c2364c84489894eeb81fb9c08a023</id>
<content type='text'>
This is a workaround for
https://github.com/llvm/llvm-project/issues/82050 by skipping the `DllMain` symbol if seen in aimport library. If this situation occurs, after this commit a warning will also be displayed. The warning can be silenced with `/ignore:exporteddllmain`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a workaround for
https://github.com/llvm/llvm-project/issues/82050 by skipping the `DllMain` symbol if seen in aimport library. If this situation occurs, after this commit a warning will also be displayed. The warning can be silenced with `/ignore:exporteddllmain`</pre>
</div>
</content>
</entry>
<entry>
<title>[lld][LoongArch] Support TLSDESC GD/LD to IE/LE (#123715)</title>
<updated>2025-07-02T08:09:51+00:00</updated>
<author>
<name>Zhaoxin Yang</name>
<email>yangzhaoxin@loongson.cn</email>
</author>
<published>2025-07-02T08:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2c1900860c088a70f8a97e7de77f7546cb297a45'/>
<id>2c1900860c088a70f8a97e7de77f7546cb297a45</id>
<content type='text'>
Support TLSDESC to initial-exec or local-exec optimizations. Introduce a
new hook RE_LOONGARCH_RELAX_TLS_GD_TO_IE_PAGE_PC and use existing
R_RELAX_TLS_GD_TO_IE_ABS to support TLSDESC =&gt; IE, while use existing
R_RELAX_TLS_GD_TO_LE to support TLSDESC =&gt; LE.
    
In normal or medium code model, there are two forms of code sequences:
* pcalau12i  $a0, %desc_pc_hi20(sym_desc)
* addi.d     $a0, $a0, %desc_pc_lo12(sym_desc)
* ld.d       $ra, $a0, %desc_ld(sym_desc)
* jirl       $ra, $ra, %desc_call(sym_desc)
------
* pcaddi     $a0, %desc_pcrel_20(sym_desc)
* ld.d       $ra, $a0, %desc_ld(sym_desc)
* jirl       $ra, $ra, %desc_call(sym_desc)
    
Convert to IE:
* pcalau12i $a0, %ie_pc_hi20(sym_ie)
* ld.[wd]   $a0, $a0, %ie_pc_lo12(sym_ie)

Convert to LE:
* lu12i.w $a0, %le_hi20(sym_le) # le_hi20 != 0, otherwise NOP
* ori $a0 src, %le_lo12(sym_le) # le_hi20 != 0, src = $a0, otherwise src = $zero

Simplicity, whether tlsdescToIe or tlsdescToLe, we always tend to
convert the preceding instructions to NOPs, due to both forms of code
sequence (corresponding to relocation combinations:
R_LARCH_TLS_DESC_PC_HI20+R_LARCH_TLS_DESC_PC_LO12 and
R_LARCH_TLS_DESC_PCREL20_S2) have same process.
    
TODO: When relaxation enables, redundant NOPs can be removed. It will be
implemented in a future patch.
    
Note: All forms of TLSDESC code sequences should not appear interleaved
in the normal, medium or extreme code model, which compilers do not
generate and lld is unsupported. This is thanks to the guard in
PostRASchedulerList.cpp in llvm.
```
Calls are not scheduling boundaries before register allocation,
but post-ra we don't gain anything by scheduling across calls
since we don't need to worry about register pressure.
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support TLSDESC to initial-exec or local-exec optimizations. Introduce a
new hook RE_LOONGARCH_RELAX_TLS_GD_TO_IE_PAGE_PC and use existing
R_RELAX_TLS_GD_TO_IE_ABS to support TLSDESC =&gt; IE, while use existing
R_RELAX_TLS_GD_TO_LE to support TLSDESC =&gt; LE.
    
In normal or medium code model, there are two forms of code sequences:
* pcalau12i  $a0, %desc_pc_hi20(sym_desc)
* addi.d     $a0, $a0, %desc_pc_lo12(sym_desc)
* ld.d       $ra, $a0, %desc_ld(sym_desc)
* jirl       $ra, $ra, %desc_call(sym_desc)
------
* pcaddi     $a0, %desc_pcrel_20(sym_desc)
* ld.d       $ra, $a0, %desc_ld(sym_desc)
* jirl       $ra, $ra, %desc_call(sym_desc)
    
Convert to IE:
* pcalau12i $a0, %ie_pc_hi20(sym_ie)
* ld.[wd]   $a0, $a0, %ie_pc_lo12(sym_ie)

Convert to LE:
* lu12i.w $a0, %le_hi20(sym_le) # le_hi20 != 0, otherwise NOP
* ori $a0 src, %le_lo12(sym_le) # le_hi20 != 0, src = $a0, otherwise src = $zero

Simplicity, whether tlsdescToIe or tlsdescToLe, we always tend to
convert the preceding instructions to NOPs, due to both forms of code
sequence (corresponding to relocation combinations:
R_LARCH_TLS_DESC_PC_HI20+R_LARCH_TLS_DESC_PC_LO12 and
R_LARCH_TLS_DESC_PCREL20_S2) have same process.
    
TODO: When relaxation enables, redundant NOPs can be removed. It will be
implemented in a future patch.
    
Note: All forms of TLSDESC code sequences should not appear interleaved
in the normal, medium or extreme code model, which compilers do not
generate and lld is unsupported. This is thanks to the guard in
PostRASchedulerList.cpp in llvm.
```
Calls are not scheduling boundaries before register allocation,
but post-ra we don't gain anything by scheduling across calls
since we don't need to worry about register pressure.
```</pre>
</div>
</content>
</entry>
</feed>
