This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Introduce a G_DYN_STACKALLOC opcode to represent dynamic allocas
ClosedPublic

Authored by aemerson on Aug 23 2019, 12:42 PM.

Details

Diff Detail

Event Timeline

aemerson created this revision.Aug 23 2019, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2019, 12:42 PM
This revision is now accepted and ready to land.Aug 23 2019, 12:52 PM
arsenm added inline comments.Aug 23 2019, 12:53 PM
llvm/include/llvm/Target/GenericOpcodes.td
195

Should this be considered a side effect?

llvm/test/MachineVerifier/test_g_dyn_stackalloc.mir
3

REQUIRES: global-isel isn't necessary anymore

aemerson marked 2 inline comments as done.Aug 23 2019, 1:13 PM
aemerson added inline comments.
llvm/include/llvm/Target/GenericOpcodes.td
195

I don't think so? G_FRAME_INDEX doesn't have side effects, so I don't think this should be counted as having it either. I do intend to use this to implement stack checking calls but that's a target dependent thing.

llvm/test/MachineVerifier/test_g_dyn_stackalloc.mir
3

Ok.

arsenm added inline comments.Aug 23 2019, 1:22 PM
llvm/include/llvm/Target/GenericOpcodes.td
195

The DAG equivalent has a chain. I think you could observe different behavior if you reordered a small and a large request

aemerson marked an inline comment as done.Aug 23 2019, 1:34 PM
aemerson added inline comments.
llvm/include/llvm/Target/GenericOpcodes.td
195

That's true. I'll change it.

This revision was automatically updated to reflect the committed changes.