From 573646d88a129f27d5d212fed40c62eee686ea5c Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 8 Dec 2017 19:26:22 +0000 Subject: [PATCH] [X86][MPX] Tag TSX/HLE/SGX instructions scheduler classes Currently tagged these as system instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320177 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrSGX.td | 2 ++ lib/Target/X86/X86InstrTSX.td | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/lib/Target/X86/X86InstrSGX.td b/lib/Target/X86/X86InstrSGX.td index 84119ad5eb3..f4331c5e2d9 100644 --- a/lib/Target/X86/X86InstrSGX.td +++ b/lib/Target/X86/X86InstrSGX.td @@ -15,6 +15,7 @@ //===----------------------------------------------------------------------===// // SGX instructions +let SchedRW = [WriteSystem] in { // ENCLS - Execute an Enclave System Function of Specified Leaf Number def ENCLS : I<0x01, MRM_CF, (outs), (ins), "encls", []>, TB; @@ -22,3 +23,4 @@ def ENCLS : I<0x01, MRM_CF, (outs), (ins), // ENCLU - Execute an Enclave User Function of Specified Leaf Number def ENCLU : I<0x01, MRM_D7, (outs), (ins), "enclu", []>, TB; +} // SchedRW diff --git a/lib/Target/X86/X86InstrTSX.td b/lib/Target/X86/X86InstrTSX.td index 61aac58a491..10c6eef7863 100644 --- a/lib/Target/X86/X86InstrTSX.td +++ b/lib/Target/X86/X86InstrTSX.td @@ -18,6 +18,8 @@ def X86xtest: SDNode<"X86ISD::XTEST", SDTypeProfile<1, 0, [SDTCisVT<0, i32>]>, [SDNPHasChain, SDNPSideEffect]>; +let SchedRW = [WriteSystem] in { + let usesCustomInserter = 1 in def XBEGIN : I<0, Pseudo, (outs GR32:$dst), (ins), "# XBEGIN", [(set GR32:$dst, (int_x86_xbegin))]>, @@ -45,11 +47,14 @@ def XTEST : I<0x01, MRM_D6, (outs), (ins), def XABORT : Ii8<0xc6, MRM_F8, (outs), (ins i8imm:$imm), "xabort\t$imm", [(int_x86_xabort imm:$imm)]>, Requires<[HasRTM]>; +} // SchedRW // HLE prefixes +let SchedRW = [WriteSystem] in { let isAsmParserOnly = 1 in { def XACQUIRE_PREFIX : I<0xF2, RawFrm, (outs), (ins), "xacquire", []>; def XRELEASE_PREFIX : I<0xF3, RawFrm, (outs), (ins), "xrelease", []>; } +} // SchedRW -- 2.11.0