LLVM API Documentation
#include "ARM.h"#include "ARMMachineFunctionInfo.h"#include "ARMInstrInfo.h"#include "llvm/CodeGen/MachineConstantPool.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/Target/TargetData.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/Statistic.h"
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "arm-cp-islands" |
Functions | |
| STATISTIC (NumCPEs,"Number of constpool entries") | |
| STATISTIC (NumSplit,"Number of uncond branches inserted") | |
| STATISTIC (NumCBrFixed,"Number of cond branches fixed") | |
| STATISTIC (NumUBrFixed,"Number of uncond branches fixed") | |
| FunctionPass * | llvm::createARMConstantIslandPass () |
| static bool | BBHasFallthrough (MachineBasicBlock *MBB) |
| static bool | CompareMBBNumbers (const MachineBasicBlock *LHS, const MachineBasicBlock *RHS) |
| static bool | BBIsJumpedOver (MachineBasicBlock *MBB) |
| static unsigned | getUnconditionalBrDisp (int Opc) |
| #define DEBUG_TYPE "arm-cp-islands" |
Definition at line 16 of file ARMConstantIslandPass.cpp.
| static bool BBHasFallthrough | ( | MachineBasicBlock * | MBB | ) | [static] |
BBHasFallthrough - Return true if the specified basic block can fallthrough into the block immediately after it.
Definition at line 319 of file ARMConstantIslandPass.cpp.
References E, llvm::MachineFunction::end(), llvm::MachineBasicBlock::getParent(), MBBI, llvm::next(), llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().
| static bool BBIsJumpedOver | ( | MachineBasicBlock * | MBB | ) | [static] |
BBIsJumpedOver - Return true of the specified basic block's only predecessor unconditionally branches to its only successor.
Definition at line 707 of file ARMConstantIslandPass.cpp.
| static bool CompareMBBNumbers | ( | const MachineBasicBlock * | LHS, | |
| const MachineBasicBlock * | RHS | |||
| ) | [static] |
CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID.
Definition at line 525 of file ARMConstantIslandPass.cpp.
References llvm::MachineBasicBlock::getNumber().
| static unsigned getUnconditionalBrDisp | ( | int | Opc | ) | [inline, static] |
getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.
Definition at line 836 of file ARMConstantIslandPass.cpp.
| STATISTIC | ( | NumUBrFixed | , | |
| "Number of uncond branches fixed" | ||||
| ) |
| STATISTIC | ( | NumCBrFixed | , | |
| "Number of cond branches fixed" | ||||
| ) |
| STATISTIC | ( | NumSplit | , | |
| "Number of uncond branches inserted" | ||||
| ) |
| STATISTIC | ( | NumCPEs | , | |
| "Number of constpool entries" | ||||
| ) |
Definition at line 125 of file ARMConstantIslandPass.cpp.
Referenced by llvm::ARMInstrInfo::copyRegToReg(), llvm::ARMRegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::emitEpilogue(), llvm::ARMRegisterInfo::emitPrologue(), llvm::ARMRegisterInfo::hasReservedCallFrame(), llvm::ARMJITInfo::Initialize(), llvm::ARMInstrInfo::InsertBranch(), llvm::ARMInstrInfo::loadRegFromAddr(), llvm::ARMInstrInfo::loadRegFromStackSlot(), llvm::ARMRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::ARMInstrInfo::RemoveBranch(), llvm::ARMRegisterInfo::requiresRegisterScavenging(), llvm::ARMInstrInfo::restoreCalleeSavedRegisters(), llvm::ARMInstrInfo::spillCalleeSavedRegisters(), llvm::ARMInstrInfo::storeRegToAddr(), and llvm::ARMInstrInfo::storeRegToStackSlot().
BBOffsets - the offset of each MBB in bytes, starting from 0. The two-byte pads required for Thumb alignment are counted as part of the following block.
Definition at line 59 of file ARMConstantIslandPass.cpp.
BBSizes - The size of each MachineBasicBlock in bytes of code, indexed by MBB Number. The two-byte pads required for Thumb alignment are counted as part of the following block (i.e., the offset and size for a padded block will both be ==2 mod 4).
Definition at line 54 of file ARMConstantIslandPass.cpp.
Definition at line 71 of file ARMConstantIslandPass.cpp.
| std::vector<std::vector<CPEntry> > CPEntries |
CPEntries - Keep track of all of the constant pool entry machine instructions. For each original constpool index (i.e. those that existed upon entry to this pass), it keeps a vector of entries. Original elements are cloned as we go along; the clones are put in the vector of the original element, but have distinct CPIs.
Definition at line 97 of file ARMConstantIslandPass.cpp.
Definition at line 86 of file ARMConstantIslandPass.cpp.
Referenced by llvm::X86InstrInfo::foldMemoryOperandImpl(), LowerConstantPool(), and llvm::AlphaTargetLowering::LowerOperation().
| std::vector<CPUser> CPUsers |
CPUsers - Keep track of all of the machine instructions that use various constant pools and their max displacement.
Definition at line 79 of file ARMConstantIslandPass.cpp.
| bool HasFarJump |
HasFarJump - True if any far jump instruction has been emitted during the branch fix up pass.
Definition at line 122 of file ARMConstantIslandPass.cpp.
char ID [static] |
Definition at line 128 of file ARMConstantIslandPass.cpp.
| std::vector<ImmBranch> ImmBranches |
ImmBranches - Keep track of all the immediate branch instructions.
Definition at line 114 of file ARMConstantIslandPass.cpp.
| bool isCond |
Definition at line 106 of file ARMConstantIslandPass.cpp.
| bool isThumb |
Definition at line 126 of file ARMConstantIslandPass.cpp.
Referenced by llvm::ARMRegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::emitEpilogue(), and llvm::ARMRegisterInfo::emitPrologue().
Definition at line 72 of file ARMConstantIslandPass.cpp.
Definition at line 70 of file ARMConstantIslandPass.cpp.
PushPopMIs - Keep track of all the Thumb push / pop instructions.
Definition at line 118 of file ARMConstantIslandPass.cpp.
Definition at line 87 of file ARMConstantIslandPass.cpp.
Referenced by llvm::AttributeListImpl::AddRef(), llvm::AttributeListImpl::AttributeListImpl(), and llvm::AttributeListImpl::DropRef().
| const TargetInstrInfo* TII |
Definition at line 124 of file ARMConstantIslandPass.cpp.
| int UncondBr |
Definition at line 107 of file ARMConstantIslandPass.cpp.
| std::vector<MachineBasicBlock*> WaterList |
WaterList - A sorted list of basic blocks where islands could be placed (i.e. blocks that don't fall through to the following block, due to a return, unreachable, or unconditional branch).
Definition at line 64 of file ARMConstantIslandPass.cpp.