[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint

Philip Reames listmail at philipreames.com
Tue Jan 20 10:45:37 PST 2015


On 01/20/2015 10:11 AM, Ramkumar Ramachandra wrote:
> Philip Reames wrote:
>> Any change outside of statepoint lowering is highly suspect.
> Notice that SelectionDAGBuilder::LowerCallTo (the one I'm modifying)
> has exactly one other caller: visitCall, which doesn't match vararg
> functions. Every other codepath directly calls
> TargetLowering::LowerCallTo, supplying CallLoweringInfo information
> explicity (it's a structure with a vararg field).
I think I'm missing something here.  What leads you to believe that 
visitCall doesn't handle vararg functions?

Also, I see calls in both visitInvoke and visitCall.  I would assume 
these are the primary entry points...

>
> I suspect I'm not overloading SelectionDAGBuilder enough.
>
>> I'm pretty sure that calling a vararg function through a statepoint already
>> works without code change (other than the verifier).  (Or at least simple
>> cases work.)  Figuring out which work and which don't would give some
>> insight.
> AFAICT, extracting the result from a statepoint wrapping a vararg
> function is the problem. If it's a void function, there's no problem.
Ah!  That helps to understand the problem.

Can you separate out a change to the verifier which accepts void 
returning varargs and post that for review?  I can sign off quickly.




More information about the llvm-dev mailing list