Commit Graph

582 Commits

Author SHA1 Message Date
Chris Lattner
a69e6701a4 Apply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",
patch by NAKAMURA Takumi!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111929 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:44:07 +00:00
Dan Gohman
f29140106f Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:59:15 +00:00
Rafael Espindola
866aa0d742 Use RunPassesOn as in the rest of bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 15:46:11 +00:00
Rafael Espindola
ec62d53736 Add a opt-args option that can be used to pass arguments to every opt
invocation. Fixes PR7793:

bugpoint -debug test.ll --opt-args -unroll-count=4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110555 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-08 22:14:20 +00:00
Rafael Espindola
8261dfed05 Most of bugpoint now only needs to know the pass names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110534 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-08 03:55:08 +00:00
Rafael Espindola
6b01837b65 Try to fix cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-08 00:50:57 +00:00
Rafael Espindola
7f99f74b7f Run opt instead of bugpoint itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 23:03:21 +00:00
Rafael Espindola
3cb96268c4 Move the bugpoint test passes to a plugin in preparation for having bugpoint
use opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 21:48:09 +00:00
Owen Anderson
90c579de5a Reapply r110396, with fixes to appease the Linux buildbot gods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 18:33:48 +00:00
Owen Anderson
1f74590e9d Revert r110396 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 00:23:35 +00:00
Owen Anderson
9ccaf53ada Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:42:04 +00:00
Bob Wilson
b8be03b0e4 Revert bugpoint change due to buildbot breakage.
--- Reverse-merging r110333 into '.':
U    tools/bugpoint/BugDriver.h
U    tools/bugpoint/OptimizerDriver.cpp
U    tools/bugpoint/bugpoint.cpp
U    tools/bugpoint/BugDriver.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 16:26:32 +00:00
Rafael Espindola
d02dc8d096 Run opt instead of bugpoint itself.
Fixes PR753.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 15:25:38 +00:00
Rafael Espindola
248d1c65f1 Add const to compileProgram and to the various test functions in CrashDebugger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 03:00:22 +00:00
Rafael Espindola
5d8cace94a Add a Module argument to the remaining runPasses methods and mark getContext
const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 02:16:32 +00:00
Rafael Espindola
ca356afe09 Make EmitProgressBitcode const and add a Module argument to runPasses. Use
that argument to simplify runPassesOn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 00:29:04 +00:00
Rafael Espindola
13793264e7 Add const to some methods and change TestMergedProgram to return the merged
module and take a const BugDriver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 14:34:49 +00:00
Rafael Espindola
d720670393 The BlockExtractorPass() constructor was not reading the BlockFile and that was
exactly what bugpoint expected it to do.

There was also only one user of
BlockExtractorPass(const std::vector<BasicBlock*> &B), so just remove it and
make BlockExtractorPass read BlockFile.

This fixes bugpoint's block extraction.

Nick, please review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 00:32:17 +00:00
Rafael Espindola
10757dd8e1 Add a Program argument to diffProgram to avoid a use of swapProgramIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109859 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 14:19:00 +00:00
Duncan Sands
80a098583b Do not pass a copy of the value map, pass a reference to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 05:50:45 +00:00
Rafael Espindola
115a932eb9 Make the test while reducing blocks functional. This avoids accessing freed
memory when one of the original BB is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 14:20:59 +00:00
Jakob Stoklund Olesen
887b703d22 Use the right gcc tool args for IsARMArchitecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 00:52:16 +00:00
Rafael Espindola
bae1b71cbb Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109602 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 18:12:30 +00:00
Rafael Espindola
84ae206c97 Clone and restore the module being reduced in
ReduceMiscompilingFunctions::TestFuncs. This makes the test functional
(i.e., no side effects).

Before we would end up using dead functions if a pass decided to remove them
(inline for example) and we would also keep broken functions and conclude that
that a single function was enough to reproduce the bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 00:07:51 +00:00
Rafael Espindola
b30cdd830b Revert unintended white space change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 23:05:45 +00:00
Rafael Espindola
97595eb05c Fix a trivial use after free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 23:02:11 +00:00
Owen Anderson
8be3291f59 Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 08:26:15 +00:00
Owen Anderson
9e081004da Reapply r108794, a fix for the failing test from last time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 06:52:42 +00:00
Daniel Dunbar
e8a469cdb4 Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 03:06:07 +00:00
Owen Anderson
8ba15cb709 Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 01:19:58 +00:00
Duncan Sands
3472766f9e Convert some tab stops into spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 08:16:59 +00:00
Devang Patel
e9916a302f Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 00:33:28 +00:00
Rafael Espindola
bc2ed599e8 Save more temps with -save-temps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-21 02:17:36 +00:00
Dan Gohman
d0a6a8ca31 Run dead type elimination after dead argument elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105552 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 20:28:37 +00:00
Dan Gohman
e49a13e726 Use ->isVoidTy().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 20:19:26 +00:00
Dan Gohman
70972bb5cd No need to special-case structs here; structs are first-class now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-05 00:42:29 +00:00
Dan Gohman
b304ba94db No need to special-case structs here; structs are first-class now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105442 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-04 00:18:06 +00:00
Dan Gohman
d27047f87d Eliminate some unnessary Path::exists() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 20:51:54 +00:00
Duncan Sands
4139630212 Apply timeouts and memory limits in more places. In particular, when
bugpoint does "Running the code generator to test for a crash" this
gets you a crash if llc goes into an infinite loop or uses up vast
amounts of memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-24 07:49:55 +00:00
Jakob Stoklund Olesen
18e05b4692 Fix complete badness in bugpoint's IsARMArchitecture() function.
The revision history for this function is interesting, with multiple layers of
wrongness being introduced one at a time.

This fixes a weird issue where bugpoint -run-llc would suddenly exit 13 half way
through isolating a miscompilation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103721 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 17:58:15 +00:00
Jeffrey Yasskin
6865f29fe7 Fix PR6951 by fixing Module leaks in bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 23:25:16 +00:00
Kalle Raiskila
faa95763eb Add command line option --gcc to bugpoint.
Remove sending duplicate of the --gcc-tool-args parameters to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 07:38:37 +00:00
Nick Lewycky
8d0e1bcc92 The llc -f flag was removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 23:37:44 +00:00
Nick Lewycky
ac1a379499 Don't forget cmake!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 05:35:20 +00:00
Nick Lewycky
d4ef4df939 Remove accidentally committed cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:46:11 +00:00
Nick Lewycky
ac15da6705 Bugpoint no longer uses exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:40:31 +00:00
Benjamin Kramer
2706387d37 Boolify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 12:22:19 +00:00
Nick Lewycky
22ff748712 Remove use of exceptions from bugpoint. No deliberate functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 05:08:25 +00:00
Nick Lewycky
16350f8d00 Remove dead argument and clean whitespace. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 23:18:13 +00:00
Dan Gohman
51ecc389a9 Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 19:56:17 +00:00