-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Separate out EH handler lowering into its own pass #21720
Conversation
src/llvm-lower-handlers.cpp
Outdated
@@ -0,0 +1,225 @@ | |||
// This file is a part of Julia. License is MIT: http://julialang.org/license |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the links are https now
that segfault during bootstrap on win64 appveyor looks legit |
Indeed. I'll take a look. |
Currently it's being done as part of the GC root lowering pass. However, I'm working on replacing that pass, so this functionality needed to be separated out anyway. While I'm here: 1. Simplify the algorithm to a simple DFS numbering 2. Have it insert lifetime intrinisics to allow the optimizer to do stack slot coloring later 3. Add a test for this pass
Fixed, I think. |
This seems to be causing segfaults when compiling on FreeBSD. |
Do you have a backtrace? |
Can you attach a debugger? "make VERBOSE=1" will show you the exact command it was trying to run. |
The warning at https://gist.github.com/ararslan/392feece5a054804c57ed181fa6cfad0#file-backtrace-L62 seems real btw |
Regarding the warning, I'm getting that on macOS as well. Perhaps the function should have a I can run make in |
Yes, it's missing a |
The backtrace almost looks like the compiler assume the return will not be reachable and let the control flow fall into the next function, which might be a valid optimization according to C++ standard... Should |
@ararslan can you add that |
Just adding the |
It seems that that's actually the code clang produce for int g1(bool);
bool f(bool a)
{
if (a)
return false;
g1(a);
}
bool k()
{
return true;
} _Z1fb: # @_Z1fb
.cfi_startproc
# BB#0:
pushq %rax
.Lcfi0:
.cfi_def_cfa_offset 16
testb %dil, %dil
je .LBB0_2
# BB#1:
xorl %eax, %eax
popq %rcx
retq
.LBB0_2:
xorl %edi, %edi
callq _Z2g1b
.Lfunc_end0:
.size _Z1fb, .Lfunc_end0-_Z1fb
.cfi_endproc
.globl _Z1kv
.p2align 4, 0x90
.type _Z1kv,@function
_Z1kv: # @_Z1kv
.cfi_startproc
# BB#0:
movb $1, %al
retq
.Lfunc_end1:
.size _Z1kv, .Lfunc_end1-_Z1kv
.cfi_endproc |
Cool. A little surprised that this doesn't trigger a crash on macOS.... |
Huh, I was under the impression that it'd just do a |
That's what gcc does..... Apparently llvm (4.0 at least) doesn't....... not even a |
Actually, it does emit a |
@Keno Bisection suggests that this is causing an assertion error with LLVM-svn. cc @ranjanan
|
Yes, I had already given @ranjanan a patch for this. |
Yes but after building I got another segfault at Base.precompile
Perhaps it's something @yuyichao already mentioned in #21879 |
Yes it is. |
Currently it's being done as part of the GC root lowering pass. However, I'm working
on replacing that pass, so this functionality needed to be separated out anyway.
While I'm here: