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" 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: 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: 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; +}