[PATCH] D34682: [Triple] Add isThumb and isARM functions NFCI.

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 10:26:21 PDT 2017


javed.absar added inline comments.


================
Comment at: include/llvm/ADT/Triple.h:646
+  }
+
   /// Tests wether the target supports comdat
----------------
fhahn wrote:
> javed.absar wrote:
> > Would it be going too far to have isARMOrThumb defined as well while we are at it.
> > I see use cases of it.
> I am not sure if that's worth it. Using `TT.isARM() || TT.isThumb()` is just as readable IMO.
> 
> 
agree


================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:480
+  bool isThumb = TT.isThumb() ||
                  TT.getSubArch() == Triple::ARMSubArch_v7m ||
                  TT.getSubArch() == Triple::ARMSubArch_v6m;
----------------
fhahn wrote:
> I am slightly worried about those checks here. Should isThumb() return true for all M profile CPUs as they only support thumb-mode? Also, it seems that v8m is missing from this check.
Yes I think isMClass would suffice. 


https://reviews.llvm.org/D34682





More information about the llvm-commits mailing list