[LLVMdev] FunctionPassManager Issue

Chris Lattner sabre at nondot.org
Wed Apr 14 22:35:01 PDT 2004


On Wed, 14 Apr 2004, Alex Li wrote:
> I'm a cs326 student that uses LLVM for our MP. While some of the COOL
> program can be run seamlessly, I get the following assertion error for
> many of them.
>
> lli: Pass.cpp:95: bool llvm::FunctionPassManager::run(llvm::Function&):
> >> Assertion `(&F == mF) && "ModuleProvider does not contain this
> >> function!"' failed.
>
> It seems like I need to link a library to it but I'm not sure how to
> resolve this.

I really have no idea what is going on here.  From my understanding, you
were given a "reduced" version of LLVM to use for CS326.  It's quite
possible that there is a problem with the reduction that is causing this.
In any case, without more information (a stack trace from GDB for
example), I can't really diagnose the issue.

> Funny thing, when I use lli -force-interpreter, some of the program runs
> but have this error message
> Tried to execute an unknown external function: sbyte * (sbyte *) * gets

The interpreter is not something that can be relied on, except for trivial
testcases.  It does not have a generic "foreign function interface" so it
cannot call external functions that it does not know about.

> Again, I'd like to know how I should link in the function so that it
> doesn't complain or fail.

Try sending in a stack trace.  In particular, run the program in the JIT,
but under gdb:

$ gdb --args lli foo.bc
....
gdb> run
...
gdb> bt

and send me the output.

Thanks!

-Chris

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




More information about the llvm-dev mailing list