[PATCH] D30226: [BranchFolding] Merge debug locations from common tail instead of removing
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 3 15:37:43 PST 2017
aprantl added inline comments.
================
Comment at: lib/CodeGen/BranchFolding.cpp:758
+/// MergeCommonTailDebugLocs - Create merged DebugLocs of identical instructions
+/// across SameTails and assign it to the instruction in common tail.
+void BranchFolder::MergeCommonTailDebugLocs(unsigned commonTailIndex) {
----------------
doxygen comments should be in the header file and not repeat the method name.
================
Comment at: lib/CodeGen/BranchFolding.cpp:763
+ std::vector<MachineBasicBlock::iterator> NextCommonInsts(SameTails.size());
+ for (unsigned int i = 0 ; i != SameTails.size() ; ++i) {
+ if (i != commonTailIndex)
----------------
I think local variables should be captialized.
================
Comment at: lib/CodeGen/BranchFolding.cpp:948
- // Remove the original debug location from the common tail.
- for (auto &MI : *MBB)
- if (!MI.isDebugValue())
- MI.setDebugLoc(DebugLoc());
+ // Merge debug locations across identical instructions for common tail
+ MergeCommonTailDebugLocs(commonTailIndex);
----------------
`.`
https://reviews.llvm.org/D30226
More information about the llvm-commits
mailing list