[CSSPGO][llvm-profgen] Continue disassembling after illegal instruction is seen.
authorHongtao Yu <hoy@fb.com>
Tue, 2 Mar 2021 06:34:30 +0000 (22:34 -0800)
committerHongtao Yu <hoy@fb.com>
Wed, 3 Mar 2021 18:14:10 +0000 (10:14 -0800)
commit55356c011b60569668f60a89ddbe2ed76787b313
tree2969a5e4eb756e9aa1d52a1657b07c269048a1d6
parent9d8a3e75b442ad7f5cdcb3c8d5b968d8189f46d2
[CSSPGO][llvm-profgen] Continue disassembling after illegal instruction is seen.

Previously we errored out when disassembling illegal instructions and there would be no profile generated. In fact illegal instructions are not uncommon and we'd better skip them and print "unknown" instead of erroring out. This matches the behavior of llvm-objdump (see disassembleObject in llvm-objdump.cpp).

Reviewed By: wlei, wenlei

Differential Revision: https://reviews.llvm.org/D97776
llvm/tools/llvm-profgen/ProfiledBinary.cpp