36 const char *getPassName()
const override {
37 return "SystemZ Local Dynamic TLS Access Clean-up";
57 return new SystemZLDCleanup(TM);
60 void SystemZLDCleanup::getAnalysisUsage(
AnalysisUsage &AU)
const {
86 unsigned TLSBaseAddrReg) {
91 for (
auto I = BB->
begin(), E = BB->
end();
I != E; ++
I) {
92 switch (
I->getOpcode()) {
95 I = ReplaceTLSCall(
I, TLSBaseAddrReg);
97 I = SetRegister(
I, &TLSBaseAddrReg);
106 for (
auto I = Node->
begin(), E = Node->
end();
I != E; ++
I)
107 Changed |= VisitNode(*
I, TLSBaseAddrReg);
115 unsigned TLSBaseAddrReg) {
119 .addReg(TLSBaseAddrReg);
130 unsigned *TLSBaseAddrReg) {
139 .addReg(SystemZ::R2D);
unsigned getNumLocalDynamicTLSAccesses() const
unsigned createVirtualRegister(const TargetRegisterClass *RegClass)
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
MachineDomTreeNode * getRootNode() const
COPY - Target-independent register copy.
AnalysisUsage & addRequired()
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
NodeTy * getNextNode()
Get the next node, or 0 for the list tail.
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
Base class for the actual dominator tree node.
const MachineBasicBlock * getParent() const
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
FunctionPass class - This class is used to implement most global optimizations.
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
BuildMI - Builder interface.
void setPreservesCFG()
This function should be called by the pass, iff they do not:
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
FunctionPass * createSystemZLDCleanupPass(SystemZTargetMachine &TM)
virtual const TargetInstrInfo * getInstrInfo() const
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...