Skip to content

Commit eec21cc

Browse files
authored
Fixed un-renamed CodeGenTargetMachineImpl Intheritances in Experimental Targets (#116290)
This PR fixes a set of build issues with experimental targets happened in result of merging #111234 to master.
1 parent 1857d29 commit eec21cc

File tree

11 files changed

+27
-23
lines changed

11 files changed

+27
-23
lines changed

llvm/include/llvm/CodeGen/TargetPassConfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ class TargetPassConfig : public ImmutablePass {
413413
virtual void addFastRegAlloc();
414414

415415
/// addOptimizedRegAlloc - Add passes related to register allocation.
416-
/// CodeGenCommonTMImpl provides standard regalloc passes for most targets.
416+
/// CodeGenTargetMachineImpl provides standard regalloc passes for most
417+
/// targets.
417418
virtual void addOptimizedRegAlloc();
418419

419420
/// addPreRewrite - Add passes to the optimized register allocation pipeline

llvm/include/llvm/MC/MCAsmInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ class MCAsmInfo {
484484
/// The integrated assembler should be enabled by default (by the
485485
/// constructors) when failing to parse a valid piece of assembly (inline
486486
/// or otherwise) is considered a bug. It may then be overridden after
487-
/// construction (see LLVMTargetMachine::initAsmInfo()).
487+
/// construction (see CodeGenTargetMachineImpl::initAsmInfo()).
488488
bool UseIntegratedAssembler;
489489

490490
/// Use AsmParser to parse inlineAsm when UseIntegratedAssembler is not set.

llvm/include/llvm/Passes/CodeGenPassBuilder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ template <typename DerivedT, typename TargetMachineT> class CodeGenPassBuilder {
443443
Error addFastRegAlloc(AddMachinePass &) const;
444444

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

449450
/// Add passes that optimize machine instructions after register allocation.

llvm/lib/Target/ARC/ARCTargetMachine.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ ARCTargetMachine::ARCTargetMachine(const Target &T, const Triple &TT,
3333
std::optional<Reloc::Model> RM,
3434
std::optional<CodeModel::Model> CM,
3535
CodeGenOptLevel OL, bool JIT)
36-
: CodeGenCommonTMImpl(T,
37-
"e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
38-
"f32:32:32-i64:32-f64:32-a:0:32-n32",
39-
TT, CPU, FS, Options, getRelocModel(RM),
40-
getEffectiveCodeModel(CM, CodeModel::Small), OL),
36+
: CodeGenTargetMachineImpl(
37+
T,
38+
"e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
39+
"f32:32:32-i64:32-f64:32-a:0:32-n32",
40+
TT, CPU, FS, Options, getRelocModel(RM),
41+
getEffectiveCodeModel(CM, CodeModel::Small), OL),
4142
TLOF(std::make_unique<TargetLoweringObjectFileELF>()),
4243
Subtarget(TT, std::string(CPU), std::string(FS), *this) {
4344
initAsmInfo();

llvm/lib/Target/CSKY/CSKYTargetMachine.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ CSKYTargetMachine::CSKYTargetMachine(const Target &T, const Triple &TT,
5454
std::optional<Reloc::Model> RM,
5555
std::optional<CodeModel::Model> CM,
5656
CodeGenOptLevel OL, bool JIT)
57-
: CodeGenCommonTMImpl(T, computeDataLayout(TT), TT, CPU, FS, Options,
58-
RM.value_or(Reloc::Static),
59-
getEffectiveCodeModel(CM, CodeModel::Small), OL),
57+
: CodeGenTargetMachineImpl(T, computeDataLayout(TT), TT, CPU, FS, Options,
58+
RM.value_or(Reloc::Static),
59+
getEffectiveCodeModel(CM, CodeModel::Small), OL),
6060
TLOF(std::make_unique<CSKYELFTargetObjectFile>()) {
6161
initAsmInfo();
6262
}

llvm/lib/Target/DirectX/DirectXTargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ DirectXTargetMachine::DirectXTargetMachine(const Target &T, const Triple &TT,
108108
std::optional<Reloc::Model> RM,
109109
std::optional<CodeModel::Model> CM,
110110
CodeGenOptLevel OL, bool JIT)
111-
: CodeGenCommonTMImpl(
111+
: CodeGenTargetMachineImpl(
112112
T,
113113
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-"
114114
"f32:32-f64:64-n8:16:32:64",

llvm/lib/Target/M68k/M68kTargetMachine.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ M68kTargetMachine::M68kTargetMachine(const Target &T, const Triple &TT,
100100
std::optional<Reloc::Model> RM,
101101
std::optional<CodeModel::Model> CM,
102102
CodeGenOptLevel OL, bool JIT)
103-
: CodeGenCommonTMImpl(T, computeDataLayout(TT, CPU, Options), TT, CPU, FS,
104-
Options, getEffectiveRelocModel(TT, RM),
105-
::getEffectiveCodeModel(CM, JIT), OL),
103+
: CodeGenTargetMachineImpl(T, computeDataLayout(TT, CPU, Options), TT, CPU,
104+
FS, Options, getEffectiveRelocModel(TT, RM),
105+
::getEffectiveCodeModel(CM, JIT), OL),
106106
TLOF(std::make_unique<M68kELFTargetObjectFile>()),
107107
Subtarget(TT, CPU, FS, *this) {
108108
initAsmInfo();

llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,8 @@ MipsTargetELFStreamer::MipsTargetELFStreamer(MCStreamer &S,
805805
ELFObjectWriter &W = getStreamer().getWriter();
806806

807807
// It's possible that MCObjectFileInfo isn't fully initialized at this point
808-
// due to an initialization order problem where CodeGenCommonTMImpl creates
809-
// the target streamer before TargetLoweringObjectFile calls
808+
// due to an initialization order problem where CodeGenTargetMachineImpl
809+
// creates the target streamer before TargetLoweringObjectFile calls
810810
// InitializeMCObjectFileInfo. There doesn't seem to be a single place that
811811
// covers all cases so this statement covers most cases and direct object
812812
// emission must call setPic() once MCObjectFileInfo has been initialized. The

llvm/lib/Target/PowerPC/PPCTargetMachine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ static ScheduleDAGInstrs *createPPCPostMachineScheduler(
345345

346346
// The FeatureString here is a little subtle. We are modifying the feature
347347
// string with what are (currently) non-function specific overrides as it goes
348-
// into the CodeGenCommonTMImpl constructor and then using the stored value in
349-
// the Subtarget constructor below it.
348+
// into the CodeGenTargetMachineImpl constructor and then using the stored value
349+
// in the Subtarget constructor below it.
350350
PPCTargetMachine::PPCTargetMachine(const Target &T, const Triple &TT,
351351
StringRef CPU, StringRef FS,
352352
const TargetOptions &Options,

llvm/lib/Target/SystemZ/SystemZTargetMachine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class SystemZTargetMachine : public CodeGenTargetMachineImpl {
4444
// attributes of each function.
4545
const SystemZSubtarget *getSubtargetImpl() const = delete;
4646

47-
// Override LLVMTargetMachine
47+
// Override CodeGenTargetMachineImpl
4848
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
4949
TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
5050

llvm/lib/Target/Xtensa/XtensaTargetMachine.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ XtensaTargetMachine::XtensaTargetMachine(const Target &T, const Triple &TT,
5050
std::optional<CodeModel::Model> CM,
5151
CodeGenOptLevel OL, bool JIT,
5252
bool IsLittle)
53-
: CodeGenCommonTMImpl(T, computeDataLayout(TT, CPU, Options, IsLittle), TT,
54-
CPU, FS, Options, getEffectiveRelocModel(JIT, RM),
55-
getEffectiveCodeModel(CM, CodeModel::Small), OL),
53+
: CodeGenTargetMachineImpl(T, computeDataLayout(TT, CPU, Options, IsLittle),
54+
TT, CPU, FS, Options,
55+
getEffectiveRelocModel(JIT, RM),
56+
getEffectiveCodeModel(CM, CodeModel::Small), OL),
5657
TLOF(std::make_unique<TargetLoweringObjectFileELF>()) {
5758
initAsmInfo();
5859
}

0 commit comments

Comments
 (0)