[PATCH] D43324: WIP: [Utils] Salvage debug info of DCE'ed extractvalue instructions
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 14:40:15 PST 2018
aprantl added inline comments.
================
Comment at: lib/Transforms/Utils/Local.cpp:1601
+ // Rewrite the extractvalue by shifting away the unrelated bits of the
+ // aggregate operand.
+ Value *Agg = EVI->getAggregateOperand();
----------------
Can you add a comment explaining why this is safe? I.e., because the size of the variable being described implicitly masks out the upper bits of the value..
================
Comment at: lib/Transforms/Utils/Local.cpp:1605
+ unsigned FieldOffset = 0;
+ for (unsigned I = 0, E = FieldIndices.size(); I < E; ++I) {
+ Type *IndexedTy = ExtractValueInst::getIndexedType(
----------------
Why does this loop go all the way to FieldIndices.size()?
https://reviews.llvm.org/D43324
More information about the llvm-commits
mailing list