1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

3449 Commits

Author SHA1 Message Date
Daniel Dunbar
620fd57052 macho-dump: Stub out C++ macho-dump tool.
llvm-svn: 120191
2010-11-27 05:58:44 +00:00
Mikhail Glushenkov
cfae3f46f9 Add a newline.
llvm-svn: 119976
2010-11-22 17:10:20 +00:00
Mikhail Glushenkov
946fa2d2ee llvmc: Make -march/-mcpu/-mtune behaviour more consistent with gcc.
llvm-svn: 119975
2010-11-22 17:10:09 +00:00
Wesley Peck
849367836f Make MCJIT work with CMake.
llvm-svn: 119589
2010-11-17 23:35:07 +00:00
Daniel Dunbar
aff668a681 MCJIT: Stub out MCJIT implementation, still doesn't do anything useful.
llvm-svn: 119509
2010-11-17 16:06:43 +00:00
Daniel Dunbar
7817c0b45f lli: Add stub -use-mcjit option, which doesn't currently do anything.
llvm-svn: 119508
2010-11-17 16:06:37 +00:00
Chris Lattner
bae8eb410d fix the autoconf script to detect "has asmprinter"ness of a target by
looking for lib/Target/*AsmPrinter.cpp.  Fix llvm-config to handle targets
that don't have an explicit AsmPrinter library.

llvm-svn: 119057
2010-11-14 19:10:47 +00:00
Daniel Dunbar
b2436c4725 Update CMake.
llvm-svn: 118953
2010-11-13 00:28:32 +00:00
Daniel Dunbar
95f870ece4 lli: Switch to using ParseIRFile, for consistency with other LLVM tools.
- Also, switch tests to not using llvm-as. They run 20% faster now, not that it matters.

llvm-svn: 118952
2010-11-13 00:28:01 +00:00
Dan Gohman
7df4b826a1 Fix some places where error messages were being swallowed.
llvm-svn: 118464
2010-11-09 01:13:31 +00:00
Che-Liang Chiou
4cc802839c Add registry hook for assembly text output
llvm-svn: 118394
2010-11-08 02:21:17 +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
Jakob Stoklund Olesen
1172cd6d88 Tweak the opt -O2 / opt -O3 inliner thresholds to be the same as llvm-gcc and
clang are using.

llvm-svn: 118118
2010-11-02 23:40:28 +00:00
Mikhail Glushenkov
4c2caa10ad GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.
This allows using GetDLLSuffix() with appendSuffix().

llvm-svn: 118051
2010-11-02 20:32:59 +00:00
Mikhail Glushenkov
709ca9117a Trailing whitespace.
llvm-svn: 118050
2010-11-02 20:32:52 +00:00
Jim Grosbach
c160d7a3ae Allow specifying a CPU to llvm-mc, so that we can properly set up subtarget
feature lists for instruction pattern predicates.

llvm-svn: 117788
2010-10-30 15:57:50 +00:00
Tobias Grosser
45db9e63fb Add polly support to the build system.
Update the cmake and autoconf build system to compile polly
as a shared library if it is checked out into tools/polly. In case
polly is not checked out, nothing changes.
This models the way clang can be added to llvm if checked out to tools/clang.

Also rebuild configure.

Patch contributed by ether.

llvm-svn: 117755
2010-10-30 00:54:26 +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
NAKAMURA Takumi
3995a53b8d tools/llvm-shlib/Makefile: Support for FreeBSD and OpenBSD.
Thanks to Yuri Gribov and Vladimir Kirillov!
*BSD(s) have environ(7) in CRT startup and cannot resolve "environ" at linking llvm.so.
environ(7) is used inlib/System/Unix/Program.inc.

llvm-svn: 117528
2010-10-28 06:45:57 +00:00
Daniel Dunbar
467507fe11 llvm-mc: Teach -as-lex to print the raw token string as well.
llvm-svn: 117296
2010-10-25 20:18:46 +00:00
Mikhail Glushenkov
c99359bf34 Resurrect mcc16, it is useful as an example.
llvm-svn: 117198
2010-10-23 07:33:02 +00:00
Mikhail Glushenkov
7b1676ee96 Syntax tweak in llvmc: (something [a,b,c]) -> (something a, b, c).
llvm-svn: 117196
2010-10-23 07:32:46 +00:00
NAKAMURA Takumi
4c7d031a0d lli: On Cygwin-1.5, lli crashes at invoking destructors in atexit handler.
llvm-svn: 117095
2010-10-22 14:53:59 +00:00
Rafael Espindola
749c19f614 Record sysbols created by aliases. Fixes PR8414.
llvm-svn: 116910
2010-10-20 04:57:22 +00:00
Tobias Grosser
88ce93b0eb Add RegionPass support.
A RegionPass is executed like a LoopPass but on the regions detected by the
RegionInfo pass instead of the loops detected by the LoopInfo pass.

llvm-svn: 116905
2010-10-20 01:54:44 +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
Benjamin Kramer
9c262b21b2 Hack around incompatible pointer warnings.
llvm-svn: 116671
2010-10-16 15:43:02 +00:00
Daniel Dunbar
1f543c9364 lto: Respect LLVM_VERSION_INFO make variable, since setting CC arguments with
spaces gives tests fits and shell escaping is an art best left to jabberwockies.

llvm-svn: 116632
2010-10-15 22:46:15 +00:00
Mikhail Glushenkov
e418492728 Forward -march correctly.
Also includes some cosmetic changes.

llvm-svn: 116475
2010-10-14 11:22:06 +00:00
Rafael Espindola
aa5448f520 Be more consistent in using ValueToValueMapTy.
llvm-svn: 116387
2010-10-13 01:36:30 +00:00
Chris Lattner
c9709f154d Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116190
2010-10-11 05:44:40 +00:00
Dan Gohman
b41a554403 This file needs ToolOutputFile.h too.
llvm-svn: 115976
2010-10-07 20:48:46 +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
58f141db94 Fix Whitespace.
llvm-svn: 115959
2010-10-07 18:51:10 +00:00
Michael J. Spencer
cf536d04e7 Fix warnings on Windows.
llvm-svn: 115958
2010-10-07 18:50:57 +00:00
Bill Wendling
ef718b99d4 Provide a fast "get me the target triple from the module" API. This can
drastically reduce the linking time during LTO.

Patch by Shantonu Sen!

llvm-svn: 115728
2010-10-06 01:22:42 +00:00
Oscar Fuentes
8f7c23d134 Stop the build if cyclic library dependecies found.
llvm-svn: 115405
2010-10-02 03:04:49 +00:00
Duncan Sands
f66899560c Convert a bunch of uses of 'bytecode' into 'bitcode'. This
is not everything, but the remaining cases are less trivial.

llvm-svn: 115080
2010-09-29 20:09:55 +00:00
Bill Wendling
3e1b942231 Add a new scope type "LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN" for the
"linker_private_weak_auto_def" linkage type for LTO.

llvm-svn: 114868
2010-09-27 20:17:45 +00:00
Bill Wendling
3dde665cb8 The "linker_private_weak*" linkages should set the LTO_SYMBOL_DEFINITION_WEAK
during LTO.

llvm-svn: 114850
2010-09-27 18:05:19 +00:00
Benjamin Kramer
cd6c025b08 Push twines deeper into SourceMgr's error handling methods.
llvm-svn: 114847
2010-09-27 17:42:11 +00:00
Daniel Dunbar
eacb42cfee MC/Lexer: Add 'Real' token type for floating point literals.
llvm-svn: 114718
2010-09-24 01:59:31 +00:00
Dan Gohman
007957687e Fix llvm-extract -delete's lazy loading to materialize the functions that
will not be deleted, rather than the ones that will.

llvm-svn: 114614
2010-09-23 00:33:13 +00:00
Mikhail Glushenkov
dba65f26d2 llvmc: Support '-emit-llvm -S' with -opt.
llvm-svn: 114541
2010-09-22 09:00:41 +00:00
Mikhail Glushenkov
46a5ec3426 A more informative output suffix for the opt tool.
llvm-svn: 114540
2010-09-22 09:00:35 +00:00
Mikhail Glushenkov
eacda4d1ca llvmc: split llvm_gcc_based into llvm_gcc_{pch,comp}_based.
llvm-svn: 114434
2010-09-21 14:59:47 +00:00
Mikhail Glushenkov
2294629636 llvmc: put linker options in a separate OptList.
llvm-svn: 114427
2010-09-21 11:57:04 +00:00
Daniel Dunbar
1eb4c166bf llvm-mc: Teach -as-lex to print more token kinds.
llvm-svn: 114051
2010-09-16 00:42:35 +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
Dan Gohman
0e71a27c03 Use ParseIRFile to auto-detect LLVM Assembly automatically.
llvm-svn: 113765
2010-09-13 18:02:47 +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
NAKAMURA Takumi
7857655635 Don't build redundant libLLVMgold.a.
Building archive would be executed due to definition of BUILD_ARCHIVE,
even if BUILD_ARCHIVE = "0".

llvm-svn: 113578
2010-09-10 06:26:57 +00:00
Dan Gohman
a9936d3f97 Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.

llvm-svn: 113557
2010-09-09 23:12:39 +00:00
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
Chris Lattner
d9ec30e2fe there is now no reason to link in TARGETS_TO_BUILD since we list
arm explicitly.  X86 and ARM are the only two targets that support
disassembly, so our explicit list is enough.  These other targets
weren't getting pulled in anyway though, since there were no 
references to their symbols.

llvm-svn: 108934
2010-07-20 21:26:27 +00:00
Chris Lattner
4aff2379b6 fix edis to only try to link in the x86 parts if the x86 backend is
enabled.  Add direct ARM support.

llvm-svn: 108933
2010-07-20 21:23:57 +00:00
Douglas Gregor
2da8b36e05 Fix edis makefile
llvm-svn: 108931
2010-07-20 21:21:27 +00:00
Chris Lattner
c37155ffb7 fix DISABLE_EDIS
llvm-svn: 108925
2010-07-20 20:55:57 +00:00
Chris Lattner
99ad016267 this logic is handled by tools/makefile.
llvm-svn: 108919
2010-07-20 20:33:59 +00:00
Chris Lattner
f70bf1be04 edis needs to link in mcdisassembler.
llvm-svn: 108876
2010-07-20 18:35:23 +00:00
Chris Lattner
543f941787 update cmake.
llvm-svn: 108875
2010-07-20 18:33:29 +00:00
Chris Lattner
2e49f3fb0e edinfo doesn't need to be built here.
llvm-svn: 108873
2010-07-20 18:31:54 +00:00
Chris Lattner
1ac58ea0f3 start straightening out libedis's dependencies and make it fit
better in the llvm world.  Among other things, this changes:

1. The guts of libedis are now moved into lib/MC/MCDisassembler
2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis,
   so edis and mc don't have to be built in series.
3. lib/MC/MCDisassembler no longer depends on the C api, the C
   API depends on it.
4. Various code cleanup changes. 

There is still a lot to be done to make edis fit with the llvm
design, but this is an incremental step in the right direction.

llvm-svn: 108869
2010-07-20 18:25:19 +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
Mikhail Glushenkov
9b60f2b865 llvmc: Add a new option type (switch_list).
llvm-svn: 108673
2010-07-19 03:16:25 +00:00
Daniel Dunbar
150021561c Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

llvm-svn: 108664
2010-07-19 00:33:49 +00:00
Daniel Dunbar
2747a00d4f edis: Save the TargetMachine in the EDDisassembler object.
llvm-svn: 108663
2010-07-19 00:33:43 +00:00
Daniel Dunbar
4dc7255379 MC: Move several clients to using AsmParser constructor function.
llvm-svn: 108645
2010-07-18 18:31:33 +00:00
Daniel Dunbar
5accac5484 llvm-mc: Fix llvm-mc -as-lex.
llvm-svn: 108644
2010-07-18 18:31:28 +00:00
Duncan Sands
0f6415ef75 Fix what seems like a clear buffer overflow, noticed by cppcheck.
llvm-svn: 108629
2010-07-17 20:23:37 +00:00
Dan Gohman
f4d2b52ffe Make llvm-bcanalyzer print out the full enum name for all metadata
code ids, not just some of them.

llvm-svn: 108543
2010-07-16 18:28:07 +00:00
Daniel Dunbar
b55ca8e447 build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
the libLTO library version from the actual build version.

llvm-svn: 108495
2010-07-16 01:41:38 +00:00
Bob Wilson
1f4fed20a5 Remove some broken code to check the DISABLE_EDIS flag (edis is now in the
DIRS list, so it does no good to filter it from PARALLEL_DIRS), and replace
it with a check to disable building the shared library version of edis when
the flag is set.  Disabling it entirely does not work because MC uses it now.

llvm-svn: 108367
2010-07-14 22:41:51 +00:00
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Bill Wendling
90b6422f2f Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

      .globl l_objc_msgSend_fixup_alloc
      .weak_definition l_objc_msgSend_fixup_alloc
      .section __DATA, __objc_msgrefs, coalesced
      .align 3
l_objc_msgSend_fixup_alloc:
       .quad   _objc_msgSend_fixup
       .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.

llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Daniel Dunbar
37b4089fbf MC: Pass the target instance to the AsmParser constructor.
llvm-svn: 107426
2010-07-01 20:41:56 +00:00
Devang Patel
8a819baed9 Preserve debug info for only extracted symbols.
llvm-svn: 107417
2010-07-01 19:58:05 +00:00
Mikhail Glushenkov
c972650d62 Make -filelist work with -linker=c++.
llvm-svn: 107362
2010-07-01 01:00:32 +00:00
Bill Wendling
59ef9bcc6d Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
05a4c0b1f2 Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

       .globl l_objc_msgSend_fixup_alloc
       .weak_definition l_objc_msgSend_fixup_alloc
       .section __DATA, __objc_msgrefs, coalesced
       .align 3
l_objc_msgSend_fixup_alloc:
        .quad   _objc_msgSend_fixup
        .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Duncan Sands
d0286618b5 Remove variables that are written by not read.
llvm-svn: 107126
2010-06-29 11:07:47 +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
ea22615ccd Add an extra-library-path option to the plugin. This is used to support
having a library both as bitcode and native code. We want to use the
bitcode first, but if codegen produces new undefined references we have to use
the native code to satisfy those references.

Gold has no notion of bitcode and native search directories, so instead it has
an API where the plugin can instruct it to look for the libraries it is passing
to it. This patch uses that API.

llvm-svn: 106674
2010-06-23 20:20:59 +00:00
Rafael Espindola
705c2bd4c3 add_input_file and add_input_library now take const arguments, remove the
const_cast.

llvm-svn: 106410
2010-06-21 02:23:12 +00:00
Rafael Espindola
cf8f391d49 Save more temps with -save-temps.
llvm-svn: 106409
2010-06-21 02:17:36 +00:00
Rafael Espindola
d7bfa3a0f7 Add a pass-through option to the plugin. The use case for this option is to
ask the linker to take another look into some library or object. The case when
one might want to do this is when codegen introduces a new undefined reference.
The canonical example is libgcc.

llvm-svn: 106303
2010-06-18 19:18:58 +00:00
Rafael Espindola
23f533848f Don't produce output only if *all* files are unused.
llvm-svn: 105962
2010-06-14 21:20:52 +00:00
Daniel Dunbar
9800936127 llvm-mc: Don't set NO_INSTALL on llvm-mc.
llvm-svn: 105837
2010-06-11 22:00:08 +00:00
Duncan Sands
cd6523c879 Change another reference to the "indirect callgraph node" to
refer to the "external node" instead.

llvm-svn: 105731
2010-06-09 17:39:05 +00:00
Duncan Sands
1585c44a59 Output "external node" rather than "Indirect CallGraph node" when printing
callgraph SCC's.  This makes it match what the node itself would print.  Also,
"indirect callgraph node" doesn't make sense - it has nothing particularly to
do with indirect calls.

llvm-svn: 105730
2010-06-09 17:35:00 +00:00
Nick Lewycky
ff1e3db00e Plug a leak in the non-error case by removing one level of indirection.
llvm-svn: 105556
2010-06-07 21:42:19 +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
Rafael Espindola
b93be14fa0 Misc cleanups to the gold plugin.
llvm-svn: 105534
2010-06-07 16:45:22 +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
Rafael Espindola
ee11d1e6a5 Add a emit-llvm option to the plugin and make the path argument to also-emit-llvm optional.
llvm-svn: 105414
2010-06-03 21:11:20 +00:00
Nick Lewycky
14c5598c42 Perfer !string.empty() over string != "".
llvm-svn: 105397
2010-06-03 17:13:23 +00:00
Nick Lewycky
04d3d4e46f Whitespace cleanup.
llvm-svn: 105395
2010-06-03 17:10:17 +00:00
Rafael Espindola
9d46e81a8b Don't preserve all symbols in a .so and instead trust gold to know what is
needed. The result is that now we are able to drop unnecessary symbol from
shared libraries.

llvm-svn: 105389
2010-06-03 14:45:44 +00:00
Dan Gohman
6163340daf Eliminate some unnessary Path::exists() calls.
llvm-svn: 104888
2010-05-27 20:51:54 +00:00
Dan Gohman
35206e98e6 When handling raw_ostream errors manually, use clear_error() so that
raw_ostream doesn't try to do its own error handling.

Also, close the raw_ostream before checking for errors so that any
errors that occur during closing are caught by the manual check.

llvm-svn: 104882
2010-05-27 20:19:47 +00:00
Dan Gohman
d13e45d0ec Don't special-case stdout in llvm::WriteBitcodeToFile; just consider
it to be the caller's responsibility to provide a stream in binary
mode. This fixes a layering violation and avoids an outs() call.

llvm-svn: 104878
2010-05-27 20:06:51 +00:00
Dan Gohman
5dc7fed6ab Don't create an output stream when output is disabled.
llvm-svn: 104875
2010-05-27 19:52:20 +00:00
Dan Gohman
bf0dac1735 Avoid calling outs() and fouts() when the stream isn't really needed.
llvm-svn: 104873
2010-05-27 19:47:36 +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
Daniel Dunbar
eb23d9ac22 MC: Add an MCLoggingStreamer, for use in debugging integrated-as mismatches.
llvm-svn: 104463
2010-05-23 17:44:06 +00:00
Matt Fleming
5d40d53cab Currently, createMachOStreamer() is invoked directly in llvm-mc which
isn't ideal if we want to be able to use another object file format.

Add a createObjectStreamer() factory method so that the correct object
file streamer can be instantiated for a given target triple.

llvm-svn: 104318
2010-05-21 12:54:43 +00:00
Daniel Dunbar
8824824171 Remove dead option.
llvm-svn: 104303
2010-05-21 00:27:55 +00:00
Rafael Espindola
aa7f3b0561 Avoid renaming loadable modules at install time. Now the gold plugin is named
LLVMgold.so both in both the build and install directories.

llvm-svn: 103897
2010-05-16 03:13:23 +00:00
Dan Gohman
79033132d7 Use regular PassManager instead of FunctionPassManager in opt, since it
isn't doing lazy streaming. This also fixes a missing doFinalization call.

llvm-svn: 103774
2010-05-14 15:36:54 +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
Rafael Espindola
bc6fabbd3e Add an also-emit-llvm option to the gold plugin.
llvm-svn: 103714
2010-05-13 13:39:31 +00:00
Jeffrey Yasskin
6768d483a0 Fix PR6951 by fixing Module leaks in bugpoint.
llvm-svn: 103523
2010-05-11 23:25:16 +00:00
Dan Gohman
5f389dacab Remove the "WantsWholeFile" concept, as it's no longer needed. CBE
and the others use the regular addPassesToEmitFile hook now, and
llc no longer needs a bunch of redundant code to handle the
whole-file case.

llvm-svn: 103492
2010-05-11 19:57:55 +00:00
Sean Callanan
e79322802a Extended the edis "IsBranch" property to call
instructions as well.  Added support for checking
this to the llvm-mc tester as well.

llvm-svn: 103454
2010-05-11 01:27:08 +00:00
Bill Wendling
ed91169004 The getDefaultSubtargetFeatures method of SubtargetFeature did actually return a
string of features for that target. However LTO was using that string to pass
into the "create target machine" stuff. That stuff needed the feature string to
be in a particular form. In particular, it needed the CPU specified first and
then the attributes. If there isn't a CPU specified, it required it to be blank
-- e.g., ",+altivec". Yuck.

Modify the getDefaultSubtargetFeatures method to be a non-static member
function. For all attributes for a specific subtarget, it will add them in like
normal. It will also take a CPU string so that it can satisfy this horrible
syntax.

llvm-svn: 103451
2010-05-11 00:30:02 +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
Chris Lattner
b064c6f5a3 don't pass -f to llc, it doesn't have it anymore. Patch by Kevin Fan (PR7090)
llvm-svn: 103263
2010-05-07 16:27:04 +00:00
Chris Lattner
5fc1e951f6 make -filetype=obj default to emitting its output to foo.obj
when on windows instead of foo.o.  Patch by Nathan Jeffords!

llvm-svn: 103150
2010-05-06 00:54:20 +00:00
Sean Callanan
7edf493591 Fixed a sign-extension bug in the X86 disassembler
that was causing PC-relative branch targets to be
evaluated incorrectly.  Also added support for
checking operand values to the llvm-mc tester.

llvm-svn: 103128
2010-05-05 22:47:27 +00:00
Duncan Sands
153ad3b903 Remove the -enable-sjlj-eh option, which doesn't do anything.
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.

llvm-svn: 102865
2010-05-02 15:36:26 +00:00
Nick Lewycky
31e338dba8 The llc -f flag was removed.
llvm-svn: 102670
2010-04-29 23:37:44 +00:00
Dan Gohman
c147c83a95 llc no longer requires the -f option to overwrite files.
llvm-svn: 102651
2010-04-29 18:46:52 +00:00
Daniel Dunbar
780c6fe8ba Remove dead option.
llvm-svn: 102621
2010-04-29 16:29:02 +00:00
Bill Wendling
8a16d236db r98363 deleted a '!' when cleaning up whitespace. This caused globals which are
*not* declarations to *not* be placed in the "preserve" list.
<rdar://problem/7870735>

llvm-svn: 102405
2010-04-27 00:55:25 +00:00
Sean Callanan
0da87c200d Fixed edis to tokenize instructions with no
operands correctly.

llvm-svn: 102227
2010-04-24 01:00:16 +00:00
Sean Callanan
72d3d36188 Fixes to edis that mark x86 call targets as
memory operands rather than immediate operands.

llvm-svn: 102217
2010-04-23 22:17:17 +00:00
Sean Callanan
a50d7d5434 Fixed EDOperand to use the operand type, not the
flags, to determine whether or not the operand is
a memory operand.

llvm-svn: 102158
2010-04-23 01:56:36 +00:00
Mikhail Glushenkov
e652c68942 Support .a files directly (without -l).
llvm-svn: 101789
2010-04-19 17:25:38 +00:00
Dan Gohman
b66acedc8a Fix more -Wcast-qual warnings.
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Chris Lattner
6a038be777 introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.

llvm-svn: 101558
2010-04-16 22:42:17 +00:00
Nick Lewycky
e96e382131 Revert r64616 which worked around http://gcc.gnu.org/PR42757 , we just didn't
know it at the time.

llvm-svn: 101439
2010-04-16 04:32:20 +00:00
Dan Gohman
499f38cfcb Create an exports file, so that the plugin only exports the onload symbol.
llvm-svn: 101431
2010-04-16 00:43:25 +00:00
Dan Gohman
792df0f4ca Make things static that don't need to be referenced from outside the file.
llvm-svn: 101430
2010-04-16 00:42:57 +00:00
Dan Gohman
55f814fdc4 Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.

llvm-svn: 101414
2010-04-15 23:08:00 +00:00
Dan Gohman
bfbdc27d54 Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.

Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.

llvm-svn: 101399
2010-04-15 20:54:25 +00:00
Benjamin Kramer
c57e4c744b Simplify ".bc" detection.
llvm-svn: 101365
2010-04-15 11:33:14 +00:00
Daniel Dunbar
3bf3e0e63a Remove unnecessary uses of <iostream>.
llvm-svn: 101338
2010-04-15 03:47:24 +00:00
Chris Lattner
f827b4be59 fix a crash on "lli ex" or any other file whose name is exactly two
characters long.

llvm-svn: 101336
2010-04-15 03:32:19 +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
Douglas Gregor
a672ffc669 Unbreak CMake build by improving the EnhancedDisassembly makefile a
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.

llvm-svn: 101188
2010-04-13 22:47:43 +00:00
Sean Callanan
29a7152676 Fixed a nasty layering violation in the edis source
code.  It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.

Also removed hacky #define-controlled initialization
of targets in edis.  If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.

llvm-svn: 101179
2010-04-13 21:21:57 +00:00