tahonermann added a comment.

With the exception of the case involving the `Policy` class, these changes all 
look fine to me.



================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:562
         if (UnMaskedPolicyScheme != PolicyScheme::SchemeNone)
-          for (auto P : SupportedUnMaskedPolicies) {
+          for (const auto &P : SupportedUnMaskedPolicies) {
             SmallVector<PrototypeDescriptor> PolicyPrototype =
----------------
erichkeane wrote:
> What type is 'P' here?  What size is it?  It is being used quite a few times 
> in this loop, which means it would have to be pretty sizable to justify 
> making it a reference unless it has a copy ctor of cost.
`P` is class `Policy` from 
`clang/include/clang/Support/RISCVVIntrinsicUtils.h`. It holds two enum values 
(with non-fixed underlying type) and has an implicit copy constructor, so cheap 
to copy. I suspect the code gen impact is negligible here, but I see no need 
for reference semantics. I recommend skipping this change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148812/new/

https://reviews.llvm.org/D148812

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to