LLVM
8.0.1
|
#include "llvm/CodeGen/FastISel.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MachineValueType.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
#include <utility>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "isel" |
Functions | |
STATISTIC (NumFastIselSuccessIndependent, "Number of insts selected by " "target-independent selector") | |
STATISTIC (NumFastIselSuccessTarget, "Number of insts selected by " "target-specific selector") | |
STATISTIC (NumFastIselDead, "Number of dead insts removed on failure") | |
static unsigned | findSinkableLocalRegDef (MachineInstr &MI) |
Return the defined register if this instruction defines exactly one virtual register and uses no other virtual registers. More... | |
static bool | isRegUsedByPhiNodes (unsigned DefReg, FunctionLoweringInfo &FuncInfo) |
static AttributeList | getReturnAttrs (FastISel::CallLoweringInfo &CLI) |
Returns an AttributeList representing the attributes applied to the return value of the given call. More... | |
Variables | |
static cl::opt< bool > | SinkLocalValues ("fast-isel-sink-local-values", cl::init(true), cl::Hidden, cl::desc("Sink local values in FastISel")) |
#define DEBUG_TYPE "isel" |
Definition at line 116 of file FastISel.cpp.
|
static |
Return the defined register if this instruction defines exactly one virtual register and uses no other virtual registers.
Otherwise return 0.
Definition at line 169 of file FastISel.cpp.
References llvm::MachineInstr::isSafeToMove(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::MachineInstr::operands(), SinkLocalValues, and llvm::SPII::Store.
|
static |
Returns an AttributeList representing the attributes applied to the return value of the given call.
Definition at line 1084 of file FastISel.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, llvm::AttributeList::get(), llvm::Type::getContext(), llvm::Attribute::InReg, llvm::FastISel::CallLoweringInfo::IsInReg, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::FastISel::CallLoweringInfo::RetSExt, llvm::FastISel::CallLoweringInfo::RetTy, llvm::AttributeList::ReturnIndex, llvm::FastISel::CallLoweringInfo::RetZExt, llvm::Attribute::SExt, and llvm::Attribute::ZExt.
Referenced by llvm::FastISel::lowerCallTo().
|
static |
Definition at line 221 of file FastISel.cpp.
References assert(), llvm::dbgs(), llvm::MachineInstr::eraseFromParent(), llvm::ilist_node_impl< OptionsT >::getIterator(), I, initialize(), LLVM_DEBUG, llvm::max(), MRI, P, llvm::FunctionLoweringInfo::PHINodesToUpdate, llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::MachineInstr::setDebugLoc().
STATISTIC | ( | NumFastIselSuccessIndependent | , |
"Number of insts selected by " "target-independent selector" | |||
) |
STATISTIC | ( | NumFastIselSuccessTarget | , |
"Number of insts selected by " "target-specific selector" | |||
) |
STATISTIC | ( | NumFastIselDead | , |
"Number of dead insts removed on failure" | |||
) |