Dan Gohman
7df4b826a1
Fix some places where error messages were being swallowed.
...
llvm-svn: 118464
2010-11-09 01:13:31 +00:00
Mikhail Glushenkov
991857f132
Rename FindExecutable to PrependMainExecutablePath.
...
Makes it more clear that it is just a path manipulation function.
llvm-svn: 118174
2010-11-03 16:14:16 +00:00
Mikhail Glushenkov
5cbf236c6a
80-col violations, trailing whitespace.
...
llvm-svn: 118173
2010-11-03 16:14:07 +00:00
Dan Gohman
3419ae24eb
Check for (unlikely) errors from FindExecutable.
...
llvm-svn: 117658
2010-10-29 16:18:26 +00:00
Dan Gohman
e9b4001854
Fix these error messages to not mention PATH in cases where
...
PATH isn't actually searched, and to not mention the executable
directory when it isn't actually searched.
llvm-svn: 117657
2010-10-29 16:15:23 +00:00
Dan Gohman
90ced5a2ee
Delete this obsolete comment.
...
llvm-svn: 117655
2010-10-29 16:03:34 +00:00
Owen Anderson
46990c17f7
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
...
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Rafael Espindola
aa5448f520
Be more consistent in using ValueToValueMapTy.
...
llvm-svn: 116387
2010-10-13 01:36:30 +00:00
Dan Gohman
6645ce3f75
Move tool_output_file into its own file.
...
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
Michael J. Spencer
90f807fda5
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
...
This reverts commit r113632
Conflicts:
cmake/modules/AddLLVM.cmake
llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer
98ad3f2ea7
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
...
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
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