Dan Gohman
fbccdef106
Fix a compiler warning on hosts where uint64_t isn't unsigned long long.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-01 16:33:33 +00:00
Nick Lewycky
195bea3498
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30 15:24:09 +00:00
Bill Wendling
581b93415e
Remove unused flags.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30 00:57:51 +00:00
Bill Wendling
8dc85ddf80
Error out with bad optimization level specified.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70449 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 23:46:43 +00:00
Bill Wendling
b8cb0bb08c
Remove LTO optimization level.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 23:40:42 +00:00
Bill Wendling
98a366d547
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 23:29:43 +00:00
Bill Wendling
a7e326b0a9
Don't use 'false' for 'fast isel' here.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 21:22:00 +00:00
Bill Wendling
be8cc2a3de
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29 00:15:41 +00:00
Bill Wendling
c69d56f115
r70270 isn't ready yet. Back this out. Sorry for the noise.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28 01:04:53 +00:00
Bill Wendling
2e9d5f912a
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...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-28 00:21:31 +00:00
Chris Lattner
0370cc6399
give bitstreamreader an API to ignore names for blocks/records,
...
only llvm-bcanalyzer wants this info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 20:04:08 +00:00
Chris Lattner
c167cac8f0
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 18:15:27 +00:00
Chris Lattner
2443747e45
clean up the output of llvm-bcanalyzer by using printf
...
instead of ostreams for formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 17:59:34 +00:00
Dan Gohman
0324205bbb
Improve bugpoint's error messages when it runs out of memory,
...
or when some other std::exception is thrown.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 01:30:37 +00:00
Chris Lattner
f9a3ec86c1
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 22:21:57 +00:00
Chris Lattner
962dde3cef
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 20:59:02 +00:00
Chris Lattner
069429062d
aDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-25 22:08:52 +00:00
Rafael Espindola
7431af050f
Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24 16:55:21 +00:00
Dan Gohman
d50330cd02
Use CloneModule's ValueMap in more places, instead of looking
...
up functions by name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 15:57:18 +00:00
Mikhail Glushenkov
4558f481b8
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 19:46:10 +00:00
Tanya Lattner
911c60630f
Remove clang since its conditionally there already.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 17:48:16 +00:00
Sanjiv Gupta
2bdf490d71
Emit the auto variables of a function into a different section than parameters.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69605 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 16:59:35 +00:00
Dan Gohman
51747a7e51
Use .empty() instead of .size().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69599 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 16:19:02 +00:00
Bill Wendling
5a22d6a6a0
Revert 69474 and 69475. They are causing failures during a bootstrap on Darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 21:45:27 +00:00
Mikhail Glushenkov
7ba8ad31df
Add a configure check for llvm-gcc (reapply).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 20:55:28 +00:00
Bill Wendling
ebcceeeaba
Temporarily revert r69438 and r69439. These were causing failures during a
...
release build of llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 11:20:33 +00:00
Mikhail Glushenkov
126b014c60
Add a configure check for llvm-gcc.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18 09:57:58 +00:00
Chris Lattner
266c7bbbbc
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 05:44:34 +00:00
Ted Kremenek
47a4edccb0
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08 17:28:16 +00:00
Chris Lattner
ae7dd8004e
Add an API for the bitstream reader to read blobs and return
...
them by reference, instead of packing each byte into a
smallvector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 02:56:46 +00:00
Chris Lattner
3f75d3176b
stub out code for reading record with blobs as blobs. Not active yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 22:44:40 +00:00
Chris Lattner
e2a466bfa9
Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 20:54:32 +00:00
Oscar Fuentes
9a0107db72
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 22:41:07 +00:00
Nick Lewycky
e032590f58
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 09:39:23 +00:00
Oscar Fuentes
cf2202a849
CMake: tools/llvm-config/CMakeLists.txt: Use ! instead of comma as
...
separator in sed scripts. Resolves Bug 3881.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 12:16:32 +00:00
Misha Brukman
a9f4836313
Fixed file header comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:37:19 +00:00
Evan Cheng
9f777c64c5
Recognize arm triplets.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:54:56 +00:00
Dan Gohman
de551f91d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:45:54 +00:00
Mikhail Glushenkov
46801029ea
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 18:33:54 +00:00
Mikhail Glushenkov
4ad0d571fa
Documentation update.
...
Expand a bit on various '--*-graph' options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27 12:58:29 +00:00
Evan Cheng
23120babfa
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 01:48:21 +00:00
Douglas Gregor
4752bd3b40
CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 22:53:26 +00:00
Evan Cheng
fd82995823
Also pass -gcc-tool-args when building a shared object.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 00:53:34 +00:00
Anton Korobeynikov
773f57e66e
Another bug :(
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 21:05:21 +00:00
Anton Korobeynikov
317bc24cd6
Unbreak the build. Dunno, why it did not fail on mingw :(
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 20:16:05 +00:00
Anton Korobeynikov
ad9d21a952
Disable plugins / shared stuff generation on windows targets.
...
This fixes fallout from recent PIC/delibtoolize changes and unbreaks
build on cygming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 19:49:42 +00:00
Dan Gohman
4832f8893b
Change these sed lines to behave correctly when the input string
...
contains commas. This fixes PR3727.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 19:01:23 +00:00
Chris Lattner
cc14d25dd9
Change various llvm utilities to use PrettyStackTraceProgram in
...
their main routines. This makes the tools print their argc/argv
commands if they crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 05:34:10 +00:00
Dan Gohman
f6dd0eb5c4
Use CloneModule's ValueMap to avoid needing to look up
...
functions by name. This fixes PR718.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 02:16:23 +00:00
Dan Gohman
ef0ff140a7
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 23:20:46 +00:00