[PATCH] D28521: [DebugInfo] Handle same locations in DILocation::getMergedLocation
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 09:46:51 PST 2017
aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.
Added a couple of inline comments. LGTM with these changes applied.
================
Comment at: include/llvm/IR/DebugInfoMetadata.h:1303
+ getColumn() != RHS.getColumn() ||
+ getDiscriminator() != RHS.getDiscriminator();
}
----------------
I would reorder these conditions so the most common mismatches come first.
Perhaps: Line, Column, Discriminator, Filename, Directory?
================
Comment at: lib/Transforms/InstCombine/InstCombinePHI.cpp:32
auto *FirstInst = cast<Instruction>(PN.getIncomingValue(0));
- DILocation *Loc = FirstInst->getDebugLoc();
+ const DILocation *Loc = FirstInst->getDebugLoc();
----------------
This should be a separate NFC commit. No need to review it.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1579
// "common" instruction and iteratively merge each location in the loop below.
- DILocation *Loc = I0->getDebugLoc();
+ const DILocation *Loc = I0->getDebugLoc();
----------------
separate commit please
https://reviews.llvm.org/D28521
More information about the llvm-commits
mailing list