[LLVMdev] How to disable simplifying function parameters in llvm-g++

Duncan Sands baldrick at free.fr
Mon Jul 26 03:35:33 PDT 2010


Hi Xiaolong,

> The compilation substitutes "__position.0" for "__position", as shown below:
>
>    define linkonce_odr void @_ZNSt4listIiSaIiEE9_M_insertESt14_List_iteratorIiERKi(%"struct.std::list<int,std::allocator<int>  >"* %this, i64 %__position.0, i32* %__x) nounwind ssp { ... }

names like this only exist to make the LLVM IR more readable, and have no
effect on the final assembler.  If you want to find out original parameter
names you need to use debug info.

> P.S. Without any optimizations, g++ does NOT do this.

It's unclear to me what you mean here, since there are no names of this kind in
the assembly files produced by g++.  Are you perhaps referring to the name g++
prints in tree dumps?

Ciao,

Duncan.



More information about the llvm-dev mailing list