[PATCH] D70994: [dsymutil] Remove final recursive call in lookForChildDIEsToKeep (NFC)
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 09:41:57 PST 2019
aprantl added inline comments.
================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:1049
- // Keep a module forward declaration if there is no definition.
- if (!(isODRAttribute(AttrSpec.Attr) && Info.Ctxt &&
- Info.Ctxt->getCanonicalDIEOffset()))
- Info.Prune = false;
- ReferencedDIEs.emplace_back(RefDie, *ReferencedCU);
- }
- }
+ bool UseOdr = (Current.Flags & TF_DependencyWalk) ? (Current.Flags & TF_ODR)
+ : Current.CU.hasODR();
----------------
Comment please.
================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:1054
- // Add referenced DIEs in reverse order to the worklist to effectively
- // process them in order.
- for (auto& P : reverse(ReferencedDIEs)) {
- // Add a worklist item before every child to calculate incompleteness right
- // after the current child is processed.
- uint32_t RefIdx = P.second.getOrigUnit().getDIEIndex(P.first);
- CompileUnit::DIEInfo &Info = P.second.getInfo(RefIdx);
- Worklist.emplace_back(Current.Die, Current.CU, WorklistItemType::UpdateRefIncompleteness, &Info);
- Worklist.emplace_back(P.first, P.second, TF_Keep | TF_DependencyWalk | ODRFlag);
- }
+ // Now schedule the parent walk.
+ Worklist.emplace_back(MyInfo.ParentIdx, Current.CU, ParFlags);
----------------
Do we ever explain what a parent walk and the other types of jobs we schedule is? This would be really helpful for future understanding.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70994/new/
https://reviews.llvm.org/D70994
More information about the llvm-commits
mailing list