Dan Gohman
f9e09104f1
Make tool_output_file's raw_ostream instance a member variable instead
...
of a base class.
This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.
llvm-svn: 112706
2010-09-01 14:20:41 +00:00
Duncan Sands
604b706b87
Straighten out any triple strings passed on the command line before
...
they hit the rest of the system.
llvm-svn: 112344
2010-08-28 01:30:02 +00:00
Chris Lattner
a97cbccf90
Apply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",
...
patch by NAKAMURA Takumi!
llvm-svn: 111929
2010-08-24 17:44:07 +00:00
Dan Gohman
d8be4c4aca
Convert tools to use tool_output_file, and introduce error
...
checking to places which previously lacked it.
llvm-svn: 111651
2010-08-20 16:59:15 +00:00
Rafael Espindola
c90e97f163
Use RunPassesOn as in the rest of bugpoint.
...
llvm-svn: 110682
2010-08-10 15:46:11 +00:00
Rafael Espindola
d25e9dbc11
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
llvm-svn: 110555
2010-08-08 22:14:20 +00:00
Rafael Espindola
a2e8c6383e
Most of bugpoint now only needs to know the pass names.
...
llvm-svn: 110534
2010-08-08 03:55:08 +00:00
Rafael Espindola
48fc63ad76
Try to fix cmake build.
...
llvm-svn: 110528
2010-08-08 00:50:57 +00:00
Rafael Espindola
0236b41a5e
Run opt instead of bugpoint itself.
...
llvm-svn: 110524
2010-08-07 23:03:21 +00:00
Rafael Espindola
5579525578
Move the bugpoint test passes to a plugin in preparation for having bugpoint
...
use opt.
llvm-svn: 110520
2010-08-07 21:48:09 +00:00
Owen Anderson
f2fea95f2f
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb
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.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Bob Wilson
74157ac156
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
llvm-svn: 110341
2010-08-05 16:26:32 +00:00
Rafael Espindola
3ef1be0f0a
Run opt instead of bugpoint itself.
...
Fixes PR753.
llvm-svn: 110333
2010-08-05 15:25:38 +00:00
Rafael Espindola
ca885492ab
Add const to compileProgram and to the various test functions in CrashDebugger.
...
llvm-svn: 110306
2010-08-05 03:00:22 +00:00
Rafael Espindola
0755ad0602
Add a Module argument to the remaining runPasses methods and mark getContext
...
const.
llvm-svn: 110300
2010-08-05 02:16:32 +00:00
Rafael Espindola
e580313f9e
Make EmitProgressBitcode const and add a Module argument to runPasses. Use
...
that argument to simplify runPassesOn.
llvm-svn: 110291
2010-08-05 00:29:04 +00:00
Rafael Espindola
b74919778f
Add const to some methods and change TestMergedProgram to return the merged
...
module and take a const BugDriver.
llvm-svn: 109951
2010-07-31 14:34:49 +00:00
Rafael Espindola
75734bc143
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.
llvm-svn: 109936
2010-07-31 00:32:17 +00:00
Rafael Espindola
ba90b65153
Add a Program argument to diffProgram to avoid a use of swapProgramIn.
...
llvm-svn: 109859
2010-07-30 14:19:00 +00:00
Duncan Sands
07cc85fd7c
Do not pass a copy of the value map, pass a reference to it.
...
llvm-svn: 109852
2010-07-30 05:50:45 +00:00
Rafael Espindola
6401c853ee
Make the test while reducing blocks functional. This avoids accessing freed
...
memory when one of the original BB is destroyed.
llvm-svn: 109747
2010-07-29 14:20:59 +00:00
Jakob Stoklund Olesen
6a7ab2405c
Use the right gcc tool args for IsARMArchitecture.
...
llvm-svn: 109714
2010-07-29 00:52:16 +00:00
Rafael Espindola
a618c1e4ec
Instead of abusing swapProgramIn, just add a Module argument to
...
EmitProgressBitcode.
llvm-svn: 109602
2010-07-28 18:12:30 +00:00
Rafael Espindola
3a92982732
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.
llvm-svn: 109387
2010-07-26 00:07:51 +00:00
Rafael Espindola
0b77450ebf
Revert unintended white space change.
...
llvm-svn: 109364
2010-07-24 23:05:45 +00:00
Rafael Espindola
f380957779
Fix a trivial use after free.
...
llvm-svn: 109363
2010-07-24 23:02:11 +00:00
Owen Anderson
5f218b8612
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.
llvm-svn: 108818
2010-07-20 08:26:15 +00:00
Owen Anderson
cf625d0179
Reapply r108794, a fix for the failing test from last time.
...
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar
3280e3aebf
Revert r108794, "Separate PassInfo into two classes: a constructor-free
...
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.
llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson
3502f9a91b
Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
...
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Duncan Sands
f7b98e2b1e
Convert some tab stops into spaces.
...
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Devang Patel
0c927a80fe
Use ValueMap instead of DenseMap.
...
The ValueMapper used by various cloning utility maps MDNodes also.
llvm-svn: 106706
2010-06-24 00:33:28 +00:00
Rafael Espindola
cf8f391d49
Save more temps with -save-temps.
...
llvm-svn: 106409
2010-06-21 02:17:36 +00:00
Dan Gohman
96649dea39
Run dead type elimination after dead argument elimination.
...
llvm-svn: 105552
2010-06-07 20:28:37 +00:00
Dan Gohman
94bc7c650c
Use ->isVoidTy().
...
llvm-svn: 105550
2010-06-07 20:19:26 +00:00
Dan Gohman
a4614e30ec
No need to special-case structs here; structs are first-class now.
...
llvm-svn: 105513
2010-06-05 00:42:29 +00:00
Dan Gohman
b03730d276
No need to special-case structs here; structs are first-class now.
...
llvm-svn: 105442
2010-06-04 00:18:06 +00:00
Dan Gohman
6163340daf
Eliminate some unnessary Path::exists() calls.
...
llvm-svn: 104888
2010-05-27 20:51:54 +00:00
Duncan Sands
f2bec8edf6
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.
llvm-svn: 104485
2010-05-24 07:49:55 +00:00
Jakob Stoklund Olesen
ed8dd53c85
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.
llvm-svn: 103721
2010-05-13 17:58:15 +00:00
Jeffrey Yasskin
6768d483a0
Fix PR6951 by fixing Module leaks in bugpoint.
...
llvm-svn: 103523
2010-05-11 23:25:16 +00:00
Kalle Raiskila
482cc7f93a
Add command line option --gcc to bugpoint.
...
Remove sending duplicate of the --gcc-tool-args parameters to gcc.
llvm-svn: 103397
2010-05-10 07:38:37 +00:00
Nick Lewycky
31e338dba8
The llc -f flag was removed.
...
llvm-svn: 102670
2010-04-29 23:37:44 +00:00
Nick Lewycky
3720e3e45f
Don't forget cmake!
...
llvm-svn: 101234
2010-04-14 05:35:20 +00:00
Nick Lewycky
2874312841
Remove accidentally committed cruft.
...
llvm-svn: 101230
2010-04-14 04:46:11 +00:00
Nick Lewycky
396b2fc686
Bugpoint no longer uses exceptions.
...
llvm-svn: 101228
2010-04-14 04:40:31 +00:00
Benjamin Kramer
033019690a
Boolify.
...
llvm-svn: 101035
2010-04-12 12:22:19 +00:00
Nick Lewycky
096fd1e0a6
Remove use of exceptions from bugpoint. No deliberate functionality change!
...
llvm-svn: 101013
2010-04-12 05:08:25 +00:00
Nick Lewycky
87bd8ff991
Remove dead argument and clean whitespace. No functionality change.
...
llvm-svn: 100954
2010-04-10 23:18:13 +00:00
Dan Gohman
7f76052c8c
Trim #includes.
...
llvm-svn: 99416
2010-03-24 19:56:17 +00:00
Jeffrey Yasskin
94ecd53a3a
Free all Constants in ~LLVMConstantImpl. We avoid assertion failures
...
by dropping all references from all constants that can use other
constants before trying to destroy any of them.
I also had to free bugpoint's Module in ~BugDriver().
llvm-svn: 99160
2010-03-22 05:23:37 +00:00
Jeffrey Yasskin
16289314f6
Bugpoint's default memory limit (100MB) was too low for valgrind, so
...
this patch raises the default to 800MB when valgrind's active. 800
was chosen semi-arbitrarily.
llvm-svn: 98905
2010-03-19 00:09:28 +00:00
Chris Lattner
75c1269e40
add support for bugpointing the integrated assembler. Something like this
...
works for me: bugpoint Output/bisort.llvm.bc -run-llc-ia -safe-run-llc
This uses llc with the integrated assembler as the test compiler and llc
without it as the safe compiler.
llvm-svn: 98618
2010-03-16 06:41:47 +00:00
Duncan Sands
1b33dd3c83
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Benjamin Kramer
3b01285b76
Replace strcpy with memcpy when we have the length around anyway.
...
llvm-svn: 94746
2010-01-28 18:04:38 +00:00
Chris Lattner
6a28d54192
remove obsolete comment.
...
llvm-svn: 93661
2010-01-16 21:34:51 +00:00
Chris Lattner
98a02fecdc
bugpoint doesn't need the mangler at all. DisambiguateGlobalSymbols
...
dates to a time when two different LLVM values could have the same
name but different types. Simplify it to just assign names to unnamed
things and let the core symtab resolve duplicates.
llvm-svn: 93660
2010-01-16 21:34:01 +00:00
Chris Lattner
b8765fdca1
switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
...
llvm-svn: 93643
2010-01-16 18:12:14 +00:00
Duncan Sands
bfb85b9a67
Make bugpoint pass -load arguments to LLI. This lets one use bugpoint with
...
programs that depend on native shared libraries. Patch by Timo Lindfors.
llvm-svn: 89087
2009-11-17 10:20:22 +00:00
Benjamin Kramer
da70783da7
Add compare_lower and equals_lower methods to StringRef. Switch all users of
...
StringsEqualNoCase (from StringExtras.h) to it.
llvm-svn: 87020
2009-11-12 20:36:59 +00:00
Duncan Sands
2400ad7236
Introduce and use convenience methods for getting pointer types
...
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
llvm-svn: 83379
2009-10-06 15:40:36 +00:00
Nick Lewycky
3b7df4bbd5
Remove the default value for ConstantStruct::get's isPacked parameter and
...
update the code which was broken by this.
llvm-svn: 82327
2009-09-19 20:30:26 +00:00
Daniel Dunbar
072b03693f
Add -output-prefix option to bugpoint (to change the default output name).
...
llvm-svn: 81154
2009-09-07 19:26:11 +00:00
Dan Gohman
3727dda74f
Make bugpoint use ParseIRFile instead of doing the same thing manually.
...
llvm-svn: 80927
2009-09-03 16:32:58 +00:00
Chris Lattner
2081eaa21d
only print the override triple if it exists!
...
llvm-svn: 80534
2009-08-31 03:22:35 +00:00
Dan Gohman
53f0d68f87
Make LLVM command-line tools overwrite their output files without -f.
...
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".
Add a -f option to llvm-extract and llvm-link, for consistency.
Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.
Update Makefiles and documentation accordingly.
llvm-svn: 79990
2009-08-25 15:34:52 +00:00
Chris Lattner
39262eb119
prune the #includes in raw_ostream.h by moving a
...
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.
llvm-svn: 79885
2009-08-24 03:52:50 +00:00
Chris Lattner
3203639c35
Prune #includes from llvm/Linker.h and llvm/System/Path.h,
...
forcing them down into various .cpp files.
This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
instead.
4. Weans llvm-db off <iostream>
sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.
llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Chris Lattner
d6a9cc484b
eliminate the ostream version of CheckBitcodeOutputToConsole,
...
change the raw_ostream one to take the raw_ostream byref instead
of byptr. Prune #includes, eliminate a use of Streams.h
llvm-svn: 79863
2009-08-23 21:36:09 +00:00
Chris Lattner
b0478019b4
eliminate the std::ostream forms of the bitcode writing APIs.
...
llvm-svn: 79840
2009-08-23 07:49:08 +00:00
Chris Lattner
f16d8ade4f
Change raw_fd_ostream to take flags as an optional bitmask
...
instead of as two bools. Use this to add a F_Append flag
which has the obvious behavior.
Other unrelated changes conflated into this patch:
1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
(Which is the thing that needed append in the first place).
llvm-svn: 79807
2009-08-23 02:51:22 +00:00
Benjamin Kramer
edbfae6370
Proper MSVC build fix (and remove my hack again). Patch by Yonggang Luo.
...
llvm-svn: 79418
2009-08-19 12:38:51 +00:00
Benjamin Kramer
deadf72086
Add a hack to unbreak MSVC builds. str(n)casecmp are POSIX functions and aren't available on windows (mingw defines them though).
...
llvm-svn: 79417
2009-08-19 12:16:17 +00:00
Nick Lewycky
6e6623b451
Include valgrind in the steps to reproduce if valgrind was used to reproduce
...
the problem.
llvm-svn: 79322
2009-08-18 06:08:01 +00:00
Daniel Dunbar
fd368c900e
Change bugpoint to use Triple to make runtime decisions.
...
- This is cleaner, and makes bugpoint match the host instead of the build
architecture.
- Patch by Sandeep Patel!
llvm-svn: 79309
2009-08-18 03:35:57 +00:00
Owen Anderson
9df206d02d
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Benjamin Kramer
9a590500ea
Make LLVMContext and LLVMContextImpl classes instead of structs.
...
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Daniel Dunbar
3123a37b69
MSVC warning fixes; patch by Stein Roger!
...
llvm-svn: 78405
2009-08-07 20:50:09 +00:00
Owen Anderson
3d0e1b855d
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
...
llvm-svn: 78258
2009-08-05 23:16:16 +00:00
Dan Gohman
7cc0d1906c
Use (void *)(intptr_t) to cast function addresses to void*
...
for use with sys::Path::GetMainExecutable, to avoid warnings
with -pedantic.
llvm-svn: 78245
2009-08-05 21:03:39 +00:00
Dan Gohman
ba72f59923
Fix FindExecutable to use sys::Path::GetMainExecutable instead of
...
just argv[0]. And remove the code for searching the current
working directory and for searching PATH; the point of FindExecutable
is not to find whatever version of the executable can be found by
searching around, but to find an executable that accompanies the
current executable.
Update the tools to use sys::Program::FindProgramByName when they
want PATH searching.
llvm-svn: 78240
2009-08-05 20:21:17 +00:00
Anton Korobeynikov
2a248f19bf
Pass user only if it's non-empty. Patch by Sandeep.
...
llvm-svn: 78184
2009-08-05 09:32:53 +00:00
Anton Korobeynikov
49930d2542
Add save-temps option to bugpoint to keep temporary stuff.
...
Patch by Sandeep Patel
llvm-svn: 78183
2009-08-05 09:32:10 +00:00
Owen Anderson
cf2c39dc30
Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
...
not hideous. Also, fix some MSVC compile errors.
llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Owen Anderson
1dc40e205b
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
...
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Owen Anderson
93ccaf5c60
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Owen Anderson
881d928f9b
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson
0ce2151b36
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
David Goodwin
c51f0caa9d
Add a bugpoint flag to disable block extraction.
...
llvm-svn: 77389
2009-07-28 23:08:36 +00:00
Owen Anderson
aa8c94b051
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Dan Gohman
839f148e82
Pass true to the Internalize parameter of createStandardLTOPasses,
...
to match llvm-ld's default behavior.
llvm-svn: 77273
2009-07-27 23:23:47 +00:00
Owen Anderson
d729f993b8
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Daniel Dunbar
3e85b410ab
Remove Value::setName(const char*, unsigned).
...
llvm-svn: 77100
2009-07-26 00:34:27 +00:00
Owen Anderson
cc33e89571
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Daniel Dunbar
e3fea713f1
Switch to getNameStr().
...
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Owen Anderson
cc287b28c9
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Evan Cheng
64b75885a0
80 col violation.
...
llvm-svn: 76629
2009-07-21 19:25:09 +00:00
David Goodwin
b7182681cf
For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
...
llvm-svn: 76432
2009-07-20 17:15:03 +00:00