Tobias Grosser
001e8a9350
Execute all Pass Printers even if -quiet is set.
...
Follow the same logic in the LoopPass, ModulePass and CallGraphSCCPass printers,
as it was already used in the BasicBlockPass and FunctionPass printers. This is
more consistent.
The other option would have been to completely disable dumping the analysis
information. However, as this information is the only information printed if the
-analysis flag is set, calling opt would not do anything at all.
llvm-svn: 113360
2010-09-08 15:02:51 +00:00
Tobias Grosser
184dc25d98
Include original pass name in the PassPrinter's name.
...
llvm-svn: 113359
2010-09-08 15:02:47 +00:00
Chris Lattner
0bae45de26
cleanups: mark stuff static, only tagdecls should be in anon namespaces.
...
llvm-svn: 113120
2010-09-05 21:25:43 +00:00
Bill Wendling
6e035f9f03
Quiesce warning about non-virtual d'tor in virtual class.
...
llvm-svn: 112991
2010-09-03 18:41:20 +00:00
Chris Lattner
ee42f75f8b
add a new "llvm-dis -show-annotations" option, which causes it to print
...
#uses comments, with a testcase.
llvm-svn: 112906
2010-09-02 23:21:44 +00:00
Chris Lattner
0f0c0967e4
lets get crazy and name the header file the exact class name,
...
not a scrunched version of it.
llvm-svn: 112904
2010-09-02 23:09:42 +00:00
Chris Lattner
a06feeb64b
AsmPrinter has a formatted stream, pass it down through AsmAnnotationWriter
...
llvm-svn: 112903
2010-09-02 23:07:12 +00:00
Mikhail Glushenkov
486aba548f
llvmc: .dylib support.
...
llvm-svn: 112818
2010-09-02 14:06:21 +00:00
Nick Lewycky
7d3f15bab3
Fix compile errors.
...
llvm-svn: 112808
2010-09-02 05:44:31 +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
Michael J. Spencer
ab565264fa
Cleanup Whitespace.
...
llvm-svn: 112587
2010-08-31 06:36:46 +00:00
Dan Gohman
36b6dc3bc1
Fix llc to run the verifier once, not twice.
...
llvm-svn: 112532
2010-08-30 21:41:20 +00:00
Chris Lattner
0643b5f1f1
tidy up
...
llvm-svn: 112385
2010-08-28 20:34:35 +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
Michael J. Spencer
642401a697
Fix the msvs 2010 build.
...
The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.
This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.
llvm-svn: 112257
2010-08-27 02:49:45 +00:00
Devang Patel
83384fcb5c
Fix prototypes.
...
llvm-svn: 112200
2010-08-26 17:47:45 +00:00
Oscar Fuentes
10d63be9fe
Updated CMake library dependencies. Removed unnecessary component name
...
from llvm-link/CMakeLists.txt
llvm-svn: 112153
2010-08-26 02:29:53 +00:00
Dan Gohman
c7605a66b7
Rewrite ExtractGV, removing a bunch of stuff that didn't fully work,
...
and was over-complicated, and replacing it with a simple implementation.
llvm-svn: 112120
2010-08-26 00:22:55 +00:00
Dan Gohman
f33b3bf2d0
Convert llvm-extract to use lazy loading. This makes it substantially
...
faster on large modules.
llvm-svn: 112110
2010-08-25 23:33:07 +00:00
Dan Gohman
6300d80566
lto_codegen_set_gcc_path was removed.
...
llvm-svn: 112069
2010-08-25 18:37:04 +00:00
Dan Gohman
1c0c6f568f
Fix a few missing entries in lto.exports.
...
llvm-svn: 112068
2010-08-25 18:22:12 +00:00
Eric Christopher
4a0b108f33
Apparently this is needed for llvm-link to link.
...
Untested.
llvm-svn: 112029
2010-08-25 06:45:22 +00:00
Bill Wendling
9e3d8d1a60
- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
...
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.
llvm-svn: 111952
2010-08-24 20:00:52 +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
John McCall
4e49cb4a11
Check in a couple of changes that I apparently never committed:
...
- teach DifferenceEngine to unify successors of calls and invokes
in certain circumstances
- basic blocks actually don't have their own numbering; did that change?
- add llvm-diff to the Makefile and CMake build systems
llvm-svn: 111909
2010-08-24 09:16:51 +00:00
Mikhail Glushenkov
8001ceb30e
llvmc: Make syntax more consistent.
...
CompilationGraph and LanguageMap definitions do not use special syntax anymore.
llvm-svn: 111862
2010-08-23 23:21:23 +00:00
Mikhail Glushenkov
d70ada534a
llvmc: Do not mention plugins in the code.
...
llvm-svn: 111826
2010-08-23 19:24:00 +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
Mikhail Glushenkov
f0f98cc3de
llvmc: Do not prefix option names with AutoGenerated.
...
Since they now live in the namespace 'autogenerated'.
llvm-svn: 111620
2010-08-20 11:24:51 +00:00
Mikhail Glushenkov
63df898925
llvmc: Cut global namespace pollution.
...
llvm-svn: 111619
2010-08-20 11:24:44 +00:00
Dan Gohman
420a417e2d
Use tool_output_file in llvm-extract and llvm-link too.
...
llvm-svn: 111604
2010-08-20 01:12:13 +00:00
Dan Gohman
bef725be86
Use the new tool_output_file in several tools. This fixes a variety
...
of problems with output files being left behind or output streams
being left unclosed. Fix llvm-mc to respect the -o option in all
modes, rather than hardcoding outs() in some cases.
llvm-svn: 111603
2010-08-20 01:07:01 +00:00
Dan Gohman
b5bb849f1a
Make the SCC printing passes use errs() instead of outs(), as the
...
other printing passes do, and update the documentation accordingly.
llvm-svn: 111601
2010-08-20 01:03:44 +00:00
Dan Gohman
7de4c040fb
Print chatty verbose messages to errs() instead of outs().
...
llvm-svn: 111599
2010-08-20 01:02:14 +00:00
Dan Gohman
3998b45134
Minor cleanups to follow the common convention for pass
...
registration variables.
llvm-svn: 111598
2010-08-20 01:00:03 +00:00
Dan Gohman
039675f5cf
Minor cleanups to follow the common convention for pass
...
registration variables.
llvm-svn: 111596
2010-08-20 00:56:16 +00:00
Mikhail Glushenkov
201390919b
llvmc: Update examples.
...
llvm-svn: 111553
2010-08-19 20:04:19 +00:00
Dan Gohman
ab87c70bb8
Eliminate some redundancy by relying on raw_fd_ostream to handle "-"
...
properly.
llvm-svn: 111373
2010-08-18 17:55:15 +00:00
Dan Gohman
3c43d4a9b6
Allow the -analyze option to follow the -o option, which defaults to
...
standard output, instead of just hardcoding outs().
llvm-svn: 111372
2010-08-18 17:42:59 +00:00
Dan Gohman
72143a0fc2
Don't translate "-" to outs() manually; raw_ostream does that automatically.
...
llvm-svn: 111371
2010-08-18 17:40:10 +00:00
Dan Gohman
1f5b3b24c3
Don't translate "-" to outs() manually; raw_ostream does that
...
automatically.
llvm-svn: 111370
2010-08-18 17:26:50 +00:00
Dan Gohman
f9731b6d32
Don't register stdout to be deleted on a signal.
...
llvm-svn: 111368
2010-08-18 17:21:42 +00:00
Dan Gohman
ea23bfd45c
Remove an unused command-line option.
...
llvm-svn: 111367
2010-08-18 17:20:51 +00:00
Anton Korobeynikov
e8b4df4143
This patch enables ENABLE_SHARED=1 to build DLL based LLVM toolchain on MingW & Cygwin.
...
Patch by Takumi Nakamura!
llvm-svn: 111268
2010-08-17 19:03:03 +00:00
Oscar Fuentes
68565e313e
CMake: Improved COMMENT on a custom command
...
llvm-svn: 111111
2010-08-15 22:14:36 +00:00
Mikhail Glushenkov
de1e03e890
Update tests.
...
llvm-svn: 111096
2010-08-15 07:07:24 +00:00
Mikhail Glushenkov
10302168ea
llvmc: remove dynamic plugins.
...
llvm-svn: 111094
2010-08-15 07:07:12 +00:00
Daniel Dunbar
4882ffc373
llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.
...
llvm-svn: 110791
2010-08-11 06:37:09 +00:00
Rafael Espindola
f345661269
Make it possible to set the cpu used for codegen.
...
llvm-svn: 110759
2010-08-11 00:15:13 +00:00
Daniel Dunbar
545b090074
lto: Fix an inverted conditional which prevented the addition of symbols scraped
...
from inline assembly, except in cases where they had already been seen (in which
case they would get added twice).
- I can't see how this ever worked...
llvm-svn: 110757
2010-08-11 00:11:19 +00:00
Daniel Dunbar
03b5c17c32
lto: Fix gratuitous memory leaks.
...
llvm-svn: 110756
2010-08-11 00:11:17 +00:00
Daniel Dunbar
2a4ab7958b
lto: Reduce nesting.
...
llvm-svn: 110752
2010-08-10 23:46:46 +00:00
Daniel Dunbar
e95bd064b5
LTOModule.cpp: Fix numerous style issues.
...
llvm-svn: 110751
2010-08-10 23:46:39 +00:00
Rafael Espindola
c61143ae75
Make it possible to set the flags passed to the assembler.
...
Nick, please review.
llvm-svn: 110705
2010-08-10 18:55:09 +00:00
Rafael Espindola
acfdd67ec8
Fix silly bug.
...
llvm-svn: 110684
2010-08-10 16:32: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
fd90a58cd3
Make it possible to set the target triple and expose that with an option in the
...
gold plugin.
llvm-svn: 110604
2010-08-09 21:09:46 +00:00
Rafael Espindola
454fd95052
Don't try to build a plugin on windows.
...
llvm-svn: 110573
2010-08-09 14:05:42 +00:00
Michael J. Spencer
4ae3f44ae3
llc: Fix help typo as pointed out by Nick Lewycky.
...
llvm-svn: 110556
2010-08-08 23:26:49 +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
c3b766cc93
s/libLLVMgold/LLVMgold/g
...
llvm-svn: 110552
2010-08-08 21:14:26 +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
1ea02f3922
Another missing file :-(
...
llvm-svn: 110522
2010-08-07 21:58:44 +00:00
Rafael Espindola
26105c62b4
Add missing file.
...
llvm-svn: 110521
2010-08-07 21:53:04 +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
Michael J. Spencer
a12b50d9cf
llc: Clarify -mc-relax-all description.
...
llvm-svn: 110477
2010-08-06 21:37:45 +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
Daniel Dunbar
86b9f0dcb6
build: Don't pass -avoid-version or -no-undefined on Darwin, they don't do
...
anything.
llvm-svn: 109957
2010-07-31 21:32:56 +00:00
Michael J. Spencer
3d80dcd82c
llc: Add -mc-relax-all.
...
llvm-svn: 109954
2010-07-31 19:57:02 +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
John McCall
3eb1263b83
Transcribe IRC to svn. Also don't print basic block names twice if they match.
...
llvm-svn: 109787
2010-07-29 18:20:13 +00:00
John McCall
1e34d6da8e
Make the header self-contained and follow #include guidelines.
...
llvm-svn: 109774
2010-07-29 18:08:23 +00:00
John McCall
892a09a0a9
Switch to using the LLVM CommandLine library so that our help
...
message is properly contaminated with nonsense about timing passes
that doesn't apply at all to this utility. :)
llvm-svn: 109769
2010-07-29 17:55:00 +00:00
Benjamin Kramer
d1340209a1
Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
...
llvm-svn: 109767
2010-07-29 17:48:06 +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
John McCall
0722760971
Centralize the logic to permanently unify two instructions and make sure
...
it establishes a context and does a complaining diff. Also make sure we
unify the prelude and postlude of a diff after a block-diff call.
llvm-svn: 109744
2010-07-29 09:20:34 +00:00
John McCall
8fda7303db
Diagnose non-structural differences in the case where blocks were
...
structurally identical.
llvm-svn: 109743
2010-07-29 09:04:45 +00:00
John McCall
9c21031e5b
When unifying instructions during a block diff, actually complain about
...
any differences we see. This should only happen if there are "non-structural"
differences between the instructions, i.e. differences which wouldn't cause
diff to return true.
llvm-svn: 109742
2010-07-29 08:59:27 +00:00
John McCall
a56b8f4800
Somehow I was getting reasonable results for the test cases I was interested
...
in despite not ever incrementing any path costs, so that the only nonzero costs
arose from the all-left path in the first column. Anyway. Perform the diff
starting from the beginning of the block to avoid capturing (say) loads of
allocas.
Vastly improves diff results on code that hasn't been mem2reg'ed.
llvm-svn: 109741
2010-07-29 08:53:59 +00:00
John McCall
f1e24e1d2b
Cache the result of errs() and implement formatted logging.
...
llvm-svn: 109740
2010-07-29 08:14:41 +00:00
John McCall
edc50f3f5b
Add the llvm-diff tool, which performs a relatively naive structural
...
diff of a function. There's a lot of cruft in the current version, and
it's pretty far from perfect, but it's usable.
Currently only capable of comparing functions. Currently ignores metadata.
Currently ignores most attributes of functions and instructions.
Patches welcome.
llvm-svn: 109739
2010-07-29 07:53:27 +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
Gabor Greif
0899f01287
simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
...
llvm-svn: 109687
2010-07-28 22:50:26 +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
Mikhail Glushenkov
bbeb485c74
Get rid of exceptions in llvmc.
...
llvmc can be now compiled with llvm-gcc on Windows.
llvm-svn: 109215
2010-07-23 03:42:55 +00:00