[BFI] Add a debug check for unknown block queries.
authorHiroshi Yamauchi <yamauchi@google.com>
Mon, 3 Feb 2020 20:22:03 +0000 (12:22 -0800)
committerHiroshi Yamauchi <yamauchi@google.com>
Tue, 4 Feb 2020 18:05:28 +0000 (10:05 -0800)
commit803dd6fe6bb493e34a8747dc286a88aa05f353e1
treef24517a88b941da0a9c29226016dfbc585377091
parentdc42ff6697db1847a6e2f154de07f6e1f3d97ae4
[BFI] Add a debug check for unknown block queries.

Summary:
Add a debug check for frequency queries for unknown blocks (typically blocks
that are created after BFI is computed but their frequencies are not
communicated to BFI.)

This is useful for detecting and debugging missed BFI updates.

This is debug build only and disabled behind a flag.

Reviewers: davidxl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73920
llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp