This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Machine Operand Flag Serialization
ClosedPublic

Authored by lenary on Nov 25 2019, 5:28 AM.

Details

Summary

We need to implement these hooks to ensure that we can serialize and parse MIR
correctly.

Diff Detail

Event Timeline

lenary created this revision.Nov 25 2019, 5:28 AM
lenary updated this revision to Diff 230947.Nov 25 2019, 11:20 AM
  • Serialization Testcase
jrtc27 added inline comments.Nov 25 2019, 12:04 PM
llvm/test/CodeGen/RISCV/mir-target-flags.ll
18

Since these are not external and the file is built without PIC, they are all being optimised to LE. With D70649, making them external would at least make them all IE except for @t_le, but in order to get GD and LD you need to have a PIC invocation. This will also get you MO_PLT and MO_GOT_HI cases for free.

65

RHS typo (hence why there is no @t_ud in the test output).

lenary updated this revision to Diff 231031.Nov 26 2019, 2:39 AM
lenary marked 4 inline comments as done.
  • Increase Testcase Coverage
llvm/test/CodeGen/RISCV/mir-target-flags.ll
18

Thanks for the help! I have added external to all these cases, and --relocation-model=pic to the llc invocation, and I think all the flag cases are being hit now.

65

Thanks, fixed!

lenary retitled this revision from [WIP][RISCV] Machine Operand Flag Serialization to [RISCV] Machine Operand Flag Serialization.Nov 26 2019, 2:51 AM
luismarques accepted this revision.Nov 26 2019, 6:14 AM

LGTM.
Thanks for the review suggestions @jrtc27 !

This revision is now accepted and ready to land.Nov 26 2019, 6:14 AM
This revision was automatically updated to reflect the committed changes.
lenary added a comment.Dec 9 2019, 5:56 AM

This broke the build and I had to add rGcb664baf50f069cb844d69cd6b8952cb22a3e7c2 to fix it.

@jrtc27 I think this testcase now doesn't cover half of what I intended it to test, do you know what caused the change?