Lines Matching refs: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");
283 /// \param ADRPMode specifies to only consider ADRP instructions for generated
284 /// definition. It also consider definitions of ADRP instructions as uses and
286 /// that involve ADRP operation only.
304 bool IsADRP = MI.getOpcode() == AArch64::ADRP;
309 // Treat ADRP def as use, as the goal of the analysis is to find
310 // ADRP defs reached by other ADRP defs.
341 // Do not register clobbered definition for no ADRP.
443 /// for ADRP optimization. \see initReachingDef for more details.
503 // Accept ADRP, ADDLow and LOADGot.
507 case AArch64::ADRP:
559 /// In ADRPMode, non-LOH candidates are "uses" with non-ADRP definitions.
580 // if all the reaching defs are not adrp, this use will not be
582 if ((ADRPMode && Def->getOpcode() != AArch64::ADRP) ||
592 // Do not consider self reaching as a simplifiable case for ADRP.
613 /// opportunities of LOH ADRP-related.
617 DEBUG(dbgs() << "*** Compute LOH for ADRP\n");
702 if (Def->getOpcode() != AArch64::ADRP) {
705 // by these kind of instructions (+ ADRP).
722 // - top is ADRP.
725 if (Def->getOpcode() == AArch64::ADRP)
736 // Look for opportunities to turn ADRP -> ADD or
737 // ADRP -> LDR GOTPAGEOFF into ADR.
738 // If ADRP has more than one use. Give up.
748 if (Def.getOpcode() != AArch64::ADRP)
750 // Check the number of users of ADRP.
760 "ADRP already involved in LOH.");
772 /// opportunities of LOH non-ADRP-related
783 // ADRP -> ADD/LDR -> LDR/STR pattern.
784 // Fall back to ADRP -> ADD pattern if we fail to catch the bigger pattern.
798 // a ADRP -> ADD/LDR/Nothing chain.
812 // (because ADRP-> Nothing -> STR is not simplifiable)
819 // PotentialCandidates are result of a chain ADRP -> ADD/LDR ->
832 if (Def->getOpcode() != AArch64::ADRP) {
861 // Check the number of users of the first node in the chain, i.e., ADRP
919 DEBUG(dbgs() << "Record Adrp" << (IsL2Add ? "Add" : "LdrGot")
949 if (ImmediateDefOpc == AArch64::ADRP)
953 DEBUG(dbgs() << "Record Adrp" << (IsL2Add ? "Add" : "LdrGot")
1065 // Start with ADRP.
1068 // Compute the reaching def in ADRP mode, meaning ADRP definitions
1071 DEBUG(dbgs() << "ADRP reaching defs\n");
1079 // Compute LOH for ADRP.
1083 // Continue with general ADRP -> ADD/LDR -> LDR/STR pattern.