[LLVMdev] vaargs and backwards compatibility

Andrew Lenharth alenhar2 at cs.uiuc.edu
Tue Apr 5 13:58:31 PDT 2005


On Sat, 2005-04-02 at 23:48 -0600, Chris Lattner wrote:
> On Tue, 29 Mar 2005, Andrew Lenharth wrote:
> > So Alpha and some other potential targets (amd64?) use structs for
> > va_list.  This is very much at odds with the current instructions and
> > intrinsics.
> 
> Yes, this is a serious issue.

What about both behaviors?  The current behavior is fine for most
current archs and we don't want to break compatibility.  However, the
architectures this is currently a problem for have no backwards
compatibility to worry about.  So, why not add the instructions for
those architectures, leaving the old archs using the old instructions.
Obviously, llvm-gcc would have to generate the correct instructions on a
per arch basis, and the CFE would need a little bit more code.   When
LLVM 2.0 rolls around, all architectures can be moved to using the new
instructions, but until then, we simply have two sets of instructions to
do about the same thing.  Granted this means .ll and .bc files are not
portable across architectures, but that seems like a much less serious
problem than what most other approaches would entail.

Andrew




More information about the llvm-dev mailing list