aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/argument-parsers.js
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2021-11-08 18:52:30 +0100
committerGitHub <noreply@github.com>2021-11-08 18:52:30 +0100
commit6f18695dc0efc0baad6567822e199eefdd47f83e (patch)
tree50bdf4b312a953e8d4c1ed2cc4d5425650ea1b25 /lib/compilers/argument-parsers.js
parented0609bb90e86b4f78b5101b9ee4946d948cf225 (diff)
downloadcompiler-explorer-6f18695dc0efc0baad6567822e199eefdd47f83e.tar.gz
compiler-explorer-6f18695dc0efc0baad6567822e199eefdd47f83e.zip
Refactor GCC dump handling (#3024)gh-1250
This change allows for only dumping a single pass (the one selected). In order to populate the list of available dumps, it now queries GCC for the enabled passes. It can still be misleading to users as a pass can be enabled but for some reason does not dump anything. In order to avoid this, the only solution seems to be to still dump all files and filter the list... This defeats the initial goal and only adds complexity for the current compilers. But this makes #2868 easier to implement (see #2985 that was a aborted first attempt) and if someday another libgccjit-based compiler is added, it could be easily hooked to this. It also changes the naming in the drop down menu. For example, instead of : '009t.omplower' it now uses 'omplower (tree)' (ie. '<pass-name> (tree|ipa|rtl)'). Fixes #3014 Signed-off-by: Marc Poulhiès <dkm@kataplop.net> Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
Diffstat (limited to 'lib/compilers/argument-parsers.js')
-rw-r--r--lib/compilers/argument-parsers.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/compilers/argument-parsers.js b/lib/compilers/argument-parsers.js
index c64de8549..1944711a1 100644
--- a/lib/compilers/argument-parsers.js
+++ b/lib/compilers/argument-parsers.js
@@ -100,6 +100,11 @@ export class GCCParser extends BaseParser {
// This check is not infallible, but takes care of Rust and Swift being picked up :)
if (_.find(keys, key => key.startsWith('-fdump-'))) {
compiler.compiler.supportsGccDump = true;
+
+ // By default, consider the compiler to be a regular GCC (eg. gcc,
+ // g++) and do the extra work of filtering out enabled pass that did
+ // not produce anything.
+ compiler.compiler.removeEmptyGccDump = true;
}
}