Repository navigation
Fix JIT symbol resolution for static const members with in-class initializers - #1
Closed
pfeodrippe wants to merge 1 commit into
Closed
pfeodrippe wants to merge 1 commit into
pfeodrippe wants to merge 1 commit into
Conversation
…ializers From #1 trying to resolve llvm#146956
This was referenced Nov 23, 2025
pfeodrippe
marked this pull request as draft
November 23, 2025 21:43
jeaye
pushed a commit
that referenced
this pull request
Sep 1, 2026
This PR optimizes the AArch64 backend for 128-bit integer squaring (`u128 x * x`). It updates the instruction selection logic to combine `(A + B) + B` into `A + (B << 1)`. This allows the compiler to emit a single, optimal `add ... lsl #1` instruction instead of multiple separate `add` instructions. A baseline test was added in the first commit, and the optimization is provided in the second commit to clearly highlight the codegen improvements. Fixes llvm#213775
jeaye
pushed a commit
that referenced
this pull request
Sep 1, 2026
This PR should fix ASAN errors from https://lab.llvm.org/buildbot/#/builders/52/builds/19811 There are three sources of leaks: 1. TargetPassConfig not being `PM.add()`ed ``` Direct leak of 136 byte(s) in 1 object(s) allocated from: #1 ...createPassConfig(...) DirectXTargetMachine.cpp:216:10 <- return new DirectXPassConfig(*this, PM); #2 ...addPassesToEmitFile(...) DirectXTargetMachine.cpp:177:34 <- TargetPassConfig *PassConfig = createPassConfig(PM); Indirect leak of 144 byte(s) in 1 object(s) allocated from: #1 llvm::TargetPassConfig::TargetPassConfig(...) TargetPassConfig.cpp:604:10 <- Impl = new PassConfigImpl(); #2 DirectXPassConfig DirectXTargetMachine.cpp:112:9 ``` 2. MachineModuleInfoWrapperPass not being `PM.add()`ed ``` Direct leak of 2624 byte(s) in 1 object(s) allocated from: #1 compileModule(...) llc.cpp:786:9 <- new MachineModuleInfoWrapperPass(Target.get()); ...passed in at llc.cpp:842:19, then dropped unless the obj+complete-pipeline branch ran ``` 3. Orphaned GlobalVariables that were detached from the module but got never deleted: - llvm/lib/Target/DirectX/DXILCBufferAccess.cpp:44: `Global->removeFromParent()`; - llvm/lib/Target/DirectX/DXILOpLowering.cpp:277: `NameGlobal->removeFromParent()`; ``` opt -S -dxil-cbuffer-access ... CBufferAccess/scalars.ll definitely lost: 57 bytes in 3 blocks (3 name entries) indirectly lost: 384 bytes in 3 blocks (3 × 128-byte GlobalVariable) ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From pfeodrippe#1 trying to resolve llvm#146956