[PATCH] D21796: [ARM] Do not test for CPUs, use SubtargetFeatures (Part 3). NFCI

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 13:55:39 PDT 2016


rengolin added inline comments.

================
Comment at: lib/Target/ARM/ARMSubtarget.h:398-400
@@ -384,2 +397,5 @@
 
+  /// @{
+  /// These functions are obsolete, please consider adding subtarget features
+  /// or properties instead of calling them.
   bool isCortexA5() const { return ARMProcFamily == CortexA5; }
----------------
MatzeB wrote:
> rengolin wrote:
> > MatzeB wrote:
> > > Does this patch remove the last uses of those functions? If yes, then I would recommend removing these functions, otherwise it is just too easy to find them with grep or autocompletion while missing the deprecation comment.
> > > 
> > > Maybe go with the aarch64 solution of exposing a getProcFamily() function (that forces you to look around for the enum and write a little bit more which may be enough to get people reading the comment and thinking :)
> > The enum solution would be odd, since we're still leaving a lot of old and oddly chosen usage for later. Means we'll change a lot of "isCPUFOO" for "CPU == Foo" without reason.
> Sure, that's why I asked whether that was the last use of these functions. I would only remove them once we have no users of them left.
Sorry, my brain separated the two phrases in independent logical units. :)


http://reviews.llvm.org/D21796





More information about the llvm-commits mailing list