This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Defer register creation in handleAssignments
ClosedPublic

Authored by arsenm on Apr 12 2021, 7:24 PM.

Details

Summary

This is currently built on top of the SelectionDAG call lowering, but
does not use it the same way. SelectionDAG passes legalized types to
the assignment functions, and the tablegenerated assignment functions
may change the value types expected for registers. This does not
change the types used, just moves the register creation to help fix
this in the future.

Defer the register creation until after all of the assignment
decisions have been made. This will also help have correct tail call
compatibility checking in a future change. Currently it does not work
as expected for any arguments split across multiple registers.

Diff Detail

Event Timeline

arsenm created this revision.Apr 12 2021, 7:24 PM
arsenm requested review of this revision.Apr 12 2021, 7:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2021, 7:24 PM
Herald added a subscriber: wdng. · View Herald Transcript
aemerson added inline comments.Apr 15 2021, 11:13 PM
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
558–574

Where's this logic going?

arsenm added inline comments.Apr 16 2021, 1:43 PM
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
558–574

These two blocks were 90% identical. Now the flag splitting and assignment is only done up here, and the register creation moved below

aemerson accepted this revision.Apr 17 2021, 10:37 PM
This revision is now accepted and ready to land.Apr 17 2021, 10:37 PM