1 //===-- X86EncodingOptimization.h - X86 Encoding optimization ---*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file contains the declarations of the X86 encoding optimization
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_X86_X86ENCODINGOPTIMIZATION_H
14 #define LLVM_LIB_TARGET_X86_X86ENCODINGOPTIMIZATION_H
19 bool optimizeInstFromVEX3ToVEX2(MCInst
&MI
, const MCInstrDesc
&Desc
);
20 bool optimizeShiftRotateWithImmediateOne(MCInst
&MI
);
21 bool optimizeVPCMPWithImmediateOneOrSix(MCInst
&MI
);
22 bool optimizeMOVSX(MCInst
&MI
);
23 bool optimizeINCDEC(MCInst
&MI
, bool In64BitMode
);
24 bool optimizeMOV(MCInst
&MI
, bool In64BitMode
);
25 bool optimizeToFixedRegisterOrShortImmediateForm(MCInst
&MI
);
26 unsigned getOpcodeForShortImmediateForm(unsigned Opcode
);
27 unsigned getOpcodeForLongImmediateForm(unsigned Opcode
);