<p dir="ltr">Ok I will update the patch, but I'm not sure how you mean to not thread through the ImmutableCallSite, since I thought InvokeInst is not a subclass of CallInst?</p>
<div class="gmail_quote">On Oct 15, 2014 10:49 AM, "Juergen Ributzka" <<a href="mailto:juergen@apple.com">juergen@apple.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I still think not threading through ImmutableCallSite would be nicer and reduce unnecessary changes. Otherwise LGTM.<br>
<br>
================<br>
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:637-643<br>
@@ -636,7 +636,9 @@<br>
<br>
-  std::pair<SDValue, SDValue> LowerCallOperands(const CallInst &CI,<br>
-                                                unsigned ArgIdx,<br>
-                                                unsigned NumArgs,<br>
-                                                SDValue Callee,<br>
-                                                bool useVoidTy = false);<br>
+  std::pair<SDValue, SDValue> LowerCallOperands(<br>
+          ImmutableCallSite CS,<br>
+          unsigned ArgIdx,<br>
+          unsigned NumArgs,<br>
+          SDValue Callee,<br>
+          bool useVoidTy = false,<br>
+          MachineBasicBlock *LandingPad = nullptr);<br>
<br>
----------------<br>
While you are already at it, could you please clean up the sins I committed and update it to the current coding standard (camelCase for functions and CamelCase for variables)?<br>
<br>
================<br>
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:783<br>
@@ -780,3 +782,3 @@<br>
   void visitStackmap(const CallInst &I);<br>
-  void visitPatchpoint(const CallInst &I);<br>
+  void visitPatchpoint(ImmutableCallSite CS, MachineBasicBlock *LandingPad);<br>
<br>
----------------<br>
I would add a default value for LandingPad = nullptr and not switch to ImmutableCallSite for the first argument.<br>
<br>
<a href="http://reviews.llvm.org/D5634" target="_blank">http://reviews.llvm.org/D5634</a><br>
<br>
<br>
</blockquote></div>