Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.h
35294 views
1
//===-- X86EncodingOptimization.h - X86 Encoding optimization ---*- C++ -*-===//
2
//
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
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains the declarations of the X86 encoding optimization
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_LIB_TARGET_X86_X86ENCODINGOPTIMIZATION_H
14
#define LLVM_LIB_TARGET_X86_X86ENCODINGOPTIMIZATION_H
15
namespace llvm {
16
class MCInst;
17
class MCInstrDesc;
18
namespace X86 {
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);
28
} // namespace X86
29
} // namespace llvm
30
#endif
31
32