[llvm] 2ef1fbf - Add norm sub-target feature to table gen for ARC

Danila Malyutin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 04:40:24 PDT 2021


Author: Thomas Johnson
Date: 2021-06-22T14:39:29+03:00
New Revision: 2ef1fbfe0e341c3d4706f54ae15b8a5a8eee7b16

URL: https://github.com/llvm/llvm-project/commit/2ef1fbfe0e341c3d4706f54ae15b8a5a8eee7b16
DIFF: https://github.com/llvm/llvm-project/commit/2ef1fbfe0e341c3d4706f54ae15b8a5a8eee7b16.diff

LOG: Add norm sub-target feature to table gen for ARC

This adds the `norm` sub-target feature (without backing implementation for now) to table gen.

Differential Revision: https://reviews.llvm.org/D104558

Added: 
    

Modified: 
    llvm/lib/Target/ARC/ARC.td
    llvm/lib/Target/ARC/ARCSubtarget.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARC/ARC.td b/llvm/lib/Target/ARC/ARC.td
index 846f1bb6735e1..142ce7f747919 100644
--- a/llvm/lib/Target/ARC/ARC.td
+++ b/llvm/lib/Target/ARC/ARC.td
@@ -8,6 +8,18 @@
 
 include "llvm/Target/Target.td"
 
+//===----------------------------------------------------------------------===//
+// ARC Subtarget features
+//===----------------------------------------------------------------------===//
+
+def FeatureNORM
+    : SubtargetFeature<"norm", "Xnorm", "true",
+                       "Enable support for norm instruction.">;
+
+//===----------------------------------------------------------------------===//
+// Registers, calling conventions, instruction descriptions
+//===----------------------------------------------------------------------===//
+
 include "ARCRegisterInfo.td"
 include "ARCInstrInfo.td"
 include "ARCCallingConv.td"

diff  --git a/llvm/lib/Target/ARC/ARCSubtarget.h b/llvm/lib/Target/ARC/ARCSubtarget.h
index 1f1b27f13f68d..6a4856221b8f2 100644
--- a/llvm/lib/Target/ARC/ARCSubtarget.h
+++ b/llvm/lib/Target/ARC/ARCSubtarget.h
@@ -29,6 +29,8 @@ class StringRef;
 class TargetMachine;
 
 class ARCSubtarget : public ARCGenSubtargetInfo {
+  bool Xnorm = false;
+
   virtual void anchor();
   ARCInstrInfo InstrInfo;
   ARCFrameLowering FrameLowering;
@@ -58,6 +60,8 @@ class ARCSubtarget : public ARCGenSubtargetInfo {
   const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
     return &TSInfo;
   }
+
+  bool hasNorm() const { return Xnorm; }
 };
 
 } // end namespace llvm


        


More information about the llvm-commits mailing list