forked from OSchip/llvm-project
[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. llvm-svn: 327202
This commit is contained in:
parent
46c88d50bc
commit
f27016f3de
|
@ -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;
|
||||
|
|
|
@ -288,7 +288,7 @@ bool EvexToVexInstPass::CompressEvexToVexImpl(MachineInstr &MI) const {
|
|||
return false;
|
||||
|
||||
MI.setDesc(TII->get(NewOpc));
|
||||
MI.setAsmPrinterFlag(AC_EVEX_2_VEX);
|
||||
MI.setAsmPrinterFlag(X86::AC_EVEX_2_VEX);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1454,7 +1454,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||
// 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue