[PATCH] D45204: [X86][MIPS][ARM] New machine instruction property 'isMoveReg'

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 13:31:56 PDT 2018


qcolombet added a comment.
Herald added a reviewer: javed.absar.
Herald added a subscriber: chrib.

A while back, with Hal, we talked about having something like:
bool TargetInstrInfo::isEquivalentTo(GenericOpcode, ExpectedOperand)

Like, TII->isEquivalentTo(TargetOpcode::COPY, InputMI, [out]MODef, [out]MOSrc), would return true if InputMI is equivalent to a copy and would populate MODef and MOSrc with the related equivalent input and output.
The nice thing about such a thing is, thanks to GISel, we now have a way to express common structure like G_ADD.

(Credit to Hal for suggesting that.)


https://reviews.llvm.org/D45204





More information about the llvm-commits mailing list