LLVM API Documentation
#include "ARM.h"#include "ARMAddressingModes.h"#include "ARMMachineFunctionInfo.h"#include "ARMInstrInfo.h"#include "llvm/CodeGen/MachineConstantPool.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineJumpTableInfo.h"#include "llvm/Target/TargetData.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.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") | |
| STATISTIC (NumTBs,"Number of table branches generated") | |
| STATISTIC (NumT2CPShrunk,"Number of Thumb2 constantpool instructions shrunk") | |
| STATISTIC (NumT2BrShrunk,"Number of Thumb2 immediate branches shrunk") | |
| 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 359 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 787 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 588 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 916 of file ARMConstantIslandPass.cpp.
| STATISTIC | ( | NumT2BrShrunk | , | |
| "Number of Thumb2 immediate branches shrunk" | ||||
| ) |
| STATISTIC | ( | NumT2CPShrunk | , | |
| "Number of Thumb2 constantpool instructions shrunk" | ||||
| ) |
| STATISTIC | ( | NumTBs | , | |
| "Number of table branches generated" | ||||
| ) |
| 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 138 of file ARMConstantIslandPass.cpp.
Referenced by llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::emitEpilogue(), llvm::ARMBaseRegisterInfo::emitEpilogue(), llvm::Thumb1RegisterInfo::emitPrologue(), llvm::ARMBaseRegisterInfo::emitPrologue(), llvm::ARMJITInfo::Initialize(), llvm::ARMBaseInstrInfo::InsertBranch(), llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(), and llvm::Thumb1InstrInfo::restoreCalleeSavedRegisters().
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 65 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 60 of file ARMConstantIslandPass.cpp.
Definition at line 77 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 106 of file ARMConstantIslandPass.cpp.
Definition at line 95 of file ARMConstantIslandPass.cpp.
Referenced by llvm::AsmPrinter::EmitConstantPool(), 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 88 of file ARMConstantIslandPass.cpp.
HasFarJump - True if any far jump instruction has been emitted during the branch fix up pass.
Definition at line 134 of file ARMConstantIslandPass.cpp.
char ID [static] |
Definition at line 143 of file ARMConstantIslandPass.cpp.
| std::vector<ImmBranch> ImmBranches |
ImmBranches - Keep track of all the immediate branch instructions.
Definition at line 123 of file ARMConstantIslandPass.cpp.
Definition at line 115 of file ARMConstantIslandPass.cpp.
Definition at line 80 of file ARMConstantIslandPass.cpp.
Definition at line 139 of file ARMConstantIslandPass.cpp.
Referenced by llvm::ARMTargetLowering::getFunctionAlignment().
Definition at line 140 of file ARMConstantIslandPass.cpp.
Definition at line 141 of file ARMConstantIslandPass.cpp.
Definition at line 78 of file ARMConstantIslandPass.cpp.
Definition at line 76 of file ARMConstantIslandPass.cpp.
Definition at line 79 of file ARMConstantIslandPass.cpp.
PushPopMIs - Keep track of all the Thumb push / pop instructions.
Definition at line 127 of file ARMConstantIslandPass.cpp.
Definition at line 96 of file ARMConstantIslandPass.cpp.
Referenced by llvm::Type::addRef(), llvm::AttributeListImpl::AddRef(), llvm::AttributeListImpl::AttributeListImpl(), llvm::Type::dropRef(), llvm::AttributeListImpl::DropRef(), and llvm::Type::getRefCount().
| const ARMSubtarget* STI |
Definition at line 137 of file ARMConstantIslandPass.cpp.
T2JumpTables - Keep track of all the Thumb2 jumptable instructions.
Definition at line 130 of file ARMConstantIslandPass.cpp.
| const TargetInstrInfo* TII |
Definition at line 136 of file ARMConstantIslandPass.cpp.
| int UncondBr |
Definition at line 116 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 70 of file ARMConstantIslandPass.cpp.