Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store tuple and vector types to the stack eagerly [ci skip]
fix #11187, fix #11450, fix #11026, ref #10525, fix #11003 TODO: confirm all of those numbers were fixed TODO: ensure the lazy-loaded objects have gc-roots TODO: re-enable VectorType objects, so small objects still end up in registers in the calling convention TODO: allow moving pointers sometimes rather than copying TODO: teach the GC how it can re-use an existing pointer as a box this also changes the julia specSig calling convention to pass non-primitive types by pointer instead of by-value this additionally fixes a bug in gen_cfunction that could be exposed by turning off specSig this additionally moves the alloca calls in ccall (and other places) to the entry BasicBlock in the function, ensuring that llvm detects them as static allocations and moves them into the function prologue this additionally fixes some undefined behavior from changing a variable's size through a alloca-cast instead of zext/sext/trunc
- Loading branch information
244f1cb
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.
👍 Exciting.
244f1cb
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.
i tried turning back on vector types as part of this (since the alignment issues should be fixed now), but so far, that seems to have inhibited one of the harder tests:
244f1cb
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.
That is too funny.
244f1cb
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.
I think it's fine. no one will notice, go ahead.
244f1cb
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.
i found the issue: i was missing a
trunc i8 %x to i1
afterextractvalue <2 x i8> %x, i32 0
, so llvm replaced the result withundef
on to the next issue: llvm appears to assume our gc returns addresses with 32-byte alignment (e.g. it emit
vmovaps %ymm0, (%rax)
, where%rax
is the register that holds the return value from the call toallocobj
).completely unrelated finding: did you know that
git checkout -
does a checkout of the previous branch? (similar idea ascd -
)244f1cb
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.
Didn't know that before !
Related reading