Lines Matching defs:PHI
21 /// _create_ PHI values that contain variable values. CodeGen has already
23 /// we can identify function positions where we would like a PHI value for a
24 /// variable, but must search the MachineFunction to see whether such a PHI is
25 /// available. If no such PHI exists, the variable location must be dropped.
31 /// PHI values. This gives us a map of every value computed in the function,
46 /// resident in any machine location, or because there is no PHI value in any
60 /// defined by an instruction or PHI node, while a variable value is the value
62 /// contain the appropriate variable value. A value that is a PHI node is
637 // Must be in entry block (block number zero), and be a PHI / live-in value.
1144 // Initialize to PHI value; corresponds to the location's live-in value
1483 // that it defines. It could be an instruction, or a PHI.
1520 // It's actually a PHI value. Which value it is might not be obvious, use
1767 // Second is the debug instruction number of the original PHI.
1826 // we're being fed illegal debug-info. Record an empty PHI, so that any
2321 // Set all machine locations to a PHI value. For transfer function
2425 // any location without a PHI already placed, the location has the same value
2426 // as its predecessors. If a PHI is placed, test to see whether it's now a
2427 // redundant PHI that we can eliminate.
2459 // If we've already eliminated a PHI here, do no further checking, just
2469 // We're now examining a PHI to see whether it's un-necessary. Loop around
2476 // Incoming values agree, continue trying to eliminate this PHI.
2480 // We can also accept a PHI value that feeds back into itself.
2488 // No disagreement? No PHI. Otherwise, leave the PHI in live-ins.
2531 // To avoid repeatedly running the PHI placement algorithm, leverage the
2605 // Install those PHI values into the live-in value array.
2639 // Install those PHI values into the live-in value array.
2693 // the same value once control flow joins, unbeknowns to the PHI placement
2818 // If we have a predecessor not in scope, we'll never find a PHI position.
2835 // An unjoined PHI has no defined locations, and so a shared location must
2913 // because a block can't dominate itself). We can accept as a PHI location
2916 // machine-value PHI locations.
2945 // Return a PHI-value-number for the found location.
3004 // If the old live-in value is not a PHI then either a) no PHI is needed
3005 // here, or b) we eliminated the PHI that was here. If so, we can just
3026 // Try to eliminate this PHI. Do the incoming values all agree?
3755 // reachable from the entry block -- model it as a PHI on entry to this
3865 /// Represents an SSA PHI node for the SSA updater class. Contains the block
3866 /// this PHI is in, the value number it would have, and the expected incoming
3903 /// we need to track the PHI value(s) that we may have observed as necessary
3924 /// SSAUpdater has requested a PHI: create that within this block record.
3939 /// Map of value numbers to PHI records.
3946 /// Machine location where any PHI must occur.
3977 /// the PHI location on entry.
3989 raw_ostream &operator<<(raw_ostream &out, const LDVSSAPhi &PHI) {
3990 out << "SSALDVPHI " << PHI.PHIValNum;
4003 /// It also provides methods to create PHI nodes and track them.
4015 /// Iterator for PHI operands.
4018 LDVSSAPhi *PHI;
4023 : PHI(P), Idx(0) {}
4025 : PHI(P), Idx(PHI->IncomingValues.size()) {}
4034 BlockValueNum getIncomingValue() { return PHI->IncomingValues[Idx].second; }
4036 LDVSSABlock *getIncomingBlock() { return PHI->IncomingValues[Idx].first; }
4039 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
4041 static inline PHI_iterator PHI_end(PhiT *PHI) {
4042 return PHI_iterator(PHI, true);
4059 // representing a PHI into this block.
4065 /// CreateEmptyPHI - Create a (representation of a) PHI in the given block.
4067 /// value number of this PHI is whatever the machine value number problem
4069 /// tries to create a PHI where the incoming values are identical.
4073 LDVSSAPhi *PHI = BB->newPHI(PHIValNum);
4074 Updater->PHIs[PHIValNum] = PHI;
4078 /// AddPHIOperand - Add the specified value as an operand of the PHI for
4080 static void AddPHIOperand(LDVSSAPhi *PHI, BlockValueNum Val, LDVSSABlock *Pred) {
4081 PHI->IncomingValues.push_back(std::make_pair(Pred, Val));
4085 /// is a PHI instruction.
4090 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
4093 LDVSSAPhi *PHI = ValueIsPHI(Val, Updater);
4094 if (PHI && PHI->IncomingValues.size() == 0)
4095 return PHI;
4099 /// GetPHIValue - For the specified PHI instruction, return the value
4101 static BlockValueNum GetPHIValue(LDVSSAPhi *PHI) { return PHI->PHIValNum; }
4162 // Map of which Def or PHI is the current value in each block.
4189 // We have the number for a PHI, or possibly live-through value, to be used
4191 // * Does any PHI use an 'Undef' (like an IMPLICIT_DEF) value? If so, this
4194 // we've left SSA form. Validate that the inputs to each PHI are the
4196 // * Is a PHI we've created actually a merging of values, or are all the
4197 // predecessor values the same, leading to a non-PHI machine value number?
4211 for (auto &PHI : CreatedPHIs)
4212 SortedPHIs.push_back(PHI);
4218 for (auto &PHI : SortedPHIs) {
4219 ValueIDNum ThisBlockValueNum = MLiveIns[PHI->ParentBlock->BB][Loc.asU64()];
4222 for (auto &PHIIt : PHI->IncomingValues) {
4248 ValidatedValues.insert({PHI->ParentBlock, ThisBlockValueNum});