Home | History | Annotate | Download | only in InstCombine

Lines Matching full:phi

23 /// FoldPHIArgBinOpIntoPHI - If we have something like phi [add (a,b), add(a,c)]
24 /// and if a/b/c and the add's all have a single use, turn this into a phi
67 // Keep track of which operand needs a phi node.
72 // If both LHS and RHS would need a PHI, don't do this transformation,
141 // We don't want to replace this phi if the replacement would require
142 // more than one phi, which leads to higher register pressure. This is
168 // Don't merge two GEPs when two operands differ (introducing phi nodes)
180 // If we already needed a PHI for an earlier operand, and another operand
181 // also requires a PHI, we'd be introducing more PHIs than we're
182 // eliminating, which increases register pressure on entry to the PHI's
187 FixedOperands[op] = nullptr; // Needs a PHI.
192 // If all of the base pointers of the PHI'd GEPs are from allocas, don't
201 // Otherwise, this is safe to transform. Insert PHI nodes for each operand
207 if (FixedOperands[i]) continue; // operand doesn't need a phi.
305 // load and the PHI.
310 // If the PHI is of volatile loads and the load block has multiple
324 // the load and the PHI.
338 // If the PHI is of volatile loads and the load block has multiple
346 // Okay, they are all the same operation. Create a new PHI node of the
347 // correct type, and PHI together all of the LHS's of the instructions.
355 // Add all operands to the new PHI.
365 // The new PHI unions all of the same values together. This is really
388 /// FoldPHIArgOpIntoPHI - If all operands to a PHI node are the same "unary"
389 /// operator and they all are only used by the PHI, PHI together their
390 /// inputs, and do the operation once, to the result of the PHI.
400 // If all input operands to the phi are the same instruction (e.g. a cast from
401 // the same type or "+42") we can pull the operation through the PHI, reducing
454 // Okay, they are all the same operation. Create a new PHI node of the
455 // correct type, and PHI together all of the LHS's of the instructions.
463 // Add all operands to the new PHI.
473 // The new PHI unions all of the same values together. This is really
506 /// DeadPHICycle - Return true if this PHI node is only used by a PHI node cycle
527 /// PHIsEqualValue - Return true if this phi node is always equal to
528 /// NonPhiInVal. This happens with mutually cyclic phi nodes like:
529 /// z = some value; x = phi (y, z); y = phi (x, z)
532 // See if we already saw this PHI node.
540 // Scan the operands to see if they are either phi nodes or are equal to
557 unsigned PHIId; // The ID # of the PHI (something determinstic to sort on)
575 PHINode *PN; // The PHI that was lowered.
610 /// SliceUpIllegalIntegerPHI - This is an integer PHI and we know that it has an
612 /// so, we split the PHI into the various pieces being extracted. This sort of
623 // PHIs are often mutually cyclic, so we keep track of a whole set of PHI
636 // Scan the input list of the PHI. If any input is an invoke, and if the
646 // If we have a phi, and if it's directly in the predecessor, then we have
655 // If the user is a PHI, inspect its uses recursively.
679 // If we have no users, they must be all self uses, just nuke the PHI.
683 // If this phi node is transformable, create new PHIs for all the pieces
687 DEBUG(dbgs() << "SLICING UP PHI: " << FirstPhi << '\n';
689 dbgs() << "AND USER PHI #" << i << ": " << *PHIsToSlice[i] << '\n';
692 // PredValues - This is a temporary used when rewriting PHI nodes. It is
696 // ExtractedVals - Each new PHI we introduce is saved here so we don't
712 // Otherwise, Create the new PHI node for this user.
716 "Truncate didn't shrink phi?");
728 // Handle the PHI self-reuse case.
737 // If the incoming value was a PHI, and if it was one of the PHIs we
756 // If the incoming value was a PHI, and if it was one of the PHIs we are
758 // means we need to revisit that PHI to make sure we extract out the
771 DEBUG(dbgs() << " Made element PHI for offset " << Offset << ": "
776 // Replace the use of this piece with the PHI node.
780 // Replace all the remaining uses of the PHI nodes (self uses and the lshrs)
794 // If all PHI operands are the same operation, pull them through the PHI,
806 // If this is a trivial cycle in the PHI node graph, remove it. Basically, if
807 // this PHI only has a single use (a PHI), and if that PHI only has one use (a
808 // PHI)... break the cycle.
818 // If this phi has a single use, and if that use just computes a value for
819 // the next iteration of a loop, delete the phi. This occurs with unused
831 // We sometimes end up with phi cycles that non-obviously end up being the
833 // z = some value; x = phi (y, z); y = phi (x, z)
834 // where the phi nodes don't necessarily need to be in the same block. Do a
835 // quick check to see if the PHI node only contains a single non-phi value, if
836 // so, scan to see if the phi cycle is actually equal to that value.
839 // Scan for the first non-phi operand.
856 // phi values. Scan PHI nodes to see if they all merge in each other or
890 // If this is an integer PHI and we know that it has an illegal type, see if
892 // PHI into the various pieces being extracted. This sort of thing is