[llvm-commits] [llvm] r72650 - in /llvm/trunk:include/llvm/CodeGen/JITCodeEmitter.hinclude/llvm/CodeGe n/MachineCodeEmitter.hinclude/llvm/ExecutionEngine/JITMemoryManager. hlib/CodeGen/MachOWriter.cpp lib/CodeGen/MachOWriter.hlib/ExecutionEngi

Duncan Sands baldrick at free.fr
Fri Jun 5 01:04:41 PDT 2009


Hi Julien,

...
> $ llvm-gcc -c -emit-llvm -o t.bc t.c
> $ lli t.bc
...
> Duncan, it seems to be coming from 72619, any idea what's wrong ?

with r72619 a definition is output for getchar:

define available_externally i32 @getchar() nounwind {
entry:
...

The code generator has this logic in SelectionDAGISel::runOnFunction:

   // Do not codegen any 'available_externally' functions at all, they have
   // definitions outside the translation unit.
   if (Fn.hasAvailableExternallyLinkage())
     return false;

This confuses the JIT because it sees a function that is not a
declaration, passes it to codegen, but codegen doesn't produce
any code for it.

I don't know what the right solution is.

Ciao,

Duncan.



More information about the llvm-commits mailing list