aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorShe Dongrui <dongrui.she@intel.com>2023-01-25 09:52:48 -0800
committerAdrian Prantl <aprantl@apple.com>2023-01-25 10:05:27 -0800
commita253a0bbe5ece7795633f8abeba7786e98a3e875 (patch)
treefa9c99d07ccdf10e8fa7a63dfa9f0bee1a7ab621 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parent490555026821db47d1cf4bf08c219b3e56ec6b45 (diff)
downloadllvm-a253a0bbe5ece7795633f8abeba7786e98a3e875.zip
llvm-a253a0bbe5ece7795633f8abeba7786e98a3e875.tar.gz
llvm-a253a0bbe5ece7795633f8abeba7786e98a3e875.tar.bz2
Avoid removing useful loop metadata when stripping debug info
The stripDebugLocFromLoopID() may mistakenly remove useful metadata nodes when they are operands of a child node, which also has DILocation operands. It can be reproduced by the output of clang for code similar to the following: for(int i = 0; i < n; i++) x[i] = 10; -strip-debug removes the child node of llvm.loop.vectorize.followup_all, which contains llvm.loop.isvectorized and llvm.loop.unroll.count. This patch fixes by checking all children nodes and only remove a metadata node if all its children are DILocation. Differential Revision: https://reviews.llvm.org/D141909
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions