about summary refs log tree commit diff
path: root/src/librustc/session
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2018-03-17 15:34:12 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2018-03-17 15:34:12 -0700
commitb4981923a05869ea2c50f1893acf433b1b67f79a (patch)
treeab0bd8270dc3d035804bc15f411f25c16c38d9bf /src/librustc/session
parent178becdd7c86d87b24951af18e4b7d45f3e1e7bc (diff)
downloadrust-b4981923a05869ea2c50f1893acf433b1b67f79a.tar.gz
rust-b4981923a05869ea2c50f1893acf433b1b67f79a.zip
Add a -Z flag for LLVM align attributes on arguments
LLVM seems to still put the assume calls in when inlining, so this probably isn't in a place where it can be turned on by default, but it's interesting to experiment with.

For example, this makes `swap::<u64x8>` be 8x `vmovaps	ymm` instead of 16x `vmovups	xmm`, on my cpu.
Diffstat (limited to 'src/librustc/session')
-rw-r--r--src/librustc/session/config.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 1c5cfa87ef4..a5eae35c556 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1208,6 +1208,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
           "set the MIR optimization level (0-3, default: 1)"),
     mutable_noalias: bool = (false, parse_bool, [UNTRACKED],
           "emit noalias metadata for mutable references"),
+    arg_align_attributes: bool = (false, parse_bool, [UNTRACKED],
+          "emit align metadata for reference arguments"),
     dump_mir: Option<String> = (None, parse_opt_string, [UNTRACKED],
           "dump MIR state at various points in translation"),
     dump_mir_dir: String = (String::from("mir_dump"), parse_string, [UNTRACKED],