Lines Matching refs:Value
33 typedef DenseMap<BasicBlock*, Value*> AvailableValsTy;
58 void SSAUpdater::AddAvailableValue(BasicBlock *BB, Value *V) {
66 SmallDenseMap<BasicBlock*, Value*, 8> &ValueMapping) {
81 Value *SSAUpdater::GetValueAtEndOfBlock(BasicBlock *BB) {
82 Value *Res = GetValueAtEndOfBlockInternal(BB);
86 Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) {
94 SmallVector<std::pair<BasicBlock*, Value*>, 8> PredValues;
95 Value *SingularValue = nullptr;
103 Value *PredVal = GetValueAtEndOfBlock(PredBB);
116 Value *PredVal = GetValueAtEndOfBlock(PredBB);
137 // in this block that produces the right value.
139 SmallDenseMap<BasicBlock*, Value*, 8> ValueMapping(PredValues.begin(),
157 // See if the PHI node can be merged to a single value. This can happen in
158 // loop cases when we get a PHI of itself and one other value.
159 if (Value *V =
181 Value *V;
187 // Notify that users of the existing value that it is being replaced.
188 Value *OldVal = U.get();
198 Value *V;
212 typedef Value *ValT;
233 Value *getIncomingValue() { return PHI->getIncomingValue(idx); }
257 /// GetUndefVal - Get an undefined value of the same type as the value
259 static Value *GetUndefVal(BasicBlock *BB, SSAUpdater *Updater) {
265 static Value *CreateEmptyPHI(BasicBlock *BB, unsigned NumPreds,
272 /// AddPHIOperand - Add the specified value as an operand of the PHI for
274 static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
284 /// ValueIsPHI - Check if a value is a PHI.
286 static PHINode *ValueIsPHI(Value *Val, SSAUpdater *Updater) {
292 static PHINode *ValueIsNewPHI(Value *Val, SSAUpdater *Updater) {
299 /// GetPHIValue - For the specified PHI instruction, return the value
301 static Value *GetPHIValue(PHINode *PHI) {
311 Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) {
313 if (Value *V = AvailableVals[BB])
329 const Value *SomeVal;
353 // processing them. Keep track of which loads are loading a live-in value.
356 DenseMap<Value*, Value*> ReplacedLoads;
368 // If it is a store, it is a trivial def of the value in the block.
401 // block is a load, then it uses the live in value. The last store defines
402 // the live out value. We handle this by doing a linear scan of the block.
403 Value *StoredValue = nullptr;
410 // use the stored value.
426 // Remember that this is the active value in the block.
431 // The last stored value that happened is the live-out for the block.
440 Value *NewVal = SSA.GetValueInMiddleOfBlock(ALoad->getParent());
456 // as a live value in the SSAUpdate data structure for a block (e.g. because
457 // the loaded value was stored later). In this case, we need to recursively
458 // propagate the updates until we get to the real value.
460 Value *NewVal = ReplacedLoads[User];
465 // dereference the Value*'s.
466 DenseMap<Value*, Value*>::iterator RLI = ReplacedLoads.find(NewVal);