[PATCH] D41043: Support for an intrinsic "fake.use" (and corresponding operand) representing a use of an operand to aid debugging

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 18:02:49 PST 2017


efriedma added inline comments.


================
Comment at: include/llvm/IR/Intrinsics.td:831
+// Introduce a use of the argument without generating any code.
+def int_fake_use : Intrinsic<[], [llvm_vararg_ty]>;
+
----------------
Does this support more than one argument?


================
Comment at: lib/Transforms/Utils/CloneFunction.cpp:333
+      if (IntrInst->getIntrinsicID() == Intrinsic::fake_use)
+        continue;
+
----------------
This is an interesting heuristic...

Putting the code here isn't great; IIRC some code outside the inliner uses this codepath.


https://reviews.llvm.org/D41043





More information about the llvm-commits mailing list