LLVM
10.0.0svn
|
#include "MCTargetDesc/PPCPredicates.h"
#include "PPC.h"
#include "PPCInstrBuilder.h"
#include "PPCInstrInfo.h"
#include "PPCSubtarget.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "ppc-branch-select" |
Functions | |
STATISTIC (NumExpanded, "Number of branches expanded to long format") | |
INITIALIZE_PASS (PPCBSel, "ppc-branch-select", "PowerPC Branch Selector", false, false) FunctionPass *llvm | |
createPPCBranchSelectionPass - returns an instance of the Branch Selection Pass More... | |
static unsigned | GetInitialOffset (MachineFunction &Fn) |
We need to be careful about the offset of the first block in the function because it might not have the function's alignment. More... | |
#define DEBUG_TYPE "ppc-branch-select" |
Definition at line 31 of file PPCBranchSelector.cpp.
|
inlinestatic |
We need to be careful about the offset of the first block in the function because it might not have the function's alignment.
This happens because, under the ELFv2 ABI, for functions which require a TOC pointer, we add a two-instruction sequence to the start of the function. Note: This needs to be synchronized with the check in PPCLinuxAsmPrinter::EmitFunctionBodyStart.
Definition at line 106 of file PPCBranchSelector.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, B, llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), BlockSize, llvm::BuildMI(), llvm::numbers::e, E, llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineInstr::eraseFromParent(), llvm::MachineBasicBlock::getAlignment(), llvm::MachineFunction::getBlockNumbered(), llvm::MachineInstr::getDebugLoc(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::PPCInstrInfo::getInstSizeInBytes(), llvm::MachineBasicBlock::getNumber(), llvm::MachineFunction::getNumBlockIDs(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::PPC::InvertPredicate(), llvm::PPCSubtarget::isELFv2ABI(), llvm::isInt< 16 >(), llvm_unreachable, llvm::max(), MI, llvm::MachineFunction::RenumberBlocks(), TII, llvm::MachineRegisterInfo::use_empty(), and llvm::Align::value().
createPPCBranchSelectionPass - returns an instance of the Branch Selection Pass
Definition at line 70 of file PPCBranchSelector.cpp.
References llvm::MachineBasicBlock::getAlignment(), llvm::MachineFunction::getAlignment(), llvm::MachineBasicBlock::getNumber(), llvm::MachineBasicBlock::getParent(), llvm::Align::None(), llvm::offsetToAlignment(), and llvm::Align::value().
STATISTIC | ( | NumExpanded | , |
"Number of branches expanded to long format" | |||
) |