35 #define TLSCLEANUP_PASS_NAME "AArch64 Local Dynamic TLS Access Clean-up" 70 switch (
I->getOpcode()) {
73 if (!
I->getOperand(0).isSymbol() ||
74 strcmp(
I->getOperand(0).getSymbolName(),
"_TLS_MODULE_BASE_"))
78 I = replaceTLSBaseAddrCall(*
I, TLSBaseAddrReg);
80 I = setRegister(*
I, &TLSBaseAddrReg);
90 Changed |= VisitNode(
N, TLSBaseAddrReg);
99 unsigned TLSBaseAddrReg) {
106 TII->
get(TargetOpcode::COPY), AArch64::X0)
107 .addReg(TLSBaseAddrReg);
128 TII->
get(TargetOpcode::COPY), *TLSBaseAddrReg)
129 .addReg(AArch64::X0);
149 return new LDTLSCleanup();
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
AArch64FunctionInfo - This class is derived from MachineFunctionInfo and contains private AArch64-spe...
This class represents lattice values for constants.
unsigned getNumLocalDynamicTLSAccesses() const
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
AnalysisUsage & addRequired()
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
void initializeLDTLSCleanupPass(PassRegistry &)
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
FunctionPass * createAArch64CleanupLocalDynamicTLSPass()
Base class for the actual dominator tree node.
virtual const TargetInstrInfo * getInstrInfo() const
TargetInstrInfo - Interface to description of machine instruction set.
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
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.
self_iterator getIterator()
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
MachineDomTreeNode * getRootNode() const
void setPreservesCFG()
This function should be called by the pass, iff they do not:
const Function & getFunction() const
Return the LLVM function that this machine code represents.
const MachineBasicBlock * getParent() const
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.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
#define TLSCLEANUP_PASS_NAME
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
StringRef - Represent a constant reference to a string, i.e.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
unsigned createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...