Repository navigation
[llc] Add -mtune option - #186998
Merged
Merged
[llc] Add -mtune option#186998
Conversation
tomershafir
force-pushed
the
llc-add-mtune-option
branch
2 times, most recently
from
March 17, 2026 11:22
dab9177 to
07dc4b8
Compare
tomershafir
marked this pull request as ready for review
March 17, 2026 12:42
tomershafir
requested review from
DavidSpickett,
dtcxzyw,
fhahn,
jroelofs and
nikic
March 17, 2026 12:43
arsenm
reviewed
Mar 17, 2026
tomershafir
force-pushed
the
llc-add-mtune-option
branch
from
March 17, 2026 15:07
dd59d3e to
ed87fb4
Compare
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
tomershafir
force-pushed
the
llc-add-mtune-option
branch
2 times, most recently
from
March 18, 2026 12:19
16f2b33 to
17103e6
Compare
arsenm
approved these changes
Mar 18, 2026
This patch adds a Clang-compatible -mtune option to llc, to enable decoupled ISA and microarchitecture targeting, which is especially important for backend development. For example, it can enable to easily test a subtarget feature or scheduling model effects on codegen across a variaty of workloads on the IR corpus benchmark: https://github.com/dtcxzyw/llvm-codegen-benchmark. The implementation adds an isolated generic codegen flag, to establish a base for wider usage - the plan is to add it to `opt` as well in a followup patch. Then `llc` consumes it, and sets `tune-cpu` attributes for functions, which are further consumed by the backend.
tomershafir
force-pushed
the
llc-add-mtune-option
branch
from
March 19, 2026 20:58
c22bf9d to
cb6bc58
Compare
tomershafir
added a commit
to tomershafir/llvm-project
that referenced
this pull request
Mar 24, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: llvm#186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
Aadarsh-Keshri
pushed a commit
to Aadarsh-Keshri/llvm-project
that referenced
this pull request
Apr 1, 2026
This patch adds a Clang-compatible -mtune option to llc, to enable decoupled ISA and microarchitecture targeting, which is especially important for backend development. For example, it can enable to easily test a subtarget feature or scheduling model effects on codegen across a variaty of workloads on the IR corpus benchmark: https://github.com/dtcxzyw/llvm-codegen-benchmark. The implementation adds an isolated generic codegen flag, to establish a base for wider usage - the plan is to add it to `opt` as well in a followup patch. Then `llc` consumes it, and sets `tune-cpu` attributes for functions, which are further consumed by the backend.
tomershafir
added a commit
to tomershafir/llvm-project
that referenced
this pull request
Apr 10, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: llvm#186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
tomershafir
added a commit
that referenced
this pull request
Apr 10, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: #186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
llvm-sync Bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Apr 10, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: llvm/llvm-project#186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
cpullvm-upstream-sync Bot
pushed a commit
to navaneethshan/cpullvm-toolchain-1
that referenced
this pull request
Apr 13, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: llvm/llvm-project#186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
llvm-upstreamsync Bot
pushed a commit
to qualcomm/cpullvm-toolchain
that referenced
this pull request
Apr 24, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: llvm/llvm-project#186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
trdthg
added a commit
to buddy-compiler/buddy-mlir
that referenced
this pull request
May 29, 2026
## Version and Build Flow
- fetch branch / apply local patch -> fetch exact submodule commit with
`git fetch origin "${LLVM_COMMIT}"`
- `LLVM_COMMIT + riscv-jitlink.patch hash` -> `LLVM_COMMIT` cache key
- apply `riscv-jitlink.patch` -> no patch; current LLVM already has the fix
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: `nanobind` /
`nanobind==2.4.*` -> `nanobind>=2.9,<3.0` / `nanobind==2.9.*`
## Python Bindings
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PybindAdaptors.h` -> `NanobindAdaptors.h`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PYBIND11_MODULE` -> `NB_MODULE`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: manual
pybind/nanobind CMake setup -> `mlir_configure_python_dev_packages()`
## MLIR API
- [#162167](llvm/llvm-project#162167) / ea291d0e8c93:
`vector::SplatOp` -> `vector::BroadcastOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::InsertElementOp` -> `vector::InsertOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::ExtractElementOp` -> `vector::ExtractOp`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`ValueRange{std::nullopt}` -> `ValueRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`TypeRange(std::nullopt)` -> `TypeRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c: empty
`scf.yield` with null operands -> empty `scf.yield`
- [#196082](llvm/llvm-project#196082) / dd57b0c9728a:
`computeConstantBound(..., /*closedUB=*/true)` ->
`computeConstantBound(..., ValueBoundsOptions{/*closedUB=*/true})`
- [#182715](llvm/llvm-project#182715) / 72f5050ae765:
`applyPatternsAndFoldGreedily(...)` -> `applyPatternsGreedily(...)`
## GPU and AMX
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`launchOp.getWorkgroupAttributions()` ->
`launchOp.getWorkgroupAttributionBBArgs()`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea: manual
`gpu.kernel` attr -> `outlinedFunc.setKernel(true)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`setAttr(getKnown*AttrName(), ...)` ->
`setKnownBlockSizeAttr(...)` / `setKnownGridSizeAttr(...)`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir/Dialect/AMX/AMXDialect.h` -> `mlir/Dialect/X86/X86Dialect.h`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir::amx::AMXDialect` -> `mlir::x86::X86Dialect`
## LLVM Source Lists
- [#167271](llvm/llvm-project#167271) / 2345b7d98f75:
`InlineSizeEstimatorAnalysis.cpp` -> removed upstream; no Buddy source-list
entry needed
- [#172680](llvm/llvm-project#172680) / 71760f324ff9:
`ExpandLargeDivRem.cpp` -> merged into `ExpandFp.cpp`
- [#172681](llvm/llvm-project#172681) / 5c05824d2bd3:
`ExpandFp.cpp` / merged `ExpandLargeDivRem.cpp` -> `ExpandIRInsts.cpp`
- [#77370](llvm/llvm-project#77370) / 5e0a06b34d09:
`ExpandMemCmp.cpp` in CodeGen -> moved to `Transforms/Scalar`
- [#181547](llvm/llvm-project#181547) / 9a0d65cdfd0d:
`CallBrPrepare.cpp` -> `InlineAsmPrepare.cpp`
- [#160454](llvm/llvm-project#160454) / aa6a33ae6556:
`EVLIndVarSimplify.cpp` -> removed upstream; no Buddy source-list entry needed
- [#192635](llvm/llvm-project#192635) / 680a9908194e:
`VPlanSLP.cpp` -> removed upstream; no Buddy source-list entry needed
## RISC-V Backend
- local Buddy `M0`-`M7` definitions -> upstream RISC-V `M0`-`M7` definitions
- Buddy `MatrixReg` using local mask regs -> `MatrixReg` using upstream mask regs
- IME `*N` instructions in disassembler tables -> mark affected instructions
`isCodeGenOnly = 1`
## Tool API and Link Libraries
- [#156715](llvm/llvm-project#156715) / dfbd76bda01e:
`Expected<std::unique_ptr<ToolOutputFile>>` from
`setupLLVMOptimizationRemarks` -> `Expected<LLVMRemarkFileHandle>`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, F)` ->
`codegen::setFunctionAttributes(F, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, *M)` ->
`codegen::setFunctionAttributes(*M, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#87226](llvm/llvm-project#87226) / d0e72ccc54df:
`TargetMachine::buildCodeGenPipeline(MPM, OS, DwoOut, FileType, Opt, PIC)` ->
pass `MAM` and `MMI.getContext()`
- [#170846](llvm/llvm-project#170846) / cd806d7e7689: `buddy-llc`
without `Plugins` -> link LLVM `Plugins`
- [#150805](llvm/llvm-project#150805) / ace42cf063a5,
[#151150](llvm/llvm-project#151150) / e68a20e0b762: implicit MLIR
register-all symbols -> link `MLIRRegisterAllDialects`,
`MLIRRegisterAllExtensions`, `MLIRRegisterAllPasses`
trdthg
added a commit
to buddy-compiler/buddy-mlir
that referenced
this pull request
May 29, 2026
- fetch branch / apply local patch -> fetch exact submodule commit with
`git fetch origin "${LLVM_COMMIT}"`
- `LLVM_COMMIT + riscv-jitlink.patch hash` -> `LLVM_COMMIT` cache key
- apply `riscv-jitlink.patch` -> no patch; current LLVM already has the fix
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: `nanobind` /
`nanobind==2.4.*` -> `nanobind>=2.9,<3.0` / `nanobind==2.9.*`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PybindAdaptors.h` -> `NanobindAdaptors.h`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PYBIND11_MODULE` -> `NB_MODULE`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: manual
pybind/nanobind CMake setup -> `mlir_configure_python_dev_packages()`
- [#162167](llvm/llvm-project#162167) / ea291d0e8c93:
`vector::SplatOp` -> `vector::BroadcastOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::InsertElementOp` -> `vector::InsertOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::ExtractElementOp` -> `vector::ExtractOp`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`ValueRange{std::nullopt}` -> `ValueRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`TypeRange(std::nullopt)` -> `TypeRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c: empty
`scf.yield` with null operands -> empty `scf.yield`
- [#196082](llvm/llvm-project#196082) / dd57b0c9728a:
`computeConstantBound(..., /*closedUB=*/true)` ->
`computeConstantBound(..., ValueBoundsOptions{/*closedUB=*/true})`
- [#182715](llvm/llvm-project#182715) / 72f5050ae765:
`applyPatternsAndFoldGreedily(...)` -> `applyPatternsGreedily(...)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`launchOp.getWorkgroupAttributions()` ->
`launchOp.getWorkgroupAttributionBBArgs()`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea: manual
`gpu.kernel` attr -> `outlinedFunc.setKernel(true)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`setAttr(getKnown*AttrName(), ...)` ->
`setKnownBlockSizeAttr(...)` / `setKnownGridSizeAttr(...)`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir/Dialect/AMX/AMXDialect.h` -> `mlir/Dialect/X86/X86Dialect.h`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir::amx::AMXDialect` -> `mlir::x86::X86Dialect`
- [#167271](llvm/llvm-project#167271) / 2345b7d98f75:
`InlineSizeEstimatorAnalysis.cpp` -> removed upstream; no Buddy source-list
entry needed
- [#172680](llvm/llvm-project#172680) / 71760f324ff9:
`ExpandLargeDivRem.cpp` -> merged into `ExpandFp.cpp`
- [#172681](llvm/llvm-project#172681) / 5c05824d2bd3:
`ExpandFp.cpp` / merged `ExpandLargeDivRem.cpp` -> `ExpandIRInsts.cpp`
- [#77370](llvm/llvm-project#77370) / 5e0a06b34d09:
`ExpandMemCmp.cpp` in CodeGen -> moved to `Transforms/Scalar`
- [#181547](llvm/llvm-project#181547) / 9a0d65cdfd0d:
`CallBrPrepare.cpp` -> `InlineAsmPrepare.cpp`
- [#160454](llvm/llvm-project#160454) / aa6a33ae6556:
`EVLIndVarSimplify.cpp` -> removed upstream; no Buddy source-list entry needed
- [#192635](llvm/llvm-project#192635) / 680a9908194e:
`VPlanSLP.cpp` -> removed upstream; no Buddy source-list entry needed
- local Buddy `M0`-`M7` definitions -> upstream RISC-V `M0`-`M7` definitions
- Buddy `MatrixReg` using local mask regs -> `MatrixReg` using upstream mask regs
- IME `*N` instructions in disassembler tables -> mark affected instructions
`isCodeGenOnly = 1`
- [#156715](llvm/llvm-project#156715) / dfbd76bda01e:
`Expected<std::unique_ptr<ToolOutputFile>>` from
`setupLLVMOptimizationRemarks` -> `Expected<LLVMRemarkFileHandle>`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, F)` ->
`codegen::setFunctionAttributes(F, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, *M)` ->
`codegen::setFunctionAttributes(*M, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#87226](llvm/llvm-project#87226) / d0e72ccc54df:
`TargetMachine::buildCodeGenPipeline(MPM, OS, DwoOut, FileType, Opt, PIC)` ->
pass `MAM` and `MMI.getContext()`
- [#170846](llvm/llvm-project#170846) / cd806d7e7689: `buddy-llc`
without `Plugins` -> link LLVM `Plugins`
- [#150805](llvm/llvm-project#150805) / ace42cf063a5,
[#151150](llvm/llvm-project#151150) / e68a20e0b762: implicit MLIR
register-all symbols -> link `MLIRRegisterAllDialects`,
`MLIRRegisterAllExtensions`, `MLIRRegisterAllPasses`
trdthg
added a commit
to buddy-compiler/buddy-mlir
that referenced
this pull request
May 29, 2026
- fetch branch / apply local patch -> fetch exact submodule commit with
`git fetch origin "${LLVM_COMMIT}"`
- `LLVM_COMMIT + riscv-jitlink.patch hash` -> `LLVM_COMMIT` cache key
- apply `riscv-jitlink.patch` -> no patch; current LLVM already has the fix
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: `nanobind` /
`nanobind==2.4.*` -> `nanobind>=2.9,<3.0` / `nanobind==2.9.*`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PybindAdaptors.h` -> `NanobindAdaptors.h`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PYBIND11_MODULE` -> `NB_MODULE`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: manual
pybind/nanobind CMake setup -> `mlir_configure_python_dev_packages()`
- [#162167](llvm/llvm-project#162167) / ea291d0e8c93:
`vector::SplatOp` -> `vector::BroadcastOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::InsertElementOp` -> `vector::InsertOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::ExtractElementOp` -> `vector::ExtractOp`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`ValueRange{std::nullopt}` -> `ValueRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`TypeRange(std::nullopt)` -> `TypeRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c: empty
`scf.yield` with null operands -> empty `scf.yield`
- [#196082](llvm/llvm-project#196082) / dd57b0c9728a:
`computeConstantBound(..., /*closedUB=*/true)` ->
`computeConstantBound(..., ValueBoundsOptions{/*closedUB=*/true})`
- [#182715](llvm/llvm-project#182715) / 72f5050ae765:
`applyPatternsAndFoldGreedily(...)` -> `applyPatternsGreedily(...)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`launchOp.getWorkgroupAttributions()` ->
`launchOp.getWorkgroupAttributionBBArgs()`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea: manual
`gpu.kernel` attr -> `outlinedFunc.setKernel(true)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`setAttr(getKnown*AttrName(), ...)` ->
`setKnownBlockSizeAttr(...)` / `setKnownGridSizeAttr(...)`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir/Dialect/AMX/AMXDialect.h` -> `mlir/Dialect/X86/X86Dialect.h`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir::amx::AMXDialect` -> `mlir::x86::X86Dialect`
- [#167271](llvm/llvm-project#167271) / 2345b7d98f75:
`InlineSizeEstimatorAnalysis.cpp` -> removed upstream; no Buddy source-list
entry needed
- [#172680](llvm/llvm-project#172680) / 71760f324ff9:
`ExpandLargeDivRem.cpp` -> merged into `ExpandFp.cpp`
- [#172681](llvm/llvm-project#172681) / 5c05824d2bd3:
`ExpandFp.cpp` / merged `ExpandLargeDivRem.cpp` -> `ExpandIRInsts.cpp`
- [#77370](llvm/llvm-project#77370) / 5e0a06b34d09:
`ExpandMemCmp.cpp` in CodeGen -> moved to `Transforms/Scalar`
- [#181547](llvm/llvm-project#181547) / 9a0d65cdfd0d:
`CallBrPrepare.cpp` -> `InlineAsmPrepare.cpp`
- [#160454](llvm/llvm-project#160454) / aa6a33ae6556:
`EVLIndVarSimplify.cpp` -> removed upstream; no Buddy source-list entry needed
- [#192635](llvm/llvm-project#192635) / 680a9908194e:
`VPlanSLP.cpp` -> removed upstream; no Buddy source-list entry needed
- local Buddy `M0`-`M7` definitions -> upstream RISC-V `M0`-`M7` definitions
- Buddy `MatrixReg` using local mask regs -> `MatrixReg` using upstream mask regs
- IME `*N` instructions in disassembler tables -> mark affected instructions
`isCodeGenOnly = 1`
- [#156715](llvm/llvm-project#156715) / dfbd76bda01e:
`Expected<std::unique_ptr<ToolOutputFile>>` from
`setupLLVMOptimizationRemarks` -> `Expected<LLVMRemarkFileHandle>`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, F)` ->
`codegen::setFunctionAttributes(F, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, *M)` ->
`codegen::setFunctionAttributes(*M, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#87226](llvm/llvm-project#87226) / d0e72ccc54df:
`TargetMachine::buildCodeGenPipeline(MPM, OS, DwoOut, FileType, Opt, PIC)` ->
pass `MAM` and `MMI.getContext()`
- [#170846](llvm/llvm-project#170846) / cd806d7e7689: `buddy-llc`
without `Plugins` -> link LLVM `Plugins`
- [#150805](llvm/llvm-project#150805) / ace42cf063a5,
[#151150](llvm/llvm-project#151150) / e68a20e0b762: implicit MLIR
register-all symbols -> link `MLIRRegisterAllDialects`,
`MLIRRegisterAllExtensions`, `MLIRRegisterAllPasses`
trdthg
added a commit
to buddy-compiler/buddy-mlir
that referenced
this pull request
Jun 1, 2026
- fetch branch / apply local patch -> fetch exact submodule commit with
`git fetch origin "${LLVM_COMMIT}"`
- `LLVM_COMMIT + riscv-jitlink.patch hash` -> `LLVM_COMMIT` cache key
- apply `riscv-jitlink.patch` -> no patch; current LLVM already has the fix
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: `nanobind` /
`nanobind==2.4.*` -> `nanobind>=2.9,<3.0` / `nanobind==2.9.*`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PybindAdaptors.h` -> `NanobindAdaptors.h`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97:
`PYBIND11_MODULE` -> `NB_MODULE`
- [#172581](llvm/llvm-project#172581) / 3d7018c70b97: manual
pybind/nanobind CMake setup -> `mlir_configure_python_dev_packages()`
- [#162167](llvm/llvm-project#162167) / ea291d0e8c93:
`vector::SplatOp` -> `vector::BroadcastOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::InsertElementOp` -> `vector::InsertOp`
- [#149603](llvm/llvm-project#149603) / 33465bb2bb75:
`vector::ExtractElementOp` -> `vector::ExtractOp`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`ValueRange{std::nullopt}` -> `ValueRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c:
`TypeRange(std::nullopt)` -> `TypeRange{}`
- [#145445](llvm/llvm-project#145445) / 63f30d7d820c: empty
`scf.yield` with null operands -> empty `scf.yield`
- [#196082](llvm/llvm-project#196082) / dd57b0c9728a:
`computeConstantBound(..., /*closedUB=*/true)` ->
`computeConstantBound(..., ValueBoundsOptions{/*closedUB=*/true})`
- [#182715](llvm/llvm-project#182715) / 72f5050ae765:
`applyPatternsAndFoldGreedily(...)` -> `applyPatternsGreedily(...)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`launchOp.getWorkgroupAttributions()` ->
`launchOp.getWorkgroupAttributionBBArgs()`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea: manual
`gpu.kernel` attr -> `outlinedFunc.setKernel(true)`
- [#188905](llvm/llvm-project#188905) / c1cff89bdcea:
`setAttr(getKnown*AttrName(), ...)` ->
`setKnownBlockSizeAttr(...)` / `setKnownGridSizeAttr(...)`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir/Dialect/AMX/AMXDialect.h` -> `mlir/Dialect/X86/X86Dialect.h`
- [#111197](llvm/llvm-project#111197) / 2f743ac52e94:
`mlir::amx::AMXDialect` -> `mlir::x86::X86Dialect`
- [#167271](llvm/llvm-project#167271) / 2345b7d98f75:
`InlineSizeEstimatorAnalysis.cpp` -> removed upstream; no Buddy source-list
entry needed
- [#172680](llvm/llvm-project#172680) / 71760f324ff9:
`ExpandLargeDivRem.cpp` -> merged into `ExpandFp.cpp`
- [#172681](llvm/llvm-project#172681) / 5c05824d2bd3:
`ExpandFp.cpp` / merged `ExpandLargeDivRem.cpp` -> `ExpandIRInsts.cpp`
- [#77370](llvm/llvm-project#77370) / 5e0a06b34d09:
`ExpandMemCmp.cpp` in CodeGen -> moved to `Transforms/Scalar`
- [#181547](llvm/llvm-project#181547) / 9a0d65cdfd0d:
`CallBrPrepare.cpp` -> `InlineAsmPrepare.cpp`
- [#160454](llvm/llvm-project#160454) / aa6a33ae6556:
`EVLIndVarSimplify.cpp` -> removed upstream; no Buddy source-list entry needed
- [#192635](llvm/llvm-project#192635) / 680a9908194e:
`VPlanSLP.cpp` -> removed upstream; no Buddy source-list entry needed
- local Buddy `M0`-`M7` definitions -> upstream RISC-V `M0`-`M7` definitions
- Buddy `MatrixReg` using local mask regs -> `MatrixReg` using upstream mask regs
- IME `*N` instructions in disassembler tables -> mark affected instructions
`isCodeGenOnly = 1`
- [#156715](llvm/llvm-project#156715) / dfbd76bda01e:
`Expected<std::unique_ptr<ToolOutputFile>>` from
`setupLLVMOptimizationRemarks` -> `Expected<LLVMRemarkFileHandle>`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, F)` ->
`codegen::setFunctionAttributes(F, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#186998](llvm/llvm-project#186998) / 69cd746bd2f1:
`codegen::setFunctionAttributes(CPUStr, FeaturesStr, *M)` ->
`codegen::setFunctionAttributes(*M, CPUStr, FeaturesStr[, TuneCPUStr])`
- [#87226](llvm/llvm-project#87226) / d0e72ccc54df:
`TargetMachine::buildCodeGenPipeline(MPM, OS, DwoOut, FileType, Opt, PIC)` ->
pass `MAM` and `MMI.getContext()`
- [#170846](llvm/llvm-project#170846) / cd806d7e7689: `buddy-llc`
without `Plugins` -> link LLVM `Plugins`
- [#150805](llvm/llvm-project#150805) / ace42cf063a5,
[#151150](llvm/llvm-project#151150) / e68a20e0b762: implicit MLIR
register-all symbols -> link `MLIRRegisterAllDialects`,
`MLIRRegisterAllExtensions`, `MLIRRegisterAllPasses`
markrvmurray
pushed a commit
to markrvmurray/llvm-mc6809
that referenced
this pull request
Jun 14, 2026
This patch adds a Clang-compatible -mtune option to opt, following up the addition to llc: llvm/llvm-project#186998, to enable decoupled ISA and microarchitecture targeting. Example use case is `MaxInterleaveFactor` for the loop vectorizer. The implementation registers the new codegen flag for opt, which consumes it and sets tune-cpu attributes for functions to be consumed by the backend.
AnthonyLatsis
pushed a commit
to swiftlang/llvm-project
that referenced
this pull request
Jul 16, 2026
(cherry picked from commit 69cd746)
apurvagandhi
pushed a commit
to fidelity-contributions/swiftlang-swift
that referenced
this pull request
Jul 17, 2026
```
lib/DriverTool/swift_llvm_opt_main.cpp:210:3: error: no matching function for call to 'setFunctionAttributes'
210 | llvm::codegen::setFunctionAttributes(CPUStr, FeaturesStr, *M);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
As part of the llvm-project change, this, the parameters of
`llvm::codegen::setFunctionAttributes` were reordered, and a new
optional `TuneCPU` parameter was added. swift-llvm-opt has no tune-cpu
concept, so the fix simply reorders the arguments.
See llvm/llvm-project@69cd746 (llvm/llvm-project#186998).
Assisted-by: Claude Code
Paul-Passeron
pushed a commit
to Paul-Passeron/swift
that referenced
this pull request
Jul 23, 2026
```
lib/DriverTool/swift_llvm_opt_main.cpp:210:3: error: no matching function for call to 'setFunctionAttributes'
210 | llvm::codegen::setFunctionAttributes(CPUStr, FeaturesStr, *M);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
As part of the llvm-project change, this, the parameters of
`llvm::codegen::setFunctionAttributes` were reordered, and a new
optional `TuneCPU` parameter was added. swift-llvm-opt has no tune-cpu
concept, so the fix simply reorders the arguments.
See llvm/llvm-project@69cd746 (llvm/llvm-project#186998).
Assisted-by: Claude Code
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.
This patch adds a Clang-compatible -mtune option to llc, to enable decoupled ISA and microarchitecture targeting, which is especially important for backend development. For example, it can enable to easily test a subtarget feature or scheduling model effects on codegen across a variaty of workloads on the IR corpus benchmark: https://github.com/dtcxzyw/llvm-codegen-benchmark.
The implementation adds an isolated generic codegen flag, to establish a base for wider usage - the plan is to add it to
optas well in a followup patch. Thenllcconsumes it, and setstune-cpuattributes for functions, which are further consumed by the backend.