[TargetRegistry] Remove deprecated createTargetMachine#161053
Merged
boomanaiden154 merged 6 commits intollvm:mainfrom Oct 4, 2025
Merged
[TargetRegistry] Remove deprecated createTargetMachine#161053boomanaiden154 merged 6 commits intollvm:mainfrom
boomanaiden154 merged 6 commits intollvm:mainfrom
Conversation
This was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.
32eaa6c to
13f984f
Compare
Contributor
Author
|
Marking this as a draft for now. I want to land some PRs in downstreams that we import internally first:
EDIT: I've moved over everything internally. I don't think waiting on the last upstream to finish review is super necessary. |
Member
|
@llvm/pr-subscribers-llvm-mc Author: Aiden Grossman (boomanaiden154) ChangesThis was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate. Full diff: https://github.com/llvm/llvm-project/pull/161053.diff 1 Files Affected:
diff --git a/llvm/include/llvm/MC/TargetRegistry.h b/llvm/include/llvm/MC/TargetRegistry.h
index 019ee602975f7..570d4c0e8d272 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -389,6 +389,7 @@ class Target {
/// @name Feature Constructors
/// @{
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCAsmInfo *createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple,
const MCTargetOptions &Options) const {
@@ -440,6 +441,7 @@ class Target {
return MCInstrAnalysisCtorFn(Info);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCRegisterInfo *createMCRegInfo(StringRef TT) const {
if (!MCRegInfoCtorFn)
@@ -454,6 +456,7 @@ class Target {
return MCRegInfoCtorFn(TT);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCSubtargetInfo *createMCSubtargetInfo(StringRef TheTriple, StringRef CPU,
StringRef Features) const {
@@ -496,16 +499,6 @@ class Target {
JIT);
}
- [[deprecated("Use overload accepting Triple instead")]]
- TargetMachine *createTargetMachine(
- StringRef TT, StringRef CPU, StringRef Features,
- const TargetOptions &Options, std::optional<Reloc::Model> RM,
- std::optional<CodeModel::Model> CM = std::nullopt,
- CodeGenOptLevel OL = CodeGenOptLevel::Default, bool JIT = false) const {
- return createTargetMachine(Triple(TT), CPU, Features, Options, RM, CM, OL,
- JIT);
- }
-
/// createMCAsmBackend - Create a target specific assembly parser.
MCAsmBackend *createMCAsmBackend(const MCSubtargetInfo &STI,
const MCRegisterInfo &MRI,
@@ -599,6 +592,7 @@ class Target {
return nullptr;
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) const {
return createMCRelocationInfo(Triple(TT), Ctx);
@@ -616,6 +610,7 @@ class Target {
return Fn(TT, Ctx);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCSymbolizer *
createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
|
nikic
approved these changes
Oct 4, 2025
aokblast
pushed a commit
to aokblast/llvm-project
that referenced
this pull request
Oct 6, 2025
This was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.
lum1n0us
pushed a commit
to bytecodealliance/wasm-micro-runtime
that referenced
this pull request
Oct 9, 2025
The overload accepting the string version of a triple will be removed soon, so switch over to the one that accepts a triple object. llvm/llvm-project#161053
kr-t
pushed a commit
to project-ocre/wasm-micro-runtime
that referenced
this pull request
Nov 13, 2025
…nce#4650) The overload accepting the string version of a triple will be removed soon, so switch over to the one that accepts a triple object. llvm/llvm-project#161053
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 was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.