diff options
| author | Paschalis Mpeis <paschalis.mpeis@arm.com> | 2025-10-03 09:13:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-03 09:13:09 +0100 |
| commit | 224a7176dc6afaec83bfcfdb7542d30a130997cc (patch) | |
| tree | f1907e02febcc0e975d6f23750dd1ffff93160bb /bolt/lib/Utils/CommandLineOpts.cpp | |
| parent | 19cd5bd350b730da35629de5095764861f70ecee (diff) | |
[BOLT][AArch64] Refuse to run CDSplit pass (#159351)
LongJmp does not support warm blocks.
On builds without assertions, this may lead to unexpected crashes.
This patch exits with a clear message.
Diffstat (limited to 'bolt/lib/Utils/CommandLineOpts.cpp')
| -rw-r--r-- | bolt/lib/Utils/CommandLineOpts.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index 5635da476451..095612ac3a4a 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -104,6 +104,29 @@ ExecutionCountThreshold("execution-count-threshold", cl::Hidden, cl::cat(BoltOptCategory)); +cl::opt<SplitFunctionsStrategy> SplitStrategy( + "split-strategy", cl::init(SplitFunctionsStrategy::Profile2), + cl::values(clEnumValN(SplitFunctionsStrategy::Profile2, "profile2", + "split each function into a hot and cold fragment " + "using profiling information")), + cl::values(clEnumValN(SplitFunctionsStrategy::CDSplit, "cdsplit", + "split each function into a hot, warm, and cold " + "fragment using profiling information")), + cl::values(clEnumValN( + SplitFunctionsStrategy::Random2, "random2", + "split each function into a hot and cold fragment at a randomly chosen " + "split point (ignoring any available profiling information)")), + cl::values(clEnumValN( + SplitFunctionsStrategy::RandomN, "randomN", + "split each function into N fragments at a randomly chosen split " + "points (ignoring any available profiling information)")), + cl::values(clEnumValN( + SplitFunctionsStrategy::All, "all", + "split all basic blocks of each function into fragments such that each " + "fragment contains exactly a single basic block")), + cl::desc("strategy used to partition blocks into fragments"), + cl::cat(BoltOptCategory)); + bool HeatmapBlockSpecParser::parse(cl::Option &O, StringRef ArgName, StringRef Arg, HeatmapBlockSizes &Val) { // Parses a human-readable suffix into a shift amount or nullopt on error. |
