This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Enable serializing of argument info.
ClosedPublic

Authored by hliao on Jul 2 2019, 1:10 PM.

Details

Summary
  • Support serialization of all arguments in machine function info. This enables fabricating MIR tests depending on argument info.

Event Timeline

hliao created this revision.Jul 2 2019, 1:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 1:10 PM
hliao marked an inline comment as done.Jul 2 2019, 1:13 PM
hliao added inline comments.
llvm/test/CodeGen/AMDGPU/hazard-hidden-bundle.mir
6–7

As non-empty arg info has '}' as well, need to match the basic block label to ensure '}' matching the end of the bundle.

rampitec added inline comments.Jul 2 2019, 1:19 PM
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
1082

Default mask value in ArgDescriptor is not 0, it is ~0.

hliao marked an inline comment as done.Jul 2 2019, 1:50 PM
hliao added inline comments.
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
1082

Optional<unsigned> only return true when is assigned with values. It's not equivalent to the checking of 0.

LGTM, but let's wait for Matt.

arsenm requested changes to this revision.Jul 2 2019, 3:15 PM

Can you avoid having an explicit isReg field? It should be able to infer if it's a register or stack offset

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
130–133

braces

This revision now requires changes to proceed.Jul 2 2019, 3:15 PM
hliao updated this revision to Diff 207691.Jul 2 2019, 6:39 PM

patch is enhanced to remove 'isReg'

hliao updated this revision to Diff 207692.Jul 2 2019, 6:48 PM

minor style fixing

arsenm accepted this revision.Jul 2 2019, 6:49 PM

LGTM

This revision is now accepted and ready to land.Jul 2 2019, 6:49 PM
This revision was automatically updated to reflect the committed changes.