[PATCH] D27984: [ARM] [RFC] Use AddDefaultCC/Pred where possible. NFC

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 27 00:47:00 PST 2016


kristof.beyls added a comment.

Thinking a bit more about this, if we'd end up deciding to go for option 2, I think the following function names and arguments would make code more easily readable compared to .addDefaultPred() or .addDefaultCC():

MIB.addSomeOperand().addSomeOtherOperand().addCondCode(ARMCC::AL).isFlagSetting(false)

i.e. drop the defaults (adding the explicit value ARMCC::AL or false is about as many characters as the word "Default", and it's more obvious what the meaning is of the code.  Furthermore, for non-default values of these operands, also the more meaningful function names can be used, e.g. addCondCode(ARMCC:EQ) or isFlagSetting(true).


https://reviews.llvm.org/D27984





More information about the llvm-commits mailing list