[PATCH] [AArch64] Condition codes AL and NV are invalid in the aliases that use inverted condition codes

Tim Northover t.p.northover at gmail.com
Mon Jun 9 03:16:52 PDT 2014


Hi Artyom,

I like the idea here. I think making it generic like this rather than
a specific InstAlias feature has the potential to remove some custom
decoders which is always appreciated.

I don't think the implementation is quite right though. Textually
substituting C++ is nasty, and I could easily see someone deciding to
write MCOperand in their code fragment. Injecting it directly into the
if statement also severely limits what can be written and raises
potential precedence & scoping issues.

A common idiom for this kind of thing seems to be deferring to a
separate function, passing the MCOperand (for now) and an arbitrary
index (e.g. RunSDNodeXForm, CheckComplexPattern at a glance, possibly
more).

We should probably also document what variables are available for the
MCOperandPredicate in the top-level .td file.

Cheers.

Tim.



More information about the llvm-commits mailing list