Commit Graph

2910 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 924b4ca59b Oops.
llvm-svn: 95670
2010-02-09 17:24:21 +00:00
Jakob Stoklund Olesen bd9e50fc91 clang test suite
llvm-svn: 95667
2010-02-09 17:20:03 +00:00
Sean Callanan e7a1b988bf Updated the enhanced disassembly library to produce
whitespace tokens in the right places.

llvm-svn: 95645
2010-02-09 01:50:54 +00:00
Sean Callanan 12f1a3ec0c Fixed a problem where the enhanced disassembly
library was reporting inaccurate token IDs.

llvm-svn: 95639
2010-02-09 01:00:18 +00:00
Sean Callanan cb956d93b8 Added header file declarations and .exports entries
for the new APIs offered by the enhanced disassembler
for inspecting operands.

llvm-svn: 95606
2010-02-08 23:34:25 +00:00
Sanjiv Gupta bb3f887a85 Fixed build error for redefinition.
llvm-svn: 95532
2010-02-08 06:08:32 +00:00
Sanjiv Gupta b67dc69a78 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.

llvm-svn: 95530
2010-02-08 05:56:37 +00:00
Jeffrey Yasskin 31faefff92 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().

llvm-svn: 95390
2010-02-05 16:19:36 +00:00
Torok Edwin 372c7d5f93 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.

llvm-svn: 95300
2010-02-04 09:31:35 +00:00
Sean Callanan 9eb8d6fb43 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.

llvm-svn: 95274
2010-02-04 01:43:08 +00:00
Daniel Dunbar e3ee332fe0 llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output.

llvm-svn: 95227
2010-02-03 18:18:30 +00:00
Chris Lattner edcf065a29 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.

llvm-svn: 95202
2010-02-03 05:55:08 +00:00
Sean Callanan 6a6f9cc634 Fixed the disassembler so it accepts multiple
instructions on a single line.  Also made it a
bit more forgiving when it reports errors.

llvm-svn: 95197
2010-02-03 03:46:41 +00:00
Chris Lattner 8856a67e41 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.

llvm-svn: 95162
2010-02-02 23:57:42 +00:00
Chris Lattner 919b97436e 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. :( :(

llvm-svn: 95148
2010-02-02 22:31:11 +00:00
Chris Lattner f0cb12acf2 eliminate FileModel::Model, just use CodeGenFileType. The client
of the code generator shouldn't care what object format a target
uses.

llvm-svn: 95124
2010-02-02 21:06:45 +00:00
Sean Callanan 0205452f38 ...and fixed the Makefile.
llvm-svn: 95119
2010-02-02 20:20:30 +00:00
Sean Callanan 2e66266d68 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.

llvm-svn: 95118
2010-02-02 20:11:23 +00:00
Chris Lattner 03dc0f7077 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.

llvm-svn: 95109
2010-02-02 19:14:27 +00:00
Chris Lattner 57992e2da6 remove dead code, we're requesting TargetMachine::AssemblyFile here.
llvm-svn: 95105
2010-02-02 19:03:39 +00:00
Sean Callanan 339975e5d5 Removed an unnecessary class from the EDDisassembler
implementation.  Also made sure that the register maps
were created during disassembler initialization.

llvm-svn: 95051
2010-02-02 02:18:20 +00:00
Sean Callanan 10b9639b74 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.

llvm-svn: 95034
2010-02-02 00:04:46 +00:00
Nate Begeman 0b810279c8 Kill the Mach-O writer, and temporarily make filetype=obj an error.
The MCStreamer based assemblers will take over for this functionality.

llvm-svn: 95033
2010-02-01 23:56:58 +00:00
Sean Callanan 0972067c93 Fix for builds with separate source and build
directories (like, oh, say, any multistage build)

llvm-svn: 95028
2010-02-01 23:27:57 +00:00
Sean Callanan 23bd0193d4 Updated to use the proper .exports file for the
target platform, depending on whether the target
supports the blocks API or not

llvm-svn: 95024
2010-02-01 23:01:38 +00:00
Sean Callanan 47cbefac94 Rollback on including blocks functionality in .exports
because some platforms don't support blocks and then
break because the symbols aren't present

llvm-svn: 95011
2010-02-01 21:57:50 +00:00
Sean Callanan bc7bd4bf40 Whoops, left some debugging code in that broke
a buildbot.  Removed.

llvm-svn: 94975
2010-02-01 09:02:24 +00:00
Sean Callanan 328f60f08c 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.

llvm-svn: 94974
2010-02-01 08:49:35 +00:00
Sean Callanan fd86e790cc Removed symbols from .exports that are not yet in
the library.

llvm-svn: 94844
2010-01-29 21:21:44 +00:00
Sean Callanan 2444ed4fea 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.

llvm-svn: 94780
2010-01-29 01:30:01 +00:00
Mikhail Glushenkov 04f442c515 Support some more options...
llvm-svn: 94752
2010-01-28 18:19:36 +00:00
Benjamin Kramer 29063eac23 Replace strcpy with memcpy when we have the length around anyway.
llvm-svn: 94746
2010-01-28 18:04:38 +00:00
Jeffrey Yasskin 091217be6f 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.

llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Mikhail Glushenkov 8e66b8eb20 Support -arch.
llvm-svn: 94546
2010-01-26 14:55:44 +00:00
Mikhail Glushenkov c9c6456a85 Support for -iquote.
llvm-svn: 94545
2010-01-26 14:55:30 +00:00
Chris Lattner 823aed16f9 make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner dec86d7337 mark some libraries that currently require RTTI.
llvm-svn: 94377
2010-01-24 20:22:08 +00:00
Chris Lattner 0522eb2160 pass "-fasm-verbose" into createAsmStreamer.
llvm-svn: 94165
2010-01-22 07:06:15 +00:00
Chris Lattner 7ba0661f27 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.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Chris Lattner c7a8eaf614 elimiante the dynamic_cast's from opt.
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner 5517958641 simplify code.
llvm-svn: 94159
2010-01-22 05:54:03 +00:00
Chris Lattner 5b0e01c54e move some files out of the llvm-mc tool into the MCParser library so
other tools can link it.

llvm-svn: 94131
2010-01-22 01:58:08 +00:00
Chris Lattner 00646cfbd4 create a new MCParser library and move some stuff into it.
llvm-svn: 94129
2010-01-22 01:44:57 +00:00
Chris Lattner 6401c883c4 remove some confused code that used strtoull
llvm-svn: 94128
2010-01-22 01:17:12 +00:00
Sean Callanan 7a77eae2f3 Moved handling of inclusion from the AsmLexer to
the AsmParser, breaking AsmLexer's dependence on
SourceMgr.

llvm-svn: 94054
2010-01-21 00:19:58 +00:00
Sean Callanan 177934e021 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.

llvm-svn: 94047
2010-01-20 23:19:55 +00:00
Sean Callanan 1a0eeb6e06 Promoted the reference to the SourceMgr from AsmLexer
into AsmParser, in preparation for making AsmLexer
independent of the SourceMgr

llvm-svn: 94043
2010-01-20 22:45:23 +00:00
Sean Callanan 70855e42e6 Modified MCAsmLexer to return error information upward
rather than printing it locally, reducing its dependence
on SourceMgr.

llvm-svn: 94041
2010-01-20 22:18:24 +00:00
Chris Lattner 38caaf14c1 give createAsmStreamer an 'isLittleEndian' argument.
llvm-svn: 93986
2010-01-20 06:39:07 +00:00
Sean Callanan 936b0d3144 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.

llvm-svn: 93916
2010-01-19 21:44:56 +00:00