Support patched clang for faster opt-view (#4416)

This commit is contained in:
Patrick Quist
2022-12-10 18:17:51 +01:00
committed by GitHub
parent f598cf8aaf
commit 67f71f2b51
4 changed files with 17 additions and 3 deletions
+1
View File
@@ -350,6 +350,7 @@ group.clangx86trunk.ldPath=${exePath}/../lib|${exePath}/../lib/x86_64-unknown-li
compiler.clang_trunk.exe=/opt/compiler-explorer/clang-trunk/bin/clang++
compiler.clang_trunk.semver=(trunk)
compiler.clang_trunk.debugPatched=true
compiler.clang_assertions_trunk.exe=/opt/compiler-explorer/clang-assertions-trunk/bin/clang++
compiler.clang_assertions_trunk.semver=(assertions trunk)
compiler.clang_concepts.exe=/opt/compiler-explorer/clang-concepts-trunk/bin/clang++
+14 -3
View File
@@ -1060,7 +1060,8 @@ export class BaseCompiler implements ICompiler {
.filter(option => option !== '-fcolor-diagnostics')
.concat(this.compiler.llvmOptArg)
.concat(llvmOptPipelineOptions.fullModule ? this.compiler.llvmOptModuleScopeArg : [])
.concat(llvmOptPipelineOptions.noDiscardValueNames ? this.compiler.llvmOptNoDiscardValueNamesArg : []);
.concat(llvmOptPipelineOptions.noDiscardValueNames ? this.compiler.llvmOptNoDiscardValueNamesArg : [])
.concat(this.compiler.debugPatched ? ['-mllvm', '--debug-to-stdout'] : []);
const execOptions = this.getDefaultExecOptions();
execOptions.maxOutput = 1024 * 1024 * 1024;
@@ -1083,7 +1084,12 @@ export class BaseCompiler implements ICompiler {
try {
const parseStart = performance.now();
const llvmOptPipeline = await this.processLLVMOptPipeline(output, filters, llvmOptPipelineOptions);
const llvmOptPipeline = await this.processLLVMOptPipeline(
output,
filters,
llvmOptPipelineOptions,
this.compiler.debugPatched,
);
const parseEnd = performance.now();
if (llvmOptPipelineOptions.demangle) {
@@ -1117,8 +1123,13 @@ export class BaseCompiler implements ICompiler {
output,
filters: ParseFiltersAndOutputOptions,
llvmOptPipelineOptions: LLVMOptPipelineBackendOptions,
debugPatched?: boolean,
) {
return this.llvmPassDumpParser.process(output.stderr, filters, llvmOptPipelineOptions);
return this.llvmPassDumpParser.process(
debugPatched ? output.stdout : output.stderr,
filters,
llvmOptPipelineOptions,
);
}
getRustMacroExpansionOutputFilename(inputFilename) {
+1
View File
@@ -243,6 +243,7 @@ export class CompilerFinder {
versionRe: props('versionRe'),
explicitVersion: props('explicitVersion'),
compilerType: props('compilerType', ''),
debugPatched: props('debugPatched', false),
demangler: demangler,
demanglerType: props('demanglerType', ''),
nvdisasm: props('nvdisasm', ''),
+1
View File
@@ -38,6 +38,7 @@ export type CompilerInfo = {
versionRe?: string;
explicitVersion?: string;
compilerType: string;
debugPatched: boolean;
demangler: string;
demanglerType: string;
objdumper: string;