This is an archive of the discontinued LLVM Phabricator instance.

MachineFunction: Introduce NoPHIs property
ClosedPublic

Authored by MatzeB on Jul 22 2016, 8:16 PM.

Details

Summary

I want to compute the SSA property of .mir files automatically in
an upcoming patch. The problem with this is that some inputs will be
reported as static single assignment and some passes subsequently reject them.
In reality though those passes have no problem with register only being assigned once but they do not support PHI
instructions.
So we track the presence of PHI instructions separate from the SSA property.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 65210.Jul 22 2016, 8:16 PM
MatzeB retitled this revision from to MachineFunction: Introduce NoPHIs property.
MatzeB updated this object.
MatzeB added a reviewer: qcolombet.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
arsenm added inline comments.Jul 22 2016, 8:24 PM
lib/CodeGen/MachineFunction.cpp
77

This seems more convoluted than
if (HasProperty)

ROS << ...
qcolombet added inline comments.Aug 12 2016, 6:30 PM
lib/CodeGen/RegAllocBase.cpp
65 ↗(On Diff #65210)

Use the getRequiredProperties method that are built in the machine function passes instead of an assert.

lib/CodeGen/RegAllocFast.cpp
1100–1101

Ditto.

lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
434

Ditto.

MatzeB updated this revision to Diff 68745.Aug 19 2016, 4:13 PM
MatzeB edited edge metadata.
MatzeB marked 4 inline comments as done.

Address review comments.

qcolombet accepted this revision.Aug 23 2016, 12:37 PM
qcolombet edited edge metadata.

LGTM, with one nitpick.

lib/CodeGen/MIRParser/MIRParser.cpp
290

return instead and get rid of the NoPHIs variable.

This revision is now accepted and ready to land.Aug 23 2016, 12:37 PM
This revision was automatically updated to reflect the committed changes.