Lines Matching full:adrp
20 // L1: adrp xA, sym@PAGE
29 // L1: adrp xA, sym@PAGE
40 // respectively ADRP, ADD (immediate), and LD.
46 // - The ADRP in L1 and the ADD in L2 must reference the same symbol using
50 // * So called non-ADRP-related:
52 // L1: adrp xA, sym@PAGE
56 // L1: adrp xA, sym@GOTPAGE
60 // L1: adrp xA, sym@PAGE
63 // L1: adrp xA, sym@PAGE
67 // L1: adrp xA, sym@GOTPAGE
71 // L1: adrp xA, sym@PAGE
80 // * So called ADRP-related:
82 // L2: ADRP xA, sym1@PAGE
83 // L1: ADRP xA, sym2@PAGE
85 // This LOH aims at getting rid of redundant ADRP instructions.
140 "Number of simplifiable ADRP dominate by another");
142 "Number of simplifiable ADRP reachable by 2 defs");
144 "Number of simplifiable ADRP reachable by 3 defs");
146 "Number of simplifiable ADRP reachable by 4 or more defs");
159 STATISTIC(NumADRPToLDR, "Number of simplifiable LDR reachable by ADRP");
164 STATISTIC(NumADRSimpleCandidate, "Number of simplifiable ADRP + ADD");
165 STATISTIC(NumADRComplexCandidate, "Number of too complex ADRP + ADD");
278 /// \param ADRPMode specifies to only consider ADRP instructions for generated
279 /// definition. It also consider definitions of ADRP instructions as uses and
281 /// that involve ADRP operation only.
299 bool IsADRP = MI.getOpcode() == AArch64::ADRP;
304 // Treat ADRP def as use, as the goal of the analysis is to find
305 // ADRP defs reached by other ADRP defs.
336 // Do not register clobbered definition for no ADRP.
438 /// for ADRP optimization. \see initReachingDef for more details.
498 // Accept ADRP, ADDLow and LOADGot.
502 case AArch64::ADRP:
554 /// In ADRPMode, non-LOH candidates are "uses" with non-ADRP definitions.
575 // if all the reaching defs are not adrp, this use will not be
577 if ((ADRPMode && Def->getOpcode() != AArch64::ADRP) ||
587 // Do not consider self reaching as a simplifiable case for ADRP.
608 /// opportunities of LOH ADRP-related.
612 DEBUG(dbgs() << "*** Compute LOH for ADRP\n");
700 if (Def->getOpcode() != AArch64::ADRP) {
703 // by these kind of instructions (+ ADRP).
720 // - top is ADRP.
723 if (Def->getOpcode() == AArch64::ADRP)
734 // Look for opportunities to turn ADRP -> ADD or
735 // ADRP -> LDR GOTPAGEOFF into ADR.
736 // If ADRP has more than one use. Give up.
746 if (Def.getOpcode() != AArch64::ADRP)
748 // Check the number of users of ADRP.
758 "ADRP already involved in LOH.");
774 /// opportunities of LOH non-ADRP-related
785 // ADRP -> ADD/LDR -> LDR/STR pattern.
786 // Fall back to ADRP -> ADD pattern if we fail to catch the bigger pattern.
800 // a ADRP -> ADD/LDR/Nothing chain.
814 // (because ADRP-> Nothing -> STR is not simplifiable)
821 // PotentialCandidates are result of a chain ADRP -> ADD/LDR ->
834 if (Def->getOpcode() != AArch64::ADRP) {
863 // Check the number of users of the first node in the chain, i.e., ADRP
921 DEBUG(dbgs() << "Record Adrp" << (IsL2Add ? "Add" : "LdrGot")
951 if (ImmediateDefOpc == AArch64::ADRP)
955 DEBUG(dbgs() << "Record Adrp" << (IsL2Add ? "Add" : "LdrGot")
1064 // Start with ADRP.
1067 // Compute the reaching def in ADRP mode, meaning ADRP definitions
1070 DEBUG(dbgs() << "ADRP reaching defs\n");
1078 // Compute LOH for ADRP.
1082 // Continue with general ADRP -> ADD/LDR -> LDR/STR pattern.