[llc/opt] Add an option to run all passes twice
authorKeno Fischer <kfischer@college.harvard.edu>
Fri, 4 Dec 2015 21:56:46 +0000 (21:56 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Fri, 4 Dec 2015 21:56:46 +0000 (21:56 +0000)
commit6f41c1352b5e860ce6fd737f1d69a13f810c0311
treefa12adef1494f2031daa9606ebfffa2a23784a20
parentb590f81c153265bc3ce6173161642b7fbc5b8a1c
[llc/opt] Add an option to run all passes twice

Summary: Lately, I have submitted a number of patches to fix bugs that
only occurred when using the same pass manager to compile multiple
modules (generally these bugs are failure to reset some persistent
state). Unfortunately I don't think there is currently a way to test
that from the command line. This adds a very simple flag to both llc
and opt, under which the tools will simply re-run their respective
pass pipelines using the same pass manager on (a clone of the same
module). Additionally, we verify that both outputs are bitwise the
same.

Reviewers: yaron.keren

Subscribers: loladiro, yaron.keren, kcc, llvm-commits

Differential Revision: http://reviews.llvm.org/D14965

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254774 91177308-0d34-0410-b5e6-96231b3b80d8
test/MC/ELF/empty-twice.ll [new file with mode: 0644]
test/Other/opt-twice.ll [new file with mode: 0644]
tools/llc/llc.cpp
tools/opt/opt.cpp