[PATCH] D68862: [ARM] Allocatable Global Register Variables for ARM

Anna Welker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 07:47:14 PDT 2019


anwel added inline comments.


================
Comment at: clang/lib/Basic/Targets/ARM.cpp:903-907
+  for (std::string &Feature : Features) {
+    if (Feature.compare(SearchFeature) == 0)
+      return true;
+  }
+  return false;
----------------
chill wrote:
> This explicit loop can be written like:
> ```
> return llvm::any_of(getTargetOpts().Features(),
>                    [&](auto &P) { return P == SearchFeature; });
> ```
> 
I see your point, but using a for loop seems to better match the style of the code.


================
Comment at: llvm/test/CodeGen/ARM/reg-alloc-wout-fixed-regs.ll:3
+;
+; Equivalent C source code
+; void bar(unsigned int i,
----------------
SjoerdMeijer wrote:
> As all these tests (this file and the ones above) are the same, the "equivalent C source code" is the same, perhaps move all these cases into 1 file.
I see your point, but I'd still prefer to leave them as they are because in my opinion having the test cases separated into individual files it's much easier to grasp what they are doing.


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

https://reviews.llvm.org/D68862





More information about the cfe-commits mailing list