summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/lambda-notes.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-09-11 18:38:34 +0000
committerVedant Kumar <vsk@apple.com>2018-09-11 18:38:34 +0000
commit727d89526efba8fea09ef2ffcb83f4952e852894 (patch)
tree58ef3c06715078828b585675369c1aeed13864ce /clang/test/Analysis/lambda-notes.cpp
parente9cc5451293b36ef5f0c0d499db5b86c10895208 (diff)
downloadbcm5719-llvm-727d89526efba8fea09ef2ffcb83f4952e852894.tar.gz
bcm5719-llvm-727d89526efba8fea09ef2ffcb83f4952e852894.zip
[gcov] Fix branch counters with switch statements (fix PR38821)
Right now, the counters are added in regards of the number of successors for a given BasicBlock: it's good when we've only 1 or 2 successors (at least with BranchInstr). But in the case of a switch statement, the BasicBlock after switch has several predecessors and we need know from which BB we're coming from. So the idea is to revert what we're doing: add a PHINode in each block which will select the counter according to the incoming BB. They're several pros for doing that: - we fix the "switch" bug - we remove the function call to "__llvm_gcov_indirect_counter_increment" and the lookup table stuff - we replace by PHINodes, so the optimizer will probably makes a better job. Patch by calixte! Differential Revision: https://reviews.llvm.org/D51619 llvm-svn: 341977
Diffstat (limited to 'clang/test/Analysis/lambda-notes.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud