Commit Graph

3039 Commits

Author SHA1 Message Date
Duncan Sands e9cd6d069d 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 3ff1a06de6 MC: Add an MCLoggingStreamer, for use in debugging integrated-as mismatches.
llvm-svn: 104463
2010-05-23 17:44:06 +00:00
Matt Fleming 638cdb2db1 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 e85262d651 Remove dead option.
llvm-svn: 104303
2010-05-21 00:27:55 +00:00
Rafael Espindola 0af6889b89 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 8d1bc79327 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 3e0ddc000c 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 ba3398bb1a Add an also-emit-llvm option to the gold plugin.
llvm-svn: 103714
2010-05-13 13:39:31 +00:00
Jeffrey Yasskin e476fa0b8e Fix PR6951 by fixing Module leaks in bugpoint.
llvm-svn: 103523
2010-05-11 23:25:16 +00:00
Dan Gohman 4cfccb801c 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 d7f09c7851 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 a12c1ff25a 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 6be5829925 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 b87e3fee0f 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 b903a15807 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 4cd930f417 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 211427bda9 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 83e3060f08 The llc -f flag was removed.
llvm-svn: 102670
2010-04-29 23:37:44 +00:00
Dan Gohman 0cc5629f4e llc no longer requires the -f option to overwrite files.
llvm-svn: 102651
2010-04-29 18:46:52 +00:00
Daniel Dunbar c1626e3317 Remove dead option.
llvm-svn: 102621
2010-04-29 16:29:02 +00:00
Bill Wendling 633c48ec1d 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 75d986935e Fixed edis to tokenize instructions with no
operands correctly.

llvm-svn: 102227
2010-04-24 01:00:16 +00:00
Sean Callanan 85d70594f0 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 62232d90cf 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 9cfb7051b6 Support .a files directly (without -l).
llvm-svn: 101789
2010-04-19 17:25:38 +00:00
Dan Gohman 7a0fde90f5 Fix more -Wcast-qual warnings.
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Chris Lattner 4422d31b84 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 bb2ec7de9c 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 0977358509 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 ebb4ae0912 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 ff9ecb2824 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 473a53f7b1 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 a944a9a902 Simplify ".bc" detection.
llvm-svn: 101365
2010-04-15 11:33:14 +00:00
Daniel Dunbar f43481df34 Remove unnecessary uses of <iostream>.
llvm-svn: 101338
2010-04-15 03:47:24 +00:00
Chris Lattner 2df4fa5bc8 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 80ee5e299c Don't forget cmake!
llvm-svn: 101234
2010-04-14 05:35:20 +00:00
Nick Lewycky c37b45bd2d Remove accidentally committed cruft.
llvm-svn: 101230
2010-04-14 04:46:11 +00:00
Nick Lewycky 7c167954e2 Bugpoint no longer uses exceptions.
llvm-svn: 101228
2010-04-14 04:40:31 +00:00
Douglas Gregor 9078f954bf 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 814e69b171 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 8af6f765f5 Add CMake support for 'edis'.
llvm-svn: 101177
2010-04-13 20:52:50 +00:00
Chris Lattner 6b2b064d7a 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 d75c8a0813 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 393c4df342 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 deee643b95 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 2d03d3a8a7 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 1f336da54f Boolify.
llvm-svn: 101035
2010-04-12 12:22:19 +00:00
Nick Lewycky 6ba630b077 Remove use of exceptions from bugpoint. No deliberate functionality change!
llvm-svn: 101013
2010-04-12 05:08:25 +00:00
Nick Lewycky 3e24f7e632 Remove dead argument and clean whitespace. No functionality change.
llvm-svn: 100954
2010-04-10 23:18:13 +00:00
Sean Callanan a4ae4e7693 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