[llvm-commits] [PATCH] LLVM intrinsic for invariants
hfinkel at anl.gov
hfinkel at anl.gov
Wed Dec 5 16:16:23 PST 2012
Adds void @llvm.invariant(i1 %cond)
http://llvm-reviews.chandlerc.com/D178
Files:
docs/LangRef.html
include/llvm/Intrinsics.td
Index: docs/LangRef.html
===================================================================
--- docs/LangRef.html
+++ docs/LangRef.html
@@ -330,6 +330,8 @@
<li><a href="#int_objectsize">
'<tt>llvm.objectsize</tt>' Intrinsic</a></li>
<li><a href="#int_expect">
+ '<tt>llvm.invariant</tt>' Intrinsic</a></li>
+ <li><a href="#int_invariant">
'<tt>llvm.expect</tt>' Intrinsic</a></li>
<li><a href="#int_donothing">
'<tt>llvm.donothing</tt>' Intrinsic</a></li>
@@ -9057,6 +9059,34 @@
<!-- _______________________________________________________________________ -->
<h4>
+ <a name="int_invariant">'<tt>llvm.invariant</tt>' Intrinsic</a>
+</h4>
+
+<div>
+
+<h5>Syntax:</h5>
+<pre>
+ declare void @llvm.invariant(i1 %cond)
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>llvm.invariant</tt>' intrinsic allows the optimizer to assume
+ that the provided condition is true. This information can then be used
+ in simplifying other parts of the code.</p>
+
+<h5>Arguments:</h5>
+
+<p>The condition which the optimizer may assume is always true.</p>
+
+<h5>Semantics:</h5>
+
+<p>The intrinsic allows the optimizer to assume that the provided condition is
+ always true. No code is generated for this intrinsic, and instructions that
+ contribute only to the provided condition are not used for code generation.</p>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<h4>
<a name="int_donothing">'<tt>llvm.donothing</tt>' Intrinsic</a>
</h4>
Index: include/llvm/Intrinsics.td
===================================================================
--- include/llvm/Intrinsics.td
+++ include/llvm/Intrinsics.td
@@ -234,6 +234,8 @@
def int_readcyclecounter : Intrinsic<[llvm_i64_ty]>;
+def int_invariant : Intrinsic<[], [llvm_i1_ty], [IntrNoMem]>;
+
// Stack Protector Intrinsic - The stackprotector intrinsic writes the stack
// guard to the correct place on the stack frame.
def int_stackprotector : Intrinsic<[], [llvm_ptr_ty, llvm_ptrptr_ty], []>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D178.1.patch
Type: text/x-patch
Size: 2095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121205/602264e6/attachment.bin>
More information about the llvm-commits
mailing list