thopre added inline comments.
================ Comment at: lib/Basic/Targets/AArch64.h:85-89 + StringRef getConstraintRegister(StringRef Constraint, + StringRef Expression) const override { + return Expression; + } + ---------------- miyuki wrote: > 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. Forgot to send this: Fair enough. Since you seems to have the expected behavior of this function well understood, would you mind adding a comment here and in clang/Basic/TargetInfo.h? Luckily we had a similar chat offline. Thanks for the change https://reviews.llvm.org/D45965 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits