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

Dan Gohman gohman at apple.com
Sun Aug 2 12:15:24 PDT 2009


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.

It does not impact the delicate dance that front-ends must do to
achieve ABI conformance, and it doesn't add new functionality.
It's intended to be a first step to eliminate a variety of
differences between targets and to prepare for future work.

Major changes from the previous patch:
  - Ported to trunk and updated for all targets (including Blackfin!).
  - ISD::LIBCALL is no longer needed.
  - InputArg and OutputArg have an ArgFlagsTy member instead of
    inheriting from ArgFlagsTy.

I believe I've addressed all the feedback from the original patch, and
I'm now looking to check this in, so I'm looking for more feedback.

On non-x86 targets, I've tested this by diff'ing llc output. There are
some differences due to this patch causing some things to get lowered in
a slightly different order, but with one exception everything I've seen
has been harmless.

The one exception in struct_args_5.bc testcase that the PIC16
maintainers sent me, in response to my earlier post. The output is
changed quite a bit, and I'm not familiar enough with PIC16 to
determine whether it's a problem.

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.

Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calling-conv-lowering-new.patch
Type: application/octet-stream
Size: 338086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090802/fc087e69/attachment.obj>


More information about the llvm-commits mailing list