This is an archive of the discontinued LLVM Phabricator instance.

[RISCV WIP] Fixed InstAlias to handle tied operands.
AbandonedPublic

Authored by apazos on Jan 3 2018, 7:11 PM.

Details

Reviewers
None
Summary

Handled all compressed instructions except for
Q (128 bit) instructions and nop (addi x0, x0, 0i,
which requires a change in the instruction definition).

  • checkEarlyTargetMatchPredicate was defined

to enforce tied operands otherwise compressed version
is picked even when operands are not tied.

  • Hint variable set to false to allow repeated operands

in AsmString 'add $rs1, $rs1, $rs2".

  • AsmMatcherEmitter.cpp 'Operator <' was updated to

check for required features before ordering unrelated
UserClasses by UserClass name. This affects instructions
with immediates since immediate classes are usually unrelated.

Diff Detail

Event Timeline

apazos created this revision.Jan 3 2018, 7:11 PM
apazos updated this revision to Diff 128817.Jan 5 2018, 3:23 PM

Handled all compressed instructions except for
Q (128 bit) instructions and nop (addi x0, x0, 0i,
which requires a change in the instruction definition).

  • checkEarlyTargetMatchPredicate was defined

to enforce tied operands otherwise compressed version
is picked even when operands are not tied.

  • Hint variable set to false to allow repeated operands

in AsmString 'add $rs1, $rs1, $rs2".

  • AsmMatcherEmitter.cpp 'Operator <' was updated to

check for required features before ordering unrelated
UserClasses by UserClass name. This affects instructions
with immediates since immediate classes are usually unrelated.

apazos edited the summary of this revision. (Show Details)Jan 5 2018, 3:24 PM
apazos retitled this revision from [RISCV] Fixed InstAlias to handle tied operands. to [RISCV WIP] Fixed InstAlias to handle tied operands..Jan 8 2018, 2:33 PM
apazos abandoned this revision.Jan 17 2018, 6:12 PM

This is one of the design options we considered for compression.
But MCPat solution is favored over this one.