[LLVMdev] Load from abs address generated bad code on LLVM 2.4

Chris Lattner clattner at apple.com
Wed Jan 21 10:07:39 PST 2009


On Jan 21, 2009, at 4:15 AM, Andrew Haley wrote:
>> That should work fine, just use "jit" instead of "x86-emitter" as the
>> debug type.
>
> That's impossible: CurrentDebugType is now private; it appears
> nowhere in the installed headers.  I can't find any public interface
> to allow a JIT to set it.

Ah ok.  I'd suggest doing what llvm-gcc does here, it is a much more  
stable API:

   std::vector<const char*> Args;
   Args.push_back(""); // program name
   Args.push_back("-debug-only=jit");
   ...
   Args.push_back(0);  // Null terminator.
   cl::ParseCommandLineOptions(Args.size()-1, (char**)&Args[0]);

This also gives you control over optimizations and codegen options,

-Chris



More information about the llvm-dev mailing list