diff options
author | Philip Reames <listmail@philipreames.com> | 2015-03-10 22:52:37 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2015-03-10 22:52:37 +0000 |
commit | 71c4035c18a9f008fd2b946c990f0da00754b1a5 (patch) | |
tree | cad17f7cb50c9f6d561efe9d750af20157ec144a /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 857b4434df18a6ebcf26eebbb5daaace54b237a2 (diff) | |
download | llvm-71c4035c18a9f008fd2b946c990f0da00754b1a5.zip llvm-71c4035c18a9f008fd2b946c990f0da00754b1a5.tar.gz llvm-71c4035c18a9f008fd2b946c990f0da00754b1a5.tar.bz2 |
If a conditional branch jumps to the same target, remove the condition
Given that large parts of inst combine is restricted to instructions which have one use, getting rid of a use on the condition can help the effectiveness of the optimizer. Also, it allows the condition to potentially be deleted by instcombine rather than waiting for another pass.
I noticed this completely by accident in another test case. It's not anything that actually came from a real workload.
p.s. We should probably do the same thing for switch instructions.
Differential Revision: http://reviews.llvm.org/D8220
llvm-svn: 231881
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
0 files changed, 0 insertions, 0 deletions