[llvm-commits] [llvm] r38506 - in /llvm/trunk: lib/VMCore/Verifier.cpp test/Verifier/byval-1.ll test/Verifier/byval-2.ll test/Verifier/byval-3.ll test/Verifier/byval-4.ll

Duncan Sands baldrick at free.fr
Tue Jul 17 06:39:13 PDT 2007


Hi Rafael,

> > I see, thanks for this information.  However this seems to be more or
> > less exactly the scheme I was suggesting: an explicit copy of the struct
> > is made in the IR (done by the caller).  In the IR the copy is passed to
> > the callee via a pointer which is marked byval.  In the x86_64 code
> > generator the byval parameter is changed from a pointer to the copy
> > into whatever special form is required (I didn't understand exactly
> > how it is supposed to be passed: as an offset from the stack frame?
> > If so the stack pointer is subtracted from the pointer to the copy,
> > and the difference is passed).
> 
> You still have the problem that the caller must generate the copy into
> the correct place in the stack frame.

could you please explain this some more.  Are you saying that the copy
has to be placed very specifically in the stack frame, or does it not
matter very much where it is?  Since an offset to it is passed to the
callee I guessed that it doesn't matter much were it is exactly.

> That is why I think this is a 
> all or nothing situation. We can have the FE handle the stack frame or
> the backend. Using a mix will create a lot of dependencies between
> them.

OK.

Duncan.



More information about the llvm-commits mailing list