[llvm-commits] [llvm] r71410 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Duncan Sands baldrick at free.fr
Mon May 18 08:39:14 PDT 2009


Hi Dale,

>>> This doesn't take care of all of the problems with debug info for
>>> inlined
>>> functions, but it's a step in the right direction. For one thing,
>>> llvm-gcc
>>> generates wrong IR (it's missing some llvm.dbg intrinsics at the
>>> point where the
>>> function's inlined) for this example:
>>>
>>> #include <stdio.h>
>>> static __inline__ __attribute__((always_inline))  int bar(int x)
>>> { return 4; }
>>> void foo() {
>>> long long b = 1;
>>> int Y = bar(4);
>>> printf("%d\n", Y);
>>> }
>> The body for "bar" is gone by the time llvm_asm_file_end is called: I
>> think the tree inliner is still being used???
> 
> Yeah, looks like it's not disabled fully at -O0 (no-unit-at-a-time  
> seems to be the relevant setting).  A significantly different high- 
> level code path, implemented by having  if(flag_unit_at_a_time)   all  
> over the place in common code....

yes, the cgraph stuff is icky.  I've fixed the problem by having all
functions be classified as uninlineable.

Ciao,

Duncan.



More information about the llvm-commits mailing list