This is an archive of the discontinued LLVM Phabricator instance.

MIR: Allow targets to serialize MachineFunctionInfo
ClosedPublic

Authored by arsenm on Mar 12 2019, 1:14 PM.

Details

Summary

This has been a very painful missing feature that has made producing
reduced testcases difficult. In particular the various registers
determined for stack access during function lowering were necessary to
avoid undefined register errors in a large percentage of
cases. Implement a subset of the important fields that need to be
preserved for AMDGPU.

Most of the changes are to support targets parsing register fields and
properly reporting errors. The biggest sort-of bug remaining is for
fields that can be initialized from the IR section will be overwritten
by a default initialized machineFunctionInfo section. Another
remaining bug is the machineFunctionInfo section is still printed even
if empty.

Diff Detail

Event Timeline

arsenm created this revision.Mar 12 2019, 1:14 PM
qcolombet accepted this revision.Mar 13 2019, 4:31 PM

Hi Matt,

Thanks for adding this long due feature!

LGTM.

Cheers,
-Quentin

This revision is now accepted and ready to land.Mar 13 2019, 4:31 PM
thegameg accepted this revision.Mar 13 2019, 4:43 PM

This is awesome, thanks for working on this!

LGTM (although I didn't look at the AMDGPU changes in detail).

arsenm closed this revision.Mar 14 2019, 3:53 PM

r356215