[llvm-commits] [llvm] r83960 - in /llvm/trunk: docs/LangRef.html lib/VMCore/Verifier.cpp
Nick Lewycky
nicholas at mxc.ca
Tue Oct 13 00:57:34 PDT 2009
Author: nicholas
Date: Tue Oct 13 02:57:33 2009
New Revision: 83960
URL: http://llvm.org/viewvc/llvm-project?rev=83960&view=rev
Log:
Force memory use markers to have a ConstantInt for the size argument.
Modified:
llvm/trunk/docs/LangRef.html
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=83960&r1=83959&r2=83960&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Tue Oct 13 02:57:33 2009
@@ -7018,8 +7018,9 @@
object's lifetime.</p>
<h5>Arguments:</h5>
-<p>The first argument is a the size of the object, or -1 if it is variable
- sized. The second argument is a pointer to the object.</p>
+<p>The first argument is a constant integer representing the size of the
+ object, or -1 if it is variable sized. The second argument is a pointer to
+ the object.</p>
<h5>Semantics:</h5>
<p>This intrinsic indicates that before this point in the code, the value of the
@@ -7047,8 +7048,9 @@
object's lifetime.</p>
<h5>Arguments:</h5>
-<p>The first argument is a the size of the object, or -1 if it is variable
- sized. The second argument is a pointer to the object.</p>
+<p>The first argument is a constant integer representing the size of the
+ object, or -1 if it is variable sized. The second argument is a pointer to
+ the object.</p>
<h5>Semantics:</h5>
<p>This intrinsic indicates that after this point in the code, the value of the
@@ -7075,8 +7077,9 @@
a memory object will not change.</p>
<h5>Arguments:</h5>
-<p>The first argument is a the size of the object, or -1 if it is variable
- sized. The second argument is a pointer to the object.</p>
+<p>The first argument is a constant integer representing the size of the
+ object, or -1 if it is variable sized. The second argument is a pointer to
+ the object.</p>
<h5>Semantics:</h5>
<p>This intrinsic indicates that until an <tt>llvm.invariant.end</tt> that uses
@@ -7103,8 +7106,9 @@
<h5>Arguments:</h5>
<p>The first argument is the matching <tt>llvm.invariant.start</tt> intrinsic.
- The second argument is a the size of the object, or -1 if it is variable
- sized and the third argument is a pointer to the object.</p>
+ The second argument is a constant integer representing the size of the
+ object, or -1 if it is variable sized and the third argument is a pointer
+ to the object.</p>
<h5>Semantics:</h5>
<p>This intrinsic indicates that the memory is mutable again.</p>
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=83960&r1=83959&r2=83960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Oct 13 02:57:33 2009
@@ -1578,6 +1578,17 @@
"llvm.stackprotector parameter #2 must resolve to an alloca.",
&CI);
break;
+ case Intrinsic::lifetime_start:
+ case Intrinsic::lifetime_end:
+ case Intrinsic::invariant_start:
+ Assert1(isa<ConstantInt>(CI.getOperand(1)),
+ "size argument of memory use markers must be a constant integer",
+ &CI);
+ break;
+ case Intrinsic::invariant_end:
+ Assert1(isa<ConstantInt>(CI.getOperand(2)),
+ "llvm.invariant.end parameter #2 must be a constant integer", &CI);
+ break;
}
}
More information about the llvm-commits
mailing list