This change moves the actual stack pointer manipulation into the legalizer, available to targets via lower(). The codegen is slightly different because we're using explicit masks instead of G_PTRMASK, and using G_SUB rather than adding a negative amount via G_GEP.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | ||
---|---|---|
1803 | Here's we're masking the allocation amount, which is an integer type, not a pointer, hence we can't use ptrmask. |
One nit, inlined, other then that looks good.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
3940 | uint64_t or int64_t instead of unsigned? | |
3957 | Or use explicit APInt for -Align here just to be sure we make bitmask of appropriate size/value. | |
llvm/test/CodeGen/AArch64/GlobalISel/legalize-dyn-alloca.mir | ||
98 | This bitmask seems strange, it looks like zeroextended 32 bit value -32 to a 64 bit value. |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
3957 | You're right, I'll fix this with APInt and commit. |
SDNodeFlags?