[PATCH] D50061: [llvm-exegesis] Proposal to add Exegesis Configuration to td files.
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 1 05:45:18 PDT 2018
gchatelet updated this revision to Diff 158512.
gchatelet added a comment.
- Simpler version with only the semantic of the instruction.
Repository:
rL LLVM
https://reviews.llvm.org/D50061
Files:
include/llvm/Target/Target.td
include/llvm/Target/TargetExegesis.td
lib/Target/X86/X86.td
lib/Target/X86/X86ExegesisConfigurations.td
Index: lib/Target/X86/X86ExegesisConfigurations.td
===================================================================
--- /dev/null
+++ lib/Target/X86/X86ExegesisConfigurations.td
@@ -0,0 +1,14 @@
+
+foreach Instr = [ MULPDrm, MULPDrr, MULSDrm, MULSDrm_Int, MULSDrr, MULSDrr_Int ] in
+def : ExegesisConfiguration {
+ let Instruction = Instr;
+ let Precision = DoublePrecision;
+ let Semantic = Multiplication;
+}
+
+foreach Instr = [ MULPSrm, MULPSrr, MULSSrm, MULSSrm_Int, MULSSrr, MULSSrr_Int ] in
+def : ExegesisConfiguration {
+ let Instruction = Instr;
+ let Precision = SinglePrecision;
+ let Semantic = Multiplication;
+}
Index: lib/Target/X86/X86.td
===================================================================
--- lib/Target/X86/X86.td
+++ lib/Target/X86/X86.td
@@ -1200,3 +1200,9 @@
//===----------------------------------------------------------------------===//
include "X86PfmCounters.td"
+
+//===----------------------------------------------------------------------===//
+// Exegesis Configurations
+//===----------------------------------------------------------------------===//
+
+include "X86ExegesisConfigurations.td"
Index: include/llvm/Target/TargetExegesis.td
===================================================================
--- /dev/null
+++ include/llvm/Target/TargetExegesis.td
@@ -0,0 +1,26 @@
+//===- TargetExegesis.td - Target Exegesis Configuration ---*- tablegen -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+class Ieee754Precision;
+def HalfPrecision : Ieee754Precision;
+def SinglePrecision : Ieee754Precision;
+def DoublePrecision : Ieee754Precision;
+def ExtendedPrecision : Ieee754Precision;
+
+class InstructionSemantic;
+def Addition : InstructionSemantic;
+def Subtraction : InstructionSemantic;
+def Multiplication : InstructionSemantic;
+def Division : InstructionSemantic;
+
+class ExegesisConfiguration {
+ Instruction Instruction;
+ Ieee754Precision Precision;
+ InstructionSemantic Semantic;
+}
Index: include/llvm/Target/Target.td
===================================================================
--- include/llvm/Target/Target.td
+++ include/llvm/Target/Target.td
@@ -1553,3 +1553,8 @@
// Pull in the common support for the Global ISel DAG-based selector generation.
//
include "llvm/Target/GlobalISel/SelectionDAGCompat.td"
+
+//===----------------------------------------------------------------------===//
+// Pull in the common support for exegesis.
+//
+include "llvm/Target/TargetExegesis.td"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50061.158512.patch
Type: text/x-patch
Size: 2776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180801/ac2c9039/attachment.bin>
More information about the llvm-commits
mailing list