<div dir="ltr"><div><div><div><div>Hello Job,<br><br></div>I managed to resolve this same problem by using custom C++ code since as you mentioned<br></div>the isSplit flag doesn't help here. There are 2 ways to analyze the arguments of a function:<br>
<br></div>1) You can get a Function pointer in LowerFormalArguments, and in LowerCall only when Callee can by dyn_casted to a GlobalAddressSDNode. By having this pointer you can then do:<br><span class=""><br>for</span> <span class="">(</span><span class="">Function</span><span class="">::</span><span class="">const_arg_iterator</span> <span class="">I</span> <span class="">=</span> <span class="">F</span><span class="">-></span><span class="">arg_begin</span><span class="">(),</span> <span class="">E</span> <span class="">=</span> <span class="">F</span><span class="">-></span><span class="">arg_end</span><span class="">();</span><span class="">I</span> <span class="">!=</span> <span class="">E</span><span class="">;</span> <span class="">++</span><span class="">I</span><span class="">)</span>
<span class=""></span><pre><div id="l848" class=""> <span class="">{</span>
</div><div id="l850" class=""> <span class="">unsigned</span> <span class="">Bytes</span> <span class="">=</span> <span class="">TD</span><span class="">-></span><span class="">getTypeSizeInBits</span><span class="">(</span><span class="">I</span><span class="">-></span><span class="">getType</span><span class="">())</span> <span class="">/</span> <span class="">8</span><span class="">;</span><br>
</div><div id="l850" class=""> // do stuff here<span class=""></span>
</div><div id="l851" class=""> <span class="">}</span><br><br><br></div><div id="l851" class="">2) The second case is when the dyn_cast above fails because the Callee SDValue is a <br><pre><span class=""></span><span class="">ExternalSymbolSDNode</span><span class=""></span>. In this case you have to manually analyze the arguments using PartOffset.<br>
<br><br></pre></div></pre></div></div>