LLVM API Documentation

SparcV9BurgISel.cpp File Reference

#include "MachineInstrAnnot.h"
#include "SparcV9BurgISel.h"
#include "SparcV9InstrForest.h"
#include "SparcV9Internals.h"
#include "SparcV9TmpInstr.h"
#include "SparcV9FrameInfo.h"
#include "SparcV9RegisterInfo.h"
#include "MachineFunctionInfo.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Type.h"
#include "llvm/Config/alloca.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/LeakDetector.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/hash_map"
#include <algorithm>
#include <cmath>
#include <iostream>

Include dependency graph for SparcV9BurgISel.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

class  llvm::InstructionNode
class  llvm::VRegListNode
class  llvm::VRegNode
class  llvm::ConstantNode
class  llvm::LabelNode
class  llvm::InstrForest
struct  llvm::MaxConstantsTableTy

Enumerations

enum  SelectDebugLevel_t

Functions

uint64_t llvm::ConvertConstantToIntType (const TargetMachine &target, const Value *V, const Type *destType, bool &isValidConstant)
static void llvm::CreateSETUWConst (uint32_t C, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi, Value *val, bool isSigned=false)
static void llvm::CreateSETSWConst (int32_t C, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi, Value *val)
static void llvm::CreateSETXConst (uint64_t C, Instruction *tmpReg, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi, Value *val)
static void llvm::CreateSETUWLabel (Value *val, Instruction *dest, std::vector< MachineInstr * > &mvec)
static void llvm::CreateSETXLabel (Value *val, Instruction *tmpReg, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
static void llvm::CreateUIntSetInstruction (uint64_t C, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi, Value *val)
static void llvm::CreateIntSetInstruction (int64_t C, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi, Value *val)
bool llvm::ConstantMayNotFitInImmedField (const Constant *CV, const Instruction *I)
static MachineOpCode llvm::ChooseLoadInstruction (const Type *DestTy)
static MachineOpCode llvm::ChooseStoreInstruction (const Type *DestTy)
static MachineOpCode llvm::ChooseAddInstructionByType (const Type *resultType)
static unsigned llvm::convertOpcodeFromRegToImm (unsigned Opcode)
void llvm::CreateCodeToLoadConst (const TargetMachine &target, Function *F, Value *val, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
void llvm::CreateCodeToCopyFloatToInt (const TargetMachine &target, Function *F, Value *val, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
void llvm::CreateBitExtensionInstructions (bool signExtend, const TargetMachine &target, Function *F, Value *srcVal, Value *destVal, unsigned int numLowBits, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
void llvm::CreateSignExtensionInstructions (const TargetMachine &target, Function *F, Value *srcVal, Value *destVal, unsigned int numLowBits, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
void llvm::CreateZeroExtensionInstructions (const TargetMachine &target, Function *F, Value *srcVal, Value *destVal, unsigned int numLowBits, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
void llvm::CreateCodeToCopyIntToFloat (const TargetMachine &target, Function *F, Value *val, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
static TmpInstructionllvm::InsertCodeToLoadConstant (Function *F, Value *opValue, Instruction *vmInstr, std::vector< MachineInstr * > &loadConstVec, TargetMachine &target)
MachineOperand::MachineOperandType llvm::ChooseRegOrImmed (int64_t intValue, bool isSigned, MachineOpCode opCode, const TargetMachine &target, bool canUseImmed, unsigned int &getMachineRegNum, int64_t &getImmedValue)
MachineOperand::MachineOperandType llvm::ChooseRegOrImmed (Value *val, MachineOpCode opCode, const TargetMachine &target, bool canUseImmed, unsigned int &getMachineRegNum, int64_t &getImmedValue)
void llvm::CreateCopyInstructionsByType (const TargetMachine &target, Function *F, Value *src, Instruction *dest, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
std::vector< MachineInstr * > llvm::FixConstantOperandsForInstr (Instruction *vmInstr, MachineInstr *minstr, TargetMachine &target)
static void llvm::Add3OperandInstr (unsigned Opcode, InstructionNode *Node, std::vector< MachineInstr * > &mvec)
static bool llvm::IsZero (Value *idx)
static Valuellvm::FoldGetElemChain (InstrTreeNode *ptrNode, std::vector< Value * > &chainIdxVec, bool lastInstHasLeadingNonZero)
static Valuellvm::GetGEPInstArgs (InstructionNode *gepNode, std::vector< Value * > &idxVec, bool &allConstantIndices)
static Valuellvm::GetMemInstArgs (InstructionNode *memInstrNode, std::vector< Value * > &idxVec, bool &allConstantIndices)
static MachineOpCode llvm::ChooseBprInstruction (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseBpccInstruction (const InstructionNode *instrNode, const BinaryOperator *setCCInstr)
static MachineOpCode llvm::ChooseBFpccInstruction (const InstructionNode *instrNode, const BinaryOperator *setCCInstr)
static TmpInstructionllvm::GetTmpForCC (Value *boolVal, const Function *F, const Type *ccType, MachineCodeForInstruction &mcfi)
static MachineOpCode llvm::ChooseBccInstruction (const InstructionNode *instrNode, const Type *&setCCType)
static MachineOpCode llvm::ChooseMovFpcciInstruction (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseMovpcciForSetCC (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseMovpregiForSetCC (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseConvertToFloatInstr (const TargetMachine &target, OpLabel vopCode, const Type *opType)
static MachineOpCode llvm::ChooseConvertFPToIntInstr (const TargetMachine &target, const Type *destType, const Type *opType)
static MachineInstrllvm::CreateConvertFPToIntInstr (const TargetMachine &target, Value *srcVal, Value *destVal, const Type *destType)
static void llvm::CreateCodeToConvertFloatToInt (const TargetMachine &target, Value *opVal, Instruction *destI, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
static MachineOpCode llvm::ChooseAddInstruction (const InstructionNode *instrNode)
static MachineInstrllvm::CreateMovFloatInstruction (const InstructionNode *instrNode, const Type *resultType)
static MachineInstrllvm::CreateAddConstInstruction (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseSubInstructionByType (const Type *resultType)
static MachineInstrllvm::CreateSubConstInstruction (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseFcmpInstruction (const InstructionNode *instrNode)
static bool llvm::BothFloatToDouble (const InstructionNode *instrNode)
static MachineOpCode llvm::ChooseMulInstructionByType (const Type *resultType)
static MachineInstrllvm::CreateIntNegInstruction (const TargetMachine &target, Value *vreg)
static MachineInstrllvm::CreateIntNegInstruction (const TargetMachine &target, Value *vreg, Value *destreg)
static void llvm::CreateShiftInstructions (const TargetMachine &target, Function *F, MachineOpCode shiftOpCode, Value *argVal1, Value *optArgVal2, unsigned optShiftNum, Instruction *destVal, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
static unsigned llvm::CreateMulConstInstruction (const TargetMachine &target, Function *F, Value *lval, Value *rval, Instruction *destVal, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
static void llvm::CreateCheapestMulConstInstruction (const TargetMachine &target, Function *F, Value *lval, Value *rval, Instruction *destVal, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi)
static void llvm::CreateMulInstruction (const TargetMachine &target, Function *F, Value *lval, Value *rval, Instruction *destVal, std::vector< MachineInstr * > &mvec, MachineCodeForInstruction &mcfi, MachineOpCode forceMulOp=-1)
static MachineOpCode llvm::ChooseDivInstruction (TargetMachine &target, const InstructionNode *instrNode)
static void llvm::CreateDivConstInstruction (TargetMachine &target, const InstructionNode *instrNode, std::vector< MachineInstr * > &mvec)
static void llvm::CreateCodeForVariableSizeAlloca (const TargetMachine &target, Instruction *result, unsigned tsize, Value *numElementsVal, std::vector< MachineInstr * > &getMvec)
static void llvm::CreateCodeForFixedSizeAlloca (const TargetMachine &target, Instruction *result, unsigned tsize, unsigned numElements, std::vector< MachineInstr * > &getMvec)
static void llvm::SetOperandsForMemInstr (unsigned Opcode, std::vector< MachineInstr * > &mvec, InstructionNode *vmInstrNode, const TargetMachine &target)
static void llvm::ForwardOperand (InstructionNode *treeNode, InstrTreeNode *parent, int operandNum)
bool llvm::AllUsesAreBranches (const Instruction *I)
static bool llvm::CodeGenIntrinsic (Intrinsic::ID iid, CallInst &callInstr, TargetMachine &target, std::vector< MachineInstr * > &mvec)
bool llvm::ThisIsAChainRule (int eruleno)
void llvm::GetInstructionsByRule (InstructionNode *subtreeRoot, int ruleForNode, short *nts, TargetMachine &target, std::vector< MachineInstr * > &mvec)
FunctionPassllvm::createSparcV9BurgInstSelector (TargetMachine &TM)

Variables

cl::opt< SelectDebugLevel_t > llvm::SelectDebugLevel ("dselect", cl::Hidden, cl::desc("enable instruction selection debug information"), cl::values(clEnumValN(Select_NoDebugInfo,"n","disable debug output"), clEnumValN(Select_PrintMachineCode,"y","print generated machine code"), clEnumValN(Select_DebugInstTrees,"i","print debugging info for instruction selection"), clEnumValN(Select_DebugBurgTrees,"b","print burg trees"), clEnumValEnd))
TargetMachineTarget
static const uint32_t llvm::MAXLO = (1 << 10) - 1
static const uint32_t llvm::MAXSIMM = (1 << 12) - 1


Variable Documentation

TargetMachine& Target

Definition at line 487 of file SparcV9BurgISel.cpp.

Referenced by CompilationCallback(), llvm::JIT::create(), llvm::createStackSlotsPass(), llvm::MSchedGraphSB::MSchedGraphSB(), PPC32CompilationCallbackC(), and llvm::SelectionDAGLowering::visitSwitch().