LLVM 22.0.0git
|
#include "MCTargetDesc/X86ATTInstPrinter.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86EncodingOptimization.h"
#include "MCTargetDesc/X86InstComments.h"
#include "MCTargetDesc/X86MCAsmInfo.h"
#include "MCTargetDesc/X86ShuffleDecode.h"
#include "MCTargetDesc/X86TargetStreamer.h"
#include "X86AsmPrinter.h"
#include "X86MachineFunctionInfo.h"
#include "X86RegisterInfo.h"
#include "X86ShuffleDecodeConstantPool.h"
#include "X86Subtarget.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/WinEHFuncInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Mangler.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/CFGuard.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizerCommon.h"
#include <string>
Go to the source code of this file.
Classes | |
struct | NoAutoPaddingScope |
A RAII helper which defines a region of instructions which can't have padding added between them for correctness. More... |
Macros | |
#define | INSTR_CASE(Prefix, Instr, Suffix, Postfix) |
#define | CASE_ARITH_RM(Instr) |
#define | MASK_AVX512_CASE(Instr) |
#define | MOV_CASE(Prefix, Suffix) |
#define | MOV_AVX512_CASE(Suffix, Postfix) |
#define | CASE_128_MOV_RM() |
#define | CASE_256_MOV_RM() |
#define | CASE_512_MOV_RM() |
#define | MOVX_CASE(Prefix, Ext, Type, Suffix, Postfix) |
#define | CASE_MOVX_RM(Ext, Type) |
Variables | |
static cl::opt< bool > | EnableBranchHint ("enable-branch-hint", cl::desc("Enable branch hint."), cl::init(false), cl::Hidden) |
static cl::opt< unsigned > | BranchHintProbabilityThreshold ("branch-hint-probability-threshold", cl::desc("The probability threshold of enabling branch hint."), cl::init(50), cl::Hidden) |
#define CASE_128_MOV_RM | ( | ) |
Referenced by addConstantComments().
#define CASE_256_MOV_RM | ( | ) |
Referenced by addConstantComments().
#define CASE_512_MOV_RM | ( | ) |
Referenced by addConstantComments().
#define CASE_ARITH_RM | ( | Instr | ) |
Referenced by addConstantComments().
#define CASE_MOVX_RM | ( | Ext, | |
Type ) |
Referenced by addConstantComments().
#define INSTR_CASE | ( | Prefix, | |
Instr, | |||
Suffix, | |||
Postfix ) |
#define MASK_AVX512_CASE | ( | Instr | ) |
Referenced by addConstantComments().
#define MOV_AVX512_CASE | ( | Suffix, | |
Postfix ) |
#define MOV_CASE | ( | Prefix, | |
Suffix ) |
#define MOVX_CASE | ( | Prefix, | |
Ext, | |||
Type, | |||
Suffix, | |||
Postfix ) |
|
static |
Definition at line 1803 of file X86MCInstLower.cpp.
References llvm::MCStreamer::AddComment(), llvm::X86::AddrNumOperands, assert(), llvm::CallingConv::C, CASE_128_MOV_RM, CASE_256_MOV_RM, CASE_512_MOV_RM, CASE_ARITH_RM, CASE_MOVX_RM, llvm::DecodePSHUFBMask(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPERMILPMask(), llvm::DecodeVPPERMMask(), llvm::dyn_cast(), llvm::X86::getConstantFromPool(), llvm::MachineOperand::getImm(), llvm::DstOp::getReg(), llvm::X86ATTInstPrinter::getRegisterName(), getShuffleComment(), getSrcIdx(), llvm::X86::getVectorRegisterWidth(), llvm::MachineOperand::isImm(), llvm_unreachable, MASK_AVX512_CASE, MI, printBroadcast(), printConstant(), printSignExtend(), printZeroExtend(), printZeroUpperMove(), llvm::raw_string_ostream::str(), and llvm::toString().
Referenced by llvm::X86AsmPrinter::emitInstruction().
Definition at line 373 of file X86MCInstLower.cpp.
|
static |
Emit the largest nop instruction smaller than or equal to NumBytes
bytes.
Return the size of nop emitted.
Definition at line 659 of file X86MCInstLower.cpp.
References assert(), llvm::MCStreamer::emitBytes(), llvm::MCStreamer::emitInstruction(), llvm_unreachable, and Opc.
Referenced by llvm::X86AsmPrinter::emitInstruction(), and emitX86Nops().
|
static |
Emit the optimal amount of multi-byte nops on X86.
Definition at line 776 of file X86MCInstLower.cpp.
|
static |
Definition at line 335 of file X86MCInstLower.cpp.
Referenced by llvm::X86AsmPrinter::emitInstruction().
|
static |
Definition at line 1505 of file X86MCInstLower.cpp.
References llvm::MachineOperand::getReg(), llvm::X86ATTInstPrinter::getRegisterName(), llvm::MachineOperand::isReg(), MI, printDstRegisterName(), and printShuffleMask().
Referenced by addConstantComments().
|
static |
Definition at line 1435 of file X86MCInstLower.cpp.
References llvm::X86II::isKMasked(), llvm::X86II::isKMergeMasked(), and MI.
Referenced by addConstantComments(), printBroadcast(), printExtend(), printZeroExtend(), and printZeroUpperMove().
bool hasJumpTableInfoInBlock | ( | const llvm::MachineInstr * | MI | ) |
Definition at line 2220 of file X86MCInstLower.cpp.
References E(), I, MBB, and MI.
Referenced by llvm::X86AsmPrinter::emitInstruction().
bool isCallToCFGuardFunction | ( | const MachineInstr * | MI | ) |
Definition at line 2210 of file X86MCInstLower.cpp.
References assert(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getTargetFlags(), llvm::isCFGuardFunction(), llvm::MachineOperand::isGlobal(), MI, and llvm::X86II::MO_NO_FLAG.
Referenced by llvm::X86AsmPrinter::emitInstruction().
bool isImportedFunction | ( | const MachineOperand & | MO | ) |
Definition at line 2205 of file X86MCInstLower.cpp.
References llvm::MachineOperand::getTargetFlags(), llvm::MachineOperand::isGlobal(), and llvm::X86II::MO_DLLIMPORT.
Referenced by llvm::X86AsmPrinter::emitInstruction().
|
static |
Definition at line 1639 of file X86MCInstLower.cpp.
References llvm::MCStreamer::AddComment(), llvm::BitWidth, llvm::CallingConv::C, llvm::X86::getConstantFromPool(), getSrcIdx(), MI, printConstant(), printDstRegisterName(), and llvm::raw_string_ostream::str().
Referenced by addConstantComments().
|
static |
Definition at line 1542 of file X86MCInstLower.cpp.
References Flt, llvm::APFloat::getZero(), and llvm::APFloat::toString().
|
static |
Definition at line 1526 of file X86MCInstLower.cpp.
References llvm::APInt::getBitWidth(), llvm::APInt::getNumWords(), llvm::APInt::getRawData(), llvm::APInt::getZExtValue(), and N.
Referenced by addConstantComments(), printBroadcast(), printConstant(), printExtend(), and printZeroUpperMove().
|
static |
Definition at line 1553 of file X86MCInstLower.cpp.
References llvm::BitWidth, llvm::dyn_cast(), E(), llvm::Type::getPrimitiveSizeInBits(), I, llvm::isa(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::Type::isHalfTy(), llvm::Type::isIntegerTy(), and printConstant().
|
static |
Definition at line 1447 of file X86MCInstLower.cpp.
References llvm::DstOp::getReg(), llvm::MachineOperand::getReg(), llvm::X86ATTInstPrinter::getRegisterName(), llvm::X86II::isKMasked(), llvm::X86II::isKMergeMasked(), and MI.
Referenced by getShuffleComment(), printBroadcast(), printExtend(), printZeroExtend(), and printZeroUpperMove().
|
static |
Definition at line 1657 of file X86MCInstLower.cpp.
References llvm::MCStreamer::AddComment(), llvm::CallingConv::C, llvm::dyn_cast(), llvm::X86::getConstantFromPool(), getSrcIdx(), MI, printConstant(), printDstRegisterName(), llvm::APInt::sext(), llvm::raw_string_ostream::str(), and llvm::APInt::zext().
Referenced by printSignExtend(), and printZeroExtend().
|
static |
Definition at line 1465 of file X86MCInstLower.cpp.
References llvm::SM_SentinelUndef, and llvm::SM_SentinelZero.
Referenced by getShuffleComment(), and printZeroExtend().
|
static |
Definition at line 1686 of file X86MCInstLower.cpp.
References MI, and printExtend().
Referenced by addConstantComments().
|
static |
Definition at line 1690 of file X86MCInstLower.cpp.
References llvm::MCStreamer::AddComment(), assert(), llvm::DecodeZeroExtendMask(), getSrcIdx(), llvm::X86::getVectorRegisterWidth(), MI, printDstRegisterName(), printExtend(), printShuffleMask(), and llvm::raw_string_ostream::str().
Referenced by addConstantComments().
|
static |
Definition at line 1612 of file X86MCInstLower.cpp.
References llvm::MCStreamer::AddComment(), llvm::CallingConv::C, E(), llvm::X86::getConstantFromPool(), getSrcIdx(), I, MI, printConstant(), printDstRegisterName(), and llvm::raw_string_ostream::str().
Referenced by addConstantComments().
|
static |
Referenced by llvm::X86AsmPrinter::emitInstruction().