llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.09k stars 11.99k forks source link

LLVM LTO a.out.0.5.precodegen.bc only 2.0kb #83589

Open catzlm opened 8 months ago

catzlm commented 8 months ago

I build binutils and build llvm with -DLLVM_BINUTILS_INCDIR I try to build prce-8.45 It generate a.out.0.5.precodegen.bc `; ModuleID = 'a.out.0.5.precodegen.bc' source_filename = "ld-temp.o" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: noinline nounwind optnone uwtable define dso_local i32 @main() #0 { %1 = alloca i32, align 4 store i32 0, i32* %1, align 4 ret i32 0 }

attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.ident = !{!0} !llvm.module.flags = !{!1, !2}

!0 = !{!"clang version 7.0.0 (tags/RELEASE_700/final)"} !1 = !{i32 1, !"wchar_size", i32 4} !2 = !{i32 1, !"ThinLTO", i32 0}` where I wrong? T.T

asl commented 8 months ago

!0 = !{!"clang version 7.0.0 (tags/RELEASE_700/final)"}

This is terribly ancient. Can you try with something like LLVM/clang 17?

catzlm commented 8 months ago

!0 = !{!"clang version 7.0.0 (tags/RELEASE_700/final)"}

This is terribly ancient. Can you try with something like LLVM/clang 17?

OK I will try it