aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/argument-parsers.ts
diff options
context:
space:
mode:
authorJ. Ryan Stinnett <jryans@gmail.com>2023-12-12 01:35:45 +0000
committerGitHub <noreply@github.com>2023-12-11 19:35:45 -0600
commitf0e1d5d26490b4a62aaee35b4cfc700d6e3f8a1c (patch)
treeb238d2e81495603183d34adb65b6b33a715f1c25 /lib/compilers/argument-parsers.ts
parent7d3156ae5ffe62a9f8b9188ea7f8c92276f526a1 (diff)
downloadcompiler-explorer-f0e1d5d26490b4a62aaee35b4cfc700d6e3f8a1c.tar.gz
compiler-explorer-f0e1d5d26490b4a62aaee35b4cfc700d6e3f8a1c.zip
Add Racket optimisation pipeline (#5836)gh-9905
This adds a Racket optimisation pipeline view by reusing the existing LLVM-focused optimisation pipeline UI. A Racket-specific pass parser translates its output into passes for the UI to present. This new Racket optimisation pipeline view is currently only enabled for Racket nightly, as it depends on [recent changes](https://github.com/racket/racket/pull/4842) to Racket's compiler output to function. This also extends the opt pipeline view to allow customising the function selector label as well as the options and filters for each compiler where needed. ![image](https://github.com/compiler-explorer/compiler-explorer/assets/279572/f540b41e-fd55-4375-bb2d-a0bb977530b3) --------- Co-authored-by: Matt Godbolt <matt@godbolt.org>
Diffstat (limited to 'lib/compilers/argument-parsers.ts')
-rw-r--r--lib/compilers/argument-parsers.ts26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/compilers/argument-parsers.ts b/lib/compilers/argument-parsers.ts
index cd89e9783..026c61c3c 100644
--- a/lib/compilers/argument-parsers.ts
+++ b/lib/compilers/argument-parsers.ts
@@ -275,15 +275,16 @@ export class ClangParser extends BaseParser {
this.mllvmOptions.has('--print-before-all') &&
this.mllvmOptions.has('--print-after-all')
) {
- compiler.compiler.supportsOptPipelineView = true;
- compiler.compiler.optPipelineArg = ['-mllvm', '--print-before-all', '-mllvm', '--print-after-all'];
- compiler.compiler.optPipelineModuleScopeArg = [];
- compiler.compiler.optPipelineNoDiscardValueNamesArg = [];
+ compiler.compiler.optPipeline = {
+ arg: ['-mllvm', '--print-before-all', '-mllvm', '--print-after-all'],
+ moduleScopeArg: [],
+ noDiscardValueNamesArg: [],
+ };
if (this.mllvmOptions.has('--print-module-scope')) {
- compiler.compiler.optPipelineModuleScopeArg = ['-mllvm', '-print-module-scope'];
+ compiler.compiler.optPipeline.moduleScopeArg = ['-mllvm', '-print-module-scope'];
}
if (this.hasSupport(options, '-fno-discard-value-names')) {
- compiler.compiler.optPipelineNoDiscardValueNamesArg = ['-fno-discard-value-names'];
+ compiler.compiler.optPipeline.noDiscardValueNamesArg = ['-fno-discard-value-names'];
}
}
@@ -496,15 +497,16 @@ export class LDCParser extends BaseParser {
}
if (this.hasSupport(options, '--print-before-all') && this.hasSupport(options, '--print-after-all')) {
- compiler.compiler.supportsOptPipelineView = true;
- compiler.compiler.optPipelineArg = ['--print-before-all', '--print-after-all'];
- compiler.compiler.optPipelineModuleScopeArg = [];
- compiler.compiler.optPipelineNoDiscardValueNamesArg = [];
+ compiler.compiler.optPipeline = {
+ arg: ['--print-before-all', '--print-after-all'],
+ moduleScopeArg: [],
+ noDiscardValueNamesArg: [],
+ };
if (this.hasSupport(options, '--print-module-scope')) {
- compiler.compiler.optPipelineModuleScopeArg = ['--print-module-scope'];
+ compiler.compiler.optPipeline.moduleScopeArg = ['--print-module-scope'];
}
if (this.hasSupport(options, '--fno-discard-value-names')) {
- compiler.compiler.optPipelineNoDiscardValueNamesArg = ['--fno-discard-value-names'];
+ compiler.compiler.optPipeline.noDiscardValueNamesArg = ['--fno-discard-value-names'];
}
}