[PATCH] D45965: [Targets] Implement getConstraintRegister for ARM and AArch64
Mikhail Maltsev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 24 02:21:35 PDT 2018
miyuki added inline comments.
================
Comment at: lib/Basic/Targets/AArch64.h:85-89
+ StringRef getConstraintRegister(StringRef Constraint,
+ StringRef Expression) const override {
+ return Expression;
+ }
+
----------------
thopre wrote:
> From what I understood of the original patch, getConstraintRegister is a sort of a more comprehensive version of convertRegister. On ARM convertRegister handles U and p constraint specially, should this do the same?
Did you mean `convertConstraint`? As I understand, this function does canonicalization of constraints. If a constraint happens to be single-register, it is converted into `{register}` form (but this does not happen on ARM). On the other hand, `getConstraintRegister` takes a constraint and an asm label and converts them into a register (and in our case the register always comes from the asm label, never from the constraint), so I don't think we need to handle U and p specially.
https://reviews.llvm.org/D45965
More information about the cfe-commits
mailing list