[LLVMdev] [llvm-commits] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains

Dan Gohman gohman at apple.com
Thu Apr 19 16:27:40 PDT 2012


On Apr 19, 2012, at 12:46 PM, Evan Cheng <evan.cheng at apple.com> wrote:

> 
> On Apr 19, 2012, at 11:15 AM, Justin Holewinski wrote:
> 
>>  
>> From: Evan Cheng [mailto:evan.cheng at apple.com] 
>> Sent: Thursday, April 19, 2012 10:47 AM
>> To: Justin Holewinski
>> Cc: llvmdev at cs.uiuc.edu; llvm-commits at cs.uiuc.edu; Vinod Grover
>> Subject: Re: [llvm-commits] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains
>>  
>> TargetLowering::LowerCall is already a mess, I would really prefer not to extend it any further. It's especially difficult to justify extending it without a use in the open source tree.
>>  
>> We really should think hard about how to improve the API in two ways. Perhaps we should wrap the arguments in some struct rather than as individual ones. We should also make it easier to extend it in the future without requiring an across the change for all in-tree and out-of-tree targets. Anyone wants to take the lead on this?
>>  
>> The second may be solved by the first.  If the LowerCall() arguments are encapsulated within some descriptor object, then extensions to this descriptor class would be transparent to existing targets, both in-tree and out-of-tree (assuming the API is consistent).  What is the overall plan for LowerCall() and LowerCallTo()?  I noticed the comment on LowerCallTo() that implies it should be merged into SelectionDAGISel when all targets are using LowerCall (which I believe they are)?
> 
> I believe Dan has some thoughts in this topic.

That FIXME comment about LowerCallTo is probably an anachronism,
and no longer relevant given the changes that that code has been
through. LowerCallTo is currently a wrapper around LowerCall
which various things need. All targets which support calls are
using LowerCall.

Dan




More information about the llvm-dev mailing list