On 5 Oct 2007, at 20:00, Dale Johannesen wrote:>>> I am not to sure on that. because that would make modules compiled >>> with the flag on incompatible with ones compiled without the flag >>> off >>> as stack behaviour would mismatch. >>> It would be no problem to make the behaviour dependent on the -tail- >>> call-opt flag. i am not sure that this is a good idea? >> >> In theory, any function can be marked fastcc. But llvm-gcc c / c++ >> frontend does *not* mark any external functions fastcc. > > The user can specify the "fastcall" and "stdcall" attributes, and it > looks > to me like llvm-gcc honors that. Certainly it should.This would imply one fastcc abi (callee pops args on return) to rule them all? That is only if fastcall translates to llvm fastcc of course. regards
On Oct 5, 2007, at 11:46 AM, Chris Lattner wrote:> On Fri, 5 Oct 2007, Arnold Schwaighofer wrote: >>> to me like llvm-gcc honors that. Certainly it should. >> >> This would imply one fastcc abi (callee pops args on return) to rule >> them all? >> That is only if fastcall translates to llvm fastcc of course. > > fastcall != fastcc. fastcall is a well defined convention on x86 > that has > very specific ABI requirements. fastcc, on the other hand, is an LLVM > thing, and LLVM is allowed to "innovate" on the abi where it wants to. > > There is no requirement for LLVM to handle fastcc and fastcall the > same.I see. Could we please change its name then? The .ll file uses x86_fastcallcc for fastcall, for an additional level of confusion.
On Fri, 5 Oct 2007, Arnold Schwaighofer wrote:>> to me like llvm-gcc honors that. Certainly it should. > > This would imply one fastcc abi (callee pops args on return) to rule > them all? > That is only if fastcall translates to llvm fastcc of course.fastcall != fastcc. fastcall is a well defined convention on x86 that has very specific ABI requirements. fastcc, on the other hand, is an LLVM thing, and LLVM is allowed to "innovate" on the abi where it wants to. There is no requirement for LLVM to handle fastcc and fastcall the same. -Chris -- http://nondot.org/sabre/ http://llvm.org/
well then back to my original question? evan? chris? On 5 Oct 2007, at 19:41, Evan Cheng wrote:> We can set a policy of treating fastcc external functions > as c functions. Then there is no chance of introducing ABI > incompatibility.this means limiting tail call opt to protected/invisible functions within a module? a little limiting i think. but i think if the incompatibility between modules compiled with tailcallopt on/off is documented then this will be okay? and this would only happen if someone other than llvm-gcc used llvm as a backend anyway. so i will make tailcallopt toggle the stack adjusting behaviour. with llvm-gcc this won't be a problem and if someone other using llvm as a backend runs into a problem than there is the documentation and the maillist that will help. is that okay? On 5 Oct 2007, at 20:46, Chris Lattner wrote:> On Fri, 5 Oct 2007, Arnold Schwaighofer wrote: >>> to me like llvm-gcc honors that. Certainly it should. >> >> This would imply one fastcc abi (callee pops args on return) to rule >> them all? >> That is only if fastcall translates to llvm fastcc of course. > > fastcall != fastcc. fastcall is a well defined convention on x86 > that has > very specific ABI requirements. fastcc, on the other hand, is an LLVM > thing, and LLVM is allowed to "innovate" on the abi where it wants to. > > There is no requirement for LLVM to handle fastcc and fastcall the > same. >okay> -Chris > > -- > http://nondot.org/sabre/ > http://llvm.org/ > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Dale,> I see. Could we please change its name then?fastcc?> The .ll file uses > x86_fastcallcc for fastcall, for an additional level of confusion.It was made intentionally to outline the target-specific nature of CC. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
On 2007-10-05, at 15:12, Anton Korobeynikov wrote:> Dale, > >> I see. Could we please change its name then? The .ll file uses >> x86_fastcallcc for fastcall, for an additional level of confusion. > > It was made intentionally to outline the target-specific nature of CC.I think Dale's confusion is that "fast(call|cc)*" names two very different conventions, and he's saying that "internalcc" or something would perhaps be a better name for fastcc, to differentiate it from x86 fastcall. — Gordon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071005/ae7f99a4/attachment.html>