diff options
author | Davide Italiano <davide@freebsd.org> | 2017-07-05 22:28:28 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-07-05 22:28:28 +0000 |
commit | 7dd0694f96ec3e6fd9c05f066e5ae9b706678257 (patch) | |
tree | 8782bc6674a04499ff193129fb07e562d2174d6f /llvm/lib/DebugInfo/CodeView/CodeViewError.cpp | |
parent | cf7347379f00c8a0872207c94ab07595e5db1c5b (diff) | |
download | bcm5719-llvm-7dd0694f96ec3e6fd9c05f066e5ae9b706678257.tar.gz bcm5719-llvm-7dd0694f96ec3e6fd9c05f066e5ae9b706678257.zip |
[GlobalOpt] Remove unreachable blocks before optimizing a function.
LLVM's definition of dominance allows instructions that are cyclic
in unreachable blocks, e.g.:
%pat = select i1 %condition, @global, i16* %pat
because any instruction dominates an instruction in a block that's
not reachable from entry.
So, remove unreachable blocks from the function, because a) there's
no point in analyzing them and b) GlobalOpt should otherwise grow
some more complicated logic to break these cycles.
Differential Revision: https://reviews.llvm.org/D35028
llvm-svn: 307215
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/CodeViewError.cpp')
0 files changed, 0 insertions, 0 deletions