[LLVMdev] JIT + tail cals

Chris Lattner sabre at nondot.org
Wed May 18 09:51:48 PDT 2005


On Wed, 18 May 2005, Morten Ofstad wrote:
> Alexander Friedman wrote:
>> How do I tell the code generator to enable tail calls on the X86?
>> Since it is part of a library, I cannot pass a command line argument.
>
> Here is a snippet from our code which might help you ;-)
>
>  const char *args[] = { "-disable-pattern-isel", "false", 0 };
>  cl::ParseCommandLineOptions(2, args);

Yup, something like this should work.  Two comments though:

1. Morton, the pattern isel is now on by default for X86, and that option
    doesn't exist.  If you update to CVS you can remove that.  Using
    -enable-x86-fastcc should work with CVS though.
2. I haven't done much testing with the JIT and tail calls.  I wouldn't be
    suprised if there are minor issues that need to be fixed.  I will try
    to take a look and see what remains to be done over the next couple of
    days.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list