Commit Graph

2514 Commits

Author SHA1 Message Date
Mikhail Glushenkov
530f399743 Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 00:13:52 +00:00
Rafael Espindola
42de34f013 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15 10:14:18 +00:00
Rafael Espindola
f403cd7838 Bug fix:
string::find returns string::npos if the substring is not found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-09 21:14:25 +00:00
Mikhail Glushenkov
9dcc26b6a0 A basic PIC16 toolchain driver.
Nice addition to the examples and also a starting point for Sanjiv to work on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-07 07:08:01 +00:00
Nick Lewycky
a9b9032df1 Add option for specifying the path to assembler, "as". This overrides the path
to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73008 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-07 00:50:45 +00:00
Devang Patel
578efa920a 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 21:57:13 +00:00
Devang Patel
d18e31ae17 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 22:05:33 +00:00
Douglas Gregor
8eeb96d2d5 CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
the CMake-generated Xcode project build properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 19:53:37 +00:00
Nick Kledzik
d8b4711a16 <rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 19:14:08 +00:00
Nick Kledzik
cbad586240 <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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 00:28:45 +00:00
Nick Kledzik
f5a1c35f1b <rdar://problem/6941517> C++ static constructors not preserved for static executable using LTO
Move setRelocationModel() to be called before TargetMachine is instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 22:52:12 +00:00
Daniel Dunbar
e0f0e0be1c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:51:32 +00:00
Daniel Dunbar
006a034828 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:06:14 +00:00
Daniel Dunbar
ca8131ebac Switch opt to using StandardPasses.h
- No functionality change, but please check if you don't believe me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 18:22:15 +00:00
Oscar Fuentes
81a875585c CMake: Implements and documents option LLVM_ENABLE_ASSERTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 15:11:25 +00:00
Nick Kledzik
4bdf73025a update comments about .objc_ symbols being generated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 23:41:09 +00:00
Nick Kledzik
3eb445feb2 <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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 20:33:09 +00:00
Nick Lewycky
079c034489 Add missing codenames to the .bc analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 04:41:03 +00:00
Evan Cheng
63d6f324ca Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 00:48:34 +00:00
Oscar Fuentes
1a53cbfb4a CMake: Set LIBS on llvm-config so we can query the system libraries
used by CMake with --ldflags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27 15:49:33 +00:00
Nick Lewycky
028839db09 Fix the crash debugger to actually bisect globals once it's determined that it
can't just eliminate all global initializers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 06:29:56 +00:00
Nick Lewycky
4c8f9af6e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 05:30:00 +00:00
Torok Edwin
2c23501031 Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
can crash during instruction simplification (for example if it creates a
broken module).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 09:40:47 +00:00
Torok Edwin
23d471f62e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 09:31:04 +00:00
Duncan Sands
10287438e1 Make sure the CXXFLAGS setting is picked up by
the common Makefile.  Not sure why this suddenly
started causing problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-16 04:00:00 +00:00
Mikhail Glushenkov
e89331b93d The 'forward_as' property did not use its second argument.
See PR4159 for details. Patch by Martin Nowack!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-06 01:41:19 +00:00
Evan Cheng
26edc21b1b bugpoint for jit should just ignore GCC arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05 18:35:36 +00:00
Evan Cheng
712e80e188 Default llc / lli optimization to "Default", which corresponds to -O1 / -O2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70934 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04 23:05:19 +00:00
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
Mikhail Glushenkov
283bb58332 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 11:02:48 +00:00
Mikhail Glushenkov
03c050f018 Comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 10:04:57 +00:00
Mikhail Glushenkov
cfa036b8f0 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 10:03:53 +00:00
Mikhail Glushenkov
178b00ce50 Move example plugins to the example/ directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 10:02:53 +00:00
Nick Lewycky
e9742d2f6c ENABLE_PIC is either 0 or 1, but is always defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 07:45:09 +00:00
Bill Wendling
38efa38c86 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 23:13:18 +00:00
Mikhail Glushenkov
540d73f0cb Move the rules for building plugins to Makefile.rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:04:13 +00:00
Mikhail Glushenkov
b14f5b5e9d Fix build with objdir != srcdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:03:36 +00:00
Mikhail Glushenkov
95e2aa8967 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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:03:02 +00:00
Mikhail Glushenkov
f188178a2f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:01:14 +00:00
Chris Lattner
e3ff456fd1 disable exports from a bunch more tools, those without plugins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 19:01:11 +00:00
Chris Lattner
6b37dcdedf use TOOL_NO_EXPORTS, this shrinks the llvm-as binary from 1825296 to
1662184 bytes (~10%)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65551 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 18:29:42 +00:00
Nick Lewycky
a3fd95b017 Tabs to spaces presto chango! Pointed out by Duncan Sands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 09:08:43 +00:00
Nick Lewycky
dcd158af27 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 07:56:49 +00:00
Nick Lewycky
677c2c2a62 Add the function attributes pass during LTO time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 06:56:16 +00:00
Nick Lewycky
a9183c8020 If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
off in libLTO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 07:41:55 +00:00
Nick Lewycky
ca4286295f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 22:15:44 +00:00
Rafael Espindola
6210a9493a really fix style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 17:49:06 +00:00
Rafael Espindola
98c507ed5c fix style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 08:30:15 +00:00
Dan Gohman
865f006bb4 Eliminate several more unnecessary intptr_t casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 05:09:16 +00:00
Devang Patel
38ed388fb3 Remove changes that were accidently included in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 22:45:18 +00:00
Devang Patel
13319ceffd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 22:43:44 +00:00