[PATCH] D27280: [PGO] fix PGO use ICE when there are unreachable BBs
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 13:30:52 PST 2016
xur created this revision.
xur added reviewers: davidxl, vsk.
xur added subscribers: llvm-commits, xur, rob.lougher.
For -O0 there might be unreachable BBs, which breaks the assumption that all the BBs have an auxiliary data structure. In this patch, I change the interface for getBBInfo() so that a nullptr can be returned for the unreachable BBs (and the callers can ignore those BBs).
This fixes the bug reported
https://llvm.org/bugs/show_bug.cgi?id=31209
https://reviews.llvm.org/D27280
Files:
lib/Transforms/Instrumentation/CFGMST.h
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
test/Transforms/PGOProfile/Inputs/unreachable_bb.proftext
test/Transforms/PGOProfile/unreachable_bb.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27280.79802.patch
Type: text/x-patch
Size: 10884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161130/a62eea52/attachment.bin>
More information about the llvm-commits
mailing list