Lines Matching defs:hoist

26 //     we can hoist it or sink it like any other instruction.
175 static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
460 // instructions, we perform another pass to hoist them out of the loop.
642 // This is a helper class for hoistRegion to make it able to hoist control flow
643 // in order to be able to hoist phis. The way this works is that we initially
645 // we make note of this. When we then come to hoist an instruction that's
647 // flow, then hoist the instruction into the block corresponding to its original
661 // The branches that we can hoist, mapped to the block that marks a
671 // We can only hoist conditional branches with loop invariant operands.
685 // We can hoist BI if one branch destination is the successor of the other,
716 // controlled by this branch so any phi we hoist would be controlled by the
730 // We can hoist phis if the block they are in is the target of hoistable
779 // If not involved in a pending branch, hoist to preheader
784 << " as hoist destination for "
812 << " as hoist destination for " << Orig->getName()
823 // hoist target branched to.
825 assert(TargetSucc && "Expected hoist target to have a single successor");
849 // The preheader hoist destination is now the new preheader, with the
850 // exception of the hoist destination of this branch.
872 /// uses, allowing us to hoist a loop body in one pass without iteration.
893 // For PHI hoisting to work we need to hoist blocks before their successors.
909 // if it is safe to hoist the instruction. We also check block frequency
911 // TODO: It may be safe to hoist if we are hoisting to a conditional block
919 hoist(I, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), SafetyInfo,
947 hoist(*ReciprocalDivisor, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB),
966 hoist(I, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), SafetyInfo,
976 // versions of those blocks before we hoist the phi.
980 hoist(*PN, DT, CurLoop, CFH.getOrCreateHoistedBlock(BB), SafetyInfo,
995 // Remember possibly hoistable branches so we can actually hoist them
1019 "New hoist point expected to dominate old hoist point");
1096 // should not hoist the load out of a loop that contains this dominating
1107 /// Return true if-and-only-if we know how to (mechanically) both hoist and
1170 // Loads have extra constraints we have to verify before we can hoist them.
1173 return false; // Don't sink/hoist volatile or ordered atomic loads!
1207 // Don't sink or hoist dbg info; it's legal, but not useful.
1217 // enclosing control flows. It is not safe to hoist or sink such operations
1243 // writes to this memory in the loop, we can hoist or sink.
1256 // in the loop, we can hoist or sink the call as appropriate.
1261 // FIXME: This should use mod/ref information to see if we can hoist or
1271 return false; // Don't sink/hoist volatile or ordered atomic store!
1273 // We can only hoist a store that we can prove writes a value which is not
1737 /// is safe to hoist, this instruction is called to do the dirty work.
1739 static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
1782 /// Only sink or hoist an instruction if it is not a trapping instruction,
1803 << "failed to hoist load with loop-invariant address "
2180 // If we couldn't prove we can hoist the load, bail.
2186 // We know we can hoist the load, but don't have a guaranteed store.
2200 // If we've still failed to prove we can sink the store, hoist the load
2203 // If we cannot hoist the load either, give up.
2581 /// Try to reassociate and hoist the following two patterns:
2644 /// Reassociate and hoist add/sub expressions.
2691 /// ((A1 * C * B1) + (A2 * C * B2) + ...) and hoist the (A1 * C), (A2 * C), ...
2798 // Try to hoist GEPs by reassociation.
2805 // Try to hoist add/sub's by reassociation.