1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

2703 Commits

Author SHA1 Message Date
David Goodwin
85da1c6622 Support remote execute for ARM.
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Jeffrey Yasskin
4f8961d587 Add a --with-oprofile flag to configure, which uses OProfile's agent
library to tell it the addresses of JITted functions.  For a
particular program, this changes the opreport -l output from:

samples %    image name        symbol name
48182  98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000)
11     0.0226  libstdc++.so.6.0.9    /usr/lib/libstdc++.so.6.0.9

to:

samples %    image name        symbol name
24565  60.7308 19814.jo        fib_left
15365  37.9861 19814.jo        fib_right
22     0.0544  ld-2.7.so       do_lookup_x

llvm-svn: 75279
2009-07-10 21:08:20 +00:00
Sanjiv Gupta
af27aae5b9 Link std.lib (.bc code) with llvm-ld.
Link devices.lib (processor specific variables) with mplink.

llvm-svn: 75263
2009-07-10 19:04:05 +00:00
Owen Anderson
49226b1075 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Mikhail Glushenkov
b067c19529 Documentation update.
llvm-svn: 75166
2009-07-09 19:39:16 +00:00
Mikhail Glushenkov
d338e3f9dd We don't need to set SaveTemps here.
'--temp-dir' always overrides 'save-temps'.

llvm-svn: 75165
2009-07-09 19:38:32 +00:00
Mikhail Glushenkov
ac5de493e5 Adjust comment.
llvm-svn: 75164
2009-07-09 19:37:58 +00:00
Sanjiv Gupta
d7c9ab8477 By default -t is always on for mcc16 and it uses ./tmp-objs as the temp directory.
llvm-svn: 75155
2009-07-09 18:09:26 +00:00
Chris Lattner
56638bb644 add llvm-mc support for parsing the .lcomm directive, patch by Kevin Enderby!
llvm-svn: 75148
2009-07-09 17:25:12 +00:00
Sanjiv Gupta
d56a55276e Added few more options to individual tools.
llvm-svn: 75120
2009-07-09 08:20:25 +00:00
Sanjiv Gupta
5a28f85997 Return dir separator as per platform.
llvm-svn: 75119
2009-07-09 08:17:55 +00:00
Nick Lewycky
8fde54aae1 Don't create undefined symbols for aliases.
llvm-svn: 75111
2009-07-09 06:03:04 +00:00
Owen Anderson
332aae685b Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Owen Anderson
7a1f69e433 Push LLVMContext through GlobalVariables and IRBuilder.
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Jeffrey Yasskin
946cb41a12 Fix http://llvm.org/PR4481: Make llvm-config print the right include paths when
srcdir!=objdir.

llvm-svn: 74956
2009-07-07 22:15:37 +00:00
Chris Lattner
2bea79b45b Implement parsing support for the .comm directive. Patch by
Kevin Enderby!

llvm-svn: 74944
2009-07-07 20:30:46 +00:00
Chris Lattner
f2acd8e359 Fix lli to print an error and exit when EE returns null but no string. Patch
by Eric Rannaud!

llvm-svn: 74930
2009-07-07 18:31:09 +00:00
Mikhail Glushenkov
93e0649f0b Documentation update.
llvm-svn: 74913
2009-07-07 16:43:49 +00:00
Mikhail Glushenkov
e2ed2abeac Show how to modify built-in options.
Sanjiv complained about the need to maintain local changes to
lib/CompilerDriver.

llvm-svn: 74912
2009-07-07 16:39:33 +00:00
Mikhail Glushenkov
90cd77a1b9 Documentation update.
llvm-svn: 74907
2009-07-07 16:09:29 +00:00
Bruno Cardoso Lopes
38373542a1 Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line.

llvm-svn: 74813
2009-07-06 05:09:34 +00:00
Mikhail Glushenkov
1056032a99 LLVMC doesn't need ENABLE_PIC to build now.
llvm-svn: 74783
2009-07-04 03:54:54 +00:00
Duncan Sands
bf3c14a658 Add newline at end of file.
llvm-svn: 74774
2009-07-03 15:38:01 +00:00
Torok Edwin
644892577f Fix typo: intepreter->interpreter.
llvm-svn: 74770
2009-07-03 12:11:32 +00:00
Chris Lattner
739a32b190 switch the .ll parser into SMDiagnostic.
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Chris Lattner
448c0a2708 implement error recovery in the llvm-mc parser. Feel the power!
llvm-svn: 74728
2009-07-02 21:53:43 +00:00
Sanjiv Gupta
45b575e63c Prefix bin dir to executables.
llvm-svn: 74713
2009-07-02 17:51:09 +00:00
Sanjiv Gupta
8fd0b5db12 Fixed handling of -c option.wq
llvm-svn: 74711
2009-07-02 17:35:38 +00:00
Daniel Dunbar
0afb18f239 llvm-mc/x86: Fix various nit-picky bugs in displacement parsing.
- Test case to follow.

llvm-svn: 74687
2009-07-02 02:26:39 +00:00
Daniel Dunbar
b87d6f328e llvm-mc/x86: Fix bug in disambiguation of displacement operand, introduced by me
(I think).
 - We weren't properly parsing the leading parenthesized expression in something
   like 'push (4)(%eax)'.
 
 - Added ParseParenRelocatableExpression to support this. I suspect we should
   just use lookahead, though.

 - Test case to follow.

llvm-svn: 74685
2009-07-02 02:09:07 +00:00
Daniel Dunbar
ffbf6228a2 llvm-mc/x86: Factor out ParseX86Register.
llvm-svn: 74684
2009-07-02 01:58:24 +00:00
Daniel Dunbar
7c83d0ed14 llvm-mc/x86: Rename X86Operand::ScaleReg to IndexReg and make order consistent
with syntax.

llvm-svn: 74679
2009-07-02 00:51:52 +00:00
Owen Anderson
9e109b6077 Maintain the old LTO API, by using the global context.
llvm-svn: 74678
2009-07-02 00:31:14 +00:00
Dan Gohman
e89dc58a7e Fix a bunch of other places that used operator[] to test whether
a key is present in a std::map or DenseMap to use find instead.

llvm-svn: 74676
2009-07-02 00:17:47 +00:00
John Mosby
c7b8abb0ec fix ld error with -no-undefined switch, which is undefined on darwin8
llvm-svn: 74674
2009-07-02 00:10:23 +00:00
Owen Anderson
4fa7e54329 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.

llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Owen Anderson
cf112e59c3 Hold the LLVMContext by reference rather than by pointer.
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Jeffrey Yasskin
29ea777c1e Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
Windows variant, strerror_s, but I couldn't test that.

I'll update configure and config.h.in in a subsequent patch.

llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Owen Anderson
81b8dabb53 Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.

llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Sanjiv Gupta
a7b306188b Executables will be at InstallDir/bin directory. Std header files will be at InstallDir/include, libs will be at InstallDir/lib. Define hooks for these and use them in the options for various tools.
llvm-svn: 74611
2009-07-01 16:10:29 +00:00
Daniel Dunbar
351a228c46 llvm-mc: Add some more doxyments.
llvm-svn: 74607
2009-07-01 15:14:50 +00:00
Daniel Dunbar
f234f1f312 llvm-mc: Fill in the rest of tokens for 'as-lex' mode.
llvm-svn: 74598
2009-07-01 06:56:54 +00:00
Daniel Dunbar
7f47cc9423 Rename MCValue::isConstant to isAbsolute.
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
db3d640a42 add some of the new tokens, others are still missing.
llvm-svn: 74595
2009-07-01 06:36:49 +00:00
Daniel Dunbar
1960440e70 llvm-mc: Emit parsed instructions to the MCStreamer.
llvm-svn: 74594
2009-07-01 06:35:48 +00:00
Daniel Dunbar
cae97fa7a9 llvm-mc: Introduce method to match a parsed x86 instruction into an MCInst.
llvm-svn: 74573
2009-06-30 23:38:38 +00:00
Daniel Dunbar
3f34774b4a llvm-mc: Accept relocatable expressions when parsing displacements and
immediates.

llvm-svn: 74568
2009-06-30 23:02:44 +00:00
Daniel Dunbar
d0589c59b3 llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.

llvm-svn: 74565
2009-06-30 22:49:27 +00:00
Daniel Dunbar
f3f3e60b4f Suppress may-be-used-uninitialized warning.
llvm-svn: 74529
2009-06-30 16:02:47 +00:00
Douglas Gregor
2373782453 Fix CMake build
llvm-svn: 74527
2009-06-30 14:37:26 +00:00
Daniel Dunbar
2d92d62fb2 llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
llvm-svn: 74498
2009-06-30 02:10:03 +00:00
Daniel Dunbar
a702c280bb llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
legally negate an MCValue.

llvm-svn: 74497
2009-06-30 02:08:27 +00:00
Daniel Dunbar
c3cac19cfe llvm-mc: Evaluation for relocatable expressions.
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Daniel Dunbar
5bec168037 Normalize SourceMgr messages.
- Don't print "Parsing" in front of every message.

 - Take additional "type" argument which is prepended to the message (with ": ")
   if given.

 - Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...

llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Daniel Dunbar
e4fd18eda8 llvm-mc: Parse symbol attribute directives.
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
2a0fc1e1a3 Clang is now production quality (at least for C).
llvm-svn: 74484
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
8f8b5ff837 Add a way to access argv[0] in hooks.
llvm-svn: 74483
2009-06-30 00:16:00 +00:00
Daniel Dunbar
72c0434597 llvm-mc: Parse .{,b,p2}align{,w,l} directives.
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Daniel Dunbar
37b8fe7db3 llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
- For example, we diagnose errors on:
--
a:
a = 10
--

 - For now we reject code like:
--
.long a
a = 10
--
   which "as" accepts (on Darwin).

llvm-svn: 74476
2009-06-29 23:43:14 +00:00
Daniel Dunbar
fca88cf26b llvm-mc: Recognize C++ style comments.
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
67828e6e0a llvm-mc: Recognize C++ style comments.
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Daniel Dunbar
8be858eeb4 Fix uninitialized variable warning.
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
a33d10fc4d Don't build LLVMC when configured with --disable-pic (it needs requires shared
module support to build).

llvm-svn: 74456
2009-06-29 21:12:26 +00:00
Daniel Dunbar
41782dbbcd MC: Improve expression parsing and implement evaluation of absolute expressions
(missed files).

llvm-svn: 74450
2009-06-29 20:40:36 +00:00
Daniel Dunbar
ade4f03bd0 MC: Improve expression parsing and implement evaluation of absolute expressions.
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Evan Cheng
05451335e6 Indentation.
llvm-svn: 74281
2009-06-26 06:57:16 +00:00
Daniel Dunbar
bfc585a86e MC: Parse .org directives.
llvm-svn: 74218
2009-06-25 22:44:51 +00:00
Daniel Dunbar
d7a883b5e5 MC: Parse .set and assignments.
llvm-svn: 74208
2009-06-25 21:56:11 +00:00
Mikhail Glushenkov
c40a28803f Update documentation.
llvm-svn: 74191
2009-06-25 18:20:44 +00:00
Jeffrey Yasskin
c431f61520 Add a JITEventListener interface that gets called back when a new function is
emitted or the machine code for a function is freed.  Chris mentioned that we
may also want a notification when a stub is emitted, but that'll be a future
change.  I intend to use this to tell oprofile where functions are emitted and
what lines correspond to what addresses.

llvm-svn: 74157
2009-06-25 02:04:04 +00:00
Mikhail Glushenkov
112972509a Remove duplication.
Factor out common preprocessor-related bits to Makefile.rules.

llvm-svn: 74153
2009-06-25 01:07:00 +00:00
Daniel Dunbar
5cf59dd842 Basic .s parsing for .asci[iz], .fill, .space, {.byte, .short, ... }
- Includes some DG tests in test/MC/AsmParser, which are rather primitive since
   we don't have a -verify mode yet.

llvm-svn: 74139
2009-06-24 23:30:00 +00:00
Owen Anderson
90f7655f57 Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
Update other uses in the codebase for this change.

llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Chris Lattner
07463b0a0a remove dead makefile flags.
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Chris Lattner
f8a7746988 implement a bunch of synonyms for section switching.
llvm-svn: 74062
2009-06-24 05:13:15 +00:00
Chris Lattner
0945d20ceb add support for parsing and emitting .section directives. We can now parse
things like:
.section __TEXT,__cstring,cstring_literals

llvm-svn: 74058
2009-06-24 04:43:34 +00:00
Chris Lattner
61a6509f6a add trivial support for passing label definitions through the MCStreamer.
This is suboptimal in several aspects, see the commented out assertion.
I need to talk to Daniel about this.

llvm-svn: 74057
2009-06-24 04:31:49 +00:00
Chris Lattner
f76b48bc93 create an MCStreamer and provide it to AsmParser.
llvm-svn: 74039
2009-06-24 00:52:40 +00:00
Chris Lattner
d3b90f1344 make the lexer unique strings it lexes instead of passing them back as
std::strings.

llvm-svn: 74036
2009-06-24 00:33:19 +00:00
Daniel Dunbar
323218db15 Start flushing out MCContext.
- Lives inside new library lib/MC (LLVMMC.a)

llvm-svn: 74013
2009-06-23 22:01:43 +00:00
Mikhail Glushenkov
d52d5e93d0 Temporary copy-pasto to make examples compile.
llvm-svn: 74001
2009-06-23 20:47:24 +00:00
Mikhail Glushenkov
f7b3bf53e2 Make llvmc work again.
Chris recently broke llvmc with his Makefile changes (r75379). That patch made
the global change .o -> .a, which caused built-in llvmc plugins to stop working
since plugin initialization in llvmc is based on static variables not referenced
from the main executable. This patch implements auto-generated forced references
to the plugin libraries.

llvm-svn: 74000
2009-06-23 20:46:48 +00:00
Chris Lattner
43f200c74a refactor a bunch of X86 specific stuff out to its own file.
llvm-svn: 73982
2009-06-23 18:41:30 +00:00
Douglas Gregor
28a3a15808 CMake: remove support for llvm-config-generated dependencies in the build
llvm-svn: 73979
2009-06-23 18:30:17 +00:00
Chris Lattner
43a2dca0e4 implement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s
llvm-svn: 73950
2009-06-23 05:57:07 +00:00
Chris Lattner
c3b0266a77 get a definition of strull on windows, thanks to Howard Su.
llvm-svn: 73929
2009-06-23 00:24:36 +00:00
Bob Wilson
dd1f69e6fb Recognize and handle ARM v7 target triples for Darwin.
llvm-svn: 73889
2009-06-22 18:01:28 +00:00
Duncan Sands
5e54310d7d Include cstdio to get EOF, needed with gcc-4.4.
llvm-svn: 73879
2009-06-22 06:59:32 +00:00
Chris Lattner
886ab50a50 process memory operands with a parenthesized expression for a displacement,
like "(4+5)(%eax)".

llvm-svn: 73878
2009-06-22 06:35:58 +00:00
Chris Lattner
5927443800 Implement full support for parsing primary expressions. We can now parse
all of health and voronoi (ignoring directives).  We only get 409 lines into
176.gcc though because we don't have binary operators yet:

Parsing 176.gcc.llc.s:409: unexpected token in operand list
	movsbl	_arityvec+1(,%edi,8), %eax
	      	         ^

llvm-svn: 73877
2009-06-22 06:32:03 +00:00
Chris Lattner
370f52dc85 implement parser support for '*' operands, as in "call *%eax".
llvm-svn: 73876
2009-06-22 06:02:13 +00:00
Chris Lattner
06378f9853 implement memory operand parsing.
llvm-svn: 73875
2009-06-22 05:51:26 +00:00
Chris Lattner
82084cf5a1 start implementing some simple operand parsing.
llvm-svn: 73867
2009-06-22 01:29:09 +00:00
Chris Lattner
dd95ab3ca9 rename SourceMgr::PrintError to PrintMessage.
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
f896c01361 set up the top-level parsing loop.
llvm-svn: 73860
2009-06-21 20:54:55 +00:00
Chris Lattner
89e17d02b1 stub out parser for asm files. Change invariant on lexer to always
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode.  Add new
-as-lex option to enable lexing mode (vs parsing mode).

llvm-svn: 73859
2009-06-21 20:16:42 +00:00
Chris Lattner
26507d1082 add string literals.
llvm-svn: 73858
2009-06-21 19:56:35 +00:00
Chris Lattner
9f3189ec41 hopefully fix the build on linux.
llvm-svn: 73857
2009-06-21 19:43:50 +00:00
Chris Lattner
b6cfcfadd4 implement enough of a lexer to get through Olden/health/Output/health.llc.s
without errors.

llvm-svn: 73855
2009-06-21 19:21:25 +00:00
Chris Lattner
f0c5d670e0 oh yeah, cmake needs to be told explicitly about new files :)
llvm-svn: 73849
2009-06-21 07:19:34 +00:00
Chris Lattner
7a7ac287db some baby steps.
llvm-svn: 73848
2009-06-21 07:19:10 +00:00
Chris Lattner
c94208cf9c start wiring up support for asm parsing.
llvm-svn: 73846
2009-06-21 05:22:37 +00:00
Chris Lattner
aa193955e5 fix build problem pointed out by John Thompson!
llvm-svn: 73739
2009-06-18 23:46:04 +00:00
Chris Lattner
821cb96b3b fix file header
llvm-svn: 73733
2009-06-18 23:05:21 +00:00
Chris Lattner
698abf1ad4 Add a skeleton driver for new machine code level fun. llvm-mc is meant
to be a test driver of other components in the system, which will develop
over time.

llvm-svn: 73732
2009-06-18 23:04:45 +00:00
Chris Lattner
be0596427d switch to using llvm/Target/TargetSelect.h
llvm-svn: 73611
2009-06-17 16:42:19 +00:00
Nick Lewycky
1704e96a5f Fix libLTO by #include'ing the initializers for all targets and all asm
printers.

While I'm here, alphabetize.

llvm-svn: 73606
2009-06-17 06:52:10 +00:00
Mikhail Glushenkov
b9a0c7b6dd Another small documentation update.
llvm-svn: 73596
2009-06-17 02:56:08 +00:00
Chris Lattner
90f1ab8c92 Use Doug's new LLVM_NATIVE_ARCH macro in config.h to link in the native
target so that the JIT works in LLI, not just the interpreter.

llvm-svn: 73595
2009-06-17 02:15:40 +00:00
Chris Lattner
3c85f09f57 Remove support for building LLVM libraries into "relinked"
object files.  Now we always build LLVM libraries into archives (.a files).

This makes the 'make' build work more like the cmake build, among other
things.  Doing this exposed some latent circular library dependencies, so
I think that llvm-config wasn't quite right for .o files anyway.

llvm-svn: 73579
2009-06-16 23:00:42 +00:00
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