LLVM  7.0.0svn
Namespaces | Macros | Functions | Variables
HexagonConstExtenders.cpp File Reference
#include "HexagonInstrInfo.h"
#include "HexagonRegisterInfo.h"
#include "HexagonSubtarget.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Pass.h"
#include <map>
#include <set>
#include <utility>
#include <vector>
Include dependency graph for HexagonConstExtenders.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "hexagon-cext-opt"
 

Functions

void llvm::initializeHexagonConstExtendersPass (PassRegistry &)
 
FunctionPassllvm::createHexagonConstExtenders ()
 
static int32_t adjustUp (int32_t V, uint8_t A, uint8_t O)
 
static int32_t adjustDown (int32_t V, uint8_t A, uint8_t O)
 
 INITIALIZE_PASS_BEGIN (HexagonConstExtenders, "hexagon-cext-opt", "Hexagon constant-extender optimization", false, false) INITIALIZE_PASS_END(HexagonConstExtenders
 

Variables

static cl::opt< unsignedCountThreshold ("hexagon-cext-threshold", cl::init(3), cl::Hidden, cl::ZeroOrMore, cl::desc("Minimum number of extenders to trigger replacement"))
 
static cl::opt< unsignedReplaceLimit ("hexagon-cext-limit", cl::init(0), cl::Hidden, cl::ZeroOrMore, cl::desc("Maximum number of replacements"))
 
hexagon cext opt
 
hexagon cext Hexagon constant extender optimization
 
hexagon cext Hexagon constant extender false
 
hexagon cext Hexagon constant extender static false unsigned ReplaceCounter = 0
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "hexagon-cext-opt"

Definition at line 26 of file HexagonConstExtenders.cpp.

Function Documentation

◆ adjustDown()

static int32_t adjustDown ( int32_t  V,
uint8_t  A,
uint8_t  O 
)
static

Definition at line 48 of file HexagonConstExtenders.cpp.

References llvm::ARM_AM::add, llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), adjustUp(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, assert(), B, llvm::MachineBasicBlock::begin(), contains(), llvm::MachineOperand::CreateFI(), llvm::MachineOperand::CreateReg(), D, llvm::dump(), E, llvm::WebAssembly::End, llvm::MachineBasicBlock::end(), llvm::MachineFunctionPass::getAnalysisUsage(), llvm::MachineOperand::getIndex(), llvm::MachineBasicBlock::getNumber(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineFunction::getSubtarget(), H, llvm::MipsISD::Higher, I, llvm::TargetRegisterInfo::index2StackSlot(), INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, intersect(), llvm::MachineOperand::isFI(), llvm::isPowerOf2_32(), llvm::MachineOperand::isReg(), llvm::TargetRegisterInfo::isStackSlot(), llvm::TargetRegisterInfo::isVirtualRegister(), Kind, llvm::Left, LLVM_ATTRIBUTE_UNUSED, llvm_unreachable, llvm::Lower, llvm::max(), MI, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_FPImmediate, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_TargetIndex, MRI, N, llvm::RISCVFenceField::O, llvm::operator!=(), llvm::operator<(), llvm::operator<<(), llvm::operator==(), OR, P, llvm::printReg(), Reg, Register, llvm::Right, llvm::TargetRegisterInfo::stackSlot2Index(), std::swap(), llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName, and UseMI.

◆ adjustUp()

static int32_t adjustUp ( int32_t  V,
uint8_t  A,
uint8_t  O 
)
static

Definition at line 42 of file HexagonConstExtenders.cpp.

References assert(), and llvm::isPowerOf2_32().

Referenced by adjustDown().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( HexagonConstExtenders  ,
"hexagon-cext-opt ,
"Hexagon constant-extender optimization ,
false  ,
false   
)

Referenced by adjustDown().

Variable Documentation

◆ CountThreshold

cl::opt<unsigned> CountThreshold("hexagon-cext-threshold", cl::init(3), cl::Hidden, cl::ZeroOrMore, cl::desc("Minimum number of extenders to trigger replacement"))
static

◆ false

hexagon cext Hexagon constant extender false

Definition at line 571 of file HexagonConstExtenders.cpp.

◆ opt

hexagon cext opt

◆ optimization

hexagon cext Hexagon constant extender optimization

Definition at line 571 of file HexagonConstExtenders.cpp.

◆ ReplaceCounter

hexagon cext Hexagon constant extender static false unsigned ReplaceCounter = 0
static

Definition at line 574 of file HexagonConstExtenders.cpp.

◆ ReplaceLimit

cl::opt<unsigned> ReplaceLimit("hexagon-cext-limit", cl::init(0), cl::Hidden, cl::ZeroOrMore, cl::desc("Maximum number of replacements"))
static