about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-09-12 15:21:29 +0530
committerGitHub <noreply@github.com>2022-09-12 15:21:29 +0530
commit413703201c59f25a5a2fded13d7ee4b4be4e8545 (patch)
treecee719a745ed231d59c282c754a9d5628b3cc383 /compiler/rustc_session/src
parent56e7678ca97e9740f7d09206f767d5bb676917f7 (diff)
parent052887e4b4c86426423ecd6f244e3e25cd71dd49 (diff)
downloadrust-413703201c59f25a5a2fded13d7ee4b4be4e8545.tar.gz
rust-413703201c59f25a5a2fded13d7ee4b4be4e8545.zip
Rollup merge of #100293 - yanchen4791:add-inline-llvm-option, r=nnethercote
Add inline-llvm option for disabling/enabling LLVM inlining

In this PR, a new -Z option `inline-llvm` is added in order to be able to turn on/off LLVM inlining.

The capability of turning on/off inlining in LLVM backend is needed for testing performance implications of using recently enabled inlining in rustc's frontend (with -Z inline-mir=yes option, #91743). It would be interesting to see the performance effect using rustc's frontend inlining only without LLVM inlining enabled. Currently LLVM is still doing inlining no mater what value inline-mir is set to. With the option `inline-llvm` being added in this PR, user can turn off LLVM inlining by using `-Z inline-llvm=no` option (the default of inline-llvm is 'yes', LLVM inlining enabled).
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/options.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index 9f07394b61a..a25e3362a0c 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1345,6 +1345,8 @@ options! {
         "hash spans relative to their parent item for incr. comp. (default: no)"),
     incremental_verify_ich: bool = (false, parse_bool, [UNTRACKED],
         "verify incr. comp. hashes of green query instances (default: no)"),
+    inline_llvm: bool = (true, parse_bool, [TRACKED],
+        "enable LLVM inlining (default: yes)"),
     inline_mir: Option<bool> = (None, parse_opt_bool, [TRACKED],
         "enable MIR inlining (default: no)"),
     inline_mir_threshold: Option<usize> = (None, parse_opt_number, [TRACKED],