LLVM API Documentation
#include "PowerPC.h"
#include "PowerPCInstrBuilder.h"
#include "PowerPCInstrInfo.h"
#include "PPC32TargetMachine.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/Support/Debug.h"
#include "llvm/ADT/Statistic.h"
#include <vector>
Include dependency graph for PPC32ISelSimple.cpp:
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "isel" |
Functions | |
static TypeClass | getClass (const Type *Ty) |
static TypeClass | getClassB (const Type *Ty) |
static AllocaInst * | dyn_castFixedAlloca (Value *V) |
static SetCondInst * | canFoldSetCCIntoBranchOrSelect (Value *V) |
static GetElementPtrInst * | canFoldGEPIntoLoadOrStore (Value *V) |
static unsigned | getSetCCNumber (unsigned Opcode) |
static unsigned | getPPCOpcodeForSetCCNumber (unsigned Opcode) |
static BasicBlock * | getBlockAfter (BasicBlock *BB) |
static Value * | dyncastIsNan (Value *V) |
static bool | isOnlyUsedByUnorderedComparisons (Value *V) |
static unsigned | ExactLog2 (unsigned Val) |
static bool | isRunOfOnes (unsigned Val, unsigned &MB, unsigned &ME) |
static bool | isInsertAndHalf (User *OpUser, Instruction **Op1User, Instruction **OrI, unsigned &Mask) |
static bool | isInsertShiftHalf (User *OpUser, Instruction **Op1User, Instruction **OrI, Instruction **OptAndI, unsigned &Shift, unsigned &Mask) |
static bool | LoadNeedsSignExtend (LoadInst &LI) |
FunctionPass * | llvm::createPPC32ISelSimple (TargetMachine &TM) |
|
Definition at line 10 of file PPC32ISelSimple.cpp. |
|
Definition at line 972 of file PPC32ISelSimple.cpp. References E. |
|
Definition at line 958 of file PPC32ISelSimple.cpp. |
|
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 488 of file PPC32ISelSimple.cpp. References llvm::Function::front(), llvm::BasicBlock::getParent(), and llvm::Instruction::getParent(). |
|
dyncastIsNan - Return the operand of an isnan operation if this is an isnan. Definition at line 1877 of file PPC32ISelSimple.cpp. References llvm::CallInst::getCalledFunction(), llvm::Function::getIntrinsicID(), llvm::User::getOperand(), and llvm::Intrinsic::isunordered. Referenced by isOnlyUsedByUnorderedComparisons(). |
|
Definition at line 2066 of file PPC32ISelSimple.cpp. |
|
Definition at line 1566 of file PPC32ISelSimple.cpp. References llvm::Function::end(), and llvm::BasicBlock::getParent(). |
|
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 46 of file PPC32ISelSimple.cpp. References llvm::Type::getTypeID(). Referenced by getClassB(), llvm::PPC64RegisterInfo::loadRegFromStackSlot(), llvm::PPC32RegisterInfo::loadRegFromStackSlot(), llvm::PPC64RegisterInfo::storeRegToStackSlot(), and llvm::PPC32RegisterInfo::storeRegToStackSlot(). |
|
Definition at line 68 of file PPC32ISelSimple.cpp. References getClass(). Referenced by canFoldSetCCIntoBranchOrSelect(), and LoadNeedsSignExtend(). |
|
Definition at line 1020 of file PPC32ISelSimple.cpp. References llvm::ISD::SetEQ, llvm::ISD::SetGE, llvm::ISD::SetGT, llvm::ISD::SetLE, llvm::ISD::SetLT, and llvm::ISD::SetNE. |
|
Definition at line 1008 of file PPC32ISelSimple.cpp. References llvm::ISD::SetEQ, llvm::ISD::SetGE, llvm::ISD::SetGT, llvm::ISD::SetLE, llvm::ISD::SetLT, and llvm::ISD::SetNE. |
|
isInsertAndHalf - Helper function for emitBitfieldInsert. Returns true if OpUser has one use, is used by an or instruction, and is itself an and whose second operand is a constant int. Optionally, set OrI to the Or instruction that is the sole user of OpUser, and Op1User to the other operand of the Or instruction. Definition at line 2136 of file PPC32ISelSimple.cpp. References llvm::ISD::And, llvm::Value::hasOneUse(), and llvm::ISD::Or. |
|
isInsertShiftHalf - Helper function for emitBitfieldInsert. Returns true if OpUser has one use, is used by an or instruction, and is itself a shift instruction that is either used directly by the or instruction, or is used by an and instruction whose second operand is a constant int, and which is used by the or instruction. Definition at line 2170 of file PPC32ISelSimple.cpp. References llvm::ISD::And, llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Value::hasOneUse(), llvm::Type::isSigned(), and llvm::ISD::Or. |
|
isOnlyUsedByUnorderedComparisons - Return true if this value is only used by or's whos operands are all calls to the isnan predicate. Definition at line 1887 of file PPC32ISelSimple.cpp. References dyncastIsNan(), E, llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::ISD::Or, llvm::Value::use_begin(), and llvm::Value::use_end(). |
|
Definition at line 2080 of file PPC32ISelSimple.cpp. |
|
LoadNeedsSignExtend - On PowerPC, there is no load byte with sign extend. Therefore, if this is a byte load and the destination type is signed, we would normally need to also emit a sign extend instruction after the load. However, store instructions don't care whether a signed type was sign extended across a whole register. Also, a SetCC instruction will emit its own sign extension to force the value into the appropriate range, so we need not emit it here. Ideally, this kind of thing wouldn't be necessary once LLVM's type system is improved. Definition at line 2944 of file PPC32ISelSimple.cpp. References E, getClassB(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::isSigned(), llvm::Value::use_begin(), and llvm::Value::use_end(). |