This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel][Tablegen] Assign small opcodes to pseudos
ClosedPublic

Authored by rtereshin on May 22 2018, 6:36 PM.

Details

Summary

Sort pseudo instructions first while emitting enum's for target
instructions info. That puts them close to each other and to generic
G_* opcodes for GlobalISel. This makes it easier to build small jump
tables over opcodes that could be directly embedded into MatchTable's
Tablegen'erated for GlobalISel's InstructionSelect.

New order breaks instregex, thus this patch also fixes that.

There is an NFC going before this patch to tidy up the implementation a little and make the diff smaller.

Diff Detail

Repository
rL LLVM

Event Timeline

rtereshin created this revision.May 22 2018, 6:36 PM
bogner accepted this revision.May 23 2018, 11:01 AM

lg

utils/TableGen/CodeGenTarget.cpp
386–387 ↗(On Diff #148140)

Should probably update this comment.

This revision is now accepted and ready to land.May 23 2018, 11:01 AM

Hi Justin,

Thanks for looking into this.

Roman

utils/TableGen/CodeGenTarget.cpp
386–387 ↗(On Diff #148140)

Good catch! Will do.

This revision was automatically updated to reflect the committed changes.