Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM] Upgrade to LLVM 13.0.0 #42602

Merged
merged 1 commit into from
Jan 6, 2022
Merged

[LLVM] Upgrade to LLVM 13.0.0 #42602

merged 1 commit into from
Jan 6, 2022

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Oct 12, 2021

@fredrikekre fredrikekre added the external dependencies Involves LLVM, OpenBLAS, or other linked libraries label Oct 12, 2021
@oscardssmith
Copy link
Member

How are the TTFP implications?

@giordano
Copy link
Contributor

Without #42379 measurements of loading time on master of packages which load JLLs, like Plots.jl, are a bit meaningless

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Oct 22, 2021

Without #42379

Now merged, but on linux64 (sounds serious):

line 499:

Libdl                              (2) |        started at 2021-10-22T01:55:13.891 on pid 62294
      From worker 4:	
      From worker 4:	signal (11): Segmentation fault
      From worker 4:	in expression starting at /buildworker/worker/tester_linux64/build/share/julia/stdlib/v1.8/InteractiveUtils/test/runtests.jl:443
      From worker 4:	_ZN4llvm10MCStreamer12InitSectionsEb at /buildworker/worker/tester_linux64/build/bin/../lib/julia/libLLVM-13jl.so (unknown line)
      From worker 4:	jl_dump_asm_internal at /buildworker/worker/package_linux64/build/src/disasm.cpp:915
      From worker 4:	jl_dump_fptr_asm_impl at /buildworker/worker/package_linux64/build/src/disasm.cpp:60

[..to line 567:]
      From worker 4:	Allocations: 5461216116 (Pool: 5459793218; Big: 1422898); GC: 1299
Libdl                              (2) |     3.06 |   0.12 |  3.9 |      53.50 |  2320.77
Logging                            (2) |        started at 2021-10-22T01:55:16.967 on pid 62294
Worker 4 terminated.
UNHANDLED TASK ERROR: EOFError: read end of file
Stacktrace:
 [1] (::Base.var"#wait_locked#653")(s::TCPSocket, buf::IOBuffer, nb::Int64)
   @ Base ./stream.jl:941
[..]

@KristofferC
Copy link
Member

KristofferC commented Oct 22, 2021

I don't think it is very useful to copy-paste CI logs for WIP PR into the comments unless you have something specific to say about it. I am sure the author of the PR knows how to find them.

@vchuravy vchuravy force-pushed the vc/llvm_13 branch 4 times, most recently from ecee36e to 5b8d968 Compare October 28, 2021 16:05
@vchuravy
Copy link
Member Author

MDNode context does not match Module context!
!0 = !{!1, !1, i64 0}
in function stress
LLVM ERROR: Broken function found, compilation aborted!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.	Program arguments: opt -enable-new-pm=0 -load libjulia-internal.so -LateLowerGCFrame -FinalLowerGC -S -
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'Module Verifier' on function '@stress'
 #0 0x00007ff84f332f9f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x00007ff84f330979 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007ff84ea14870 __restore_rt sigaction.c:0:0
 #3 0x00007ff84e4fed22 raise (/usr/lib/libc.so.6+0x3cd22)
 #4 0x00007ff84e4e8862 abort (/usr/lib/libc.so.6+0x26862)
 #5 0x00007ff84f258813 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/vchuravy/builds/julia/usr/tools/../lib/libLLVM-13jl.so+0x804813)
 #6 0x00007ff84f258988 (/home/vchuravy/builds/julia/usr/tools/../lib/libLLVM-13jl.so+0x804988)
 #7 0x00007ff84f500dcf (anonymous namespace)::VerifierLegacyPass::runOnFunction(llvm::Function&) Verifier.cpp:0:0
 #8 0x00007ff84f46a5a9 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/vchuravy/builds/julia/usr/tools/../lib/libLLVM-13jl.so+0xa165a9)
 #9 0x00007ff84f46a841 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/vchuravy/builds/julia/usr/tools/../lib/libLLVM-13jl.so+0xa16841)
#10 0x00007ff84f46ba37 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/vchuravy/builds/julia/usr/tools/../lib/libLLVM-13jl.so+0xa17a37)
#11 0x000000000041b682 main (/home/vchuravy/builds/julia/usr/tools/opt+0x41b682)
#12 0x00007ff84e4e9b25 __libc_start_main (/usr/lib/libc.so.6+0x27b25)
#13 0x000000000041c1e2 _start /workspace/srcdir/glibc-2.12.2/csu/../sysdeps/x86_64/elf/start.S:116:0
FileCheck error: '<stdin>' is empty.
FileCheck command line:  FileCheck /home/vchuravy/src/julia/test/llvmpasses/safepoint_stress.jl

@pchintalapudi this looks similar to the bug we run into on #42572

@vtjnash
Copy link
Member

vtjnash commented Oct 28, 2021

That sounds like you accidentally initialized libjulia-internal twice, which I think we have seen the linker do because of the split with libjulia-codegen now

@vtjnash
Copy link
Member

vtjnash commented Nov 22, 2021

Now just waiting on https://reviews.llvm.org/D114389, and getting LLVM (re-)packaged correctly in the build for Win32/Win64.

vtjnash added a commit to llvm/llvm-project that referenced this pull request Nov 30, 2021
Previously, this caused GlobalISel to emit invalid IR (a gpr32 to gpr64
copy) and fail during verification.

While this shift is not defined (returns poison), it should not crash
codegen, as it may appear inside dead code (for example, a select
instruction), and it is legal IR input, as long as the value is unused.

Discovered while trying to build Julia with LLVM v13:
JuliaLang/julia#42602.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D114389
vchuravy pushed a commit to JuliaLang/llvm-project that referenced this pull request Dec 5, 2021
Previously, this caused GlobalISel to emit invalid IR (a gpr32 to gpr64
copy) and fail during verification.

While this shift is not defined (returns poison), it should not crash
codegen, as it may appear inside dead code (for example, a select
instruction), and it is legal IR input, as long as the value is unused.

Discovered while trying to build Julia with LLVM v13:
JuliaLang/julia#42602.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D114389

(cherry picked from commit 18308e1)
@vchuravy vchuravy force-pushed the vc/llvm_13 branch 2 times, most recently from aa04c69 to bd990db Compare December 8, 2021 02:01
@vchuravy vchuravy requested review from vtjnash and staticfloat and removed request for vtjnash December 8, 2021 04:58
base/binaryplatforms.jl Outdated Show resolved Hide resolved
@vchuravy
Copy link
Member Author

vchuravy commented Dec 8, 2021

@nanosoldier runtests(ALL, vs = ":master")

@vchuravy
Copy link
Member Author

vchuravy commented Dec 8, 2021

@nanosoldier runbenchmarks(ALL, vs=":master")

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

@vchuravy vchuravy changed the base branch from master to vc/backport_llvm_13 December 14, 2021 00:06
Base automatically changed from vc/backport_llvm_13 to master December 14, 2021 02:43
@vchuravy
Copy link
Member Author

@nanosoldier runbenchmarks(ALL, vs=":master")

@nanosoldier
Copy link
Collaborator

Something went wrong when running your job:

NanosoldierError: error when preparing/pushing to report repo: failed process: Process(setenv(`git push`; dir="/data/nanosoldier/workdir/NanosoldierReports"), ProcessExited(1)) [1]

Unfortunately, the logs could not be uploaded.

@vtjnash
Copy link
Member

vtjnash commented Dec 28, 2021

https://github.com/JuliaCI/NanosoldierReports/blob/master/benchmark/by_hash/15db64c_vs_c790938/report.md Looks okay. Sorry that this new AWS machine seems to be unreliable. Hopefully we can move back to dedicated hardware soon.

@nanosoldier runbenchmarks("collections" || "shootout" || "dates" || "string", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@vchuravy
Copy link
Member Author

Oh yeah that's extremely noisy :/

@vchuravy
Copy link
Member Author

vchuravy commented Jan 5, 2022

Non-scientific build benchmark:

Before:

Sysimage built. Summary:
Total ───────  52.908324 seconds 
Base: ───────  21.431235 seconds 40.5064%
Stdlibs: ────  31.475813 seconds 59.4912%
    JULIA /home/vchuravy/builds/julia/usr/lib/julia/sys-o.a
Generating REPL precompile statements... 36/36
Executing precompile statements... 1309/1340
Precompilation complete. Summary:
Total ─────── 109.812820 seconds
Generation ──  82.326156 seconds 74.9695%
Execution ───  27.486664 seconds 25.0305%
    LINK /home/vchuravy/builds/julia/usr/lib/julia/sys.so

After:

Sysimage built. Summary:
Total ───────  52.104447 seconds 
Base: ───────  20.850621 seconds 40.017%
Stdlibs: ────  31.252741 seconds 59.9809%
    JULIA /home/vchuravy/builds/julia/usr/lib/julia/sys-o.a
Generating REPL precompile statements... 36/36
Executing precompile statements... 1309/1340
Precompilation complete. Summary:
Total ─────── 102.547306 seconds
Generation ──  75.177300 seconds 73.3099%
Execution ───  27.370006 seconds 26.6901%

@vchuravy vchuravy merged commit 9555548 into master Jan 6, 2022
@vchuravy vchuravy deleted the vc/llvm_13 branch January 6, 2022 21:31
vchuravy pushed a commit to JuliaLang/llvm-project that referenced this pull request Feb 7, 2022
Previously, this caused GlobalISel to emit invalid IR (a gpr32 to gpr64
copy) and fail during verification.

While this shift is not defined (returns poison), it should not crash
codegen, as it may appear inside dead code (for example, a select
instruction), and it is legal IR input, as long as the value is unused.

Discovered while trying to build Julia with LLVM v13:
JuliaLang/julia#42602.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D114389

(cherry picked from commit 18308e1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependencies Involves LLVM, OpenBLAS, or other linked libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants