Commit Graph

2363 Commits

Author SHA1 Message Date
Nick Lewycky a303097de0 Allow a user of libLTO to specify the full pathname of the gcc executable to
run when assembling.

Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc
and it will run that gcc instead of looking for it on the path.

llvm-svn: 70490
2009-04-30 15:24:09 +00:00
Bill Wendling aeaf5a57be Remove unused flags.
llvm-svn: 70459
2009-04-30 00:57:51 +00:00
Bill Wendling dad991900b Error out with bad optimization level specified.
llvm-svn: 70449
2009-04-29 23:46:43 +00:00
Bill Wendling 6598b95712 Remove LTO optimization level.
llvm-svn: 70445
2009-04-29 23:40:42 +00:00
Bill Wendling 026e5d7667 Instead of passing in an unsigned value for the optimization level, use an enum,
which better identifies what the optimization is doing. And is more flexible for
future uses.

llvm-svn: 70440
2009-04-29 23:29:43 +00:00
Bill Wendling e9037a97d1 Don't use 'false' for 'fast isel' here.
llvm-svn: 70411
2009-04-29 21:22:00 +00:00
Bill Wendling 084669a1c9 Second attempt:
Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.

llvm-svn: 70343
2009-04-29 00:15:41 +00:00
Bill Wendling 56f2987a87 r70270 isn't ready yet. Back this out. Sorry for the noise.
llvm-svn: 70275
2009-04-28 01:04:53 +00:00
Bill Wendling d0ae15946c Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...

llvm-svn: 70270
2009-04-28 00:21:31 +00:00
Chris Lattner 0e3f50d8cf give bitstreamreader an API to ignore names for blocks/records,
only llvm-bcanalyzer wants this info.

llvm-svn: 70239
2009-04-27 20:04:08 +00:00
Chris Lattner 1cf8069c5f Print statistics for each record kind saying the number of bits
and % abbreviated.  For example:

	Record Histogram:
		  Count    # Bits   % Abv  Record Kind
		  25738   3424174  100.00  SM_SLOC_INSTANTIATION_ENTRY
		    814    562079  100.00  SM_SLOC_FILE_ENTRY
		    798     34110          SM_HEADER_FILE_INFO
		      3     91104  100.00  SM_SLOC_BUFFER_BLOB
		      3       498  100.00  SM_SLOC_BUFFER_ENTRY
		      1       465          SM_LINE_TABLE

llvm-svn: 70215
2009-04-27 18:15:27 +00:00
Chris Lattner bf419a9328 clean up the output of llvm-bcanalyzer by using printf
instead of ostreams for formatting.

llvm-svn: 70214
2009-04-27 17:59:34 +00:00
Dan Gohman 6019e07b3b Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown.

llvm-svn: 70175
2009-04-27 01:30:37 +00:00
Chris Lattner a6fdf5a8c9 Add two new record types to the blockinfo block:
BLOCKNAME and SETRECORDNAME.  This allows a bitcode
file to be self describing with pretty names for 
records and blocks in addition to numbers.  This
enhances llvm-bcanalyzer to use this to print prettily.

llvm-svn: 70165
2009-04-26 22:21:57 +00:00
Chris Lattner 277800a643 Make a major API change to BitstreamReader: split all the reading
state out of the BitstreamReader class into a BitstreamCursor class.
Doing this allows the client to have multiple cursors into the same
file, each with potentially different live block stacks and
abbreviation records.

llvm-svn: 70157
2009-04-26 20:59:02 +00:00
Chris Lattner 0cb8977c0a aDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!
llvm-svn: 70082
2009-04-25 22:08:52 +00:00
Rafael Espindola 56548523f5 Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
llvm-svn: 69972
2009-04-24 16:55:21 +00:00
Dan Gohman 956ae9dc15 Use CloneModule's ValueMap in more places, instead of looking
up functions by name.

llvm-svn: 69805
2009-04-22 15:57:18 +00:00
Mikhail Glushenkov 2c332fec97 Support --with-llvmgccdir and friends in llvmc, take 2.
Should now work when building with objdir != srcdir and when llvm-gcc is not
available.

Thanks to Duncan Sands for testing and advice!

llvm-svn: 69700
2009-04-21 19:46:10 +00:00
Tanya Lattner a1eeaff125 Remove clang since its conditionally there already.
llvm-svn: 69610
2009-04-20 17:48:16 +00:00
Sanjiv Gupta 0fcc019d36 Emit the auto variables of a function into a different section than parameters.
llvm-svn: 69605
2009-04-20 16:59:35 +00:00
Dan Gohman 59ceb59f5b Use .empty() instead of .size().
llvm-svn: 69599
2009-04-20 16:19:02 +00:00
Bill Wendling 4d10aae8c2 Revert 69474 and 69475. They are causing failures during a bootstrap on Darwin.
llvm-svn: 69478
2009-04-18 21:45:27 +00:00
Mikhail Glushenkov 73e9e021f1 Add a configure check for llvm-gcc (reapply).
llvm-svn: 69474
2009-04-18 20:55:28 +00:00
Bill Wendling 02b47d9958 Temporarily revert r69438 and r69439. These were causing failures during a
release build of llvm.

llvm-svn: 69440
2009-04-18 11:20:33 +00:00
Mikhail Glushenkov e078105a89 Add a configure check for llvm-gcc.
llvm-svn: 69438
2009-04-18 09:57:58 +00:00
Chris Lattner 184f1be4a8 Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc.  Related bugzilla's
include PR3517, PR3100, & PR2933.  Nothing uses this yet, but it
appears to work.

llvm-svn: 68940
2009-04-13 05:44:34 +00:00
Ted Kremenek b58a9058a2 Accommodate empty string for build type. This was previously causing an error
when generating an Xcode project using the CMake files (thanks to Doug Gregor
for identifying the issue).

llvm-svn: 68618
2009-04-08 17:28:16 +00:00
Chris Lattner 73ab815c27 Add an API for the bitstream reader to read blobs and return
them by reference, instead of packing each byte into a
smallvector.

llvm-svn: 68486
2009-04-07 02:56:46 +00:00
Chris Lattner 2ed6a20934 stub out code for reading record with blobs as blobs. Not active yet.
llvm-svn: 68472
2009-04-06 22:44:40 +00:00
Chris Lattner b9e07fd297 Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.
llvm-svn: 68458
2009-04-06 20:54:32 +00:00
Oscar Fuentes bda403b4c8 CMake: defines and uses macro add_llvm_definitions for keeping track
of compiler parameters explicitly added by the build
specification. This macro replaces the cmake built-in
`add_definitions'.

Detects glibc and defines _GNU_SOURCE accordingly.

Resolves bug 3882.

llvm-svn: 68428
2009-04-04 22:41:07 +00:00
Nick Lewycky b294e31e83 CloneModule stores the BasicBlock mapping in ValueMap. There's no need to
recompute it. This fixes a O(n^2) in number of blocks when reducing a crash.

llvm-svn: 68422
2009-04-04 09:39:23 +00:00
Oscar Fuentes cf03f4b041 CMake: tools/llvm-config/CMakeLists.txt: Use ! instead of comma as
separator in sed scripts. Resolves Bug 3881.

llvm-svn: 68385
2009-04-03 12:16:32 +00:00
Misha Brukman 7182686dbf Fixed file header comment.
llvm-svn: 68250
2009-04-01 21:37:19 +00:00
Evan Cheng 856e339241 Recognize arm triplets.
llvm-svn: 68229
2009-04-01 18:54:56 +00:00
Dan Gohman cff6953c45 Use CHAR_BIT instead of hard-coding 8 in several places where it
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.

llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Mikhail Glushenkov eccc5967bf Do not pass '-relocation-model=pic' to llc.
Does not work well on 32 bit targets. Bug reported by Albert Graef.

This patch also adds new "-Wllc,option" syntax to pass options to llc.

llvm-svn: 68127
2009-03-31 18:33:54 +00:00
Mikhail Glushenkov 0f78c2721b Documentation update.
Expand a bit on various '--*-graph' options.

llvm-svn: 67836
2009-03-27 12:58:29 +00:00
Evan Cheng 499d5f333f CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
llvm-svn: 67669
2009-03-25 01:48:21 +00:00
Douglas Gregor 6d1ec14f0f CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be
llvm-svn: 67056
2009-03-16 22:53:26 +00:00
Evan Cheng 690b635aa6 Also pass -gcc-tool-args when building a shared object.
llvm-svn: 66746
2009-03-12 00:53:34 +00:00
Anton Korobeynikov 7d4d379a00 Another bug :(
llvm-svn: 66708
2009-03-11 21:05:21 +00:00
Anton Korobeynikov 3b046d084e Unbreak the build. Dunno, why it did not fail on mingw :(
llvm-svn: 66692
2009-03-11 20:16:05 +00:00
Anton Korobeynikov a09ba46ee3 Disable plugins / shared stuff generation on windows targets.
This fixes fallout from recent PIC/delibtoolize changes and unbreaks
build on cygming.

llvm-svn: 66686
2009-03-11 19:49:42 +00:00
Dan Gohman 02ba62c106 Change these sed lines to behave correctly when the input string
contains commas. This fixes PR3727.

llvm-svn: 66565
2009-03-10 19:01:23 +00:00
Chris Lattner e3fc2d13be Change various llvm utilities to use PrettyStackTraceProgram in
their main routines.  This makes the tools print their argc/argv
commands if they crash.

llvm-svn: 66248
2009-03-06 05:34:10 +00:00
Dan Gohman bcad718f73 Use CloneModule's ValueMap to avoid needing to look up
functions by name. This fixes PR718.

llvm-svn: 66239
2009-03-06 02:16:23 +00:00
Dan Gohman 4f42ac8400 Fix a bugpoint bug on anonymous functions. Instead of looking up
functions in the new module by name, use the ValueMap provided by
CloneModule to do the lookups.

llvm-svn: 66216
2009-03-05 23:20:46 +00:00
Mikhail Glushenkov 33435e49a9 Add example/Skeleton.
This is a template that can be used to build your own LLVMC-based drivers.
It can be also useful as a "bare-bones" LLVMC.

llvm-svn: 65944
2009-03-03 11:02:48 +00:00