[LLVMdev] VMKIT: Error while producing LLVMruntime.inc (using llvm-as and llc)

Foivos Zakkak foivos at zakkak.net
Mon May 28 12:01:14 PDT 2012


vmkit fails to build because llvm-as with llc -march=cpp generate wrong 
code for
AttrListPtr AttrListPtr::get(ArrayRef< AttributeWithIndex >Attrs)
http://llvm.org/doxygen/classllvm_1_1AttrListPtr.html#a3a19622d131e9f0d981398f54cf6acfc

bellow you can see the faulty generated code

llvm-as ./vmkit/lib/vmkit/Compiler/LLVMRuntime.ll -o - | llc -march=cpp 
-cppgen=contents -o - | grep 'AttrListPtr::get'
  func_llvm_sqrt_f64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_sin_f64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_cos_f64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_memcpy_i32_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_memset_i32_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_frameaddress_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i8_p0i8_PAL = 
AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i16_p0i16_PAL = 
AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i32_p0i32_PAL = 
AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i64_p0i64_PAL = 
AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_unconditionalSafePoint_PAL = AttrListPtr::get(Attrs.begin(), 
Attrs.end());
  func_conditionalSafePoint_PAL = AttrListPtr::get(Attrs.begin(), 
Attrs.end());
  func_llvm_gcroot_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func__setjmp_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_registerSetjmp_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_unregisterSetjmp_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());

One would expect to see AttrListPtr::get(Attrs.begin(), Attrs.end())

Thank you
Foivos



More information about the llvm-dev mailing list