aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2022-03-29 17:20:12 +0000
committerPaul Kirth <paulkirth@google.com>2022-03-31 17:38:21 +0000
commit46774df307159444d65083c2fd82f8574f0ab1d9 (patch)
treef8ffbe79bc649e116207e735120faefb89fd9394 /lldb/source/Commands/CommandObjectMemory.cpp
parent7641e42def02f228dc9e907094353c3ac55d5226 (diff)
downloadllvm-46774df307159444d65083c2fd82f8574f0ab1d9.zip
llvm-46774df307159444d65083c2fd82f8574f0ab1d9.tar.gz
llvm-46774df307159444d65083c2fd82f8574f0ab1d9.tar.bz2
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata. New checks rely on 2 invariants: 1) For frontend instrumentation, MD_prof branch_weights will always be populated before llvm.expect intrinsics are lowered. 2) for IR and sample profiling, llvm.expect intrinsics will always be lowered before branch_weights are populated from the IR profiles. These invariants allow the checking to assume how the existing branch weights are populated depending on the profiling method used, and emit the correct diagnostics. If these invariants are ever invalidated, the MisExpect related checks would need to be updated, potentially by re-introducing MD_misexpect metadata, and ensuring it always will be transformed the same way as branch_weights in other optimization passes. Frontend based profiling is now enabled without using LLVM Args, by introducing a new CodeGen option, and checking if the -Wmisexpect flag has been passed on the command line. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D115907
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
0 files changed, 0 insertions, 0 deletions