[PATCH] D34085: [PGO] Register promote profile counter updates
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 23:07:25 PDT 2017
davidxl marked an inline comment as done.
davidxl added a comment.
Added one more test case to show the merged live-in values from multiple predecessors in the loop.
================
Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:170
+ Instruction *InsertPos = InsertPts[i];
+ Value *LiveInValue = SSA.GetValueInMiddleOfBlock(ExitBlock);
+ Value *Addr = cast<StoreInst>(Store)->getPointerOperand();
----------------
vsk wrote:
> This may be a basic question, but.. why is it that SSA.GetValueInMiddleOfBlock(ExitBlock) gives the right increment, coming from the promoted counter for {L, S}? It may help to have a short comment about this for readers who are unfamiliar with SSAUpdater (like me).
Added a comment. The name of the API is a little misleading -- it really means getting the LiveIn value (from the promoted counter stores) to the exit block.
https://reviews.llvm.org/D34085
More information about the llvm-commits
mailing list