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
636 // Must be in entry block (block number zero), and be a PHI / live-in value.
1143 // Initialize to PHI value; corresponds to the location's live-in value
1503 // that it defines. It could be an instruction, or a PHI.
1540 // It's actually a PHI value. Which value it is might not be obvious, use
1787 // Second is the debug instruction number of the original PHI.
1846 // we're being fed illegal debug-info. Record an empty PHI, so that any
2339 // Set all machine locations to a PHI value. For transfer function
2443 // any location without a PHI already placed, the location has the same value
2444 // as its predecessors. If a PHI is placed, test to see whether it's now a
2445 // redundant PHI that we can eliminate.
2475 // If we've already eliminated a PHI here, do no further checking, just
2485 // We're now examining a PHI to see whether it's un-necessary. Loop around
2492 // Incoming values agree, continue trying to eliminate this PHI.
2496 // We can also accept a PHI value that feeds back into itself.
2504 // No disagreement? No PHI. Otherwise, leave the PHI in live-ins.
2547 // To avoid repeatedly running the PHI placement algorithm, leverage the
2621 // Install those PHI values into the live-in value array.
2655 // Install those PHI values into the live-in value array.
2709 // the same value once control flow joins, unbeknowns to the PHI placement
2834 // If we have a predecessor not in scope, we'll never find a PHI position.
2851 // An unjoined PHI has no defined locations, and so a shared location must
2929 // because a block can't dominate itself). We can accept as a PHI location
2932 // machine-value PHI locations.
2961 // Return a PHI-value-number for the found location.
3020 // If the old live-in value is not a PHI then either a) no PHI is needed
3021 // here, or b) we eliminated the PHI that was here. If so, we can just
3042 // Try to eliminate this PHI. Do the incoming values all agree?
3769 // reachable from the entry block -- model it as a PHI on entry to this
3879 /// Represents an SSA PHI node for the SSA updater class. Contains the block
3880 /// this PHI is in, the value number it would have, and the expected incoming
3917 /// we need to track the PHI value(s) that we may have observed as necessary
3938 /// SSAUpdater has requested a PHI: create that within this block record.
3953 /// Map of value numbers to PHI records.
3960 /// Machine location where any PHI must occur.
3989 /// the PHI location on entry.
4001 raw_ostream &operator<<(raw_ostream &out, const LDVSSAPhi &PHI) {
4002 out << "SSALDVPHI " << PHI.PHIValNum;
4015 /// It also provides methods to create PHI nodes and track them.
4027 /// Iterator for PHI operands.
4030 LDVSSAPhi *PHI;
4035 : PHI(P), Idx(0) {}
4037 : PHI(P), Idx(PHI->IncomingValues.size()) {}
4046 BlockValueNum getIncomingValue() { return PHI->IncomingValues[Idx].second; }
4048 LDVSSABlock *getIncomingBlock() { return PHI->IncomingValues[Idx].first; }
4051 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
4053 static inline PHI_iterator PHI_end(PhiT *PHI) {
4054 return PHI_iterator(PHI, true);
4071 // representing a PHI into this block.
4077 /// CreateEmptyPHI - Create a (representation of a) PHI in the given block.
4079 /// value number of this PHI is whatever the machine value number problem
4081 /// tries to create a PHI where the incoming values are identical.
4085 LDVSSAPhi *PHI = BB->newPHI(PHIValNum);
4086 Updater->PHIs[PHIValNum] = PHI;
4090 /// AddPHIOperand - Add the specified value as an operand of the PHI for
4092 static void AddPHIOperand(LDVSSAPhi *PHI, BlockValueNum Val, LDVSSABlock *Pred) {
4093 PHI->IncomingValues.push_back(std::make_pair(Pred, Val));
4097 /// is a PHI instruction.
4102 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
4105 LDVSSAPhi *PHI = ValueIsPHI(Val, Updater);
4106 if (PHI && PHI->IncomingValues.size() == 0)
4107 return PHI;
4111 /// GetPHIValue - For the specified PHI instruction, return the value
4113 static BlockValueNum GetPHIValue(LDVSSAPhi *PHI) { return PHI->PHIValNum; }
4174 // Map of which Def or PHI is the current value in each block.
4201 // We have the number for a PHI, or possibly live-through value, to be used
4203 // * Does any PHI use an 'Undef' (like an IMPLICIT_DEF) value? If so, this
4206 // we've left SSA form. Validate that the inputs to each PHI are the
4208 // * Is a PHI we've created actually a merging of values, or are all the
4209 // predecessor values the same, leading to a non-PHI machine value number?
4223 for (auto &PHI : CreatedPHIs)
4224 SortedPHIs.push_back(PHI);
4230 for (auto &PHI : SortedPHIs) {
4231 ValueIDNum ThisBlockValueNum = MLiveIns[PHI->ParentBlock->BB][Loc.asU64()];
4234 for (auto &PHIIt : PHI->IncomingValues) {
4260 ValidatedValues.insert({PHI->ParentBlock, ThisBlockValueNum});