[llvm] TargetMachine: Remove pointer-size query methods (PR #226404)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 02:11:49 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
Remove the shim methods from the TargetMachine's copy of the
DataLayout, which will soon be eliminated. The Module owns the authoritative
DataLayout, so callers should read the value from the contextual Module.
Completely unreasonably, Mips's ABI name can change the pointer size which
we probably should just not support. Many other triple checks will never be
correct. This avoids potential mismatches in these contexts, but I still expect
this to be widely broken.
Some of the TargetLowering constructor changes and AMDGPULegalizerInfo
changes are kind of annoying. We could pass in the DataLayout through
the subtarget constructors but it didn't seem worth the effort and
the information should be derivable from the triple anyway.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply@<!-- -->anthropic.com>
---
Full diff: https://github.com/llvm/llvm-project/pull/226404.diff
38 Files Affected:
- (modified) llvm/include/llvm/CodeGen/AsmPrinter.h (+5-2)
- (modified) llvm/include/llvm/CodeGen/BasicTTIImpl.h (+2-2)
- (modified) llvm/include/llvm/CodeGen/TargetLowering.h (+2-1)
- (modified) llvm/include/llvm/Target/TargetMachine.h (+2-1)
- (modified) llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (+14-12)
- (modified) llvm/lib/CodeGen/CodeGenPrepare.cpp (+2-2)
- (modified) llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp (+1-1)
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (+12-7)
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (+1-1)
- (modified) llvm/lib/CodeGen/TargetLoweringBase.cpp (+3-2)
- (modified) llvm/lib/Target/AArch64/AArch64ISelLowering.cpp (+2-2)
- (modified) llvm/lib/Target/AArch64/AArch64TargetMachine.h (+3-2)
- (modified) llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp (+11-15)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (+2-1)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.cpp (+4-3)
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.h (+2-1)
- (modified) llvm/lib/Target/ARM/ARMInstructionSelector.cpp (+3-2)
- (modified) llvm/lib/Target/ARM/ARMTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/AVR/AVRTargetMachine.h (+3-2)
- (modified) llvm/lib/Target/Hexagon/HexagonTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/LoongArch/LoongArchTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp (+3-1)
- (modified) llvm/lib/Target/Mips/MipsTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (+2-1)
- (modified) llvm/lib/Target/PowerPC/PPCTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/RISCV/RISCVTargetMachine.cpp (+2-1)
- (modified) llvm/lib/Target/RISCV/RISCVTargetMachine.h (+2-1)
- (modified) llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp (+1-1)
- (modified) llvm/lib/Target/Sparc/SparcISelLowering.cpp (+1-1)
- (modified) llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp (+1-2)
- (modified) llvm/lib/Target/SystemZ/SystemZISelLowering.cpp (+2-2)
- (modified) llvm/lib/Target/SystemZ/SystemZXPLINKAsmPrinter.cpp (+1-2)
- (modified) llvm/lib/Target/VE/VEISelLowering.cpp (+1-2)
- (modified) llvm/lib/Target/X86/GISel/X86LegalizerInfo.cpp (+1-1)
- (modified) llvm/lib/Target/X86/X86ISelLowering.cpp (+1-1)
- (modified) llvm/lib/Target/X86/X86TargetMachine.cpp (+2-2)
- (modified) llvm/lib/Target/X86/X86TargetMachine.h (+2-1)
``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````
</details>
https://github.com/llvm/llvm-project/pull/226404
More information about the llvm-commits
mailing list