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
Ted Kremenek
02e55f4a52
Add CMake support for 'edis'.
...
llvm-svn: 101177
2010-04-13 20:52:50 +00:00
Chris Lattner
f3ed0658ed
Make the disassembler respect the assembler dialect when printing instructions,
...
patch by Marius Wachtler!
llvm-svn: 101160
2010-04-13 18:41:17 +00:00
Sean Callanan
5066bc60be
Build system fix to make llvm-mc properly build
...
after edis. Really, there ought to be some
mechanism to ensure that PARALLEL_DIRS get built
after DIRS.
llvm-svn: 101095
2010-04-12 23:55:28 +00:00
Sean Callanan
7d250f2b65
Build system fixes. llvm-mc depends on
...
libEnhancedDisassembly, so we now build the
static library in all cases (although the shared
library is only built when requested/possible).
Also, fixed a bug where edis wasn't properly
initializing the targets it uses.
llvm-svn: 101072
2010-04-12 21:55:49 +00:00
Sean Callanan
d9474b01ae
Bug fix: made the enhanced disassembler's link
...
flags work properly when EDIS_VERSION is defined
llvm-svn: 101063
2010-04-12 20:23:08 +00:00
Sean Callanan
033fde84b5
Second try at integrating the edis tester. This
...
time I use the LIBS variable, which is not subject
to a %.a -> -l% transformation, to link llvm-mc
against libEnhancedDisassembly.
llvm-mc -edis works the same as llvm-mc
-disassemble, but outputs tokens and operands.
llvm-svn: 101058
2010-04-12 19:43:00 +00:00
Benjamin Kramer
033019690a
Boolify.
...
llvm-svn: 101035
2010-04-12 12:22:19 +00:00
Nick Lewycky
096fd1e0a6
Remove use of exceptions from bugpoint. No deliberate functionality change!
...
llvm-svn: 101013
2010-04-12 05:08:25 +00:00
Nick Lewycky
87bd8ff991
Remove dead argument and clean whitespace. No functionality change.
...
llvm-svn: 100954
2010-04-10 23:18:13 +00:00
Sean Callanan
2ec5514c48
Updated the edis build mechanism to allow for builds
...
that do not build some (or all) of the targets that
edis supports.
llvm-svn: 100910
2010-04-10 00:48:10 +00:00
Chris Lattner
bc47db9f8e
revert r100842 which broke several of the build bots.
...
llvm-svn: 100848
2010-04-09 04:24:20 +00:00
Sean Callanan
6a94ce3daf
Added a tester for the enhanced disassembler,
...
integrated into the llvm-mc testing tool.
llvm-svn: 100842
2010-04-09 01:43:16 +00:00
Sean Callanan
736f3ecc4c
Bugfixes for edis. Code to initialize instruction
...
state was being executed too lazily, and the LLVM
assembly syntax for the disassembler was not being
written into the proper disassembler state variable.
llvm-svn: 100830
2010-04-09 00:11:15 +00:00
Sean Callanan
dcd7a375dd
Added support for ARM disassembly to edis.
...
I also added a rule to the ARM target's Makefile to
build the ARM-specific instruction information table
for the enhanced disassembler.
I will add the test harness for all this stuff in
a separate commit.
llvm-svn: 100735
2010-04-08 00:48:21 +00:00
Chris Lattner
5b4c7591ac
add .o file writing for inline asm in llc. Here's a silly
...
demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
LLVM ERROR: Error parsing inline asm
Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:
$ cat asm.c
int foo(int X) {
__asm__ ("incl %0" : "+r" (X));
return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$
don't stop at inc!
llvm-svn: 100491
2010-04-05 23:11:24 +00:00
Chris Lattner
8b9eaae8d5
tidy #includes.
...
llvm-svn: 100489
2010-04-05 23:07:18 +00:00
Chris Lattner
269737461d
stringref-ize the MemoryBuffer::get apis. This requires
...
a co-committed clang patch.
llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Chris Lattner
8fb6be1886
fix an ugly wart in the MCInstPrinter api where the
...
raw_ostream to print an instruction to had to be specified
at MCInstPrinter construction time instead of being able
to pick at each call to printInstruction.
llvm-svn: 100307
2010-04-04 05:04:31 +00:00
Chris Lattner
fb18894982
remove some extraneous casts
...
llvm-svn: 100287
2010-04-03 21:03:50 +00:00
Chris Lattner
c2f273b52d
Add special case bitcode support for DebugLoc. This avoids
...
having the bitcode writer materialize mdnodes for all the
debug location tuples when writing out the bc file and
stores the information in a more compact form. For example,
the -O0 -g bc file for combine.c in 176.gcc shrinks from
739392 to 512096 bytes.
This concludes my planned short-term debug info work.
llvm-svn: 100261
2010-04-03 02:17:50 +00:00
Mikhail Glushenkov
f4668a70f5
Pass -shared to the linker.
...
llvm-svn: 100260
2010-04-03 02:00:03 +00:00
Chris Lattner
6fb3f169c8
add a couple missing enum names.
...
llvm-svn: 100257
2010-04-03 01:05:24 +00:00
Sean Callanan
ea4f4644ee
Updated the install location for EnhancedDisassembly
...
on Mac OS X to use @rpath rather than an absolute
path. Also allowed the version to be set using an
environment variable.
llvm-svn: 100163
2010-04-02 00:53:42 +00:00
Mikhail Glushenkov
a44a629d14
Pass -m32/-m64 to assembler.
...
llvm-svn: 100064
2010-03-31 23:51:55 +00:00
Dan Gohman
ad125e679e
Fix llvm-ld to clean up its output files in case of an error.
...
llvm-svn: 99915
2010-03-30 19:56:41 +00:00
Chris Lattner
64d472ae54
revert r99719 which is breaking the botz.
...
llvm-svn: 99721
2010-03-27 18:01:10 +00:00
Dan Gohman
542d5a3602
Make llvm-ld remove its output files in the event of an error.
...
llvm-svn: 99719
2010-03-27 16:49:51 +00:00
Dan Gohman
4651d3f3ef
No need to check the same condition twice.
...
llvm-svn: 99716
2010-03-27 16:36:08 +00:00
Daniel Dunbar
d04906b49e
llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
...
exactly two passes in that case, and don't ever need to recompute any layout,
so this is a nice baseline for relaxation performance.
llvm-svn: 99563
2010-03-25 22:49:09 +00:00
Dan Gohman
7f76052c8c
Trim #includes.
...
llvm-svn: 99416
2010-03-24 19:56:17 +00:00
Dan Gohman
475a978a96
It's not necessary to call raw_ostream::close explicitly on automatic
...
raw_ostream variables immediately before they go out of scope.
llvm-svn: 99413
2010-03-24 19:00:02 +00:00
Daniel Dunbar
b07aeb1c00
llvm-mc: Support -filetype=null, for timing purposes.
...
llvm-svn: 99349
2010-03-23 23:47:12 +00:00
Bill Wendling
a33116ece2
Remove if DISABLED not if not DISABLED...
...
llvm-svn: 99343
2010-03-23 23:09:03 +00:00
Bill Wendling
9a977ce8ce
Use "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
...
Apple-style builds.
llvm-svn: 99336
2010-03-23 22:15:33 +00:00