[PATCH] D104558: Add norm sub-target feature to table gen for ARC

Thomas Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 11:07:17 PDT 2021


thomasjohns created this revision.
thomasjohns added reviewers: marksl, danilaml.
Herald added a subscriber: hiraditya.
thomasjohns requested review of this revision.
Herald added a project: LLVM.

This is a small change for going through the process of creating a patch for the ARC code generator.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104558

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


Index: llvm/lib/Target/ARC/ARCSubtarget.h
===================================================================
--- llvm/lib/Target/ARC/ARCSubtarget.h
+++ llvm/lib/Target/ARC/ARCSubtarget.h
@@ -29,6 +29,8 @@
 class TargetMachine;
 
 class ARCSubtarget : public ARCGenSubtargetInfo {
+  bool Xnorm = false;
+
   virtual void anchor();
   ARCInstrInfo InstrInfo;
   ARCFrameLowering FrameLowering;
@@ -58,6 +60,8 @@
   const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
     return &TSInfo;
   }
+
+  bool hasNorm() const { return Xnorm; }
 };
 
 } // end namespace llvm
Index: llvm/lib/Target/ARC/ARC.td
===================================================================
--- llvm/lib/Target/ARC/ARC.td
+++ 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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104558.353052.patch
Type: text/x-patch
Size: 1442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210618/3c3a7fdd/attachment.bin>


More information about the llvm-commits mailing list