Commit Graph

3142 Commits

Author SHA1 Message Date
Jeffrey Yasskin
2155d459a7 Roll back the shared library, r96559. It broke two darwins and arm, mysteriously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 04:43:02 +00:00
Jeffrey Yasskin
f6afae2f49 Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
--enable-shared configure flag to have the tools linked shared. (2.7svn is just
$(LLVMVersion) so it'll change to "2.7" in the release.)  Always link the
example programs shared to test that the shared library keeps working.

On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is
16M static vs 440K shared.

Two things are less than ideal here:
1) The library doesn't include any version information. Since we expect to break
the ABI with every release, this shouldn't be much of a problem. If we do
release a compatible 2.7.1, we may be able to hack its library to work with
binaries compiled against 2.7.0, or we can just ask them to recompile. I'm
hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared
library. I'll add this as a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 02:36:02 +00:00
Duncan Sands
1df9859c40 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 11:11:14 +00:00
Mikhail Glushenkov
49e496b1cc Support some more Darwin-only options.
We really need a conditional compilation mechanism...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 22:37:13 +00:00
Mikhail Glushenkov
b88c6f6cdc Support -mfix-and-continue properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96128 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 22:37:00 +00:00
Mikhail Glushenkov
2ac7ab129d Revert r94752, turns out we don't need to touch these options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96127 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13 22:36:43 +00:00
Chris Lattner
86020e4628 give MCCodeEmitters access to the current MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 23:12:47 +00:00
Dan Gohman
a499d20e8d Add support to llvm-extract for extracting multiple functions and/or
multiple global variables at a time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95825 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 23:58:53 +00:00
Daniel Dunbar
5532cf44a0 llvm-mc: Remove --show-fixups and always show as part of --show-encoding.
Also, fix a silly memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95752 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 01:41:14 +00:00
Daniel Dunbar
6b71653c82 llvm-mc: Add --show-fixups option, for displaying the instruction fixup information in the asm comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 23:00:14 +00:00
Jakob Stoklund Olesen
4b42a1e40f Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 17:24:21 +00:00
Jakob Stoklund Olesen
8addca2f3a clang test suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 17:20:03 +00:00
Sean Callanan
2d58147ca5 Updated the enhanced disassembly library to produce
whitespace tokens in the right places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:50:54 +00:00
Sean Callanan
de5dac1c46 Fixed a problem where the enhanced disassembly
library was reporting inaccurate token IDs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:00:18 +00:00
Sean Callanan
01cd79fe1b Added header file declarations and .exports entries
for the new APIs offered by the enhanced disassembler
for inspecting operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:34:25 +00:00
Sanjiv Gupta
504b4cdc1c Fixed build error for redefinition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95532 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 06:08:32 +00:00
Sanjiv Gupta
90f4c914b8 Add uppercase and lowercase part defines in driver.
Use a temp dir with a unique name in the current dir itself.
Use forward_value instead of unpack_values.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 05:56:37 +00:00
Jeffrey Yasskin
4688261c20 Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions.  This patch passes them through the EngineBuilder into
JIT::selectTarget().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05 16:19:36 +00:00
Torok Edwin
18743f4502 New flag for GenLibDeps, and llvm-config-perobjincl.
This allows to show the explicit files that need to be built/linked to get an
LLVM component.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04 09:31:35 +00:00
Sean Callanan
76706584c2 Filled in a few new APIs for the enhanced
disassembly library that provide access to
instruction information, and fixed ambiguous
wording in the comments for the header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95274 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04 01:43:08 +00:00
Daniel Dunbar
9dee8e3009 llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 18:18:30 +00:00
Chris Lattner
5669e30097 change addPassesToEmitFile to return true on failure instead of its input,
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 05:55:08 +00:00
Sean Callanan
2e235a826d Fixed the disassembler so it accepts multiple
instructions on a single line.  Also made it a
bit more forgiving when it reports errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 03:46:41 +00:00
Chris Lattner
ac7798e906 Hook up -filetype=obj through the MachO streamer. Here's a demo:
$ cat t.ll 
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g

There is still a ton of work left.  Instructions are not being encoded
yet apparently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95162 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:57:42 +00:00
Chris Lattner
3813d8adf3 Remove a bunch of stuff around the edges of the ELF writer.
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 22:31:11 +00:00
Chris Lattner
211edae484 eliminate FileModel::Model, just use CodeGenFileType. The client
of the code generator shouldn't care what object format a target
uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95124 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:06:45 +00:00
Sean Callanan
b788b3753b ...and fixed the Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 20:20:30 +00:00
Sean Callanan
59b9c8879b Renamed the ed directory to edis, as suggested
yesterday.  This eliminates possible confusion
about what exactly in this directory; the name
is still short, though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95118 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 20:11:23 +00:00
Chris Lattner
b5c5160a55 eliminate all forms of addPassesToEmitMachineCode except
the one used by the JIT.  Remove all forms of
addPassesToEmitFileFinish except the one used by the static
code generator.  Inline the remaining version of
addPassesToEmitFileFinish into its only caller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 19:14:27 +00:00
Chris Lattner
390444a704 remove dead code, we're requesting TargetMachine::AssemblyFile here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 19:03:39 +00:00
Sean Callanan
d74667e226 Removed an unnecessary class from the EDDisassembler
implementation.  Also made sure that the register maps
were created during disassembler initialization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95051 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:18:20 +00:00
Sean Callanan
37ad4661b4 Changed to Chris Lattner's suggested approach, which
merely stubs out the blocks-based disassembly functions
if the library wasn't built with blocks, which allows a
constant .exports file and also properly deals with
situations in which the compiler used to build a client
is different from the compiler used to build the library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 00:04:46 +00:00
Nate Begeman
39bdc78e6f Kill the Mach-O writer, and temporarily make filetype=obj an error.
The MCStreamer based assemblers will take over for this functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:56:58 +00:00
Sean Callanan
54c7788e99 Fix for builds with separate source and build
directories (like, oh, say, any multistage build)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:27:57 +00:00
Sean Callanan
81b0c39927 Updated to use the proper .exports file for the
target platform, depending on whether the target
supports the blocks API or not


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 23:01:38 +00:00
Sean Callanan
c54a747352 Rollback on including blocks functionality in .exports
because some platforms don't support blocks and then
break because the symbols aren't present


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95011 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 21:57:50 +00:00
Sean Callanan
7bb2929512 Whoops, left some debugging code in that broke
a buildbot.  Removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 09:02:24 +00:00
Sean Callanan
ee5dfd42f1 Added the enhanced disassembly library's implementation and
fleshed out the .exports file.  I still have to fix several
details of operand parsing, but the basic functionality is
there and usable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 08:49:35 +00:00
Sean Callanan
400c70036d Removed symbols from .exports that are not yet in
the library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 21:21:44 +00:00
Sean Callanan
bd51cdd067 Added a bare-bones Makefile to build the enhanced disassembly
library as a static and a shared library.  Added dependencies
so the target-specific enhanced disassembly info tables are
built before the library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94780 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 01:30:01 +00:00
Mikhail Glushenkov
1124cc02b4 Support some more options...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94752 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:19:36 +00:00
Benjamin Kramer
12ea66a727 Replace strcpy with memcpy when we have the length around anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:04:38 +00:00
Jeffrey Yasskin
f0356fe140 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 20:34:15 +00:00
Mikhail Glushenkov
058b3f5114 Support -arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94546 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 14:55:44 +00:00
Mikhail Glushenkov
967edd0102 Support for -iquote.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94545 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 14:55:30 +00:00
Chris Lattner
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
c0f8a361f5 mark some libraries that currently require RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:22:08 +00:00
Chris Lattner
07404415ab pass "-fasm-verbose" into createAsmStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 07:06:15 +00:00
Chris Lattner
e73a31f667 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:49:46 +00:00
Chris Lattner
476e9bd114 elimiante the dynamic_cast's from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:03:06 +00:00
Chris Lattner
6f6e87db19 simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 05:54:03 +00:00
Chris Lattner
be343b3ca3 move some files out of the llvm-mc tool into the MCParser library so
other tools can link it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:58:08 +00:00
Chris Lattner
c6ef277a0b create a new MCParser library and move some stuff into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:44:57 +00:00
Chris Lattner
03949c9db3 remove some confused code that used strtoull
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94128 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:17:12 +00:00
Sean Callanan
fd0b0288e2 Moved handling of inclusion from the AsmLexer to
the AsmParser, breaking AsmLexer's dependence on
SourceMgr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 00:19:58 +00:00
Sean Callanan
bf2013ee22 Changed the AsmParser to handle error messages itself
rather than passing them off to the AsmLexer to handle.
This means the AsmLexer no longer requires a SourceMgr
to do error handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 23:19:55 +00:00
Sean Callanan
10d33a4937 Promoted the reference to the SourceMgr from AsmLexer
into AsmParser, in preparation for making AsmLexer
independent of the SourceMgr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 22:45:23 +00:00
Sean Callanan
79036e421f Modified MCAsmLexer to return error information upward
rather than printing it locally, reducing its dependence
on SourceMgr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 22:18:24 +00:00
Chris Lattner
1658202529 give createAsmStreamer an 'isLittleEndian' argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 06:39:07 +00:00
Sean Callanan
18b8323de7 Promoted the getTok() method to MCAsmParser so that
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:44:56 +00:00
Sean Callanan
79ed1a8734 Added a Lex function to the AsmParser, to allow handling
of include directives to occur within the parser itself.
This will break the lexer's dependency on a SourceMgr as
input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 20:22:31 +00:00
Chris Lattner
aaec205b87 Generalize mcasmstreamer data emission APIs to take an address space
identifier.  There is no way to work around it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 19:46:13 +00:00
Chris Lattner
ddf6bdde44 add a "MCStreamer::EmitFill" method, and move the default implementation
(which just iteratively emits bytes) to MCStreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 18:45:47 +00:00
Chris Lattner
258281d8ac fix parsing .comm directives on systems which do not represent alignments
as a power of 2.  This fixes MC/AsmParser/directive_comm.s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93867 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 06:22:22 +00:00
Eli Friedman
74733a7e46 Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93798 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:38:31 +00:00
Chris Lattner
59780b8017 make llvm-config more portable to windows versions of perl,
patch by Michael Beck!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 22:27:43 +00:00
Chris Lattner
c0dba723d1 now that mangler is in libtarget, it can use MCAsmInfo instead of clients
having to pass various fields from it in.  Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 18:22:35 +00:00
Dan Gohman
b56bf581a3 Don't create a (empty) output file, and don't warn about bitcode output
to a console, when --analyze is used.

Similarly, avoid creating an empty output file when --disable-output is used.

Print a warning when the -o option appears with either --analyze or
--disable-output, to indicate that the option is being ignored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17 17:47:24 +00:00
Chris Lattner
45111d160c move the mangler into libtarget from vmcore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:57:06 +00:00
Chris Lattner
1ffb33d033 remove obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:34:51 +00:00
Chris Lattner
8abfb8adb2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:34:01 +00:00
Chris Lattner
7c3418ba58 remove calls to dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:20:34 +00:00
Chris Lattner
c5451065e0 remove use of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 20:56:05 +00:00
Chris Lattner
469340493c switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 18:12:14 +00:00
Chris Lattner
54482b472a fix a bug in range information for $42, eliminate an
unneeded argument from ParseExpression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:39:23 +00:00
Chris Lattner
b4307b3370 extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions.  Use this to
provide range info for several new X86Operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:28:38 +00:00
Nate Begeman
3fe980b127 Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer

Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93527 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:51:18 +00:00
Chris Lattner
9d3c755fd6 add virtual methods to get the start/end of a MCParsedAsmOperand,
the default implementation returns "unknown".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:29:57 +00:00
Chris Lattner
9898671a74 Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands.  A new MatchInstruction interface is used to
turn the operand list into an MCInst.

This requires new/deleting all the operands, but it also gives 
targets the ability to use polymorphic operands if they want to. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:21:20 +00:00
Chris Lattner
f007e853e2 prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:32:45 +00:00
Benjamin Kramer
d4f195999a Reimplement getToken and SplitString as "StringRef helper functions"
- getToken is modeled after StringRef::split but it can split on multiple
  separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
  same behaviour as getToken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:03:24 +00:00
David Greene
08fc0d3026 Enable debug buffering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:32 +00:00
David Greene
c58d01b235 Enable debug buffering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:21 +00:00
Mikhail Glushenkov
364cf75c40 Forward -O0 to llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-02 08:27:23 +00:00
Mikhail Glushenkov
bc56d86e25 Apparently, it is OK for -MT to be specified several times.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92413 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-02 08:27:10 +00:00
Mikhail Glushenkov
99da5d7bba Minor simplifactions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 04:41:10 +00:00
Mikhail Glushenkov
3a481e38c9 Minor simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 03:50:51 +00:00
Bill Wendling
9bc0af847d Mark some debug variables as 'unused' to quiet compiler and analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 01:34:57 +00:00
Douglas Gregor
7aed44658c Fix another -Wmismatched-tags warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 18:27:13 +00:00
Douglas Gregor
1f291059b2 Fix struct/class mismatch for LTOModule and LTOCodeGenerator, detected by Clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 17:05:07 +00:00
Mikhail Glushenkov
9d2e2b2bb2 Make it easier to regenerate docs when srcdir != objdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 12:50:03 +00:00
Mikhail Glushenkov
e0b6570d24 Allow (set_option SwitchOption, true).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 12:49:30 +00:00
Chris Lattner
a3dcfb1300 rename HexDisassembler -> Disassembler, it works on any input
integer encoding (0123, 0b10101, 42, etc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91934 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 22:50:29 +00:00
Chris Lattner
f444c06f91 just discard the debug output from the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 22:47:43 +00:00
Chris Lattner
a1aa8bba77 specify what is invalid about it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91901 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 07:03:21 +00:00
Chris Lattner
5a99615704 reject invalid input with a caret, e.g.:
simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:58:29 +00:00
Chris Lattner
665e947740 various cleanups, make the disassemble reject lines with too much
data on them, for example:

	addb	%al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0 
    ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:56:51 +00:00
Chris Lattner
c3de94fabf If you thought that it didn't make sense for the disassembler
to not produce caret diagnostics, you were right!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:45:48 +00:00
Chris Lattner
2adbef06a6 rewrite the file parser for the disassembler, implementing support for
comments.  Also, check in a simple testcase for the disassembler,
including a test for r91864


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:37:58 +00:00
Chris Lattner
222af46482 don't crash on blank lines, rename some variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:24:00 +00:00
Sanjiv Gupta
7ae1ddeb2f Adding a bunch of options to the mcc16 driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 13:13:29 +00:00
Mikhail Glushenkov
994dbe0073 Add a 'set_option' action for use in OptionPreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-17 07:49:16 +00:00
Chandler Carruth
b5d3daba91 Update CMake build to include HexDisassembler.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91589 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-17 06:35:17 +00:00
Sean Callanan
ba847da571 Test harness for the LLVM disassembler. When invoked
with -disassemble, llvm-mc now accepts lines of the
form
0x00 0x00
and passes the resulting bytes to the disassembler for
the chosen (or default) target, printing the result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-17 01:49:59 +00:00
Mikhail Glushenkov
e4ac23a0ff Validate the generated C++ code in llvmc tests.
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:

- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov
68d475ad90 Small documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91401 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:03:37 +00:00
Chris Lattner
c0d91b75f0 when opt crashes, print its command line arguments as a pretty stack trace.
Somehow opt was missed when this was added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 00:41:28 +00:00
Mikhail Glushenkov
b59b0f81be Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:26:11 +00:00
Mikhail Glushenkov
5b9b3ba2ba Deprecate 'unpack_values'.
Use 'forward_values' + 'comma_separated' instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
8461202767 Pass '-msse' and friends to llc as '-mattr=+/-'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 17:03:21 +00:00
Mikhail Glushenkov
fa8182e335 Forward -m32/-m64 to the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:38:45 +00:00
Mikhail Glushenkov
3ab4883053 Support -march/-mtune/-mcpu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 06:38:28 +00:00
Mikhail Glushenkov
55cd767bdb Add relocation model options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 09:47:11 +00:00
Mikhail Glushenkov
4227c0ffc5 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90221 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 09:19:09 +00:00
Mikhail Glushenkov
97955005b3 Forward -save-temps to llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 06:51:30 +00:00
Mikhail Glushenkov
18518603f1 Support -[weak_]framework and -F in llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 05:59:55 +00:00
Tobias Grosser
56f4ef3232 Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:47 +00:00
Tobias Grosser
a10d598602 Instantiate DefaultDOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 12:38:13 +00:00
Viktor Kutuzov
308f6630a3 Rollback changes r89516: Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 22:44:18 +00:00
Daniel Dunbar
f87ea4dd9a Add the rest of the build system logic for optional target disassemblers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 04:46:58 +00:00
Viktor Kutuzov
054b52c366 Added two SubtargetFeatures::AddFeatures methods, which accept a comma-separated string or already parsed command line parameters as input, and some code re-factoring to use these new methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 00:00:02 +00:00
Mikhail Glushenkov
e0ace0c08f Make example/Hello compile again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 17:29:25 +00:00
Viktor Kutuzov
e823db8bae Added getDefaultSubtargetFeatures method to SubtargetFeatures class which returns a correct feature string for given triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-18 20:20:05 +00:00
Viktor Kutuzov
51cdac02c4 Added getArchNameForAssembler method to the Triple class for which returns OS and Vendor independent target assembler arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 18:48:27 +00:00
Duncan Sands
3ea11cf8fc Make bugpoint pass -load arguments to LLI. This lets one use bugpoint with
programs that depend on native shared libraries.  Patch by Timo Lindfors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 10:20:22 +00:00
Benjamin Kramer
05872ea804 Add compare_lower and equals_lower methods to StringRef. Switch all users of
StringsEqualNoCase (from StringExtras.h) to it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 20:36:59 +00:00
Daniel Dunbar
e9b88e4440 Stop running get_target_triple more than we need to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86418 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:52:20 +00:00
Kenneth Uildriks
b908f8ad6a Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 15:29:06 +00:00
Nick Lewycky
f4e748bc3f Line this up as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 22:08:51 +00:00
Nick Lewycky
ed1f1687b7 Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85747 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 22:07:54 +00:00
Douglas Gregor
076124ef26 Reverting 85714, 85715, 85716, which are breaking the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 16:42:53 +00:00
Dan Gohman
b2fae7560d Remove the #include of Pass.h from PassManager.h. This breaks a significant
#include dependency, as frontends commonly pull in PassManager.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 15:20:19 +00:00
Viktor Kutuzov
5c00b4af61 Fix to pass options from Gold plugin to LTO codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28 18:55:55 +00:00
Jeffrey Yasskin
18fec73e29 Revert the API changes from r85295 to make it easier for people to build
against both 2.6 and HEAD.  The default is still changed to eager jitting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85330 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 22:39:42 +00:00
Jeffrey Yasskin
dc85724f70 Change the JIT to compile eagerly by default as agreed in
http://llvm.org/PR5184, and beef up the comments to describe what both options
do and the risks of lazy compilation in the presence of threads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 20:30:28 +00:00
Chandler Carruth
8b67f774e9 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 01:35:46 +00:00
Mikhail Glushenkov
3e4102e94c Document OptionPreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 01:44:11 +00:00
Duncan Sands
09b5d90429 Include config.h in order to have HAVE_STDINT_H be defined.
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 16:03:32 +00:00
Chris Lattner
316e3268a8 llvm-ld doesn't throw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:52:28 +00:00
Chris Lattner
42a8832ff7 this doesn't use EH either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:50:24 +00:00
Chris Lattner
61db1a1b6a nothing opt uses can throw, remove the try block and -fexceptions when
building opt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:46:41 +00:00
Chris Lattner
d331cb3fde Add some command line options for twiddling the default data layout
used by opt when a module doesn't specify one.  Patch from Kenneth Uildriks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 00:44:10 +00:00
Sanjiv Gupta
db1d9dbdd7 Added more options to mcc16 driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84752 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 10:38:59 +00:00
Mikhail Glushenkov
4e6138758d Clarify documentation on multi_val options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 02:13:52 +00:00
Jeffrey Yasskin
4cdc5bb707 Delete the MacOSJITEventListener per echristo's request. It was disabled by
default and didn't work anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 00:43:48 +00:00
Mikhail Glushenkov
0a22fb6664 First draft of the OptionPreprocessor.
More to follow...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:09:29 +00:00
Mikhail Glushenkov
6b4967e1a6 -O[0-3] options should be also forwarded to opt and llc.
This will require implementing OptionPreprocessor to forbid invalid invocations
such as 'llvmc -O1 -O2'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 20:07:49 +00:00
Daniel Dunbar
79ec717193 llvm-as: Simplify, and don't create empty output files with -disable-output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 03:28:28 +00:00
Evan Cheng
bf57b52ba4 Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not want post-regalloc scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 21:02:20 +00:00
Daniel Dunbar
e00b011e6a MC: Remove unneeded context argument to MCExpr::Evaluate*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:57:52 +00:00
Daniel Dunbar
75773ff00d MC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
variables and symbols invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:57:39 +00:00
Daniel Dunbar
fffff915d5 MC: When parsing a variable reference, substitute absolute variables immediately
since they are allowed to be redefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 01:34:54 +00:00
Duncan Sands
81b0b64298 There seems to be no reason for opt's -S option to be hidden.
Make it visible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 20:01:39 +00:00
Nick Lewycky
c469e9fd22 Fix Makefile to build correctly on Darwin. Patch by Sandeep Patel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 23:10:09 +00:00
Mikhail Glushenkov
aba210b624 Slight rewording.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 05:45:38 +00:00
Mikhail Glushenkov
3ab68895b4 Use llvm-as only for compiling .ll -> .bc.
llc can compile .ll files directly these days.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 05:45:01 +00:00
Mikhail Glushenkov
976248d836 Unbreak the build.
Forgot about the need to reconfigure after modifying Base.td.in....

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-08 06:03:38 +00:00
Mikhail Glushenkov
6d80d2b6e0 Make the Base plugin understand -MF and -MT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-08 04:40:28 +00:00
Duncan Sands
ac53a0b272 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06 15:40:36 +00:00
Chris Lattner
dbf75e813e remove llvm-db: it is completely broken and if anyone wants to do a debugger,
they should not base it on llvm-db (which not following almost any "best practices").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 02:29:51 +00:00
Oscar Fuentes
144034eace CMake: remove .so file extension from library names when building
dependency info.

Patch by Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 06:24:57 +00:00
Mikhail Glushenkov
ad981bfbcc Add a way to query the number of input files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov
d66e8de838 Document the 'not' combinator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-28 01:16:07 +00:00
Chris Lattner
ebb89b4186 add a new DirectiveMap stringmap, which allows more efficient dispatching
to directive handlers and allows for easier extensibility.

I only switched a few over for now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 21:16:52 +00:00
Chris Lattner
cec545097c avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 19:38:39 +00:00
Daniel Dunbar
42985bbe38 Make llvm-bcanalyzer percentages more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82772 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 16:04:21 +00:00
Daniel Dunbar
80ba3d2c0b Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 16:03:57 +00:00
Duncan Sands
0cad4e3f0b Print INST_INBOUNDS_GEP rather than UnknownCode30.
Likewise for constant inbounds GEP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 12:28:37 +00:00
Gabor Greif
4136e7b90e pretty mechanical changes to match coding guidelines (blessed by sabre on IRC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 02:46:12 +00:00
Daniel Dunbar
bf6f0859b0 Fix llvm-config --src-root and --obj-root for CMake builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 06:09:31 +00:00
Daniel Dunbar
eba6b261c5 llvm-config: Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 06:09:22 +00:00
Chris Lattner
e895c61515 Add an intel syntax MCInstPrinter implementation. You can now
transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-20 07:17:49 +00:00
Nick Lewycky
c332fba828 Remove the default value for ConstantStruct::get's isPacked parameter and
update the code which was broken by this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 20:30:26 +00:00
Devang Patel
e8e0213cc3 Write and read metadata attachments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 19:26:43 +00:00
Dan Gohman
d81c450afc Now that llc can read .ll files directly, teach it to recognize .ll as
an extension, so that the default output filename for foo.ll is foo.s,
not foo.ll.s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82071 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 19:18:41 +00:00
Kevin Enderby
b5db830840 Fixed some problems with the logic of parsing line comments by adding
isAtStartOfComment and using that instead in two places where a loop
to check if the char was in MAI.getCommentString().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 18:08:00 +00:00
Xerxes Ranby
3a9f68bb7a Make cmake generated llvm-config output correct JIT backend for non X86 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 14:36:35 +00:00
Chris Lattner
3b13d361d0 use an accessor to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 04:12:47 +00:00
Dan Gohman
a93f30ee65 Give llvm-link a -S option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 15:35:07 +00:00
Dan Gohman
04fc8c8d33 Don't bother using a PassManager just to print a Module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 15:33:42 +00:00
Chris Lattner
90edac0e8b Change MCAsmStreamer to take an MCInstPrinter instead of a
full AsmPrinter, and change TargetRegistry to keep track
of registered MCInstPrinters.

llvm-mc is still linking in the entire
target foo to get the code emitter stuff, but this is an
important step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 03:02:37 +00:00
Dan Gohman
d624154034 Convert llvm-link to IRReader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12 21:55:12 +00:00
Douglas Gregor
dc91e54013 De-bork CMake build. llvm-extract depends on asmparser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 21:26:24 +00:00
Dan Gohman
ec080467f5 Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
working. To support this, add an is_displayed() function to raw_ostream,
and generalize Process::StandardOutIsDisplayed and friends in order to
support it.

Also, call RemoveFileOnSignal before creating a file instead of after, so
that the file isn't left behind if the program is interrupted between when
the file is created and RemoveFileOnSignal is called.

While here, add a -S to llvm-extract and port it to IRReader so that it
supports assembly input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 20:46:33 +00:00
Kevin Enderby
9c656450d6 Added the ParseInstruction() hook for target specific assembler directives so
that things like .word can be parsed as target specific.  Moved parsing .word
out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
for other targets that support the .word directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 20:51:44 +00:00
Mikhail Glushenkov
57a7e94de9 Allow llvmc to take .bc files as input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 17:04:32 +00:00
Nuno Lopes
8018f5d5a4 fix leakage of Module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 14:56:31 +00:00
Daniel Dunbar
b8b70521de MC: Give target specific parsers access to the MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 00:59:15 +00:00
Daniel Dunbar
68ccdaa849 Add -output-prefix option to bugpoint (to change the default output name).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 19:26:11 +00:00
Benjamin Kramer
12fd767ed8 Fix an integer truncation noticed by MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81109 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 09:35:10 +00:00
Daniel Dunbar
8c042c2337 opt: Add -S option to print output as LLVM assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05 11:34:53 +00:00
Kevin Enderby
fb0f0dedd7 Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
preparation of supporting other targets. Then changed the lexer to parse these
as tokens.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 22:40:31 +00:00
Kevin Enderby
9823ca971d Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
supporting other targets.  Changed the code to pass MCAsmInfo to the parser
and the lexer.  Then changed the lexer to use CommentString from MCAsmInfo
instead of a literal '#' character.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 21:45:34 +00:00
Kevin Enderby
7b4608dfa0 Removed the non-target independent AsmToken::Register enum constant
from MCAsmLexer.h in preparation of supporting other targets.  Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 17:15:07 +00:00
Dan Gohman
dad45ea56e Make bugpoint use ParseIRFile instead of doing the same thing manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 16:32:58 +00:00
Dan Gohman
99ed416787 Use IRReader.h in opt, to support reading of LLVM Assembly files directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 16:00:08 +00:00
Chris Lattner
a9eb359452 TAI -> MAI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80899 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 06:13:54 +00:00
Daniel Dunbar
2b991bbd99 Tweak comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80891 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 05:47:22 +00:00
Douglas Gregor
05bb5261d8 Unbreak my CMake build. Say you'll link again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 22:45:31 +00:00
Dan Gohman
778b06bbce Switch llc from ParseBitcodeFile to ParseIRFile. This lets llc
transparently read either LLVM Assembly or LLVM Bitcode files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80829 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 19:35:19 +00:00