LLVM
8.0.1
|
#include "X86.h"
#include "X86InstrInfo.h"
#include "X86Subtarget.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "x86-vzeroupper" |
Functions | |
STATISTIC (NumVZU, "Number of vzeroupper instructions inserted") | |
static bool | isYmmOrZmmReg (unsigned Reg) |
VZEROUPPER cleans state that is related to Y/ZMM0-15 only. More... | |
static bool | checkFnHasLiveInYmmOrZmm (MachineRegisterInfo &MRI) |
static bool | clobbersAllYmmAndZmmRegs (const MachineOperand &MO) |
static bool | hasYmmOrZmmReg (MachineInstr &MI) |
static bool | callHasRegMask (MachineInstr &MI) |
Check if given call instruction has a RegMask operand. More... | |
#define DEBUG_TYPE "x86-vzeroupper" |
Definition at line 41 of file X86VZeroUpper.cpp.
|
static |
Check if given call instruction has a RegMask operand.
Definition at line 169 of file X86VZeroUpper.cpp.
References assert(), llvm::MachineBasicBlock::back(), llvm::BuildMI(), checkFnHasLiveInYmmOrZmm(), llvm::dbgs(), llvm::MachineBasicBlock::end(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::X86Subtarget::getInstrInfo(), llvm::MachineBasicBlock::getNumber(), llvm::MachineFunction::getNumBlockIDs(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasFastPartialYMMorZMMWrite(), hasYmmOrZmmReg(), I, llvm::MachineInstr::isCall(), LLVM_DEBUG, MI, MRI, llvm::MachineInstr::operands(), llvm::MachineRegisterInfo::reg_nodbg_empty(), SI, llvm::MachineBasicBlock::successors(), TII, and llvm::CallingConv::X86_INTR.
|
static |
Definition at line 134 of file X86VZeroUpper.cpp.
References isYmmOrZmmReg(), and llvm::MachineRegisterInfo::liveins().
Referenced by callHasRegMask().
|
static |
Definition at line 142 of file X86VZeroUpper.cpp.
References llvm::MachineOperand::clobbersPhysReg().
Referenced by hasYmmOrZmmReg().
|
static |
Definition at line 154 of file X86VZeroUpper.cpp.
References clobbersAllYmmAndZmmRegs(), llvm::MachineInstr::isCall(), isYmmOrZmmReg(), and llvm::MachineInstr::operands().
Referenced by callHasRegMask().
VZEROUPPER cleans state that is related to Y/ZMM0-15 only.
Thus, there is no need to check for Y/ZMM16 and above.
Definition at line 129 of file X86VZeroUpper.cpp.
Referenced by checkFnHasLiveInYmmOrZmm(), and hasYmmOrZmmReg().
STATISTIC | ( | NumVZU | , |
"Number of vzeroupper instructions inserted" | |||
) |