<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Yup. The code in question verifies more than the prototypes.</div><div><br></div><div><blockquote type="cite">-        Assert1(isa<AllocaInst>(CI.getOperand(1)->stripPointerCasts()),<br>-                "llvm.gcroot parameter #1 must be an alloca.", &CI);<br>-        Assert1(isa<Constant>(CI.getOperand(2)),<br>-                "llvm.gcroot parameter #2 must be a constant.", &CI);<br></blockquote></div><div><br></div><div><blockquote type="cite">-      Assert1(CI.getParent()->getParent()->hasGC(),<br>-              "Enclosing function does not use GC.",<br>-              &CI);<br></blockquote><div><font class="Apple-style-span" color="#144FAE"><br></font></div><div><font class="Apple-style-span" color="#144FAE"><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">The rest is a holdover from when these intrinsics allowed arbitrary types.</span></font></div><div><font class="Apple-style-span" color="#144FAE"><br></font></div><div><font class="Apple-style-span" color="#000000"><span class="Apple-style-span" style="background-color: transparent;">We could verify these 3 cases and fall through to the default case for the rest; or just drop the type checks if the prototypes are already verified.</span></font></div></div></div><br><div><div>On Aug 23, 2008, at 05:45, Bill Wendling wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I think that this patch broke the regression tests. Reverting for now.<br><br>-bw<br><br>Here's what I'm getting:<br><br>Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/ <br>test/Verifier/dg.exp ...<br>FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/ <br>test/Verifier/gcread-ptrptr.ll for PR1633<br>Failed with exit(1) at line 1<br>while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/ <br>build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll >& /dev/null<br>child process exited abnormally<br>FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/ <br>test/Verifier/gcroot-alloca.ll for PR1633<br>Failed with exit(1) at line 1<br>while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/ <br>build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll >& /dev/null<br>child process exited abnormally<br>FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/ <br>test/Verifier/gcroot-meta.ll for PR1633<br>Failed with exit(1) at line 1<br>while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/ <br>build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll >& /dev/null<br>child process exited abnormally<br>FAIL: ndbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/ <br>gcroot-ptrptr.ll for PR1633<br>Failed with exit(1) at line 1<br>while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/ <br>build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll >& /dev/null<br>child process exited abnormally<br>FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/ <br>test/Verifier/gcwrite-ptrptr.ll for PR1633<br>Failed with exit(1) at line 1<br>while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/ <br>build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll >& /dev/null<br>child process exited abnormally<br><br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>===  Summary ===<br><br># of expected passes<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>3021<br># of unexpected failures<span class="Apple-tab-span" style="white-space:pre">      </span>6<br># of expected failures<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>16<br>make[1]: *** [check-local] Error 1<br>make: *** [check] Error 2<br><br>On Aug 22, 2008, at 10:26 PM, Chris Lattner wrote:<br><br><blockquote type="cite">Author: lattner<br></blockquote><blockquote type="cite">Date: Sat Aug 23 00:26:35 2008<br></blockquote><blockquote type="cite">New Revision: 55227<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=55227&view=rev">http://llvm.org/viewvc/llvm-project?rev=55227&view=rev</a><br></blockquote><blockquote type="cite">Log:<br></blockquote><blockquote type="cite">remove verification for gc intrinsic argument types.  it was  <br></blockquote><blockquote type="cite">indented wrong<br></blockquote><blockquote type="cite">and tblgen now knows intrinsic prototypes.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Modified:<br></blockquote><blockquote type="cite">   llvm/trunk/lib/VMCore/Verifier.cpp<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Modified: llvm/trunk/lib/VMCore/Verifier.cpp<br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=55227&r1=55226&r2=55227&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=55227&r1=55226&r2=55227&view=diff</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">= <br></blockquote><blockquote type="cite">======================================================================<br></blockquote><blockquote type="cite">--- llvm/trunk/lib/VMCore/Verifier.cpp (original)<br></blockquote><blockquote type="cite">+++ llvm/trunk/lib/VMCore/Verifier.cpp Sat Aug 23 00:26:35 2008<br></blockquote><blockquote type="cite">@@ -1273,45 +1273,6 @@<br></blockquote><blockquote type="cite">  switch (ID) {<br></blockquote><blockquote type="cite">  default:<br></blockquote><blockquote type="cite">    break;<br></blockquote><blockquote type="cite">-  case Intrinsic::gcroot:<br></blockquote><blockquote type="cite">-  case Intrinsic::gcwrite:<br></blockquote><blockquote type="cite">-  case Intrinsic::gcread: {<br></blockquote><blockquote type="cite">-      Type *PtrTy    = PointerType::getUnqual(Type::Int8Ty),<br></blockquote><blockquote type="cite">-           *PtrPtrTy = PointerType::getUnqual(PtrTy);<br></blockquote><blockquote type="cite">-<br></blockquote><blockquote type="cite">-      switch (ID) {<br></blockquote><blockquote type="cite">-      default:<br></blockquote><blockquote type="cite">-        break;<br></blockquote><blockquote type="cite">-      case Intrinsic::gcroot:<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(1)->getType() == PtrPtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #1 is not i8**.", &CI);<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(2)->getType() == PtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #2 is not i8*.", &CI);<br></blockquote><blockquote type="cite">-        Assert1(isa<AllocaInst>(CI.getOperand(1)- <br></blockquote><blockquote type="cite"><blockquote type="cite">stripPointerCasts()),<br></blockquote></blockquote><blockquote type="cite">-                "llvm.gcroot parameter #1 must be an alloca.", &CI);<br></blockquote><blockquote type="cite">-        Assert1(isa<Constant>(CI.getOperand(2)),<br></blockquote><blockquote type="cite">-                "llvm.gcroot parameter #2 must be a constant.", &CI);<br></blockquote><blockquote type="cite">-        break;<br></blockquote><blockquote type="cite">-      case Intrinsic::gcwrite:<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(1)->getType() == PtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #1 is not a i8*.", &CI);<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(2)->getType() == PtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #2 is not a i8*.", &CI);<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(3)->getType() == PtrPtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #3 is not a i8**.", &CI);<br></blockquote><blockquote type="cite">-        break;<br></blockquote><blockquote type="cite">-      case Intrinsic::gcread:<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(1)->getType() == PtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #1 is not a i8*.", &CI);<br></blockquote><blockquote type="cite">-        Assert1(CI.getOperand(2)->getType() == PtrPtrTy,<br></blockquote><blockquote type="cite">-                "Intrinsic parameter #2 is not a i8**.", &CI);<br></blockquote><blockquote type="cite">-        break;<br></blockquote><blockquote type="cite">-      }<br></blockquote><blockquote type="cite">-<br></blockquote><blockquote type="cite">-      Assert1(CI.getParent()->getParent()->hasGC(),<br></blockquote><blockquote type="cite">-              "Enclosing function does not use GC.",<br></blockquote><blockquote type="cite">-              &CI);<br></blockquote><blockquote type="cite">-    } break;<br></blockquote><blockquote type="cite">  case Intrinsic::init_trampoline:<br></blockquote><blockquote type="cite">    Assert1(isa<Function>(CI.getOperand(2)->stripPointerCasts()),<br></blockquote><blockquote type="cite">            "llvm.init_trampoline parameter #2 must resolve to a  <br></blockquote><blockquote type="cite">function.",<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">llvm-commits mailing list<br></blockquote><blockquote type="cite"><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br></blockquote><blockquote type="cite"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></div></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><br class="khtml-block-placeholder"></div>— Gordon<br class="Apple-interchange-newline"></span></span></span></span></span></div></span> </div><br></body></html>