[llvm] r327202 - [X86] Move the AC_EVEX_2_VEX AsmComments enum to X86InstrInfo.h from X86InstComments.h.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 9 21:15:23 PST 2018
Author: ctopper
Date: Fri Mar 9 21:15:22 2018
New Revision: 327202
URL: http://llvm.org/viewvc/llvm-project?rev=327202&view=rev
Log:
[X86] Move the AC_EVEX_2_VEX AsmComments enum to X86InstrInfo.h from X86InstComments.h.
X86InstComments.h is used by tools that only have the MC layer. We shouldn't be importing a file from CodeGen into this.
X86InstrInfo.h isn't a great place, but I couldn't find a better one.
Modified:
llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.h
llvm/trunk/lib/Target/X86/X86EvexToVex.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.h
llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.h?rev=327202&r1=327201&r2=327202&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.h (original)
+++ llvm/trunk/lib/Target/X86/InstPrinter/X86InstComments.h Fri Mar 9 21:15:22 2018
@@ -15,15 +15,8 @@
#ifndef LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTCOMMENTS_H
#define LLVM_LIB_TARGET_X86_INSTPRINTER_X86INSTCOMMENTS_H
-#include "llvm/CodeGen/MachineInstr.h"
-
namespace llvm {
- enum AsmComments {
- // For instr that was compressed from EVEX to VEX.
- AC_EVEX_2_VEX = MachineInstr::TAsmComments
- };
-
class MCInst;
class MCInstrInfo;
class raw_ostream;
Modified: llvm/trunk/lib/Target/X86/X86EvexToVex.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86EvexToVex.cpp?rev=327202&r1=327201&r2=327202&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86EvexToVex.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86EvexToVex.cpp Fri Mar 9 21:15:22 2018
@@ -288,7 +288,7 @@ bool EvexToVexInstPass::CompressEvexToVe
return false;
MI.setDesc(TII->get(NewOpc));
- MI.setAsmPrinterFlag(AC_EVEX_2_VEX);
+ MI.setAsmPrinterFlag(X86::AC_EVEX_2_VEX);
return true;
}
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=327202&r1=327201&r2=327202&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Fri Mar 9 21:15:22 2018
@@ -29,6 +29,12 @@ class X86RegisterInfo;
class X86Subtarget;
namespace X86 {
+
+enum AsmComments {
+ // For instr that was compressed from EVEX to VEX.
+ AC_EVEX_2_VEX = MachineInstr::TAsmComments
+};
+
// X86 specific condition code. These correspond to X86_*_COND in
// X86InstrInfo.td. They must be kept in synch.
enum CondCode {
Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=327202&r1=327201&r2=327202&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Fri Mar 9 21:15:22 2018
@@ -1454,7 +1454,7 @@ void X86AsmPrinter::EmitInstruction(cons
// Add a comment about EVEX-2-VEX compression for AVX-512 instrs that
// are compressed from EVEX encoding to VEX encoding.
if (TM.Options.MCOptions.ShowMCEncoding) {
- if (MI->getAsmPrinterFlags() & AC_EVEX_2_VEX)
+ if (MI->getAsmPrinterFlags() & X86::AC_EVEX_2_VEX)
OutStreamer->AddComment("EVEX TO VEX Compression ", false);
}
More information about the llvm-commits
mailing list