Skip to content

Fixed un-renamed CodeGenTargetMachineImpl Intheritances in Experimental Targets #116290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/include/llvm/CodeGen/TargetPassConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ class TargetPassConfig : public ImmutablePass {
virtual void addFastRegAlloc();

/// addOptimizedRegAlloc - Add passes related to register allocation.
/// CodeGenCommonTMImpl provides standard regalloc passes for most targets.
/// CodeGenTargetMachineImpl provides standard regalloc passes for most
/// targets.
virtual void addOptimizedRegAlloc();

/// addPreRewrite - Add passes to the optimized register allocation pipeline
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MC/MCAsmInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ class MCAsmInfo {
/// The integrated assembler should be enabled by default (by the
/// constructors) when failing to parse a valid piece of assembly (inline
/// or otherwise) is considered a bug. It may then be overridden after
/// construction (see LLVMTargetMachine::initAsmInfo()).
/// construction (see CodeGenTargetMachineImpl::initAsmInfo()).
bool UseIntegratedAssembler;

/// Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.
Expand Down
3 changes: 2 additions & 1 deletion llvm/include/llvm/Passes/CodeGenPassBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ template <typename DerivedT, typename TargetMachineT> class CodeGenPassBuilder {
Error addFastRegAlloc(AddMachinePass &) const;

/// addOptimizedRegAlloc - Add passes related to register allocation.
/// CodeGenCommonTMImpl provides standard regalloc passes for most targets.
/// CodeGenTargetMachineImpl provides standard regalloc passes for most
/// targets.
void addOptimizedRegAlloc(AddMachinePass &) const;

/// Add passes that optimize machine instructions after register allocation.
Expand Down
11 changes: 6 additions & 5 deletions llvm/lib/Target/ARC/ARCTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ ARCTargetMachine::ARCTargetMachine(const Target &T, const Triple &TT,
std::optional<Reloc::Model> RM,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: CodeGenCommonTMImpl(T,
"e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
"f32:32:32-i64:32-f64:32-a:0:32-n32",
TT, CPU, FS, Options, getRelocModel(RM),
getEffectiveCodeModel(CM, CodeModel::Small), OL),
: CodeGenTargetMachineImpl(
T,
"e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
"f32:32:32-i64:32-f64:32-a:0:32-n32",
TT, CPU, FS, Options, getRelocModel(RM),
getEffectiveCodeModel(CM, CodeModel::Small), OL),
TLOF(std::make_unique<TargetLoweringObjectFileELF>()),
Subtarget(TT, std::string(CPU), std::string(FS), *this) {
initAsmInfo();
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Target/CSKY/CSKYTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ CSKYTargetMachine::CSKYTargetMachine(const Target &T, const Triple &TT,
std::optional<Reloc::Model> RM,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: CodeGenCommonTMImpl(T, computeDataLayout(TT), TT, CPU, FS, Options,
RM.value_or(Reloc::Static),
getEffectiveCodeModel(CM, CodeModel::Small), OL),
: CodeGenTargetMachineImpl(T, computeDataLayout(TT), TT, CPU, FS, Options,
RM.value_or(Reloc::Static),
getEffectiveCodeModel(CM, CodeModel::Small), OL),
TLOF(std::make_unique<CSKYELFTargetObjectFile>()) {
initAsmInfo();
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ DirectXTargetMachine::DirectXTargetMachine(const Target &T, const Triple &TT,
std::optional<Reloc::Model> RM,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: CodeGenCommonTMImpl(
: CodeGenTargetMachineImpl(
T,
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-"
"f32:32-f64:64-n8:16:32:64",
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Target/M68k/M68kTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ M68kTargetMachine::M68kTargetMachine(const Target &T, const Triple &TT,
std::optional<Reloc::Model> RM,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: CodeGenCommonTMImpl(T, computeDataLayout(TT, CPU, Options), TT, CPU, FS,
Options, getEffectiveRelocModel(TT, RM),
::getEffectiveCodeModel(CM, JIT), OL),
: CodeGenTargetMachineImpl(T, computeDataLayout(TT, CPU, Options), TT, CPU,
FS, Options, getEffectiveRelocModel(TT, RM),
::getEffectiveCodeModel(CM, JIT), OL),
TLOF(std::make_unique<M68kELFTargetObjectFile>()),
Subtarget(TT, CPU, FS, *this) {
initAsmInfo();
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ MipsTargetELFStreamer::MipsTargetELFStreamer(MCStreamer &S,
ELFObjectWriter &W = getStreamer().getWriter();

// It's possible that MCObjectFileInfo isn't fully initialized at this point
// due to an initialization order problem where CodeGenCommonTMImpl creates
// the target streamer before TargetLoweringObjectFile calls
// due to an initialization order problem where CodeGenTargetMachineImpl
// creates the target streamer before TargetLoweringObjectFile calls
// InitializeMCObjectFileInfo. There doesn't seem to be a single place that
// covers all cases so this statement covers most cases and direct object
// emission must call setPic() once MCObjectFileInfo has been initialized. The
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ static ScheduleDAGInstrs *createPPCPostMachineScheduler(

// The FeatureString here is a little subtle. We are modifying the feature
// string with what are (currently) non-function specific overrides as it goes
// into the CodeGenCommonTMImpl constructor and then using the stored value in
// the Subtarget constructor below it.
// into the CodeGenTargetMachineImpl constructor and then using the stored value
// in the Subtarget constructor below it.
PPCTargetMachine::PPCTargetMachine(const Target &T, const Triple &TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/SystemZ/SystemZTargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SystemZTargetMachine : public CodeGenTargetMachineImpl {
// attributes of each function.
const SystemZSubtarget *getSubtargetImpl() const = delete;

// Override LLVMTargetMachine
// Override CodeGenTargetMachineImpl
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
TargetTransformInfo getTargetTransformInfo(const Function &F) const override;

Expand Down
7 changes: 4 additions & 3 deletions llvm/lib/Target/Xtensa/XtensaTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ XtensaTargetMachine::XtensaTargetMachine(const Target &T, const Triple &TT,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT,
bool IsLittle)
: CodeGenCommonTMImpl(T, computeDataLayout(TT, CPU, Options, IsLittle), TT,
CPU, FS, Options, getEffectiveRelocModel(JIT, RM),
getEffectiveCodeModel(CM, CodeModel::Small), OL),
: CodeGenTargetMachineImpl(T, computeDataLayout(TT, CPU, Options, IsLittle),
TT, CPU, FS, Options,
getEffectiveRelocModel(JIT, RM),
getEffectiveCodeModel(CM, CodeModel::Small), OL),
TLOF(std::make_unique<TargetLoweringObjectFileELF>()) {
initAsmInfo();
}
Expand Down
Loading