Douglas Gregor
f5291553f2
Introduce new headers whose inclusion forces linking and
...
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.
llvm-svn: 73543
2009-06-16 20:12:29 +00:00
Mikhail Glushenkov
5569b9482b
Documentation update.
...
llvm-svn: 73448
2009-06-16 00:13:52 +00:00
Rafael Espindola
904e6801af
Remove the gcc= option. llvm-gcc uses only as=
...
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.
llvm-svn: 73383
2009-06-15 10:14:18 +00:00
Rafael Espindola
65d1c4f548
Bug fix:
...
string::find returns string::npos if the substring is not found.
llvm-svn: 73145
2009-06-09 21:14:25 +00:00
Mikhail Glushenkov
1c400b6622
A basic PIC16 toolchain driver.
...
Nice addition to the examples and also a starting point for Sanjiv to work on.
llvm-svn: 73013
2009-06-07 07:08:01 +00:00
Nick Lewycky
acd23348af
Add option for specifying the path to assembler, "as". This overrides the path
...
to gcc.
llvm-svn: 73008
2009-06-07 00:50:45 +00:00
Devang Patel
8d170194e8
Add new function attribute - noimplicitfloat
...
Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.
llvm-svn: 72959
2009-06-05 21:57:13 +00:00
Devang Patel
9757e4f9f3
Add new function attribute - noredzone.
...
Update code generator to use this attribute and remove DisableRedZone target option.
Update llc to set this attribute when -disable-red-zone command line option is used.
llvm-svn: 72894
2009-06-04 22:05:33 +00:00
Douglas Gregor
31439d9bde
CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
...
the CMake-generated Xcode project build properly.
llvm-svn: 72883
2009-06-04 19:53:37 +00:00
Nick Kledzik
5864847d7b
<rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
...
llvm-svn: 72881
2009-06-04 19:14:08 +00:00
Nick Kledzik
870391a06e
<rdar://problem/6940611> libLTO.dylib needs to let linker specify path to assembler
...
Add lto_codegen_set_assembler_path() API which allows the linker to specify the
path to the assembler tool to run. When assembler is used (instead of compiler)
different command line options are used.
Add LTO_API_VERSION #define so clients (linkers) can conditionalize use of new APIs.
llvm-svn: 72823
2009-06-04 00:28:45 +00:00
Nick Kledzik
23e080b04e
<rdar://problem/6941517> C++ static constructors not preserved for static executable using LTO
...
Move setRelocationModel() to be called before TargetMachine is instantiated.
llvm-svn: 72816
2009-06-03 22:52:12 +00:00
Daniel Dunbar
57d886ecbc
Change LTO to run the global opt pass twice.
...
- This matches llvm-ld.
It took a bit of archeology to figure out what the right thing to do was
(whether this was intentionally added or intentionally removed). My final
conclusion is that Chris added this intentionally here:
http://llvm.org/viewvc/llvm-project?view=rev&revision=16913
but the changes weren't propogated to llvm-ld until here:
http://llvm.org/viewvc/llvm-project?view=rev&revision=34058
which was after lto.cpp had been cloned off (of llvm-ld), here:
http://llvm.org/viewvc/llvm-project?view=rev&revision=29494
From the commit message, it looks like the motivation for running global opt
again is because we ran it prior to inlining. Based on that I updated the
comment and also only run the pass if we actually ran the inliner.
Chris, please review.
llvm-svn: 72811
2009-06-03 21:51:32 +00:00
Daniel Dunbar
6a35862267
Add createStandardLTOPasses to StandardPasses.h, and move lto and llvm-ld over.
...
- I know it sounds crazy, but I think all the pass lists are now coalesced into
StandardPasses.h.
llvm-svn: 72805
2009-06-03 21:06:14 +00:00
Daniel Dunbar
fe1e04f85a
Switch opt to using StandardPasses.h
...
- No functionality change, but please check if you don't believe me.
llvm-svn: 72789
2009-06-03 18:22:15 +00:00
Oscar Fuentes
86f4f18dca
CMake: Implements and documents option LLVM_ENABLE_ASSERTS.
...
llvm-svn: 72774
2009-06-03 15:11:25 +00:00
Nick Kledzik
c367a91ca8
update comments about .objc_ symbols being generated
...
llvm-svn: 72708
2009-06-01 23:41:09 +00:00
Nick Kledzik
3486856fd9
<rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
...
Parse __OBJC data structures and synthesize magic .objc_ symbols.
Also, alter mangler so that objc method names are readable.
llvm-svn: 72700
2009-06-01 20:33:09 +00:00
Nick Lewycky
8e4eb22f45
Add missing codenames to the .bc analyzer.
...
llvm-svn: 72684
2009-06-01 04:41:03 +00:00
Evan Cheng
d3943e6171
Untabify.
...
llvm-svn: 72600
2009-05-30 00:48:34 +00:00
Oscar Fuentes
72dd52b258
CMake: Set LIBS on llvm-config so we can query the system libraries
...
used by CMake with --ldflags.
llvm-svn: 72470
2009-05-27 15:49:33 +00:00
Nick Lewycky
c1dbf95623
Fix the crash debugger to actually bisect globals once it's determined that it
...
can't just eliminate all global initializers.
llvm-svn: 72378
2009-05-25 06:29:56 +00:00
Nick Lewycky
dc75efd40a
Add a bisection step on the list of instructions before doing the linear
...
simplification. It's not clear to me whether this can replace the first of the
linear instruction simplification stages or not, so I left it in.
llvm-svn: 72377
2009-05-25 05:30:00 +00:00
Torok Edwin
c492a2c1bc
Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
...
can crash during instruction simplification (for example if it creates a
broken module).
llvm-svn: 72362
2009-05-24 09:40:47 +00:00
Torok Edwin
65289dbda1
Add -disable-global-remove option to bugpoint.
...
Sometimes when bugpointing a crash the bugpoint-reduced-simplified.bc reproduces
a totally different bug than the original one ("GV doesn't have initializer").
Although its useful to report that bug too, I need a way to reduce the original
bug, hence I introduced -disable-global-remove.
llvm-svn: 72361
2009-05-24 09:31:04 +00:00
Duncan Sands
28cf31b990
Make sure the CXXFLAGS setting is picked up by
...
the common Makefile. Not sure why this suddenly
started causing problems.
llvm-svn: 71925
2009-05-16 04:00:00 +00:00
Mikhail Glushenkov
d9ef672a0d
The 'forward_as' property did not use its second argument.
...
See PR4159 for details. Patch by Martin Nowack!
llvm-svn: 71054
2009-05-06 01:41:19 +00:00
Evan Cheng
2deb91f54b
bugpoint for jit should just ignore GCC arguments.
...
llvm-svn: 70988
2009-05-05 18:35:36 +00:00
Evan Cheng
0eb8616e89
Default llc / lli optimization to "Default", which corresponds to -O1 / -O2.
...
llvm-svn: 70934
2009-05-04 23:05:19 +00:00
Dan Gohman
908d546da3
Fix a compiler warning on hosts where uint64_t isn't unsigned long long.
...
llvm-svn: 70548
2009-05-01 16:33:33 +00:00
Nick Lewycky
503cfd4ace
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
9a6ed80b64
Remove unused flags.
...
llvm-svn: 70459
2009-04-30 00:57:51 +00:00
Bill Wendling
4df71cd268
Error out with bad optimization level specified.
...
llvm-svn: 70449
2009-04-29 23:46:43 +00:00
Bill Wendling
6e33661382
Remove LTO optimization level.
...
llvm-svn: 70445
2009-04-29 23:40:42 +00:00
Bill Wendling
40a162f75f
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
e02f6210ab
Don't use 'false' for 'fast isel' here.
...
llvm-svn: 70411
2009-04-29 21:22:00 +00:00
Bill Wendling
7546bed590
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
ef47ace92f
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
2799e916c3
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
c8838e7b00
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
bd53d3b24f
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
23dfe61ece
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
74bf1cb52e
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
f84ee5d944
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
a43dcba929
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
6d2e830ad8
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
b01a03d6d5
Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
...
llvm-svn: 69972
2009-04-24 16:55:21 +00:00
Dan Gohman
6cf471ad30
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
1b37a864d2
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
0f0aee8534
Remove clang since its conditionally there already.
...
llvm-svn: 69610
2009-04-20 17:48:16 +00:00
Sanjiv Gupta
44b55dc966
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
6f18ecd37b
Use .empty() instead of .size().
...
llvm-svn: 69599
2009-04-20 16:19:02 +00:00
Bill Wendling
b9b8df7897
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
c4c09c570f
Add a configure check for llvm-gcc (reapply).
...
llvm-svn: 69474
2009-04-18 20:55:28 +00:00
Bill Wendling
8f953e077c
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
60c590c45a
Add a configure check for llvm-gcc.
...
llvm-svn: 69438
2009-04-18 09:57:58 +00:00
Chris Lattner
c1bfdc9bb2
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
af38385f43
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
12dadd5a5e
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
a98e068143
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
7e2c9be68e
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
2da28965f6
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
a97e687848
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
bb781a2974
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
dd9c6eb7ba
Fixed file header comment.
...
llvm-svn: 68250
2009-04-01 21:37:19 +00:00
Evan Cheng
2e9343d630
Recognize arm triplets.
...
llvm-svn: 68229
2009-04-01 18:54:56 +00:00
Dan Gohman
770f4158e5
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
98603f97fa
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
d1d0033738
Documentation update.
...
Expand a bit on various '--*-graph' options.
llvm-svn: 67836
2009-03-27 12:58:29 +00:00
Evan Cheng
129934ea28
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
f15b4edb34
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
e4f82d3dcc
Also pass -gcc-tool-args when building a shared object.
...
llvm-svn: 66746
2009-03-12 00:53:34 +00:00
Anton Korobeynikov
205b701b43
Another bug :(
...
llvm-svn: 66708
2009-03-11 21:05:21 +00:00
Anton Korobeynikov
a4b01bf40c
Unbreak the build. Dunno, why it did not fail on mingw :(
...
llvm-svn: 66692
2009-03-11 20:16:05 +00:00
Anton Korobeynikov
fe336ae73e
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
fd1f0259a6
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
1b05680d5f
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
5487f51dbf
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
ab9affc0bf
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
06f114ba92
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
Mikhail Glushenkov
1777b8c113
Comment fixes.
...
llvm-svn: 65943
2009-03-03 10:04:57 +00:00
Mikhail Glushenkov
86e63a12c5
Use LLVMLIBS instead of USEDLIBS.
...
Since this Makefile is supposed to be usable from LLVM-based projects not in the
tree, LLVMLIBS should be used instead of USEDLIBS. This depends on my previous
fix to Makefile.rules.
llvm-svn: 65941
2009-03-03 10:03:53 +00:00
Mikhail Glushenkov
96788a19b6
Move example plugins to the example/ directory.
...
llvm-svn: 65939
2009-03-03 10:02:53 +00:00
Nick Lewycky
b7302132ac
ENABLE_PIC is either 0 or 1, but is always defined.
...
llvm-svn: 65938
2009-03-03 07:45:09 +00:00
Bill Wendling
8adf350009
Add a "-gcc-tool-args" option. This option acts like the "-tool-args" option,
...
but passes the arguments to the "gcc" invocation instead of to the "llc"
invocation.
llvm-svn: 65896
2009-03-02 23:13:18 +00:00
Mikhail Glushenkov
a79911a965
Move the rules for building plugins to Makefile.rules.
...
llvm-svn: 65827
2009-03-02 09:04:13 +00:00
Mikhail Glushenkov
07e209b7b0
Fix build with objdir != srcdir.
...
llvm-svn: 65826
2009-03-02 09:03:36 +00:00
Mikhail Glushenkov
3f2bbd6301
Move code from Main.cpp to the include dir.
...
User drivers based on llvmc must all share the initialization code.
Putting main() into libCompilerDriver is not a very good idea IMO (and ld gave
me some strange EH-related error anyway).
llvm-svn: 65825
2009-03-02 09:03:02 +00:00
Mikhail Glushenkov
3cde18e191
Reorganize llvmc code.
...
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change
the build system accordingly. Makes it easier for projects using LLVM to build
their own llvmc-based drivers.
Tested with objdir != srcdir.
llvm-svn: 65821
2009-03-02 09:01:14 +00:00
Chris Lattner
4869ed1aa7
disable exports from a bunch more tools, those without plugins.
...
llvm-svn: 65558
2009-02-26 19:01:11 +00:00
Chris Lattner
fe5245613b
use TOOL_NO_EXPORTS, this shrinks the llvm-as binary from 1825296 to
...
1662184 bytes (~10%)
llvm-svn: 65551
2009-02-26 18:29:42 +00:00
Nick Lewycky
962dc30177
Tabs to spaces presto chango! Pointed out by Duncan Sands.
...
llvm-svn: 65523
2009-02-26 09:08:43 +00:00
Nick Lewycky
2e90dfefff
Force 'llvm-config' to go first, optionally followed by lto and gold mixed in
...
with the rest of the parallel directories.
Build lto when possible on all platforms. Make gold to explicitly depend on
libLTO.
llvm-svn: 65518
2009-02-26 07:56:49 +00:00
Nick Lewycky
0132cfe834
Add the function attributes pass during LTO time.
...
llvm-svn: 65508
2009-02-26 06:56:16 +00:00
Nick Lewycky
8b33f0ef05
If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
...
off in libLTO.
llvm-svn: 65310
2009-02-23 07:41:55 +00:00
Nick Lewycky
9dc59d9c7b
Add an option to the gold plugin to make it emit a file with the public api
...
list that can in turn be passed to -internalize pass through
-internalize-public-api-file.
Pass gold -plugin-opt=generate-api-file to produce "apifile.txt" in the current
directory.
llvm-svn: 65295
2009-02-22 22:15:44 +00:00
Rafael Espindola
86b3bf5add
really fix style
...
llvm-svn: 64923
2009-02-18 17:49:06 +00:00
Rafael Espindola
3435277172
fix style
...
llvm-svn: 64905
2009-02-18 08:30:15 +00:00
Dan Gohman
0e73582689
Eliminate several more unnecessary intptr_t casts.
...
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Devang Patel
6ae4cb364b
Remove changes that were accidently included in previous commit.
...
llvm-svn: 64835
2009-02-17 22:45:18 +00:00
Devang Patel
25f2741ae9
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
...
Add support for two additional DWARF attributes to encode Objective-C runtime version number.
llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Rafael Espindola
c5a5171d1b
tools like nm and ar only need register_claim_file and add_symbols. Don't abort
...
if other hooks are missing.
llvm-svn: 64812
2009-02-17 21:08:21 +00:00
Nick Lewycky
6b1d3c472e
Shoot! Remove this debugging line again!
...
llvm-svn: 64617
2009-02-15 22:50:17 +00:00
Nick Lewycky
c3eb6707e6
Don't discard definitions of common symbols. Not sure if this is the right fix.
...
Before this change, the program:
int var;
int main(void) { return 0; }
when run under 'nm -g' would show 'U var' with the gold plugin and
'B var' with gcc.
llvm-svn: 64616
2009-02-15 22:49:17 +00:00
Dan Gohman
2a08dc12a9
Rename bugpoint's error message file so that if it somehow
...
gets left behind, it's less cryptic.
llvm-svn: 64399
2009-02-12 20:53:27 +00:00
Duncan Sands
beb14ee048
Revert r64299: it breaks the build when configured
...
without --enable-pic, like my nightly tester.
llvm-svn: 64302
2009-02-11 13:23:49 +00:00
Nick Lewycky
37642a4967
Try this. Darwin -> LTO, PIC -> LTO + possibly gold too.
...
llvm-svn: 64299
2009-02-11 08:44:13 +00:00
Devang Patel
d363b52c07
62987 disables LTO build on darwin.
...
Revert 62987 for now. Nicolas please investigate.
llvm-svn: 64285
2009-02-11 02:34:33 +00:00
Chris Lattner
385ad992b2
fix bugpoint url, patch by Pieter de Bie!
...
llvm-svn: 64022
2009-02-07 18:56:30 +00:00
Nick Lewycky
11dca311a6
Free the buffer in the case where we don't create a module out of it, as
...
pointed out by Torok Edwin.
Remove trailing whitespaces.
llvm-svn: 64002
2009-02-07 03:15:01 +00:00
Nick Lewycky
c54f8330b0
Correct strange whitespace.
...
llvm-svn: 63927
2009-02-06 07:01:00 +00:00
Nick Lewycky
0f8a4bbb7e
Free the buffer.
...
llvm-svn: 63907
2009-02-06 01:58:34 +00:00
Chris Lattner
a74fb94d27
fix PR3488: llvm-ar r doesn't replace existing files
...
Patch by Daniel Shelton!
llvm-svn: 63870
2009-02-05 17:58:39 +00:00
Duncan Sands
134778fae1
Revert the previous commit. It seems it didn't
...
really solve the problem. Also it changed the
name from libLLVMgold to LLVMgold (correcting
the name resulted in the original problem
suddenly reappearing).
llvm-svn: 63861
2009-02-05 10:21:34 +00:00
Duncan Sands
9ae3dee83e
Stop llvm-config thinking that there are circular
...
dependencies between libraries due to __dso_handle
when doing "make install". I don't know what the
LINK_COMPONENTS stuff is about, so I left it alone.
llvm-svn: 63860
2009-02-05 09:54:02 +00:00
Nick Lewycky
7c25f31e98
It's not obvious, but lto_module_create_from_memory doesn't need to use the
...
buffer after it creates the Module. Thus, we don't need to store this pointer
in claimed_file.
llvm-svn: 63834
2009-02-05 05:36:01 +00:00
Nick Lewycky
43c102836a
Remove accidentally included debug message!
...
Reword a comment for clarity. Remove some extra whitespace.
llvm-svn: 63823
2009-02-05 04:14:23 +00:00
Torok Edwin
cd96136848
Alphabetize includes. Update comment.
...
llvm-svn: 63771
2009-02-04 21:00:02 +00:00
Torok Edwin
04de24510f
mention that PIC is needed for libLTO and libLLVMgold
...
llvm-svn: 63755
2009-02-04 19:12:25 +00:00
Torok Edwin
b3017f3e09
remove printf - it was there only for debugging!
...
llvm-svn: 63742
2009-02-04 17:40:28 +00:00
Torok Edwin
36cbde673b
add support for .a files containing LLVM IR to the gold plugin
...
llvm-svn: 63741
2009-02-04 17:39:30 +00:00
Nick Lewycky
23adb71f2a
Add LLVM plugin for gold.
...
llvm-svn: 63623
2009-02-03 07:13:24 +00:00
Mikhail Glushenkov
f9201d933e
Add some comments.
...
llvm-svn: 63364
2009-01-30 02:12:57 +00:00
Mikhail Glushenkov
920118470d
Add three new option properties.
...
Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.
llvm-svn: 63172
2009-01-28 03:47:20 +00:00
Nick Lewycky
a41f9610fe
Build libLTO on any platform so long as PIC is enabled.
...
llvm-svn: 62987
2009-01-26 03:04:57 +00:00
Mike Stump
ef377ddede
Perform optional clang building.
...
llvm-svn: 62895
2009-01-24 00:00:41 +00:00
Mikhail Glushenkov
ff00dc77f2
Fix 'llvm-config --libs' output.
...
Change the naming scheme for llvmc plugins so that they do not appear in
'llvm-config --libs' output.
llvm-svn: 62687
2009-01-21 13:05:00 +00:00
Mikhail Glushenkov
bf9e875d8e
Change the hook API back to prevent memory leaks.
...
llvm-svn: 62686
2009-01-21 13:04:33 +00:00
Mikhail Glushenkov
9153777db7
Allow hooks with arguments.
...
llvm-svn: 62685
2009-01-21 13:04:00 +00:00
Mikhail Glushenkov
49be18cfc6
Registry.h should not depend on CommandLine.h.
...
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.
llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5000223556
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Rafael Espindola
0aba6c9435
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Mikhail Glushenkov
615e954f0f
Some small documentation fixes.
...
llvm-svn: 62251
2009-01-15 02:42:40 +00:00
Mikhail Glushenkov
682197e760
Clarify the documentation a bit.
...
llvm-svn: 62249
2009-01-15 02:04:54 +00:00
Mikhail Glushenkov
1acdd98295
Make -o a prefix option.
...
Both 'llvmc -o file' and 'llvmc -ofile' should work.
llvm-svn: 62211
2009-01-14 02:02:16 +00:00
Mikhail Glushenkov
6761ea2676
Add a --check-graph option to llvmc.
...
llvm-svn: 61989
2009-01-09 16:16:27 +00:00
Oscar Fuentes
b37acd2804
CMake: replace `rm' with portable invocations of cmake.
...
Based on a bug report by Yonggang Luo.
llvm-svn: 61875
2009-01-07 19:24:44 +00:00
Chris Lattner
30583c34ed
make llvm-ld smart enough to link against native libraries that are
...
not in system library directories by checking -L paths as well.
Patch by Axel Naumann!
llvm-svn: 61730
2009-01-05 19:01:32 +00:00
Bill Wendling
58dc5669b7
Setting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.
...
llvm-svn: 61599
2009-01-03 01:48:26 +00:00
Chris Lattner
f28c74870f
Reimplement the old and horrible bison parser for .ll files with a nice
...
and clean recursive descent parser.
This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
including what is autogenerated).
2. The code should be significantly faster than the old code because we
don't have to work around bison's poor handling of datatypes with
ctors/dtors. This also makes the code much more resistant to memory
leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32". There was no good
reason to support this, it was just an accident of the old
implementation. I have no reason to think that anyone is actually using
this.
6. The syntax for sticking a global variable has changed to make it
unambiguous. I don't think anyone is depending on this since only clang
supports this and it is not solid yet, so I'm not worried about anything
breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
I'll prune this from the makefiles as a subsequent commit.
There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.
llvm-svn: 61558
2009-01-02 07:01:27 +00:00
Misha Brukman
3eb537b893
Add spacing between type and variable name.
...
llvm-svn: 61530
2008-12-31 17:41:49 +00:00
Misha Brukman
ba68ff9a5d
Comment headers should extend to 80 chars.
...
llvm-svn: 61529
2008-12-31 17:40:52 +00:00
Misha Brukman
6c8b57ddfa
Fix spacing to be uniform for parameters.
...
llvm-svn: 61528
2008-12-31 17:39:58 +00:00
Duncan Sands
36db5853cb
Rename AddReadAttrs to FunctionAttrs, and teach it how
...
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape. Mark such arguments 'nocapture'.
llvm-svn: 61525
2008-12-31 16:14:43 +00:00
Mikhail Glushenkov
90baa08c2b
Some enhancements for the 'case' expression.
...
Add (error) and (empty).
llvm-svn: 61117
2008-12-17 02:47:01 +00:00
Mikhail Glushenkov
2f6a78628d
Add a comment to the auto-generated docs.
...
llvm-svn: 60985
2008-12-13 17:51:47 +00:00
Mikhail Glushenkov
e114e7652a
Merge llvm-rst.css and llvm.css.
...
llvm-svn: 60984
2008-12-13 17:50:58 +00:00
Mikhail Glushenkov
8d8dd2f6a3
Some more documentation tweaks.
...
llvm-svn: 60970
2008-12-13 03:11:37 +00:00
Mikhail Glushenkov
37399780e2
More cosmetic tweaks for llvmc docs.
...
llvm-svn: 60969
2008-12-13 02:28:58 +00:00
Mikhail Glushenkov
0f084f3469
Fix W3C validator errors.
...
llvm-svn: 60912
2008-12-11 23:43:14 +00:00
Mikhail Glushenkov
7ac8dfbc99
Use correct file for the llvmc tutorial.
...
llvm-svn: 60910
2008-12-11 23:33:33 +00:00
Mikhail Glushenkov
24b3fd0fa8
Update the auto-generated llvmc documentation.
...
llvm-svn: 60909
2008-12-11 23:24:40 +00:00
Mikhail Glushenkov
0ed5bf3b7a
Add a '-Wo,' option that passes options to opt.
...
llvm-svn: 60902
2008-12-11 22:19:14 +00:00
Mikhail Glushenkov
751b67348d
Merge Base.td and Tools.td.
...
This stuff is not used outside Base.td, and with the conversion of the
compilation graph to string-based format became much less (if at all)
useful.
llvm-svn: 60873
2008-12-11 10:38:06 +00:00
Mikhail Glushenkov
6f236eebcf
Support -emit-llvm properly (with -S and -c).
...
llvm-svn: 60764
2008-12-09 14:40:18 +00:00
Dan Gohman
df0e24acce
Generalize bugpoint's concept of a "safe" backend, and add options
...
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.
This enables the following use cases:
- bugpoint llc against an llc command from a different build
- bugpoint llc against the same llc with different command-line options
- and more...
Also, document the existing "custom" interpreter options.
llvm-svn: 60681
2008-12-08 04:02:47 +00:00
Oscar Fuentes
3eaab7ff7a
CMake: Added Tool.cpp to tools/llvmc/driver.
...
llvm-svn: 60670
2008-12-07 17:01:16 +00:00
Mikhail Glushenkov
c1fc4efe85
Describe recent changes in the documentation.
...
llvm-svn: 60668
2008-12-07 16:47:42 +00:00
Mikhail Glushenkov
c75a4df77c
Make 'extern' an option property.
...
Makes (forward) work better.
llvm-svn: 60667
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
bc0bc455b7
Plugin updates: support more options.
...
llvm-svn: 60666
2008-12-07 16:46:23 +00:00
Mikhail Glushenkov
72a5dd4ae6
Join tools couldn't be used in the middle of the toolchain.
...
llvm-svn: 60665
2008-12-07 16:45:37 +00:00
Mikhail Glushenkov
7a56e66e32
Enable the Clang plugin by default.
...
This will eventually replace `ccc`. The command `llvmc -clang` now uses
the Clang toolchain instead of `llvm-gcc`.
llvm-svn: 60661
2008-12-07 16:43:42 +00:00
Mikhail Glushenkov
53f66e6d9a
Update plugins to use (actions).
...
llvm-svn: 60660
2008-12-07 16:43:17 +00:00
Mikhail Glushenkov
f01331152a
Use (actions) instead of option properties, support external options.
...
Also includes a major refactoring. See documentation for more
information.
llvm-svn: 60656
2008-12-07 16:41:11 +00:00
Devang Patel
508dc0b548
Enable LoopIndexSplit pass.
...
llvm-svn: 60555
2008-12-04 21:40:31 +00:00
Nick Lewycky
d0b10fefba
Remove warning about declaration does not declare anything. This class was
...
already declared in the other headers.
llvm-svn: 60261
2008-11-30 00:36:34 +00:00
Nick Lewycky
39e055d2a3
Add protected visibility to libLTO.
...
llvm-svn: 60257
2008-11-29 22:49:59 +00:00
Mikhail Glushenkov
ee55a49632
Scrap some boilerplate.
...
llvm-svn: 60200
2008-11-28 00:14:11 +00:00
Mikhail Glushenkov
187b171022
Add 'hidden' and 'really_hidden' option properties.
...
llvm-svn: 60198
2008-11-28 00:13:25 +00:00
Mikhail Glushenkov
45f83604cd
Documentation: clarify what is meant by 'multiple edges'.
...
llvm-svn: 60197
2008-11-28 00:12:09 +00:00
Mikhail Glushenkov
869ded12c8
Disallow multiple edges.
...
llvm-svn: 60127
2008-11-26 22:59:45 +00:00
Devang Patel
c17a1f06f3
Disable -loop-index-split for now.
...
llvm-svn: 60087
2008-11-26 04:58:14 +00:00
Zhongxing Xu
985967aa25
Adjust indent.
...
llvm-svn: 60081
2008-11-26 02:57:24 +00:00
Oscar Fuentes
4588307b06
CMake: llvmc2 is now known as llvmc.
...
llvm-svn: 60052
2008-11-25 22:18:49 +00:00
Mikhail Glushenkov
89bfeb825b
Since the old llvmc was removed, rename llvmc2 to llvmc.
...
llvm-svn: 60048
2008-11-25 21:38:12 +00:00
Mikhail Glushenkov
4877183f90
docs: Add author info + fix incorrect code example.
...
llvm-svn: 60046
2008-11-25 21:34:53 +00:00
Mikhail Glushenkov
a1314465ee
Small documentation update.
...
llvm-svn: 60045
2008-11-25 21:34:29 +00:00
Mikhail Glushenkov
3a0ef826d3
Document the plugin priority feature.
...
llvm-svn: 60044
2008-11-25 21:34:01 +00:00
Andrew Lenharth
54748faa8a
ignore the -m elf_i386 directive used in the linux kernel
...
llvm-svn: 59642
2008-11-19 17:00:08 +00:00
Mikhail Glushenkov
0c4ad9c7cc
Support dependencies between plugins by priority-sorting.
...
llvm-svn: 59449
2008-11-17 17:30:25 +00:00
Mikhail Glushenkov
773924299a
Add a layer of indirection to make plugins more flexible.
...
Use strings instead of TableGen defs in the compilation graph
definition. Makes it easier for the plugins to modify an existing graph.
llvm-svn: 59447
2008-11-17 17:29:18 +00:00
Oscar Fuentes
bc0f4b6c9a
CMake: Removed some cruft.
...
llvm-svn: 59376
2008-11-15 20:51:18 +00:00
Oscar Fuentes
d7820a0c15
CMake: Recursively invokes cmake using the right directories.
...
LLVM_MAIN_SRC_DIR and LLVM_BINARY_DIR are not the cmake top level
directories when LLVM is embedded on the build of other project.
Fixes PR #3072 .
llvm-svn: 59374
2008-11-15 20:35:25 +00:00
Oscar Fuentes
c036da8d8e
CMake: Remove unused tablegenning code from tools/llvmc2/driver.
...
llvm-svn: 59333
2008-11-14 23:59:50 +00:00
Daniel Dunbar
a830cb14f3
Add Binary flag to raw_fd_ostream constructor.
...
Document raw_fd_ostream's treatment of "-".
llvm-svn: 59219
2008-11-13 05:01:07 +00:00
Mikhail Glushenkov
bb1a81c8e7
Some cosmetic changes.
...
llvm-svn: 59096
2008-11-12 00:04:46 +00:00
Devang Patel
b3ecdedbe0
Remove incomplete lto-bugpoint tool. If there is an interest then we can resurrect this tool later on and finish implementation.
...
llvm-svn: 59071
2008-11-11 19:35:38 +00:00
Oscar Fuentes
eb7ea841e0
CMake: forces rebuild of llvm-config's library dependency info when a
...
library is added or changed.
llvm-svn: 59051
2008-11-11 17:10:58 +00:00
Oscar Fuentes
7f47a65445
CMake: Corrected detection of `nm'.
...
llvm-svn: 58941
2008-11-09 20:26:31 +00:00
Oscar Fuentes
bb9c221f2a
CMake: Support for cross-compiling. For now, requires a previously
...
built native tblgen which is passed to cmake in the variable
LLVM_TABLEGEN.
See
http://www.cmake.org/Wiki/CmakeMingw
for a quick example on how to cross-compile with CMake.
llvm-svn: 58939
2008-11-09 18:53:19 +00:00
Daniel Dunbar
a525d7b3f6
Add LLVMC2 tool definitions for Objective-C and Objective-C++.
...
llvm-svn: 58885
2008-11-08 03:25:47 +00:00
Nick Lewycky
b75c0781c3
Update to add newer bitcodes.
...
llvm-svn: 58852
2008-11-07 14:52:51 +00:00
Evan Cheng
c0a36d4aef
Add command line option -entry-funcion to override entry function (default is main).
...
llvm-svn: 58779
2008-11-05 23:21:52 +00:00
Devang Patel
bc0cbd20b0
On darwin, 32-bit x86 target is i386-apple-darwin...
...
llvm-svn: 58731
2008-11-04 23:13:50 +00:00
Nuno Lopes
a5d766c285
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
...
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager
llvm-svn: 58730
2008-11-04 23:03:58 +00:00
Tanya Lattner
2c01b34040
Revert 58687. This breaks mingw.
...
llvm-svn: 58719
2008-11-04 21:06:11 +00:00
Nick Lewycky
1fc44bd56f
Don't "shell out" to resolve paths. Using pure perl makes llvm-config
...
friendlier to non-Unixes that happen to have perl. Patch from Sascha Othman!
llvm-svn: 58687
2008-11-04 08:05:21 +00:00
Oscar Fuentes
582a9fcc48
CMakeLists: removed asmprinter component from
...
tools/llc/CMakeLists.txt.
llvm-svn: 58678
2008-11-04 03:28:37 +00:00
Oscar Fuentes
c2a8e16a50
CMake: Removed some cruft.
...
llvm-svn: 58358
2008-10-29 02:33:15 +00:00
Nick Lewycky
6288e2288d
Remove -check-exit-code from bugpoint. This is subsumed by -append-exit-code.
...
Note that -check-exit-code was on by default while -append-exit-code is not.
llvm-svn: 58221
2008-10-26 23:59:36 +00:00