36 #define DEBUG_TYPE "ppc-tls-dynamic-call"
61 if (MI->
getOpcode() != PPC::ADDItlsgdLADDR &&
63 MI->
getOpcode() != PPC::ADDItlsgdLADDR32 &&
64 MI->
getOpcode() != PPC::ADDItlsldLADDR32) {
69 DEBUG(
dbgs() <<
"TLS Dynamic Call Fixup:\n " << *MI;);
74 unsigned GPR3 = Is64Bit ? PPC::X3 : PPC::R3;
84 case PPC::ADDItlsgdLADDR:
85 Opc1 = PPC::ADDItlsgdL;
86 Opc2 = PPC::GETtlsADDR;
88 case PPC::ADDItlsldLADDR:
89 Opc1 = PPC::ADDItlsldL;
90 Opc2 = PPC::GETtlsldADDR;
92 case PPC::ADDItlsgdLADDR32:
93 Opc1 = PPC::ADDItlsgdL32;
94 Opc2 = PPC::GETtlsADDR32;
96 case PPC::ADDItlsldLADDR32:
97 Opc1 = PPC::ADDItlsldL32;
98 Opc2 = PPC::GETtlsldADDR32;
128 LIS->repairIntervalsInRange(&MBB, First, Last, OrigRegs);
138 LIS = &getAnalysis<LiveIntervals>();
140 bool Changed =
false;
162 "PowerPC TLS Dynamic Call Fixup",
false,
false)
166 "PowerPC TLS Dynamic Call
Fixup",
false, false)
168 char PPCTLSDynamicCall::
ID = 0;
void push_back(const T &Elt)
const MachineFunction * getParent() const
getParent - Return the MachineFunction containing this basic block.
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void initializePPCTLSDynamicCallPass(PassRegistry &)
INITIALIZE_PASS_BEGIN(PPCTLSDynamicCall, DEBUG_TYPE,"PowerPC TLS Dynamic Call Fixup", false, false) INITIALIZE_PASS_END(PPCTLSDynamicCall
FunctionPass * createPPCTLSDynamicCallPass()
COPY - Target-independent register copy.
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
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
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
PowerPC TLS Dynamic Call false
bundle_iterator< MachineInstr, instr_iterator > iterator
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
const MachineOperand & getOperand(unsigned i) const
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
BuildMI - Builder interface.
PowerPC TLS Dynamic Call Fixup
void addOperand(MachineFunction &MF, const MachineOperand &Op)
Add the specified operand to the instruction.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
Representation of each machine instruction.
MachineInstr * removeFromParent()
Unlink 'this' from the containing basic block, and return it without deleting it. ...
unsigned getReg() const
getReg - Returns the register number.
BasicBlockListType::iterator iterator
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...