[llvm-commits] [Backend API CHANGE] Calling-convention lowering proposal update

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Aug 2 23:37:02 PDT 2009


On 02/08/2009, at 21.15, Dan Gohman wrote:

> Hello,
>
> Here is a new version of my major calling-convention patch, which was
> first described here:
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-April/021908.html
>
> In summary, this patch simpifies the way information is passed between
> target-independent code and target-dependent code. Instead of encoding
> lots of information in FORMAL_ARGUMENTS, CALL, and RET nodes
> which must be decoded, the information is now kept in regular data
> structures, and communicated via APIs. It also reworks how tail  
> calls are
> lowered.

Very nice.

While you are at it: It seems like every target defines an identical  
RET_FLAG node. I wonder if that could be lifted to common code as well?

[...]

> - Ported to trunk and updated for all targets (including Blackfin!).

Impressive!

[...]

> Oh, and I haven't tested Blackfin yet, but I will as soon as it
> settles in. But it appears to be a straight-forward target, so I'm not
> worried.

I quickly tested your patch, and it looks OK to me. The Blackfin call  
lowering code is almost entirely cargo cult programming, the XCore  
target was particularly nice to steal from. If something looks odd it  
is probably because of a mistake, not because I was being clever.

I have not tried actually running the generated code yet, neither on  
silicon nor on a simulator, so there are probably bugs. I can just as  
easily fix them in your new code than in the old cargo cult code, so  
don't delay committing this because you haven't properly tested  
Blackfin yet.

/jakob




More information about the llvm-commits mailing list