File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6615,10 +6615,15 @@ const Value *llvm::getUnderlyingObjectAggressive(const Value *V) {
66156615 SmallPtrSet<const Value *, 8 > Visited;
66166616 SmallVector<const Value *, 8 > Worklist;
66176617 Worklist.push_back (V);
6618- const Value *Object = nullptr , *FirstObject = nullptr ;
6618+ const Value *Object = nullptr ;
6619+ // Used as fallback if we can't find a common underlying object through
6620+ // recursion.
6621+ bool First = true ;
6622+ const Value *FirstObject = getUnderlyingObject (V);
66196623 do {
66206624 const Value *P = Worklist.pop_back_val ();
6621- P = getUnderlyingObject (P);
6625+ P = First ? FirstObject : getUnderlyingObject (P);
6626+ First = false ;
66226627
66236628 if (!FirstObject)
66246629 FirstObject = P;
You can’t perform that action at this time.
0 commit comments