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

Artyom Skrobov Artyom.Skrobov at arm.com
Mon Jun 9 09:36:52 PDT 2014


Thank you Tim!

Attaching the updated patch that separates the MCOperandPredicates code fragments into a separate function, modelled upon RunSDNodeXForm.
Also adding a brief documentation for MCOperandPredicate in Target.td.

Are the two other original patches (pure TableGen) OK to commit?


-----Original Message-----
From: Tim Northover [mailto:t.p.northover at gmail.com] 
Sent: 09 June 2014 11:17
To: Artyom Skrobov
Cc: llvm-commits
Subject: Re: [PATCH] [AArch64] Condition codes AL and NV are invalid in the aliases that use inverted condition codes

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inv_ccode.patch
Type: application/octet-stream
Size: 11914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140609/72399576/attachment.obj>


More information about the llvm-commits mailing list