[LLVMdev] API changes (was Antw.: 2.0 Pre-release tarballs online)

Bram Adams bram.adams at ugent.be
Sun May 20 14:21:39 PDT 2007


Op 19-mei-07, om 00:39 heeft Chris Lattner het volgende geschreven:

> Anton is right.  You should be able to use -fno-builtins to disable  
> this.

Thanks, that did the trick.

Some final remarks (my app works again :-)):
  * llvm.va_start and similar intrinsics now have an i8* arg instead  
of an sbyte**
  * For some reason the Arguments of a Function are now circularly  
linked, i.e. getPrev()/Next() does not yield 0 when the first  
Argument is reached, but jumps back to the last one. I experienced  
this with a loop I was using to find out the index of an Argument. It  
relied on the fact that getPrev() would eventually give 0, which  
worked in previous LLVM versions.

On a related note: while using llvmc I have some test cases where the  
following error now pops up on Linux X86 (not on OSX):

<premain>: CommandLine Error: Argument 'debug' defined more than once!
llvmc: CommandLine Error: Argument 'debug' defined more than once!

These are the arguments I provide to llvmc (I need the -disable-opt  
as some of the standard passes absolutely need to occur before my  
passes, and the rest must come afterwards):

llvmc --config-dir ${ASPICERE2_SRC}/config/ -Tlnk="-L${LLVM_FRONT}/ 
lib" -Tlnk="-L${ASPICERE2_INSTALL}/lib" -Tlnk="-L${SWI_LIB}" -Tlnk="- 
load=${ASPICERE2_INSTALL}/lib/weaver" -Tlnk="-load=$ 
{ASPICERE2_INSTALL}/lib/native" -Tlnk="-disable-opt" -Tlnk="- 
constmerge" -Tlnk="-globalsmodref-aa" -Tlnk="-reify" -Tlnk="-match" - 
Tlnk="-weave" -Tlnk="-globalsmodref-aa" -Tlnk="-internalize" -Tlnk="- 
ipsccp" -Tlnk="-globalopt" -Tlnk="-constmerge" -Tlnk="-deadargelim" - 
Tlnk="-instcombine" -Tlnk="-inline" -Tlnk="-prune-eh" -Tlnk="- 
globalopt" -Tlnk="-globaldce" -Tlnk="-argpromotion" -Tlnk="- 
instcombine" -Tlnk="-scalarrepl" -Tlnk="-globalsmodref-aa" -Tlnk="- 
licm" -Tlnk="-load-vn" -Tlnk="-gcse" -Tlnk="-dse" -Tlnk="- 
instcombine" -Tlnk="-simplifycfg" -Tlnk="-globaldce" $FILTERED_ARGS  

Variable $FILTERED_ARGS contains some .c files and also the -o switch  
with the name of the resulting binary, while $ASPECT_STRING_TO_C  
contains another number of .c files.

The weird thing (besides that I only experience this error on Linux)  
is that although all my test cases use llvmc, only two fail with this  
error without a clear reason. Any ideas on this?

Kind regards,

Bram Adams
GH-SEL, INTEC, Ghent University (Belgium)

More information about the llvm-dev mailing list