Commit Graph

3095 Commits

Author SHA1 Message Date
Duncan Sands
57b6e9eb6c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-02 15:36:26 +00:00
Nick Lewycky
8d0e1bcc92 The llc -f flag was removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 23:37:44 +00:00
Dan Gohman
281ead4da6 llc no longer requires the -f option to overwrite files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 18:46:52 +00:00
Daniel Dunbar
8ae93e77e8 Remove dead option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 16:29:02 +00:00
Bill Wendling
c3d0e0c8ef 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>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102405 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 00:55:25 +00:00
Sean Callanan
a870256d7d Fixed edis to tokenize instructions with no
operands correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 01:00:16 +00:00
Sean Callanan
a0f914b6c1 Fixes to edis that mark x86 call targets as
memory operands rather than immediate operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102217 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 22:17:17 +00:00
Sean Callanan
d8993a3f92 Fixed EDOperand to use the operand type, not the
flags, to determine whether or not the operand is
a memory operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 01:56:36 +00:00
Mikhail Glushenkov
c1b202a2b8 Support .a files directly (without -l).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 17:25:38 +00:00
Dan Gohman
43bc70ebef Fix more -Wcast-qual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 17:44:03 +00:00
Chris Lattner
2decb22222 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 22:42:17 +00:00
Nick Lewycky
4b67bc1e80 Revert r64616 which worked around http://gcc.gnu.org/PR42757 , we just didn't
know it at the time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 04:32:20 +00:00
Dan Gohman
aa08c55e18 Create an exports file, so that the plugin only exports the onload symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101431 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 00:43:25 +00:00
Dan Gohman
f6920033e0 Make things static that don't need to be referenced from outside the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101430 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 00:42:57 +00:00
Dan Gohman
7c52f2ee06 Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 23:08:00 +00:00
Dan Gohman
b16b53b181 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 20:54:25 +00:00
Benjamin Kramer
3bb37e968b Simplify ".bc" detection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 11:33:14 +00:00
Daniel Dunbar
8f10915145 Remove unnecessary uses of <iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 03:47:24 +00:00
Chris Lattner
6484dd46b8 fix a crash on "lli ex" or any other file whose name is exactly two
characters long.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 03:32:19 +00:00
Nick Lewycky
ac1a379499 Don't forget cmake!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 05:35:20 +00:00
Nick Lewycky
d4ef4df939 Remove accidentally committed cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:46:11 +00:00
Nick Lewycky
ac15da6705 Bugpoint no longer uses exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:40:31 +00:00
Douglas Gregor
533ae9b71d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 22:47:43 +00:00
Sean Callanan
9899f70a74 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 21:21:57 +00:00
Ted Kremenek
0a6f053732 Add CMake support for 'edis'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101177 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:52:50 +00:00
Chris Lattner
f23c769294 Make the disassembler respect the assembler dialect when printing instructions,
patch by Marius Wachtler!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 18:41:17 +00:00
Sean Callanan
18d57661f3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 23:55:28 +00:00
Sean Callanan
2fb938fd42 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 21:55:49 +00:00
Sean Callanan
dae9efc23e Bug fix: made the enhanced disassembler's link
flags work properly when EDIS_VERSION is defined


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101063 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 20:23:08 +00:00
Sean Callanan
668b15467b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 19:43:00 +00:00
Benjamin Kramer
2706387d37 Boolify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 12:22:19 +00:00
Nick Lewycky
22ff748712 Remove use of exceptions from bugpoint. No deliberate functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 05:08:25 +00:00
Nick Lewycky
16350f8d00 Remove dead argument and clean whitespace. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 23:18:13 +00:00
Sean Callanan
35a3d3f8cd Updated the edis build mechanism to allow for builds
that do not build some (or all) of the targets that
edis supports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100910 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 00:48:10 +00:00
Chris Lattner
cfc99a99bd revert r100842 which broke several of the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 04:24:20 +00:00
Sean Callanan
8c0a1608d5 Added a tester for the enhanced disassembler,
integrated into the llvm-mc testing tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100842 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 01:43:16 +00:00
Sean Callanan
4285b294a8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 00:11:15 +00:00
Sean Callanan
8f993b8c24 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:48:21 +00:00
Chris Lattner
af632c91a0 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!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100491 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:11:24 +00:00
Chris Lattner
519466c32f tidy #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:07:18 +00:00
Chris Lattner
4c842dda39 stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 22:42:30 +00:00
Chris Lattner
d374087be5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:04:31 +00:00
Chris Lattner
4d12fdc2d9 remove some extraneous casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 21:03:50 +00:00
Chris Lattner
a6245247e9 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 02:17:50 +00:00
Mikhail Glushenkov
cbf1aa9e31 Pass -shared to the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 02:00:03 +00:00
Chris Lattner
d3a5fa8e96 add a couple missing enum names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 01:05:24 +00:00
Sean Callanan
eb3a1ab796 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:53:42 +00:00
Mikhail Glushenkov
62d1da0bb9 Pass -m32/-m64 to assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 23:51:55 +00:00
Dan Gohman
132a9946bf Fix llvm-ld to clean up its output files in case of an error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 19:56:41 +00:00
Chris Lattner
46475cb08e revert r99719 which is breaking the botz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99721 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-27 18:01:10 +00:00