aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cypress/e2e/frontend.cy.ts2
-rw-r--r--docs/WhatIsCompilerExplorer.md2
-rw-r--r--lib/base-compiler.ts60
-rw-r--r--lib/compilers/argument-parsers.ts24
-rw-r--r--lib/compilers/hlsl.ts6
-rw-r--r--lib/compilers/llc.ts8
-rw-r--r--lib/compilers/opt.ts8
-rw-r--r--lib/compilers/rust.ts8
-rw-r--r--lib/compilers/snowball.ts2
-rw-r--r--lib/compilers/swift.ts8
-rw-r--r--lib/demangler/llvm.ts6
-rw-r--r--lib/parsers/llvm-pass-dump-parser.ts24
-rw-r--r--static/components.interfaces.ts10
-rw-r--r--static/components.ts20
-rw-r--r--static/event-map.ts10
-rw-r--r--static/hub.ts15
-rw-r--r--static/panes/cfg-view.ts2
-rw-r--r--static/panes/compiler.ts46
-rw-r--r--static/panes/opt-pipeline.interfaces.ts (renamed from static/panes/llvm-opt-pipeline.interfaces.ts)2
-rw-r--r--static/panes/opt-pipeline.ts (renamed from static/panes/llvm-opt-pipeline.ts)50
-rw-r--r--static/styles/explorer.scss4
-rw-r--r--static/styles/themes/default-theme.scss2
-rw-r--r--static/widgets/timing-info-widget.ts10
-rw-r--r--types/compilation/compilation.interfaces.ts8
-rw-r--r--types/compilation/opt-pipeline-output.interfaces.ts (renamed from types/compilation/llvm-opt-pipeline-output.interfaces.ts)10
-rw-r--r--types/compiler.interfaces.ts8
-rw-r--r--views/templates/panes/compiler.pug2
-rw-r--r--views/templates/panes/ir.pug2
-rw-r--r--views/templates/panes/opt-pipeline.pug (renamed from views/templates/panes/llvm-opt-pipeline.pug)10
-rw-r--r--views/templates/templates.pug2
30 files changed, 188 insertions, 183 deletions
diff --git a/cypress/e2e/frontend.cy.ts b/cypress/e2e/frontend.cy.ts
index 17f4017c0..6093406bd 100644
--- a/cypress/e2e/frontend.cy.ts
+++ b/cypress/e2e/frontend.cy.ts
@@ -10,7 +10,7 @@ const PANE_DATA_MAP = {
preprocessor: {name: 'Preprocessor', selector: 'view-pp'},
ast: {name: 'Ast Viewer', selector: 'view-ast'},
llvmir: {name: 'LLVM IR', selector: 'view-ir'},
- pipeline: {name: 'Pipeline', selector: 'view-llvm-opt-pipeline'},
+ pipeline: {name: 'Pipeline', selector: 'view-opt-pipeline'},
device: {name: 'Device', selector: 'view-device'},
mir: {name: 'MIR', selector: 'view-rustmir'},
hir: {name: 'HIR', selector: 'view-rusthir'},
diff --git a/docs/WhatIsCompilerExplorer.md b/docs/WhatIsCompilerExplorer.md
index 3ae077e14..a9d708cd6 100644
--- a/docs/WhatIsCompilerExplorer.md
+++ b/docs/WhatIsCompilerExplorer.md
@@ -139,7 +139,7 @@ Assembly views support extra child panes, and support tooling.
Child panes can be created with the "Add new..." button and include views that are compiler-specific. For example, for
`clang`-based compilers we can supply additional command-line options to the compiler to emit optimization information,
-and then display it with the "LLVM Opt Pipeline" pane. There are similar panes for the `gcc`-based compilers. Some
+and then display it with the "Opt Pipeline" pane. There are similar panes for the `gcc`-based compilers. Some
panes, like the "Control Flow Graph" work on most compilers.
Tool windows include separate binary tools that run over the result of compilation, independent of the compiler. For
diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts
index 9e3b9b27d..6a2ccf985 100644
--- a/lib/base-compiler.ts
+++ b/lib/base-compiler.ts
@@ -44,9 +44,9 @@ import {
bypassExecutionCache,
} from '../types/compilation/compilation.interfaces.js';
import type {
- LLVMOptPipelineBackendOptions,
- LLVMOptPipelineOutput,
-} from '../types/compilation/llvm-opt-pipeline-output.interfaces.js';
+ OptPipelineBackendOptions,
+ OptPipelineOutput,
+} from '../types/compilation/opt-pipeline-output.interfaces.js';
import type {CompilerInfo, ICompiler, PreliminaryCompilerInfo} from '../types/compiler.interfaces.js';
import {
BasicExecutionResult,
@@ -1349,8 +1349,8 @@ export class BaseCompiler implements ICompiler {
.filter(option => option !== '-fcolor-diagnostics')
.concat(unwrap(this.compiler.irArg));
- if (irOptions.noDiscardValueNames && this.compiler.llvmOptNoDiscardValueNamesArg) {
- newOptions.push(...this.compiler.llvmOptNoDiscardValueNamesArg);
+ if (irOptions.noDiscardValueNames && this.compiler.optPipelineNoDiscardValueNamesArg) {
+ newOptions.push(...this.compiler.optPipelineNoDiscardValueNamesArg);
}
const execOptions = this.getDefaultExecOptions();
@@ -1402,19 +1402,19 @@ export class BaseCompiler implements ICompiler {
};
}
- async generateLLVMOptPipeline(
+ async generateOptPipeline(
inputFilename: string,
options: string[],
filters: ParseFiltersAndOutputOptions,
- llvmOptPipelineOptions: LLVMOptPipelineBackendOptions,
- ): Promise<LLVMOptPipelineOutput | undefined> {
+ optPipelineOptions: OptPipelineBackendOptions,
+ ): Promise<OptPipelineOutput | undefined> {
// These options make Clang produce the pass dumps
const newOptions = options
.filter(option => option !== '-fcolor-diagnostics')
- .concat(unwrap(this.compiler.llvmOptArg))
- .concat(llvmOptPipelineOptions.fullModule ? unwrap(this.compiler.llvmOptModuleScopeArg) : [])
+ .concat(unwrap(this.compiler.optPipelineArg))
+ .concat(optPipelineOptions.fullModule ? unwrap(this.compiler.optPipelineModuleScopeArg) : [])
.concat(
- llvmOptPipelineOptions.noDiscardValueNames ? unwrap(this.compiler.llvmOptNoDiscardValueNamesArg) : [],
+ optPipelineOptions.noDiscardValueNames ? unwrap(this.compiler.optPipelineNoDiscardValueNamesArg) : [],
)
.concat(this.compiler.debugPatched ? ['-mllvm', '--debug-to-stdout'] : []);
@@ -1429,7 +1429,7 @@ export class BaseCompiler implements ICompiler {
return {
error: 'Clang invocation timed out',
results: {},
- clangTime: output.execTime || compileEnd - compileStart,
+ compileTime: output.execTime || compileEnd - compileStart,
};
}
@@ -1439,15 +1439,15 @@ export class BaseCompiler implements ICompiler {
try {
const parseStart = performance.now();
- const llvmOptPipeline = await this.processLLVMOptPipeline(
+ const optPipeline = await this.processOptPipeline(
output,
filters,
- llvmOptPipelineOptions,
+ optPipelineOptions,
this.compiler.debugPatched,
);
const parseEnd = performance.now();
- if (llvmOptPipelineOptions.demangle) {
+ if (optPipelineOptions.demangle) {
// apply demangles after parsing, would otherwise greatly complicate the parsing of the passes
// new this.demanglerClass(this.compiler.demangler, this);
const demangler = new LLVMIRDemangler(this.compiler.demangler, this);
@@ -1458,14 +1458,14 @@ export class BaseCompiler implements ICompiler {
demangler.collect({asm: output.stderr});
}
return {
- results: await demangler.demangleLLVMPasses(llvmOptPipeline),
- clangTime: compileEnd - compileStart,
+ results: await demangler.demangleLLVMPasses(optPipeline),
+ compileTime: compileEnd - compileStart,
parseTime: parseEnd - parseStart,
};
} else {
return {
- results: llvmOptPipeline,
- clangTime: compileEnd - compileStart,
+ results: optPipeline,
+ compileTime: compileEnd - compileStart,
parseTime: parseEnd - parseStart,
};
}
@@ -1473,21 +1473,21 @@ export class BaseCompiler implements ICompiler {
return {
error: e.toString(),
results: {},
- clangTime: compileEnd - compileStart,
+ compileTime: compileEnd - compileStart,
};
}
}
- async processLLVMOptPipeline(
+ async processOptPipeline(
output,
filters: ParseFiltersAndOutputOptions,
- llvmOptPipelineOptions: LLVMOptPipelineBackendOptions,
+ optPipelineOptions: OptPipelineBackendOptions,
debugPatched?: boolean,
) {
return this.llvmPassDumpParser.process(
debugPatched ? output.stdout : output.stderr,
filters,
- llvmOptPipelineOptions,
+ optPipelineOptions,
);
}
@@ -2228,7 +2228,7 @@ export class BaseCompiler implements ICompiler {
const makeGnatDebug = backendOptions.produceGnatDebug && this.compiler.supportsGnatDebugViews;
const makeGnatDebugTree = backendOptions.produceGnatDebugTree && this.compiler.supportsGnatDebugViews;
const makeIr = backendOptions.produceIr && this.compiler.supportsIrView;
- const makeLLVMOptPipeline = backendOptions.produceLLVMOptPipeline && this.compiler.supportsLLVMOptPipelineView;
+ const makeOptPipeline = backendOptions.produceOptPipeline && this.compiler.supportsOptPipelineView;
const makeRustMir = backendOptions.produceRustMir && this.compiler.supportsRustMirView;
const makeRustMacroExp = backendOptions.produceRustMacroExp && this.compiler.supportsRustMacroExpView;
const makeRustHir = backendOptions.produceRustHir && this.compiler.supportsRustHirView;
@@ -2244,7 +2244,7 @@ export class BaseCompiler implements ICompiler {
astResult,
ppResult,
irResult,
- llvmOptPipelineResult,
+ optPipelineResult,
rustHirResult,
rustMacroExpResult,
toolsResult,
@@ -2261,8 +2261,8 @@ export class BaseCompiler implements ICompiler {
filters,
)
: null,
- makeLLVMOptPipeline
- ? this.generateLLVMOptPipeline(inputFilename, options, filters, backendOptions.produceLLVMOptPipeline)
+ makeOptPipeline
+ ? this.generateOptPipeline(inputFilename, options, filters, backendOptions.produceOptPipeline)
: null,
makeRustHir ? this.generateRustHir(inputFilename, options) : null,
makeRustMacroExp ? this.generateRustMacroExpansion(inputFilename, options) : null,
@@ -2359,9 +2359,9 @@ export class BaseCompiler implements ICompiler {
asmResult.hasIrOutput = true;
asmResult.irOutput = irResult;
}
- if (llvmOptPipelineResult) {
- asmResult.hasLLVMOptPipelineOutput = true;
- asmResult.llvmOptPipelineOutput = llvmOptPipelineResult;
+ if (optPipelineResult) {
+ asmResult.hasOptPipelineOutput = true;
+ asmResult.optPipelineOutput = optPipelineResult;
}
if (rustMirResult) {
asmResult.hasRustMirOutput = true;
diff --git a/lib/compilers/argument-parsers.ts b/lib/compilers/argument-parsers.ts
index 604eb434a..cd89e9783 100644
--- a/lib/compilers/argument-parsers.ts
+++ b/lib/compilers/argument-parsers.ts
@@ -275,15 +275,15 @@ export class ClangParser extends BaseParser {
this.mllvmOptions.has('--print-before-all') &&
this.mllvmOptions.has('--print-after-all')
) {
- compiler.compiler.supportsLLVMOptPipelineView = true;
- compiler.compiler.llvmOptArg = ['-mllvm', '--print-before-all', '-mllvm', '--print-after-all'];
- compiler.compiler.llvmOptModuleScopeArg = [];
- compiler.compiler.llvmOptNoDiscardValueNamesArg = [];
+ compiler.compiler.supportsOptPipelineView = true;
+ compiler.compiler.optPipelineArg = ['-mllvm', '--print-before-all', '-mllvm', '--print-after-all'];
+ compiler.compiler.optPipelineModuleScopeArg = [];
+ compiler.compiler.optPipelineNoDiscardValueNamesArg = [];
if (this.mllvmOptions.has('--print-module-scope')) {
- compiler.compiler.llvmOptModuleScopeArg = ['-mllvm', '-print-module-scope'];
+ compiler.compiler.optPipelineModuleScopeArg = ['-mllvm', '-print-module-scope'];
}
if (this.hasSupport(options, '-fno-discard-value-names')) {
- compiler.compiler.llvmOptNoDiscardValueNamesArg = ['-fno-discard-value-names'];
+ compiler.compiler.optPipelineNoDiscardValueNamesArg = ['-fno-discard-value-names'];
}
}
@@ -496,15 +496,15 @@ export class LDCParser extends BaseParser {
}
if (this.hasSupport(options, '--print-before-all') && this.hasSupport(options, '--print-after-all')) {
- compiler.compiler.supportsLLVMOptPipelineView = true;
- compiler.compiler.llvmOptArg = ['--print-before-all', '--print-after-all'];
- compiler.compiler.llvmOptModuleScopeArg = [];
- compiler.compiler.llvmOptNoDiscardValueNamesArg = [];
+ compiler.compiler.supportsOptPipelineView = true;
+ compiler.compiler.optPipelineArg = ['--print-before-all', '--print-after-all'];
+ compiler.compiler.optPipelineModuleScopeArg = [];
+ compiler.compiler.optPipelineNoDiscardValueNamesArg = [];
if (this.hasSupport(options, '--print-module-scope')) {
- compiler.compiler.llvmOptModuleScopeArg = ['--print-module-scope'];
+ compiler.compiler.optPipelineModuleScopeArg = ['--print-module-scope'];
}
if (this.hasSupport(options, '--fno-discard-value-names')) {
- compiler.compiler.llvmOptNoDiscardValueNamesArg = ['--fno-discard-value-names'];
+ compiler.compiler.optPipelineNoDiscardValueNamesArg = ['--fno-discard-value-names'];
}
}
diff --git a/lib/compilers/hlsl.ts b/lib/compilers/hlsl.ts
index 0b5662ac7..c4d2f8e48 100644
--- a/lib/compilers/hlsl.ts
+++ b/lib/compilers/hlsl.ts
@@ -41,9 +41,9 @@ export class HLSLCompiler extends BaseCompiler {
this.compiler.supportsIntel = false;
this.spirvAsm = new SPIRVAsmParser(this.compilerProps);
- this.compiler.supportsLLVMOptPipelineView = true;
- this.compiler.llvmOptArg = ['-print-before-all', '-print-after-all'];
- this.compiler.llvmOptNoDiscardValueNamesArg = [];
+ this.compiler.supportsOptPipelineView = true;
+ this.compiler.optPipelineArg = ['-print-before-all', '-print-after-all'];
+ this.compiler.optPipelineNoDiscardValueNamesArg = [];
}
override async generateAST(inputFilename, options): Promise<ResultLine[]> {
diff --git a/lib/compilers/llc.ts b/lib/compilers/llc.ts
index f15915321..dc7144817 100644
--- a/lib/compilers/llc.ts
+++ b/lib/compilers/llc.ts
@@ -36,10 +36,10 @@ export class LLCCompiler extends BaseCompiler {
constructor(info: PreliminaryCompilerInfo, env) {
super(info, env);
this.compiler.supportsIntel = true;
- this.compiler.supportsLLVMOptPipelineView = true;
- this.compiler.llvmOptArg = ['-print-after-all', '-print-before-all'];
- this.compiler.llvmOptModuleScopeArg = ['-print-module-scope'];
- this.compiler.llvmOptNoDiscardValueNamesArg = [];
+ this.compiler.supportsOptPipelineView = true;
+ this.compiler.optPipelineArg = ['-print-after-all', '-print-before-all'];
+ this.compiler.optPipelineModuleScopeArg = ['-print-module-scope'];
+ this.compiler.optPipelineNoDiscardValueNamesArg = [];
}
override getSharedLibraryPathsAsArguments() {
diff --git a/lib/compilers/opt.ts b/lib/compilers/opt.ts
index f5c0d4cb6..418230f31 100644
--- a/lib/compilers/opt.ts
+++ b/lib/compilers/opt.ts
@@ -35,10 +35,10 @@ export class OptCompiler extends BaseCompiler {
constructor(info: PreliminaryCompilerInfo, env) {
super(info, env);
- this.compiler.supportsLLVMOptPipelineView = true;
- this.compiler.llvmOptArg = ['-print-after-all', '-print-before-all'];
- this.compiler.llvmOptModuleScopeArg = ['-print-module-scope'];
- this.compiler.llvmOptNoDiscardValueNamesArg = [];
+ this.compiler.supportsOptPipelineView = true;
+ this.compiler.optPipelineArg = ['-print-after-all', '-print-before-all'];
+ this.compiler.optPipelineModuleScopeArg = ['-print-module-scope'];
+ this.compiler.optPipelineNoDiscardValueNamesArg = [];
}
override optionsForFilter(filters: ParseFiltersAndOutputOptions, outputFilename: string) {
diff --git a/lib/compilers/rust.ts b/lib/compilers/rust.ts
index 98683f6d9..e57a86840 100644
--- a/lib/compilers/rust.ts
+++ b/lib/compilers/rust.ts
@@ -49,7 +49,7 @@ export class RustCompiler extends BaseCompiler {
super(info, env);
this.compiler.supportsIntel = true;
this.compiler.supportsIrView = true;
- this.compiler.supportsLLVMOptPipelineView = true;
+ this.compiler.supportsOptPipelineView = true;
this.compiler.supportsRustMirView = true;
const isNightly = this.isNightly();
@@ -60,9 +60,9 @@ export class RustCompiler extends BaseCompiler {
this.compiler.irArg = ['--emit', 'llvm-ir'];
this.compiler.minIrArgs = ['--emit=llvm-ir'];
- this.compiler.llvmOptArg = ['-C', 'llvm-args=-print-after-all -print-before-all'];
- this.compiler.llvmOptModuleScopeArg = ['-C', 'llvm-args=-print-module-scope'];
- this.compiler.llvmOptNoDiscardValueNamesArg = isNightly ? ['-Z', 'fewer-names=no'] : [];
+ this.compiler.optPipelineArg = ['-C', 'llvm-args=-print-after-all -print-before-all'];
+ this.compiler.optPipelineModuleScopeArg = ['-C', 'llvm-args=-print-module-scope'];
+ this.compiler.optPipelineNoDiscardValueNamesArg = isNightly ? ['-Z', 'fewer-names=no'] : [];
this.linker = this.compilerProps<string>('linker');
}
diff --git a/lib/compilers/snowball.ts b/lib/compilers/snowball.ts
index b39c09808..2e3a3d1e2 100644
--- a/lib/compilers/snowball.ts
+++ b/lib/compilers/snowball.ts
@@ -40,7 +40,7 @@ export class SnowballCompiler extends BaseCompiler {
super(info, env);
this.compiler.supportsIntel = true;
this.compiler.supportsIrView = true;
- this.compiler.supportsLLVMOptPipelineView = true;
+ this.compiler.supportsOptPipelineView = true;
this.compiler.supportsCfg = true;
this.compiler.irArg = ['--emit', 'llvm-ir'];
diff --git a/lib/compilers/swift.ts b/lib/compilers/swift.ts
index 6b4406aeb..7d943752f 100644
--- a/lib/compilers/swift.ts
+++ b/lib/compilers/swift.ts
@@ -35,10 +35,10 @@ export class SwiftCompiler extends BaseCompiler {
constructor(info: PreliminaryCompilerInfo, env) {
super(info, env);
- this.compiler.supportsLLVMOptPipelineView = true;
- this.compiler.llvmOptArg = ['-Xllvm', '-print-after-all', '-Xllvm', '-print-before-all'];
- this.compiler.llvmOptModuleScopeArg = ['-Xllvm', '-print-module-scope'];
- this.compiler.llvmOptNoDiscardValueNamesArg = [];
+ this.compiler.supportsOptPipelineView = true;
+ this.compiler.optPipelineArg = ['-Xllvm', '-print-after-all', '-Xllvm', '-print-before-all'];
+ this.compiler.optPipelineModuleScopeArg = ['-Xllvm', '-print-module-scope'];
+ this.compiler.optPipelineNoDiscardValueNamesArg = [];
}
override getSharedLibraryPathsAsArguments() {
diff --git a/lib/demangler/llvm.ts b/lib/demangler/llvm.ts
index a7144207b..5d4b247b9 100644
--- a/lib/demangler/llvm.ts
+++ b/lib/demangler/llvm.ts
@@ -22,7 +22,7 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-import {LLVMOptPipelineResults} from '../../types/compilation/llvm-opt-pipeline-output.interfaces.js';
+import {OptPipelineResults} from '../../types/compilation/opt-pipeline-output.interfaces.js';
import {ResultLine} from '../../types/resultline/resultline.interfaces.js';
import {logger} from '../logger.js';
import {SymbolStore} from '../symbol-store.js';
@@ -59,7 +59,7 @@ export class LLVMIRDemangler extends BaseDemangler {
}
}
- protected processPassOutput(passOutput: LLVMOptPipelineResults, demanglerOutput) {
+ protected processPassOutput(passOutput: OptPipelineResults, demanglerOutput) {
if (demanglerOutput.stdout.length === 0 && demanglerOutput.stderr.length > 0) {
logger.error(`Error executing demangler ${this.demanglerExe}`, demanglerOutput);
return passOutput;
@@ -95,7 +95,7 @@ export class LLVMIRDemangler extends BaseDemangler {
return passOutput;
}
- public async demangleLLVMPasses(passOutput: LLVMOptPipelineResults) {
+ public async demangleLLVMPasses(passOutput: OptPipelineResults) {
const options = {
input: this.getInput(),
};
diff --git a/lib/parsers/llvm-pass-dump-parser.ts b/lib/parsers/llvm-pass-dump-parser.ts
index 0729bcc82..5786dccee 100644
--- a/lib/parsers/llvm-pass-dump-parser.ts
+++ b/lib/parsers/llvm-pass-dump-parser.ts
@@ -23,10 +23,10 @@
// POSSIBILITY OF SUCH DAMAGE.
import {
- LLVMOptPipelineBackendOptions,
- LLVMOptPipelineResults,
+ OptPipelineBackendOptions,
+ OptPipelineResults,
Pass,
-} from '../../types/compilation/llvm-opt-pipeline-output.interfaces.js';
+} from '../../types/compilation/opt-pipeline-output.interfaces.js';
import {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
import {ResultLine} from '../../types/resultline/resultline.interfaces.js';
import {assert} from '../assert.js';
@@ -345,7 +345,7 @@ export class LlvmPassDumpParser {
matchPassDumps(passDumpsByFunction: Record<string, PassDump[]>) {
// We have all the passes for each function, now we will go through each function and match the before/after
// dumps
- const final_output: LLVMOptPipelineResults = {};
+ const final_output: OptPipelineResults = {};
for (const [function_name, passDumps] of Object.entries(passDumpsByFunction)) {
// I had a fantastic chunk2 method to iterate the passes in chunks of 2 but I've been foiled by an edge
// case: At least the "Delete dead loops" may only print a before dump and no after dump
@@ -414,10 +414,10 @@ export class LlvmPassDumpParser {
return final_output;
}
- breakdownOutput(ir: ResultLine[], llvmOptPipelineOptions: LLVMOptPipelineBackendOptions) {
+ breakdownOutput(ir: ResultLine[], optPipelineOptions: OptPipelineBackendOptions) {
// break down output by "*** IR Dump After XYZ ***" markers
const raw_passes = this.breakdownOutputIntoPassDumps(ir);
- if (llvmOptPipelineOptions.fullModule) {
+ if (optPipelineOptions.fullModule) {
const passDumpsByFunction = this.associateFullDumpsWithFunctions(raw_passes);
// Match before / after pass dumps and we're done
return this.matchPassDumps(passDumpsByFunction);
@@ -432,15 +432,15 @@ export class LlvmPassDumpParser {
}
}
- applyIrFilters(ir: ResultLine[], llvmOptPipelineOptions: LLVMOptPipelineBackendOptions) {
+ applyIrFilters(ir: ResultLine[], optPipelineOptions: OptPipelineBackendOptions) {
// Additional filters conditionally enabled by `filterDebugInfo`/`filterIRMetadata`
let filters = this.filters;
let lineFilters = this.lineFilters;
- if (llvmOptPipelineOptions.filterDebugInfo) {
+ if (optPipelineOptions.filterDebugInfo) {
filters = filters.concat(this.debugInfoFilters);
lineFilters = lineFilters.concat(this.debugInfoLineFilters);
}
- if (llvmOptPipelineOptions.filterIRMetadata) {
+ if (optPipelineOptions.filterIRMetadata) {
lineFilters = lineFilters.concat(this.metadataLineFilters);
}
@@ -472,13 +472,13 @@ export class LlvmPassDumpParser {
process(
output: ResultLine[],
_: ParseFiltersAndOutputOptions,
- llvmOptPipelineOptions: LLVMOptPipelineBackendOptions,
+ optPipelineOptions: OptPipelineBackendOptions,
) {
// Crop out any junk before the pass dumps (e.g. warnings)
const ir = output.slice(
output.findIndex(line => line.text.match(this.irDumpHeader) || line.text.match(this.machineCodeDumpHeader)),
);
- const preprocessed_lines = this.applyIrFilters(ir, llvmOptPipelineOptions);
- return this.breakdownOutput(preprocessed_lines, llvmOptPipelineOptions);
+ const preprocessed_lines = this.applyIrFilters(ir, optPipelineOptions);
+ return this.breakdownOutput(preprocessed_lines, optPipelineOptions);
}
}
diff --git a/static/components.interfaces.ts b/static/components.interfaces.ts
index 932b3214b..7f174264b 100644
--- a/static/components.interfaces.ts
+++ b/static/components.interfaces.ts
@@ -24,7 +24,7 @@
import {CompilerOutputOptions} from '../types/features/filters.interfaces.js';
import {CfgState} from './panes/cfg-view.interfaces.js';
-import {LLVMOptPipelineViewState} from './panes/llvm-opt-pipeline.interfaces.js';
+import {OptPipelineViewState} from './panes/opt-pipeline.interfaces.js';
import {GccDumpViewState} from './panes/gccdump-view.interfaces.js';
import {ConfiguredOverrides} from './compilation/compiler-overrides.interfaces.js';
import {ConfiguredRuntimeTools} from './execution/execution.interfaces.js';
@@ -47,6 +47,8 @@ export const GCC_DUMP_VIEW_COMPONENT_NAME = 'gccdump';
export const CFG_VIEW_COMPONENT_NAME = 'cfg';
export const CONFORMANCE_VIEW_COMPONENT_NAME = 'conformance';
export const IR_VIEW_COMPONENT_NAME = 'ir';
+export const OPT_PIPELINE_VIEW_COMPONENT_NAME = 'optPipelineView';
+// Historical LLVM-specific name preserved to keep old links working
export const LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME = 'llvmOptPipelineView';
export const RUST_MIR_VIEW_COMPONENT_NAME = 'rustmir';
export const HASKELL_CORE_VIEW_COMPONENT_NAME = 'haskellCore';
@@ -213,9 +215,9 @@ export type PopulatedIrViewState = StateWithId &
compilerName: string;
};
-export type EmptyLLVMOptPipelineViewState = EmptyState;
-export type PopulatedLLVMOptPipelineViewState = StateWithId &
- LLVMOptPipelineViewState & {
+export type EmptyOptPipelineViewState = EmptyState;
+export type PopulatedOptPipelineViewState = StateWithId &
+ OptPipelineViewState & {
compilerName: string;
editorid: number;
treeid: number;
diff --git a/static/components.ts b/static/components.ts
index fad988dc2..e9ec90230 100644
--- a/static/components.ts
+++ b/static/components.ts
@@ -101,9 +101,9 @@ import {
RUST_MACRO_EXP_VIEW_COMPONENT_NAME,
RUST_HIR_VIEW_COMPONENT_NAME,
DEVICE_VIEW_COMPONENT_NAME,
- LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME,
- EmptyLLVMOptPipelineViewState,
- PopulatedLLVMOptPipelineViewState,
+ OPT_PIPELINE_VIEW_COMPONENT_NAME,
+ EmptyOptPipelineViewState,
+ PopulatedOptPipelineViewState,
PopulatedStackUsageViewState,
EmptyStackUsageViewState,
} from './components.interfaces.js';
@@ -625,25 +625,25 @@ export function getIrViewWith(
};
}
-/** Get an empty ir view component. */
-export function getLLVMOptPipelineView(): ComponentConfig<EmptyLLVMOptPipelineViewState> {
+/** Get an empty opt pipeline view component. */
+export function getOptPipelineView(): ComponentConfig<EmptyOptPipelineViewState> {
return {
type: 'component',
- componentName: LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME,
+ componentName: OPT_PIPELINE_VIEW_COMPONENT_NAME,
componentState: {},
};
}
-/** Get a ir view with the given configuration. */
-export function getLLVMOptPipelineViewWith(
+/** Get a opt pipeline view with the given configuration. */
+export function getOptPipelineViewWith(
id: number,
compilerName: string,
editorid: number,
treeid: number,
-): ComponentConfig<PopulatedLLVMOptPipelineViewState> {
+): ComponentConfig<PopulatedOptPipelineViewState> {
return {
type: 'component',
- componentName: LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME,
+ componentName: OPT_PIPELINE_VIEW_COMPONENT_NAME,
componentState: {
id,
compilerName,
diff --git a/static/event-map.ts b/static/event-map.ts
index 609cb1c5f..92807ea71 100644
--- a/static/event-map.ts
+++ b/static/event-map.ts
@@ -32,7 +32,7 @@ import {GccDumpFiltersState, GccDumpViewSelectedPass} from './panes/gccdump-view
import {Motd} from './motd.interfaces.js';
import {CompilerInfo} from '../types/compiler.interfaces.js';
import {CompilationResult} from '../types/compilation/compilation.interfaces.js';
-import {LLVMOptPipelineBackendOptions} from './compilation/llvm-opt-pipeline-output.interfaces.js';
+import {OptPipelineBackendOptions} from './compilation/opt-pipeline-output.interfaces.js';
import {LLVMIrBackendOptions} from './compilation/ir.interfaces.js';
// This list comes from executing
@@ -112,11 +112,11 @@ export type EventMap = {
initialised: () => void;
irViewClosed: (compilerId: number) => void;
irViewOpened: (compilerId: number) => void;
- llvmOptPipelineViewClosed: (compilerId: number) => void;
- llvmOptPipelineViewOpened: (compilerId: number) => void;
- llvmOptPipelineViewOptionsUpdated: (
+ optPipelineViewClosed: (compilerId: number) => void;
+ optPipelineViewOpened: (compilerId: number) => void;
+ optPipelineViewOptionsUpdated: (
compilerId: number,
- options: LLVMOptPipelineBackendOptions,
+ options: OptPipelineBackendOptions,
recompile: boolean,
) => void;
llvmIrViewOptionsUpdated: (compilerId: number, options: LLVMIrBackendOptions, recompile: boolean) => void;
diff --git a/static/hub.ts b/static/hub.ts
index 71f1987bc..431f0294e 100644
--- a/static/hub.ts
+++ b/static/hub.ts
@@ -42,6 +42,7 @@ import {
HASKELL_CORE_VIEW_COMPONENT_NAME,
HASKELL_STG_VIEW_COMPONENT_NAME,
IR_VIEW_COMPONENT_NAME,
+ OPT_PIPELINE_VIEW_COMPONENT_NAME,
LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME,
OPT_VIEW_COMPONENT_NAME,
STACK_USAGE_VIEW_COMPONENT_NAME,
@@ -69,7 +70,7 @@ import {Flags as FlagsView} from './panes/flags-view.js';
import {PP as PreProcessorView} from './panes/pp-view.js';
import {Ast as AstView} from './panes/ast-view.js';
import {Ir as IrView} from './panes/ir-view.js';
-import {LLVMOptPipeline} from './panes/llvm-opt-pipeline.js';
+import {OptPipeline} from './panes/opt-pipeline.js';
import {DeviceAsm as DeviceView} from './panes/device-view.js';
import {GnatDebug as GnatDebugView} from './panes/gnatdebug-view.js';
import {RustMir as RustMirView} from './panes/rustmir-view.js';
@@ -132,7 +133,9 @@ export class Hub {
layout.registerComponent(PP_VIEW_COMPONENT_NAME, (c, s) => this.ppViewFactory(c, s));
layout.registerComponent(AST_VIEW_COMPONENT_NAME, (c, s) => this.astViewFactory(c, s));
layout.registerComponent(IR_VIEW_COMPONENT_NAME, (c, s) => this.irViewFactory(c, s));
- layout.registerComponent(LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME, (c, s) => this.llvmOptPipelineFactory(c, s));
+ layout.registerComponent(OPT_PIPELINE_VIEW_COMPONENT_NAME, (c, s) => this.optPipelineFactory(c, s));
+ // Historical LLVM-specific name preserved to keep old links working
+ layout.registerComponent(LLVM_OPT_PIPELINE_VIEW_COMPONENT_NAME, (c, s) => this.optPipelineFactory(c, s));
layout.registerComponent(DEVICE_VIEW_COMPONENT_NAME, (c, s) => this.deviceViewFactory(c, s));
layout.registerComponent(RUST_MIR_VIEW_COMPONENT_NAME, (c, s) => this.rustMirViewFactory(c, s));
layout.registerComponent(HASKELL_CORE_VIEW_COMPONENT_NAME, (c, s) => this.haskellCoreViewFactory(c, s));
@@ -462,11 +465,11 @@ export class Hub {
return new IrView(this, container, state);
}
- public llvmOptPipelineFactory(
+ public optPipelineFactory(
container: GoldenLayout.Container,
- state: ConstructorParameters<typeof LLVMOptPipeline>[2],
- ): LLVMOptPipeline {
- return new LLVMOptPipeline(this, container, state);
+ state: ConstructorParameters<typeof OptPipeline>[2],
+ ): OptPipeline {
+ return new OptPipeline(this, container, state);
}
public deviceViewFactory(
diff --git a/static/panes/cfg-view.ts b/static/panes/cfg-view.ts
index 564194cbc..4d2a76a52 100644
--- a/static/panes/cfg-view.ts
+++ b/static/panes/cfg-view.ts
@@ -311,7 +311,7 @@ export class Cfg extends Pane<CfgState> {
this.compilerInfo.editorId = editorId;
this.compilerInfo.treeId = treeId;
this.updateTitle();
- if (compiler && !compiler.supportsLLVMOptPipelineView) {
+ if (compiler && !compiler.supportsOptPipelineView) {
//this.editor.setValue('<LLVM IR output is not supported for this compiler>');
}
}
diff --git a/static/panes/compiler.ts b/static/panes/compiler.ts
index df96cff20..49e379748 100644
--- a/static/panes/compiler.ts
+++ b/static/panes/compiler.ts
@@ -56,7 +56,7 @@ import {AssemblyInstructionInfo} from '../../lib/asm-docs/base.js';
import {PPOptions} from './pp-view.interfaces.js';
import {CompilationStatus} from '../compiler-service.interfaces.js';
import {WidgetState} from '../widgets/libs-widget.interfaces.js';
-import {LLVMOptPipelineBackendOptions} from '../../types/compilation/llvm-opt-pipeline-output.interfaces.js';
+import {OptPipelineBackendOptions} from '../compilation/opt-pipeline-output.interfaces.js';
import {
ActiveTools,
BypassCache,
@@ -186,7 +186,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
private ppButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
private astButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
private irButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
- private llvmOptPipelineButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
+ private optPipelineButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
private deviceButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
private gnatDebugTreeButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
private gnatDebugButton: JQuery<HTMLElementTagNameMap[keyof HTMLElementTagNameMap]>;
@@ -254,7 +254,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
private ppViewOpen: boolean;
private astViewOpen: boolean;
private irViewOpen: boolean;
- private llvmOptPipelineViewOpenCount: number;
+ private optPipelineViewOpenCount: number;
private gccDumpViewOpen: boolean;
private gccDumpPassSelected?: GccDumpViewSelectedPass;
private treeDumpEnabled?: boolean;
@@ -271,7 +271,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
private haskellCmmViewOpen: boolean;
private ppOptions: PPOptions;
private llvmIrOptions: LLVMIrBackendOptions;
- private llvmOptPipelineOptions: LLVMOptPipelineBackendOptions;
+ private optPipelineOptions: OptPipelineBackendOptions;
private isOutputOpened: boolean;
private mouseMoveThrottledFunction?: ((e: monaco.editor.IEditorMouseEvent) => void) & _.Cancelable;
private cursorSelectionThrottledFunction?: ((e: monaco.editor.ICursorSelectionChangedEvent) => void) & _.Cancelable;
@@ -302,7 +302,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
this.optViewOpen = false;
this.cfgViewOpenCount = 0;
this.irCfgViewOpenCount = 0;
- this.llvmOptPipelineViewOpenCount = 0;
+ this.optPipelineViewOpenCount = 0;
this.decorations = {
labelUsages: [],
@@ -529,8 +529,8 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
);
};
- const createLLVMOptPipelineView = () => {
- return Components.getLLVMOptPipelineViewWith(
+ const createOptPipelineView = () => {
+ return Components.getOptPipelineViewWith(
this.id,
this.getCompilerName(),
this.sourceEditorId ?? 0,
@@ -780,16 +780,16 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
});
this.container.layoutManager
- .createDragSource(this.llvmOptPipelineButton, createLLVMOptPipelineView as any)
+ .createDragSource(this.optPipelineButton, createOptPipelineView as any)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
._dragListener.on('dragStart', togglePannerAdder);
- this.llvmOptPipelineButton.on('click', () => {
+ this.optPipelineButton.on('click', () => {
const insertPoint =
this.hub.findParentRowOrColumn(this.container.parent) ||
this.container.layoutManager.root.contentItems[0];
- insertPoint.addChild(createLLVMOptPipelineView());
+ insertPoint.addChild(createOptPipelineView());
});
this.container.layoutManager
@@ -1254,7 +1254,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
produceGnatDebugTree: this.gnatDebugTreeViewOpen,
produceGnatDebug: this.gnatDebugViewOpen,
produceIr: this.irViewOpen ? this.llvmIrOptions : null,
- produceLLVMOptPipeline: this.llvmOptPipelineViewOpenCount > 0 ? this.llvmOptPipelineOptions : null,
+ produceOptPipeline: this.optPipelineViewOpenCount > 0 ? this.optPipelineOptions : null,
produceDevice: this.deviceViewOpen,
produceRustMir: this.rustMirViewOpen,
produceRustMacroExp: this.rustMacroExpViewOpen,
@@ -2169,22 +2169,22 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
}
}
- onLLVMOptPipelineViewOpened(id: number): void {
+ onOptPipelineViewOpened(id: number): void {
if (this.id === id) {
- this.llvmOptPipelineViewOpenCount++;
+ this.optPipelineViewOpenCount++;
this.compile();
}
}
- onLLVMOptPipelineViewClosed(id: number): void {
+ onOptPipelineViewClosed(id: number): void {
if (this.id === id) {
- this.llvmOptPipelineViewOpenCount--;
+ this.optPipelineViewOpenCount--;
}
}
- onLLVMOptPipelineViewOptionsUpdated(id: number, options: LLVMOptPipelineBackendOptions, recompile: boolean): void {
+ onOptPipelineViewOptionsUpdated(id: number, options: OptPipelineBackendOptions, recompile: boolean): void {
if (this.id === id) {
- this.llvmOptPipelineOptions = options;
+ this.optPipelineOptions = options;
if (recompile) {
this.compile();
}
@@ -2488,7 +2488,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
this.ppButton = this.domRoot.find('.btn.view-pp');
this.astButton = this.domRoot.find('.btn.view-ast');
this.irButton = this.domRoot.find('.btn.view-ir');
- this.llvmOptPipelineButton = this.domRoot.find('.btn.view-llvm-opt-pipeline');
+ this.optPipelineButton = this.domRoot.find('.btn.view-opt-pipeline');
this.deviceButton = this.domRoot.find('.btn.view-device');
this.gnatDebugTreeButton = this.domRoot.find('.btn.view-gnatdebugtree');
this.gnatDebugButton = this.domRoot.find('.btn.view-gnatdebug');
@@ -2765,7 +2765,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
this.astButton.prop('disabled', this.astViewOpen);
this.irButton.prop('disabled', this.irViewOpen);
// As per #4112, it's useful to have this available more than once: Don't disable it when it opens
- // this.llvmOptPipelineButton.prop('disabled', this.llvmOptPipelineViewOpen);
+ // this.optPipelineButton.prop('disabled', this.optPipelineViewOpen);
this.deviceButton.prop('disabled', this.deviceViewOpen);
this.rustMirButton.prop('disabled', this.rustMirViewOpen);
this.haskellCoreButton.prop('disabled', this.haskellCoreViewOpen);
@@ -2784,7 +2784,7 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
this.ppButton.toggle(!!this.compiler.supportsPpView);
this.astButton.toggle(!!this.compiler.supportsAstView);
this.irButton.toggle(!!this.compiler.supportsIrView);
- this.llvmOptPipelineButton.toggle(!!this.compiler.supportsLLVMOptPipelineView);
+ this.optPipelineButton.toggle(!!this.compiler.supportsOptPipelineView);
this.deviceButton.toggle(!!this.compiler.supportsDeviceAsmView);
this.rustMirButton.toggle(!!this.compiler.supportsRustMirView);
this.rustMacroExpButton.toggle(!!this.compiler.supportsRustMacroExpView);
@@ -2948,9 +2948,9 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
this.eventHub.on('irViewOpened', this.onIrViewOpened, this);
this.eventHub.on('irViewClosed', this.onIrViewClosed, this);
this.eventHub.on('llvmIrViewOptionsUpdated', this.onLLVMIrViewOptionsUpdated, this);
- this.eventHub.on('llvmOptPipelineViewOpened', this.onLLVMOptPipelineViewOpened, this);
- this.eventHub.on('llvmOptPipelineViewClosed', this.onLLVMOptPipelineViewClosed, this);
- this.eventHub.on('llvmOptPipelineViewOptionsUpdated', this.onLLVMOptPipelineViewOptionsUpdated, this);
+ this.eventHub.on('optPipelineViewOpened', this.onOptPipelineViewOpened, this);
+ this.eventHub.on('optPipelineViewClosed', this.onOptPipelineViewClosed, this);
+ this.eventHub.on('optPipelineViewOptionsUpdated', this.onOptPipelineViewOptionsUpdated, this);
this.eventHub.on('deviceViewOpened', this.onDeviceViewOpened, this);
this.eventHub.on('deviceViewClosed', this.onDeviceViewClosed, this);
this.eventHub.on('rustMirViewOpened', this.onRustMirViewOpened, this);
diff --git a/static/panes/llvm-opt-pipeline.interfaces.ts b/static/panes/opt-pipeline.interfaces.ts
index 4f46c3350..3f31a48f7 100644
--- a/static/panes/llvm-opt-pipeline.interfaces.ts
+++ b/static/panes/opt-pipeline.interfaces.ts
@@ -22,7 +22,7 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-export interface LLVMOptPipelineViewState {
+export interface OptPipelineViewState {
selectedFunction: string;
selectedIndex: number;
// may be 0 when first initialized
diff --git a/static/panes/llvm-opt-pipeline.ts b/static/panes/opt-pipeline.ts
index 1bc41f2d4..31aa19727 100644
--- a/static/panes/llvm-opt-pipeline.ts
+++ b/static/panes/opt-pipeline.ts
@@ -30,7 +30,7 @@ import TomSelect from 'tom-select';
import scrollIntoView from 'scroll-into-view-if-needed';
import {MonacoPane} from './pane.js';
-import {LLVMOptPipelineViewState} from './llvm-opt-pipeline.interfaces.js';
+import {OptPipelineViewState} from './opt-pipeline.interfaces.js';
import {MonacoPaneState} from './pane.interfaces.js';
import {ga} from '../analytics.js';
@@ -40,10 +40,10 @@ import * as utils from '../utils.js';
import {Toggles} from '../widgets/toggles.js';
import {
- LLVMOptPipelineBackendOptions,
- LLVMOptPipelineOutput,
- LLVMOptPipelineResults,
-} from '../../types/compilation/llvm-opt-pipeline-output.interfaces.js';
+ OptPipelineBackendOptions,
+ OptPipelineOutput,
+ OptPipelineResults,
+} from '../compilation/opt-pipeline-output.interfaces.js';
import {unwrap} from '../assert.js';
import {CompilationResult} from '../compilation/compilation.interfaces.js';
import {CompilerInfo} from '../compiler.interfaces.js';
@@ -51,8 +51,8 @@ import {escapeHTML} from '../../shared/common-utils.js';
const MIN_SIDEBAR_WIDTH = 100;
-export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEditor, LLVMOptPipelineViewState> {
- results: LLVMOptPipelineResults = {};
+export class OptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEditor, OptPipelineViewState> {
+ results: OptPipelineResults = {};
passesColumn: JQuery;
passesList: JQuery;
passesColumnResizer: JQuery;
@@ -65,8 +65,8 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
modifiedModel: any;
options: Toggles;
filters: Toggles;
- state: LLVMOptPipelineViewState;
- lastOptions: LLVMOptPipelineBackendOptions = {
+ state: OptPipelineViewState;
+ lastOptions: OptPipelineBackendOptions = {
filterDebugInfo: true,
filterIRMetadata: false,
fullModule: false,
@@ -80,11 +80,11 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
resizeDragEndBind: (e: MouseEvent) => void;
firstResults = true;
- constructor(hub: Hub, container: Container, state: LLVMOptPipelineViewState & MonacoPaneState) {
+ constructor(hub: Hub, container: Container, state: OptPipelineViewState & MonacoPaneState) {
super(hub, container, state);
this.passesColumn = this.domRoot.find('.passes-column');
this.passesList = this.domRoot.find('.passes-list');
- this.body = this.domRoot.find('.llvm-opt-pipeline-body');
+ this.body = this.domRoot.find('.opt-pipeline-body');
if (state.sidebarWidth === 0) {
_.defer(() => {
state.sidebarWidth = parseInt(
@@ -117,13 +117,13 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
this.keydownCallback = this.onKeydownCallback.bind(this);
$(document).on('click', this.clickCallback);
$(document).on('keydown', this.keydownCallback);
- this.eventHub.emit('llvmOptPipelineViewOpened', this.compilerInfo.compilerId);
+ this.eventHub.emit('optPipelineViewOpened', this.compilerInfo.compilerId);
this.eventHub.emit('requestSettings');
this.emitOptions(true);
}
override getInitialHTML(): string {
- return $('#llvm-opt-pipeline').html();
+ return $('#opt-pipeline').html();
}
override createEditor(editorRoot: HTMLElement): monaco.editor.IStandaloneDiffEditor {
@@ -154,15 +154,15 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
ga.proxy('send', {
hitType: 'event',
eventCategory: 'OpenViewPane',
- eventAction: 'LLVMOptPipelineView',
+ eventAction: 'OptPipelineView',
});
}
override getDefaultPaneName(): string {
- return 'LLVM Opt Pipeline Viewer';
+ return 'Opt Pipeline Viewer';
}
- override registerButtons(state: LLVMOptPipelineViewState) {
+ override registerButtons(state: OptPipelineViewState) {
super.registerButtons(state);
this.options = new Toggles(this.domRoot.find('.options'), state as unknown as Record<string, boolean>);
this.options.on('change', this.onOptionsChange.bind(this));
@@ -206,7 +206,7 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
const filters = this.filters.get();
// TODO: Make use of filter-inconsequential-passes on the back end? Maybe provide a specific function arg to
// the backend? Would be a data transfer optimization.
- const newOptions: LLVMOptPipelineBackendOptions = {
+ const newOptions: OptPipelineBackendOptions = {
//'filter-inconsequential-passes': options['filter-inconsequential-passes'],
filterDebugInfo: filters['filter-debug-info'],
filterIRMetadata: filters['filter-instruction-metadata'],
@@ -223,7 +223,7 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
}
this.lastOptions = newOptions;
if (changed || force) {
- this.eventHub.emit('llvmOptPipelineViewOptionsUpdated', this.compilerInfo.compilerId, newOptions, true);
+ this.eventHub.emit('optPipelineViewOptionsUpdated', this.compilerInfo.compilerId, newOptions, true);
}
}
@@ -236,8 +236,8 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
override onCompileResult(compilerId: number, compiler: CompilerInfo, result: CompilationResult): void {
if (this.compilerInfo.compilerId !== compilerId) return;
- if (result.hasLLVMOptPipelineOutput) {
- const output: LLVMOptPipelineOutput = unwrap(result.llvmOptPipelineOutput);
+ if (result.hasOptPipelineOutput) {
+ const output: OptPipelineOutput = unwrap(result.optPipelineOutput);
if (output.error) {
this.editor
.getModel()
@@ -247,7 +247,7 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
this.editor.getModel()?.modified.setValue('');
}
this.updateResults(output.results);
- } else if (compiler.supportsLLVMOptPipelineView) {
+ } else if (compiler.supportsOptPipelineView) {
this.updateResults({});
this.editor.getModel()?.original.setValue('<Error>');
this.editor.getModel()?.modified.setValue('');
@@ -266,12 +266,12 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
this.compilerInfo.editorId = editorId;
this.compilerInfo.treeId = treeId;
this.updateTitle();
- if (compiler && !compiler.supportsLLVMOptPipelineView) {
- //this.editor.setValue('<LLVM IR output is not supported for this compiler>');
+ if (compiler && !compiler.supportsOptPipelineView) {
+ //this.editor.setValue('<Opt pipeline output is not supported for this compiler>');
}
}
- updateResults(results: LLVMOptPipelineResults): void {
+ updateResults(results: OptPipelineResults): void {
this.results = results;
//const functions = Object.keys(result);
let selectedFunction = this.state.selectedFunction; // one of the .clear calls below will end up resetting this
@@ -431,7 +431,7 @@ export class LLVMOptPipeline extends MonacoPane<monaco.editor.IStandaloneDiffEdi
$(document).off('click', this.clickCallback);
$(document).off('keydown', this.keydownCallback);
this.eventHub.unsubscribe();
- this.eventHub.emit('llvmOptPipelineViewClosed', this.compilerInfo.compilerId);
+ this.eventHub.emit('optPipelineViewClosed', this.compilerInfo.compilerId);
this.editor.dispose();
}
}
diff --git a/static/styles/explorer.scss b/static/styles/explorer.scss
index df5ed3b6f..e8bbbea6b 100644
--- a/static/styles/explorer.scss
+++ b/static/styles/explorer.scss
@@ -133,7 +133,7 @@ li.tweet {
margin: 0 10px 0 0;
}
-.llvm-opt-function-picker {
+.opt-function-picker {
min-width: 10em;
}
@@ -1356,7 +1356,7 @@ html[data-theme='pink'] {
}
}
-.llvm-opt-pipeline-body {
+.opt-pipeline-body {
display: flex;
overflow: hidden;
align-items: stretch;
diff --git a/static/styles/themes/default-theme.scss b/static/styles/themes/default-theme.scss
index 30c6ac59e..8182dec51 100644
--- a/static/styles/themes/default-theme.scss
+++ b/static/styles/themes/default-theme.scss
@@ -378,7 +378,7 @@ div.argmenuitem span.argdescription {
border: 1px solid #d2d3d4;
}
-.llvm-opt-pipeline-body {
+.opt-pipeline-body {
.passes-column {
color: black;
border-right: 1px solid #d2d3d4;
diff --git a/static/widgets/timing-info-widget.ts b/static/widgets/timing-info-widget.ts
index 1458744c9..7e4d8098e 100644
--- a/static/widgets/timing-info-widget.ts
+++ b/static/widgets/timing-info-widget.ts
@@ -116,12 +116,12 @@ function initializeChartDataFromResult(compileResult: CompilationResult, totalTi
pushTimingInfo(data, 'Process execution result', compileResult.processExecutionResultTime);
}
- if (compileResult.hasLLVMOptPipelineOutput && !isString(compileResult.llvmOptPipelineOutput)) {
- if (compileResult.llvmOptPipelineOutput?.clangTime !== undefined) {
- pushTimingInfo(data, 'Llvm opt pipeline clang time', compileResult.llvmOptPipelineOutput.clangTime);
+ if (compileResult.hasOptPipelineOutput && !isString(compileResult.optPipelineOutput)) {
+ if (compileResult.optPipelineOutput?.compileTime !== undefined) {
+ pushTimingInfo(data, 'Llvm opt pipeline clang time', compileResult.optPipelineOutput.compileTime);
}
- if (compileResult.llvmOptPipelineOutput?.parseTime !== undefined) {
- pushTimingInfo(data, 'Llvm opt pipeline parse time', compileResult.llvmOptPipelineOutput.parseTime);
+ if (compileResult.optPipelineOutput?.parseTime !== undefined) {
+ pushTimingInfo(data, 'Llvm opt pipeline parse time', compileResult.optPipelineOutput.parseTime);
}
}
diff --git a/types/compilation/compilation.interfaces.ts b/types/compilation/compilation.interfaces.ts
index 38a4aa80d..e41be3b7f 100644
--- a/types/compilation/compilation.interfaces.ts
+++ b/types/compilation/compilation.interfaces.ts
@@ -37,7 +37,7 @@ import {Artifact, ToolResult} from '../tool.interfaces.js';
import {CFGResult} from './cfg.interfaces.js';
import {ConfiguredOverrides} from './compiler-overrides.interfaces.js';
import {LLVMIrBackendOptions} from './ir.interfaces.js';
-import {LLVMOptPipelineBackendOptions, LLVMOptPipelineOutput} from './llvm-opt-pipeline-output.interfaces.js';
+import {OptPipelineBackendOptions, OptPipelineOutput} from './opt-pipeline-output.interfaces.js';
export type ActiveTools = {
id: number;
@@ -91,7 +91,7 @@ export type CompilationRequestOptions = {
produceGnatDebugTree?: boolean;
produceGnatDebug?: boolean;
produceIr?: LLVMIrBackendOptions | null;
- produceLLVMOptPipeline?: LLVMOptPipelineBackendOptions | null;
+ produceOptPipeline?: OptPipelineBackendOptions | null;
produceDevice?: boolean;
produceRustMir?: boolean;
produceRustMacroExp?: boolean;
@@ -187,8 +187,8 @@ export type CompilationResult = {
cfg?: CFGResult;
};
- hasLLVMOptPipelineOutput?: boolean;
- llvmOptPipelineOutput?: LLVMOptPipelineOutput;
+ hasOptPipelineOutput?: boolean;
+ optPipelineOutput?: OptPipelineOutput;
cfg?: CFGResult;
diff --git a/types/compilation/llvm-opt-pipeline-output.interfaces.ts b/types/compilation/opt-pipeline-output.interfaces.ts
index 8aa0d6573..0b6a9004b 100644
--- a/types/compilation/llvm-opt-pipeline-output.interfaces.ts
+++ b/types/compilation/opt-pipeline-output.interfaces.ts
@@ -33,16 +33,16 @@ export type Pass = {
irChanged: boolean;
};
-export type LLVMOptPipelineResults = Record<string, Pass[]>;
+export type OptPipelineResults = Record<string, Pass[]>;
-export type LLVMOptPipelineOutput = {
+export type OptPipelineOutput = {
error?: string;
- results: LLVMOptPipelineResults;
- clangTime?: number | string;
+ results: OptPipelineResults;
+ compileTime?: number | string;
parseTime?: number;
};
-export type LLVMOptPipelineBackendOptions = {
+export type OptPipelineBackendOptions = {
filterDebugInfo: boolean;
filterIRMetadata: boolean;
fullModule: boolean;
diff --git a/types/compiler.interfaces.ts b/types/compiler.interfaces.ts
index 338db104a..679a0ba4e 100644
--- a/types/compiler.interfaces.ts
+++ b/types/compiler.interfaces.ts
@@ -74,7 +74,7 @@ export type CompilerInfo = {
supportsPpView?: boolean;
supportsAstView?: boolean;
supportsIrView?: boolean;
- supportsLLVMOptPipelineView?: boolean;
+ supportsOptPipelineView?: boolean;
supportsRustMirView?: boolean;
supportsRustMacroExpView?: boolean;
supportsRustHirView?: boolean;
@@ -133,9 +133,9 @@ export type CompilerInfo = {
removeEmptyGccDump?: boolean;
irArg?: string[];
minIrArgs?: string[];
- llvmOptArg?: string[];
- llvmOptModuleScopeArg?: string[];
- llvmOptNoDiscardValueNamesArg?: string[];
+ optPipelineArg?: string[];
+ optPipelineModuleScopeArg?: string[];
+ optPipelineNoDiscardValueNamesArg?: string[];
cachedPossibleArguments?: any;
nvdisasm?: string;
mtime?: any;
diff --git a/views/templates/panes/compiler.pug b/views/templates/panes/compiler.pug
index 231c4c8c0..5ace00984 100644
--- a/views/templates/panes/compiler.pug
+++ b/views/templates/panes/compiler.pug
@@ -59,7 +59,7 @@ mixin newPaneButton(classId, text, title, icon)
+newPaneButton("view-pp", "Preprocessor", "Show preprocessor output", "fas fa-hashtag")
+newPaneButton("view-ast", "AST", "Show AST output", "fas fa-leaf")
+newPaneButton("view-ir", "LLVM IR", "Show LLVM Intermediate Representation", "fas fa-align-center")
- +newPaneButton("view-llvm-opt-pipeline", "LLVM Opt Pipeline", "Show LLVM optimization pipeline output", "fas fa-compass")
+ +newPaneButton("view-opt-pipeline", "Opt Pipeline", "Show optimization pipeline output", "fas fa-compass")
+newPaneButton("view-device", "Device", "Show device output", "fas fa-tv")
+newPaneButton("view-rustmir", "Rust MIR", "Show Rust Mid-level Intermediate Representation", "fas fa-water")
+newPaneButton("view-rusthir", "Rust HIR", "Show Rust High-level Intermediate Representation", "fas fa-arrows-alt")
diff --git a/views/templates/panes/ir.pug b/views/templates/panes/ir.pug
index ff140dca4..10e129ac8 100644
--- a/views/templates/panes/ir.pug
+++ b/views/templates/panes/ir.pug
@@ -27,5 +27,5 @@ mixin optionButton(bind, isActive, text, title)
.btn-group.btn-group-sm(role="group")
button.btn.btn-sm.btn-light.cfg(title="Open Control Flow Graph")
span <i class="fa-solid fa-exchange-alt"></i> Control Flow Graph
- div.llvm-opt-pipeline-body
+ div.opt-pipeline-body
.monaco-placeholder
diff --git a/views/templates/panes/llvm-opt-pipeline.pug b/views/templates/panes/opt-pipeline.pug
index 7a0e8cf81..b754468af 100644
--- a/views/templates/panes/llvm-opt-pipeline.pug
+++ b/views/templates/panes/opt-pipeline.pug
@@ -4,11 +4,11 @@ mixin optionButton(bind, isActive, text, title)
span #{text}
input.d-none(type="checkbox" checked=isActive)
-#llvm-opt-pipeline
+#opt-pipeline
.top-bar.btn-toolbar.bg-light(role="toolbar")
include ../../font-size
.btn-group.btn-group-sm.options(role="group")
- button.btn.btn-sm.btn-light.dropdown-toggle(type="button" title="LLVM Opt Pass Options" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Set output options")
+ button.btn.btn-sm.btn-light.dropdown-toggle(type="button" title="Opt Pass Options" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Set output options")
span.fas.fa-anchor
span.hideable Options
.dropdown-menu
@@ -16,7 +16,7 @@ mixin optionButton(bind, isActive, text, title)
+optionButton("demangle-symbols", true, "Demangle Symbols", "Demangle symbols")
+optionButton("-fno-discard-value-names", true, "-fno-discard-value-names", "Keep value names instead of LLVM value numbers")
.btn-group.btn-group-sm.filters(role="group")
- button.btn.btn-sm.btn-light.dropdown-toggle(type="button" title="LLVM Opt Pass Filters" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Set output filters")
+ button.btn.btn-sm.btn-light.dropdown-toggle(type="button" title="Opt Pass Filters" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Set output filters")
span.fas.fa-filter
span.hideable Filters
.dropdown-menu
@@ -29,8 +29,8 @@ mixin optionButton(bind, isActive, text, title)
.input-group-prepend
label.input-group-text
| Function:&nbsp;
- select.llvm-opt-function-picker.function-selector(placeholder="Select function")
- div.llvm-opt-pipeline-body
+ select.opt-function-picker.function-selector(placeholder="Select function")
+ div.opt-pipeline-body
.passes-column(style="width: 250px;") Passes:
.passes-list
.passes-column-resizer
diff --git a/views/templates/templates.pug b/views/templates/templates.pug
index b20ee2168..d32f7d290 100644
--- a/views/templates/templates.pug
+++ b/views/templates/templates.pug
@@ -22,7 +22,7 @@ mixin monacopane(id)
include panes/ir
- include panes/llvm-opt-pipeline
+ include panes/opt-pipeline
include panes/device