Skip to content

Commit a241518

Browse files
liujunchangpaperchalice
liujunchang
authored andcommitted
[CodeGen][NewPM] Add necessary codegen options
Theses options are used by TargetPassConfig to build codegen pass pipeline, add them to CGPassBuilderOption so CodeGenPassBuilder can use them.
1 parent e21b7e2 commit a241518

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

llvm/include/llvm/Target/CGPassBuilderOption.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ struct CGPassBuilderOption {
3131
bool DisableVerify = false;
3232
bool EnableImplicitNullChecks = false;
3333
bool EnableBlockPlacementStats = false;
34+
bool EnableMachineFunctionSplitter = false;
3435
bool MISchedPostRA = false;
3536
bool EarlyLiveIntervals = false;
37+
bool GCEmptyBlocks = false;
3638

3739
bool DisableLSR = false;
3840
bool DisableCGP = false;
@@ -41,16 +43,25 @@ struct CGPassBuilderOption {
4143
bool DisablePartialLibcallInlining = false;
4244
bool DisableConstantHoisting = false;
4345
bool DisableSelectOptimize = true;
46+
bool DisableAtExitBasedGlobalDtorLowering = false;
47+
bool DisableExpandReductions = false;
48+
bool DisableRAFSProfileLoader = false;
49+
bool DisableCFIFixup = false;
50+
bool PrintAfterISel = false;
4451
bool PrintISelInput = false;
4552
bool RequiresCodeGenSCCOrder = false;
4653

4754
RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
4855
RegAllocType RegAlloc = RegAllocType::Default;
4956
std::optional<GlobalISelAbortMode> EnableGlobalISelAbort;
57+
std::string FSProfileFile;
58+
std::string FSRemappingFile;
5059

5160
std::optional<bool> VerifyMachineCode;
5261
std::optional<bool> EnableFastISelOption;
5362
std::optional<bool> EnableGlobalISelOption;
63+
std::optional<bool> DebugifyAndStripAll;
64+
std::optional<bool> DebugifyCheckAndStripAll;
5465
};
5566

5667
CGPassBuilderOption getCGPassBuilderOption();

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,11 @@ CGPassBuilderOption llvm::getCGPassBuilderOption() {
474474
SET_OPTION(EnableIPRA)
475475
SET_OPTION(OptimizeRegAlloc)
476476
SET_OPTION(VerifyMachineCode)
477+
SET_OPTION(DisableAtExitBasedGlobalDtorLowering)
478+
SET_OPTION(DisableExpandReductions)
479+
SET_OPTION(PrintAfterISel)
480+
SET_OPTION(FSProfileFile)
481+
SET_OPTION(GCEmptyBlocks)
477482

478483
#define SET_BOOLEAN_OPTION(Option) Opt.Option = Option;
479484

@@ -490,6 +495,11 @@ CGPassBuilderOption llvm::getCGPassBuilderOption() {
490495
SET_BOOLEAN_OPTION(DisableSelectOptimize)
491496
SET_BOOLEAN_OPTION(PrintLSR)
492497
SET_BOOLEAN_OPTION(PrintISelInput)
498+
SET_BOOLEAN_OPTION(DebugifyAndStripAll)
499+
SET_BOOLEAN_OPTION(DebugifyCheckAndStripAll)
500+
SET_BOOLEAN_OPTION(DisableRAFSProfileLoader)
501+
SET_BOOLEAN_OPTION(DisableCFIFixup)
502+
SET_BOOLEAN_OPTION(EnableMachineFunctionSplitter)
493503

494504
return Opt;
495505
}

0 commit comments

Comments
 (0)