LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

X86ISelSimple.cpp File Reference

#include "X86.h"
#include "X86InstrBuilder.h"
#include "X86InstrInfo.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/InstVisitor.h"
#include "llvm/ADT/Statistic.h"

Include dependency graph for X86ISelSimple.cpp:

Go to the source code of this file.

Functions

static TypeClass getClass (const Type *Ty)
static TypeClass getClassB (const Type *Ty)
static AllocaInst * dyn_castFixedAlloca (Value *V)
static bool RequiresFPRegKill (const MachineBasicBlock *MBB)
static SetCondInst * canFoldSetCCIntoBranchOrSelect (Value *V)
static unsigned getSetCCNumber (unsigned Opcode)
static BasicBlock * getBlockAfter (BasicBlock *BB)
static bool isSafeToFoldLoadIntoInstruction (LoadInst &LI, Instruction &User)
static unsigned ExactLog2 (unsigned Val)
FunctionPass * llvm::createX86SimpleInstructionSelector (TargetMachine &TM)

Variables

static const unsigned SetCCOpcodeTab [2][8]


Function Documentation

static SetCondInst* canFoldSetCCIntoBranchOrSelect (  Value *  V  )  [static]
 

Definition at line 871 of file X86ISelSimple.cpp.

References getClassB(), llvm::ISD::SetEQ, and llvm::ISD::SetNE.

static AllocaInst* dyn_castFixedAlloca (  Value *  V  )  [static]
 

dyn_castFixedAlloca - If the specified value is a fixed size alloca instruction in the entry block, return it. Otherwise, return a null pointer.

Definition at line 388 of file X86ISelSimple.cpp.

References llvm::Function::front(), llvm::BasicBlock::getParent(), and llvm::Instruction::getParent().

static unsigned ExactLog2 (  unsigned  Val  )  [static]
 

Definition at line 2378 of file X86ISelSimple.cpp.

static BasicBlock* getBlockAfter (  BasicBlock *  BB  )  [inline, static]
 

Definition at line 1423 of file X86ISelSimple.cpp.

References llvm::Function::end(), and llvm::BasicBlock::getParent().

static TypeClass getClass (  const Type *  Ty  )  [inline, static]
 

getClass - Turn a primitive type into a "class" number which is based on the size of the type, and whether or not it is floating point.

Definition at line 49 of file X86ISelSimple.cpp.

References llvm::Type::getTypeID().

static TypeClass getClassB (  const Type *  Ty  )  [inline, static]
 

Definition at line 71 of file X86ISelSimple.cpp.

References getClass().

static unsigned getSetCCNumber (  unsigned  Opcode  )  [static]
 

Definition at line 888 of file X86ISelSimple.cpp.

References llvm::ISD::SetEQ, llvm::ISD::SetGE, llvm::ISD::SetGT, llvm::ISD::SetLE, llvm::ISD::SetLT, and llvm::ISD::SetNE.

static bool isSafeToFoldLoadIntoInstruction (  LoadInst &  LI,
Instruction &  User
)  [static]
 

Definition at line 1983 of file X86ISelSimple.cpp.

References llvm::ISD::Call, llvm::Instruction::getParent(), llvm::LoadInst::isVolatile(), llvm::ISD::Load, and llvm::ISD::Store.

static bool RequiresFPRegKill (  const MachineBasicBlock *  MBB  )  [static]
 

RequiresFPRegKill - The floating point stackifier pass cannot insert compensation code on critical edges. As such, it requires that we kill all FP registers on the exit from any blocks that either ARE critical edges, or branch to a block that has incoming critical edges.

Note that this kill instruction will eventually be eliminated when restrictions in the stackifier are relaxed.

Definition at line 753 of file X86ISelSimple.cpp.

References E, llvm::MachineBasicBlock::getBasicBlock(), llvm::pred_begin(), llvm::pred_end(), llvm::succ_begin(), and llvm::succ_end().


Variable Documentation

Statistic NumFPKill("x86-codegen","Number of FP_REG_KILL instructions added") [static]
 

const unsigned SetCCOpcodeTab[2][8] [static]
 

Initial value:

 {
  { X86::SETEr, X86::SETNEr, X86::SETBr, X86::SETAEr, X86::SETAr, X86::SETBEr,
    0, 0 },
  { X86::SETEr, X86::SETNEr, X86::SETLr, X86::SETGEr, X86::SETGr, X86::SETLEr,
    X86::SETSr, X86::SETNSr },
}

Definition at line 911 of file X86ISelSimple.cpp.