about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorRich Kadel <richkadel@google.com>2020-06-08 16:20:26 -0700
committerRich Kadel <richkadel@google.com>2020-06-15 16:50:10 -0700
commit46ebd57c42439b3aedcb160f70b022a4f59f4afa (patch)
tree2a5b485593b8e9a970858665d80fc67d3d7614d4 /src/librustc_codegen_llvm
parent7e49a9ec59f7950efa9950b65c10f9b3f3a4b6b2 (diff)
downloadrust-46ebd57c42439b3aedcb160f70b022a4f59f4afa.tar.gz
rust-46ebd57c42439b3aedcb160f70b022a4f59f4afa.zip
moved instrument_coverage pass, optimized scalar, added FIXME
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/intrinsic.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs
index 7fddda99185..95465939070 100644
--- a/src/librustc_codegen_llvm/intrinsic.rs
+++ b/src/librustc_codegen_llvm/intrinsic.rs
@@ -148,6 +148,11 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
                         caller_fn_path
                     );
 
+                    // FIXME(richkadel): (1) Replace raw function name with mangled function name;
+                    // (2) Replace hardcoded `1234` in `hash` with a computed hash (as discussed in)
+                    // the MCP (compiler-team/issues/278); and replace the hardcoded `1` for
+                    // `num_counters` with the actual number of counters per function (when the
+                    // changes are made to inject more than one counter per function).
                     let (fn_name, _len_val) = self.const_str(Symbol::intern(&caller_fn_path));
                     let index = args[0].immediate();
                     let hash = self.const_u64(1234);