This is an archive of the discontinued LLVM Phabricator instance.

TableGen: Add IsOptional field to AsmOperandClass
ClosedPublic

Authored by tstellarAMD on Dec 23 2015, 11:10 AM.

Details

Summary

This makes it possible to specify some operands as optional to the AsmMatcher.
Setting this field to true will prevent the AsmMatcher from emitting
'too few operands' errors when there are missing optional operands.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to TableGen: Add IsOptional field to AsmOperandClass.
tstellarAMD updated this object.
tstellarAMD added a subscriber: llvm-commits.
arsenm added a subscriber: arsenm.Dec 23 2015, 1:19 PM
arsenm added inline comments.
include/llvm/Target/Target.td
608–611 ↗(On Diff #43552)

This comment should have more detail. Is this just talking about the assembler? What default value is used?

Update comment.

Adding as reviewers people who have made non-trivial changes to the AsmMatcher backend in the last year.

ab accepted this revision.Feb 3 2016, 12:03 PM
ab edited edge metadata.

LGTM

include/llvm/Target/Target.td
612 ↗(On Diff #46658)

Typo: surppressed

utils/TableGen/AsmMatcherEmitter.cpp
3088 ↗(On Diff #46658)

That " <<" in the middle is unnecessary, right? Can you delete it?

This revision is now accepted and ready to land.Feb 3 2016, 12:03 PM
This revision was automatically updated to reflect the committed changes.