[llvm-commits] [Patch] Make TableGen put chains on more realistic instrucitons

Tim Northover t.p.northover at gmail.com
Sun Jun 24 11:10:21 PDT 2012


Hi,

Recently on the dev list an issue came up where TableGen wasn't giving
load instructions (as an example) chains when their only use was in
Pat instantiations. TableGen's logic for this decision currently
relies on the Pattern field being set in the destination Instruction.

This patch includes a sensible subset of the possible flags in the
decision: load/store, side effects and the (oddly unused right now)
hasCtrlDep which seems to be exactly what we want.

Including those extra flags almost certainly reduces the risk of wrong
code generation, though it does limit the flexibility of the system:
if anyone wanted a loading instruction which didn't take a chain they
would need to make the logic more flexible. Since we couldn't come up
with an actual user of this functionality, it's probably best not to
complicate things for now.

Ok to commit?

Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tblgen-chains.diff
Type: application/octet-stream
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120624/e5a7195c/attachment.obj>


More information about the llvm-commits mailing list