[PATCH] D63162: GlobalISel: Avoid producing Illegal copies in RegBankSelect
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 08:20:18 PDT 2019
arsenm closed this revision.
arsenm marked 2 inline comments as done.
arsenm added a comment.
r363410
================
Comment at: lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:252
return getInvalidInstructionMapping();
+ }
----------------
qcolombet wrote:
> arsenm wrote:
> > qcolombet wrote:
> > > From LLVM standard: no brackets here.
> > I will die on the hill that there should be braces here. There are multiple lines after the if due to the comment. I don't see where it says this, and clang-format doesn't touch it
> I don't see anything in the standard mentioning the one-line-block thing now that you mention it. Which is strange because then it would be left to interpretation for case like:
> ```
> if ()
> continue;
> ```
> or
> ```
> if () {
> continue;
> }
> ```
> whereas I thought we were very strict at using the former.
>
> FWIW, clang will not remove the braces for the latter case either, so that's not a good indication of what is in the standard, unless the standard is: we don't care :).
>
> Anyway, I don't really care, but I apply the rule for every one-statement-block. To me comments don't count as lines.
>
> For instance, `lib/Analysis/LazyCallGraph.cpp` has one-statement block with comments (i.e., more than one line block in the end), but it still doesn't have braces.
There are examples of both, so I don't think there's a clear rule
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63162/new/
https://reviews.llvm.org/D63162
More information about the llvm-commits
mailing list