Commit Graph

3018 Commits

Author SHA1 Message Date
Sanjiv Gupta
23bb1e21f4 By default -t is always on for mcc16 and it uses ./tmp-objs as the temp directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 18:09:26 +00:00
Chris Lattner
1fc3d75581 add llvm-mc support for parsing the .lcomm directive, patch by Kevin Enderby!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75148 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 17:25:12 +00:00
Sanjiv Gupta
549882d312 Added few more options to individual tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 08:20:25 +00:00
Sanjiv Gupta
44a382f894 Return dir separator as per platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 08:17:55 +00:00
Nick Lewycky
485ded0db7 Don't create undefined symbols for aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:03:04 +00:00
Owen Anderson
e9b11b4313 Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:03:57 +00:00
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Jeffrey Yasskin
9a3b13fa9b Fix http://llvm.org/PR4481: Make llvm-config print the right include paths when
srcdir!=objdir.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:15:37 +00:00
Chris Lattner
4e4db7adfc Implement parsing support for the .comm directive. Patch by
Kevin Enderby!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:30:46 +00:00
Chris Lattner
fd15beefee Fix lli to print an error and exit when EE returns null but no string. Patch
by Eric Rannaud!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74930 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:31:09 +00:00
Mikhail Glushenkov
bb41b2deca Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 16:43:49 +00:00
Mikhail Glushenkov
091ca1c9e0 Show how to modify built-in options.
Sanjiv complained about the need to maintain local changes to
lib/CompilerDriver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 16:39:33 +00:00
Mikhail Glushenkov
dad7820e14 Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 16:09:29 +00:00
Bruno Cardoso Lopes
ac57e6e498 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 05:09:34 +00:00
Mikhail Glushenkov
86a3510a68 LLVMC doesn't need ENABLE_PIC to build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74783 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-04 03:54:54 +00:00
Duncan Sands
d44d4bf04b Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 15:38:01 +00:00
Torok Edwin
db9c028d01 Fix typo: intepreter->interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 12:11:32 +00:00
Chris Lattner
92bcb426c3 switch the .ll parser into SMDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 22:46:18 +00:00
Chris Lattner
b717fb0fe0 implement error recovery in the llvm-mc parser. Feel the power!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 21:53:43 +00:00
Sanjiv Gupta
7c07f3ae8d Prefix bin dir to executables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74713 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 17:51:09 +00:00
Sanjiv Gupta
31b798197e Fixed handling of -c option.wq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 17:35:38 +00:00
Daniel Dunbar
5470e12c62 llvm-mc/x86: Fix various nit-picky bugs in displacement parsing.
- Test case to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 02:26:39 +00:00
Daniel Dunbar
2c3f00cd94 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 02:09:07 +00:00
Daniel Dunbar
46b6c5266e llvm-mc/x86: Factor out ParseX86Register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 01:58:24 +00:00
Daniel Dunbar
55a3c6c324 llvm-mc/x86: Rename X86Operand::ScaleReg to IndexReg and make order consistent
with syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:51:52 +00:00
Owen Anderson
0e7a54672c Maintain the old LTO API, by using the global context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:31:14 +00:00
Dan Gohman
f530c92cd5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:17:47 +00:00
John Mosby
1bc1e6407f fix ld error with -no-undefined switch, which is undefined on darwin8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74674 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 00:10:23 +00:00
Owen Anderson
4434ed44c4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:13:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Jeffrey Yasskin
ed1c0ffe0b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 18:11:20 +00:00
Owen Anderson
8b477ed579 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Sanjiv Gupta
81d0c2abc8 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:10:29 +00:00
Daniel Dunbar
1aa14aac41 llvm-mc: Add some more doxyments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 15:14:50 +00:00
Daniel Dunbar
165e8344d8 llvm-mc: Fill in the rest of tokens for 'as-lex' mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 06:56:54 +00:00
Daniel Dunbar
80f62d0062 Rename MCValue::isConstant to isAbsolute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 06:48:00 +00:00
Chris Lattner
87380cb0e0 add some of the new tokens, others are still missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 06:36:49 +00:00
Daniel Dunbar
0eebb0543f llvm-mc: Emit parsed instructions to the MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 06:35:48 +00:00
Daniel Dunbar
d9627e11bf llvm-mc: Introduce method to match a parsed x86 instruction into an MCInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74573 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 23:38:38 +00:00
Daniel Dunbar
d870b2804b llvm-mc: Accept relocatable expressions when parsing displacements and
immediates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74568 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 23:02:44 +00:00
Daniel Dunbar
374d8bddac 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 22:49:27 +00:00
Daniel Dunbar
b79742cd47 Suppress may-be-used-uninitialized warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 16:02:47 +00:00
Douglas Gregor
892b507f7c Fix CMake build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 14:37:26 +00:00
Daniel Dunbar
f4b830f03f llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 02:10:03 +00:00
Daniel Dunbar
3597604e5e llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
legally negate an MCValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 02:08:27 +00:00
Daniel Dunbar
15d1707096 llvm-mc: Evaluation for relocatable expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 01:49:52 +00:00
Daniel Dunbar
3fb7683bec 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): ...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:49:23 +00:00
Daniel Dunbar
d7b267bd90 llvm-mc: Parse symbol attribute directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
e8e4d588c3 Clang is now production quality (at least for C).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
875ace52ee Add a way to access argv[0] in hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:16:00 +00:00
Daniel Dunbar
c29dfa786a llvm-mc: Parse .{,b,p2}align{,w,l} directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 23:46:59 +00:00
Daniel Dunbar
dce0f3c556 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 23:43:14 +00:00
Daniel Dunbar
1ad7edc212 llvm-mc: Recognize C++ style comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 22:00:57 +00:00
Daniel Dunbar
383a4a8db0 llvm-mc: Recognize C++ style comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 21:58:22 +00:00
Daniel Dunbar
513306395c Fix uninitialized variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 21:14:21 +00:00
Daniel Dunbar
74deeb84bd Don't build LLVMC when configured with --disable-pic (it needs requires shared
module support to build).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 21:12:26 +00:00
Daniel Dunbar
fc6877aec9 MC: Improve expression parsing and implement evaluation of absolute expressions
(missed files).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74450 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 20:40:36 +00:00
Daniel Dunbar
475839e9a9 MC: Improve expression parsing and implement evaluation of absolute expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 20:37:27 +00:00
Evan Cheng
855a168dbe Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 06:57:16 +00:00
Daniel Dunbar
c238b584de MC: Parse .org directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 22:44:51 +00:00
Daniel Dunbar
8f780cd789 MC: Parse .set and assignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74208 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 21:56:11 +00:00
Mikhail Glushenkov
294f5074f5 Update documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 18:20:44 +00:00
Jeffrey Yasskin
df5a7daff9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 02:04:04 +00:00
Mikhail Glushenkov
0a1cb1ea86 Remove duplication.
Factor out common preprocessor-related bits to Makefile.rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 01:07:00 +00:00
Daniel Dunbar
a0d1426af0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 23:30:00 +00:00
Owen Anderson
8cbc94afb7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 17:37:09 +00:00
Chris Lattner
929a49356e remove dead makefile flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 05:29:56 +00:00
Chris Lattner
529fb545e7 implement a bunch of synonyms for section switching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 05:13:15 +00:00
Chris Lattner
9a023f70b4 add support for parsing and emitting .section directives. We can now parse
things like:
.section __TEXT,__cstring,cstring_literals




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 04:43:34 +00:00
Chris Lattner
c69485e34d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 04:31:49 +00:00
Chris Lattner
cbc23f75cd create an MCStreamer and provide it to AsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:52:40 +00:00
Chris Lattner
faf32c102d make the lexer unique strings it lexes instead of passing them back as
std::strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24 00:33:19 +00:00
Daniel Dunbar
ecc63f8687 Start flushing out MCContext.
- Lives inside new library lib/MC (LLVMMC.a)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 22:01:43 +00:00
Mikhail Glushenkov
223e99cd8d Temporary copy-pasto to make examples compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:47:24 +00:00
Mikhail Glushenkov
d80d8690af 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:46:48 +00:00
Chris Lattner
29dfe7c5f7 refactor a bunch of X86 specific stuff out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:41:30 +00:00
Douglas Gregor
8756a8db5b CMake: remove support for llvm-config-generated dependencies in the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:30:17 +00:00
Chris Lattner
8dfbe6c853 implement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 05:57:07 +00:00
Chris Lattner
bcd0b8d2ef get a definition of strull on windows, thanks to Howard Su.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 00:24:36 +00:00
Bob Wilson
75d6ffd53f Recognize and handle ARM v7 target triples for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 18:01:28 +00:00
Duncan Sands
66b9f29df2 Include cstdio to get EOF, needed with gcc-4.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:59:32 +00:00
Chris Lattner
7031806fe2 process memory operands with a parenthesized expression for a displacement,
like "(4+5)(%eax)".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:35:58 +00:00
Chris Lattner
74ec1a3b11 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
	      	         ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:32:03 +00:00
Chris Lattner
be9c23fef4 implement parser support for '*' operands, as in "call *%eax".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:02:13 +00:00
Chris Lattner
c41938303b implement memory operand parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 05:51:26 +00:00
Chris Lattner
2cf5f14f20 start implementing some simple operand parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73867 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 01:29:09 +00:00
Chris Lattner
14ee48a5ba rename SourceMgr::PrintError to PrintMessage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 21:22:11 +00:00
Chris Lattner
b0789ed5a4 set up the top-level parsing loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 20:54:55 +00:00
Chris Lattner
27aa7d259b 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 20:16:42 +00:00
Chris Lattner
10a907d70f add string literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 19:56:35 +00:00
Chris Lattner
4506bd2cfd hopefully fix the build on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 19:43:50 +00:00
Chris Lattner
4651bca31b implement enough of a lexer to get through Olden/health/Output/health.llc.s
without errors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 19:21:25 +00:00
Chris Lattner
4577bbaa12 oh yeah, cmake needs to be told explicitly about new files :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 07:19:34 +00:00
Chris Lattner
a59e877996 some baby steps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 07:19:10 +00:00
Chris Lattner
b23677e076 start wiring up support for asm parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 05:22:37 +00:00
Chris Lattner
f4a481505e fix build problem pointed out by John Thompson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:46:04 +00:00
Chris Lattner
bb4688a9cf fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:05:21 +00:00
Chris Lattner
f9f065e455 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:04:45 +00:00
Chris Lattner
2deb58f72e switch to using llvm/Target/TargetSelect.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 16:42:19 +00:00
Nick Lewycky
8189d40a8d Fix libLTO by #include'ing the initializers for all targets and all asm
printers.

While I'm here, alphabetize.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 06:52:10 +00:00
Mikhail Glushenkov
4aecec1f50 Another small documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 02:56:08 +00:00
Chris Lattner
c447ff693e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 02:15:40 +00:00
Chris Lattner
6be926647d 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 23:00:42 +00:00
Douglas Gregor
1555a23335 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 20:12:29 +00:00
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
Rafael Espindola
f163a95705 tools like nm and ar only need register_claim_file and add_symbols. Don't abort
if other hooks are missing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64812 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 21:08:21 +00:00
Nick Lewycky
45eb7865c9 Shoot! Remove this debugging line again!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 22:50:17 +00:00
Nick Lewycky
e0afaa301d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 22:49:17 +00:00
Dan Gohman
a971b29425 Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12 20:53:27 +00:00
Duncan Sands
535e3e8df9 Revert r64299: it breaks the build when configured
without --enable-pic, like my nightly tester.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 13:23:49 +00:00
Nick Lewycky
46dec95319 Try this. Darwin -> LTO, PIC -> LTO + possibly gold too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 08:44:13 +00:00
Devang Patel
ca70533d3d 62987 disables LTO build on darwin.
Revert 62987 for now. Nicolas please investigate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 02:34:33 +00:00
Chris Lattner
3a4baf1951 fix bugpoint url, patch by Pieter de Bie!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 18:56:30 +00:00
Nick Lewycky
0df91b2c86 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 03:15:01 +00:00
Nick Lewycky
b454eabe7f Correct strange whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 07:01:00 +00:00
Nick Lewycky
ea97aa6129 Free the buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 01:58:34 +00:00
Chris Lattner
7d8f9b6133 fix PR3488: llvm-ar r doesn't replace existing files
Patch by Daniel Shelton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63870 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 17:58:39 +00:00
Duncan Sands
7a2e7e5c20 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 10:21:34 +00:00
Duncan Sands
105de28dab 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 09:54:02 +00:00
Nick Lewycky
98245c7060 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 05:36:01 +00:00
Nick Lewycky
c1da8864a9 Remove accidentally included debug message!
Reword a comment for clarity. Remove some extra whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 04:14:23 +00:00
Torok Edwin
6cbbdfd2e9 Alphabetize includes. Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:00:02 +00:00
Torok Edwin
1845d99041 mention that PIC is needed for libLTO and libLLVMgold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 19:12:25 +00:00
Torok Edwin
4cb16349b0 remove printf - it was there only for debugging!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:40:28 +00:00
Torok Edwin
3e5a0d8b0b add support for .a files containing LLVM IR to the gold plugin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 17:39:30 +00:00
Nick Lewycky
3e62b2dc93 Add LLVM plugin for gold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 07:13:24 +00:00
Mikhail Glushenkov
7ba6052852 Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:12:57 +00:00
Mikhail Glushenkov
19d3e82905 Add three new option properties.
Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 03:47:20 +00:00
Nick Lewycky
1281741311 Build libLTO on any platform so long as PIC is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-26 03:04:57 +00:00
Mike Stump
0a26891ce9 Perform optional clang building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-24 00:00:41 +00:00
Mikhail Glushenkov
e441b831c0 Fix 'llvm-config --libs' output.
Change the naming scheme for llvmc plugins so that they do not appear in
'llvm-config --libs' output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 13:05:00 +00:00
Mikhail Glushenkov
b6b514124d Change the hook API back to prevent memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 13:04:33 +00:00
Mikhail Glushenkov
a298bb7525 Allow hooks with arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 13:04:00 +00:00
Mikhail Glushenkov
2388a588bd 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5c1799b293 Delete trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 06:53:46 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Mikhail Glushenkov
f9b1d79a54 Some small documentation fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 02:42:40 +00:00
Mikhail Glushenkov
564b75a4c6 Clarify the documentation a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 02:04:54 +00:00
Mikhail Glushenkov
15b064d045 Make -o a prefix option.
Both 'llvmc -o file' and 'llvmc -ofile' should work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 02:02:16 +00:00
Mikhail Glushenkov
f8c430b3da Add a --check-graph option to llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 16:16:27 +00:00
Oscar Fuentes
82447ebb41 CMake: replace `rm' with portable invocations of cmake.
Based on a bug report by Yonggang Luo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 19:24:44 +00:00
Chris Lattner
5d5a897529 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:01:32 +00:00
Bill Wendling
93d9ad567d Setting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61599 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-03 01:48:26 +00:00
Chris Lattner
df98617b23 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 07:01:27 +00:00
Misha Brukman
f2f8d79790 Add spacing between type and variable name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61530 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:41:49 +00:00
Misha Brukman
8050e9e854 Comment headers should extend to 80 chars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61529 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:40:52 +00:00
Misha Brukman
262b05f637 Fix spacing to be uniform for parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:39:58 +00:00
Duncan Sands
9e89ba31f1 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'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 16:14:43 +00:00
Mikhail Glushenkov
5c2b6b26c9 Some enhancements for the 'case' expression.
Add (error) and (empty).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 02:47:01 +00:00
Mikhail Glushenkov
23f522a545 Add a comment to the auto-generated docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60985 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 17:51:47 +00:00
Mikhail Glushenkov
8cc8288bef Merge llvm-rst.css and llvm.css.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 17:50:58 +00:00
Mikhail Glushenkov
462886e8ad Some more documentation tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 03:11:37 +00:00
Mikhail Glushenkov
d565203d96 More cosmetic tweaks for llvmc docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60969 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13 02:28:58 +00:00
Mikhail Glushenkov
905315441e Fix W3C validator errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:43:14 +00:00
Mikhail Glushenkov
99a3a2c44c Use correct file for the llvmc tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:33:33 +00:00
Mikhail Glushenkov
68319f87cc Update the auto-generated llvmc documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 23:24:40 +00:00
Mikhail Glushenkov
ba71d677dd Add a '-Wo,' option that passes options to opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60902 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 22:19:14 +00:00
Mikhail Glushenkov
de1e521648 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 10:38:06 +00:00
Mikhail Glushenkov
74bcb057c0 Support -emit-llvm properly (with -S and -c).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 14:40:18 +00:00
Dan Gohman
70ef449741 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:02:47 +00:00
Oscar Fuentes
f76eda70fa CMake: Added Tool.cpp to tools/llvmc/driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 17:01:16 +00:00
Mikhail Glushenkov
4410e3203d Describe recent changes in the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:42 +00:00
Mikhail Glushenkov
b4ced5a3c4 Make 'extern' an option property.
Makes (forward) work better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
940cdfe697 Plugin updates: support more options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:46:23 +00:00
Mikhail Glushenkov
b677df82ed Join tools couldn't be used in the middle of the toolchain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:45:37 +00:00
Mikhail Glushenkov
0bef2ad481 Enable the Clang plugin by default.
This will eventually replace `ccc`. The command `llvmc -clang` now uses
the Clang toolchain instead of `llvm-gcc`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60661 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:43:42 +00:00
Mikhail Glushenkov
c8813da34a Update plugins to use (actions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60660 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:43:17 +00:00
Mikhail Glushenkov
f915253dfc Use (actions) instead of option properties, support external options.
Also includes a major refactoring. See documentation for more
information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60656 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:41:11 +00:00
Devang Patel
4d6e2331c3 Enable LoopIndexSplit pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-04 21:40:31 +00:00
Nick Lewycky
6e11687282 Remove warning about declaration does not declare anything. This class was
already declared in the other headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60261 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 00:36:34 +00:00
Nick Lewycky
4fd40e884c Add protected visibility to libLTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-29 22:49:59 +00:00
Mikhail Glushenkov
bfdef3a6b2 Scrap some boilerplate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60200 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-28 00:14:11 +00:00
Mikhail Glushenkov
739c720e66 Add 'hidden' and 'really_hidden' option properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60198 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-28 00:13:25 +00:00
Mikhail Glushenkov
3321b0ff24 Documentation: clarify what is meant by 'multiple edges'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60197 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-28 00:12:09 +00:00
Mikhail Glushenkov
7e6d70a425 Disallow multiple edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60127 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 22:59:45 +00:00
Devang Patel
6f9f3e1a18 Disable -loop-index-split for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60087 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 04:58:14 +00:00
Zhongxing Xu
3253f4c979 Adjust indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 02:57:24 +00:00
Oscar Fuentes
63c956c083 CMake: llvmc2 is now known as llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 22:18:49 +00:00
Mikhail Glushenkov
113ec35f7f Since the old llvmc was removed, rename llvmc2 to llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 21:38:12 +00:00
Mikhail Glushenkov
536637fb75 docs: Add author info + fix incorrect code example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 21:34:53 +00:00
Mikhail Glushenkov
ebdeca786d Small documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 21:34:29 +00:00
Mikhail Glushenkov
f80f0aacf9 Document the plugin priority feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60044 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 21:34:01 +00:00
Andrew Lenharth
0c6ba44890 ignore the -m elf_i386 directive used in the linux kernel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 17:00:08 +00:00
Mikhail Glushenkov
35fde15059 Support dependencies between plugins by priority-sorting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 17:30:25 +00:00
Mikhail Glushenkov
010887765a 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 17:29:18 +00:00
Oscar Fuentes
232ed2d373 CMake: Removed some cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59376 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-15 20:51:18 +00:00
Oscar Fuentes
2c688da09e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-15 20:35:25 +00:00
Oscar Fuentes
2833f59cad CMake: Remove unused tablegenning code from tools/llvmc2/driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59333 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-14 23:59:50 +00:00
Daniel Dunbar
0d9eb9b491 Add Binary flag to raw_fd_ostream constructor.
Document raw_fd_ostream's treatment of "-".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59219 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 05:01:07 +00:00
Mikhail Glushenkov
aa4774caaa Some cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59096 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12 00:04:46 +00:00
Devang Patel
17ddcd99dd Remove incomplete lto-bugpoint tool. If there is an interest then we can resurrect this tool later on and finish implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59071 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 19:35:38 +00:00
Oscar Fuentes
123f4fd42b CMake: forces rebuild of llvm-config's library dependency info when a
library is added or changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59051 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 17:10:58 +00:00
Oscar Fuentes
63b27a61f8 CMake: Corrected detection of `nm'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 20:26:31 +00:00
Oscar Fuentes
3ab40ca3d5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 18:53:19 +00:00
Daniel Dunbar
77e0c85dcc Add LLVMC2 tool definitions for Objective-C and Objective-C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-08 03:25:47 +00:00
Nick Lewycky
82b80d9884 Update to add newer bitcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58852 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-07 14:52:51 +00:00
Evan Cheng
ec740e325c Add command line option -entry-funcion to override entry function (default is main).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 23:21:52 +00:00
Devang Patel
f75e78900c On darwin, 32-bit x86 target is i386-apple-darwin...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58731 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 23:13:50 +00:00
Nuno Lopes
641397f2ef 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 23:03:58 +00:00
Tanya Lattner
e32d58f637 Revert 58687. This breaks mingw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58719 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 21:06:11 +00:00
Nick Lewycky
c40b75b55a 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 08:05:21 +00:00
Oscar Fuentes
6e1b1253e0 CMakeLists: removed asmprinter component from
tools/llc/CMakeLists.txt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58678 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 03:28:37 +00:00
Oscar Fuentes
980e842153 CMake: Removed some cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 02:33:15 +00:00
Nick Lewycky
33b1c30b0b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 23:59:36 +00:00
Oscar Fuentes
48ed0f59d5 CMake: If we have clang' under the tools/' subdirectory, add it to
the build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58179 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 00:52:09 +00:00
Oscar Fuentes
579e43a44a CMake: GetTargetTriple: new module for determining the target
triple. Assign to LLVM_HOSTTRIPLE so it figures in config.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 00:47:52 +00:00
Daniel Dunbar
3b0da26e20 Move Print*Pass to use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 03:25:22 +00:00
Oscar Fuentes
1dc9716121 CMake: `make install' for libraries, executables and header files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 02:56:07 +00:00
Daniel Dunbar
f4db3a51c7 Privatize PrintModulePass and PrintFunctionPass and add
createPrintModulePass and createPrintFunctionPass.
 - So clients who compile w/o RTTI can use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:33:38 +00:00
Mikhail Glushenkov
cc30d9caa5 Re-apply Makefile changes. Fix build with srcdir != objdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57636 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 14:02:29 +00:00
Bill Wendling
e90842ca52 Unbreak the build. Please test out the proper fix for this by compiling LLVM
with the build directory different from the source directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 16:20:13 +00:00
Anton Korobeynikov
b2029c98ea Temporary revert r57567 and unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57578 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 14:22:06 +00:00
Mikhail Glushenkov
8323748329 llvmc2: Documentation update. Describe recent work on plugins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 09:29:13 +00:00
Mikhail Glushenkov
a01ab7f381 llvmc2: Some Makefile fixes and renames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 09:28:50 +00:00
Mikhail Glushenkov
a1e6eb8b73 Use (a slightly modified) llvm.css for llvmc2 docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57566 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 09:27:44 +00:00
Dan Gohman
b8cab9227a Fix command-line option printing to print two spaces where needed,
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:25:08 +00:00
Devang Patel
7a76ed6774 Fix build failure.
Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57355 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 17:57:50 +00:00
Oscar Fuentes
80533040bc CMake: Reflected changes on source file structure. New plugin support
for llvmc2 incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 21:18:50 +00:00
Mikhail Glushenkov
3945b7cfce Rename llvmc2/core to llvmc2/driver.
Makefiles try to remove 'core' by default, so it wasn't a very good name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57031 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 21:26:27 +00:00
Mikhail Glushenkov
b6cc085134 Rename llvmc2/src to llvmc2/core.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 10:27:23 +00:00
Mikhail Glushenkov
c32dece5a8 Fix build breakage when objdir!=srcdir (proper fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 10:26:37 +00:00
Mikhail Glushenkov
9d1b696441 Fix build breakage (again) when srcdir != objdir, other small fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 09:09:34 +00:00
Bill Wendling
a079e2bdf5 Unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 00:26:49 +00:00
Mikhail Glushenkov
597f3f8c5d Fix build breakage.
Forgot to include Makefile.plugins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-02 22:41:42 +00:00
Mikhail Glushenkov
e4a5ea3130 Build system tweaks to make it more convenient for the plugin authors.
Plugins can be now compiled in with a slight Makefile change.
For example, to compile the new Clang driver, use:

cd $LLVMC2_DIR
make TOOLNAME=ccc2 BUILTIN_PLUGINS=Clang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56967 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-02 21:15:05 +00:00
Bill Wendling
46f7a5ec1a Avoid name shadowing with E variable defined in for(). This was giving VC++
grief.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56961 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-02 18:39:11 +00:00
Oscar Fuentes
e1ad087fcb CMake: Builds all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 04:40:32 +00:00
Oscar Fuentes
5f1f2aef7d CMake: Lists of source files updated. Removed bogus dependency from
lib/VMCore/CMakeLists.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56541 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 01:58:12 +00:00
Duncan Sands
3ee8fc9649 Rationalize the names of passes that print information:
-callgraph => print-callgraph
    -callscc   => print-callgraph-sccs
    -cfgscc    => print-cfg-sccs
    -externalfnconstants => print-externalfnconstants
    -print               => print-function
    -print-alias-sets (no change)
    -print-callgraph     => dot-callgraph
    -print-cfg           => dot-cfg
    -print-cfg-only      => dot-cfg-only
    -print-dom-info (no change)
    -printm              => print-module
    -printusedtypes      => print-used-types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 12:47:39 +00:00
Mikhail Glushenkov
14ef05937f Convert llvmc2 plugins to use llvm/Support/Registry.h machinery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56467 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:51:19 +00:00
Mikhail Glushenkov
4a1a77c1c9 Move llvmc2 header files under include/llvm/CompilerDriver
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56466 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:50:40 +00:00
Mikhail Glushenkov
c82ce4a8a7 Plugin support for llvmc2 (a-la opt).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56465 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:49:34 +00:00
Mikhail Glushenkov
9ecd30c4a2 Add a 'Debugging' section to the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56464 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:48:48 +00:00
Mikhail Glushenkov
0737651452 Make comments a little bit more clear.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56463 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:48:22 +00:00
Mikhail Glushenkov
11a353a206 Get rid of GlobalLanguageMap. Global state is evil.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56462 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:47:46 +00:00
Mikhail Glushenkov
ac69f91e44 Rename our version of ccc to ccc2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56461 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:47:09 +00:00
Mikhail Glushenkov
d92f2e01fc Fix some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56460 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:46:44 +00:00
Mikhail Glushenkov
fdee954623 Add a (forward_as) option property
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56459 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:46:19 +00:00
Mikhail Glushenkov
5ccf28f168 Delete the file llvmc2/doc/LLVMC-Enhancements.rst + some minor language/spelling fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56458 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:45:17 +00:00
Oscar Fuentes
1d8e4cfdb7 CMake build system: support for parallel builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56453 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 18:21:51 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Duncan Sands
210fada2c6 Turn on the AddReadAttrs pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56345 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-19 14:34:36 +00:00
Duncan Sands
e65d39a42c Teach -callgraph to always print the callgraph (as the
description says it does), not just when -analyze is
used as well.  This means printing to stderr, so adjust
some tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56337 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-19 07:57:09 +00:00
Devang Patel
442b1aa94b Fix comments, help messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56282 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 16:01:39 +00:00
Devang Patel
d9424edf94 Fix cut-n-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-17 00:01:04 +00:00
Devang Patel
2d7551ced2 Add -O1, -O2 and -O3 that matches llvm-gcc's -O1, -O2 and -O3 respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16 22:25:14 +00:00
Duncan Sands
38197fed5b End of the GlobalsModRef experiment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-15 18:42:38 +00:00
Duncan Sands
0e3b7b2f91 Give GlobalsModRef a whirl in the nightly testers.
I placed it just before GVN because that it is the
pass most likely to benefit from it.  Some quick
and dirty testing confirms that this is a decent
place for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56144 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12 08:23:37 +00:00
Evan Cheng
70f684fcf9 Allow use of ssh to perform remote execution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55979 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 06:11:26 +00:00
Devang Patel
ff5d06d797 Backout 55429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 20:51:49 +00:00
Devang Patel
9d2968c824 Add facility to create a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55429 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27 20:00:27 +00:00
Chris Lattner
944fac71e0 Switch the asmprinter (.ll) and all the stuff it requires over to
use raw_ostream instead of std::ostream.  Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).

Other interesting changes:
 1) This makes Value::print be non-virtual.
 2) AP[S]Int and ConstantRange can no longer print to ostream directly, 
    use raw_ostream instead.
 3) This fixes a bug in raw_os_ostream where it didn't flush itself 
    when destroyed.
 4) This adds a new SDNode::print method, instead of only allowing "dump".


A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream 
versions.

This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:23:09 +00:00
Dan Gohman
ed3e8b4ed2 Don't silently ignore errors when opening output streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55120 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 15:33:45 +00:00
Owen Anderson
cb37188323 Use raw_ostream throughout the AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21 00:14:44 +00:00
Anton Korobeynikov
2b11004d56 Link GC metadata printers by default to llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54892 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 14:33:01 +00:00
Anton Korobeynikov
3c3bc48d33 Move X86 assembler printers into separate directory. This allows JIT-only users not to link it in (use 'x86codegen' llvm-config arg for this)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 13:53:59 +00:00
Owen Anderson
3688f268cb Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated for almost a year; it's finally time for them to go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-15 21:31:02 +00:00
Evan Cheng
e1a4eda990 Add -fast command line option to lli. It enables fast codegen path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-08 08:12:06 +00:00
Matthijs Kooijman
bcbd9c43a1 Improve bugpoint output a bit by outputting the actual instructions instead of
just it's name, which is often empty. Also remove a newline from the output
that wasn't really needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 08:55:30 +00:00
Devang Patel
9d76c73d9c Identify llvm bit-code file that is causing linking failure in LTO mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 00:34:11 +00:00
Devang Patel
38bcec13e8 Quit early, if unable to reproduce error using original input files.
Quit, if unable to fix error when linker input files are all native object files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53935 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 22:20:18 +00:00
Devang Patel
8502112419 Remove temp. files in the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 20:03:45 +00:00
Bill Wendling
b6f08eb1e6 Remove more tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53905 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 09:08:05 +00:00
Devang Patel
6e7775f732 Provide llvm bitcode file to native object file interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 23:04:39 +00:00
Nick Kledzik
db6535dd20 tentative definitions are default visibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-19 00:58:07 +00:00
Devang Patel
5a7fb69ac2 typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:47:27 +00:00
Devang Patel
0597667717 If all linker input files are native object files then lto-bugpoint is not useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 23:46:41 +00:00
Devang Patel
8e450f07ad Start writing lto-bugpoint tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53774 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18 22:59:45 +00:00
Devang Patel
413907000e Name string length is end position marker - begin position marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53697 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 19:49:09 +00:00
Devang Patel
c2aec57c63 Do not forget global definitions from inline asm code block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-16 18:06:52 +00:00
Devang Patel
f0d286b77f LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53580 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 00:00:11 +00:00
Evan Cheng
5f2f218825 Goodbye tail duplication (for good this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 22:29:15 +00:00
Dan Gohman
cebf59b4a9 Reformat this message to fit in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 17:43:27 +00:00
Duncan Sands
56eb133095 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-13 20:14:38 +00:00
Chris Lattner
3dda08ad5d Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-13 19:35:21 +00:00
Nick Kledzik
920ae9863b fix dangling pointer and argv off by one errors. Add support for --disable-inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 21:14:10 +00:00
Owen Anderson
7220b814ed Global variables beginning with \01 have special meaning on Darwin, so we need to remove
the name prefix when we change them from internal to external.  This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53236 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 16:38:42 +00:00
Nick Kledzik
82eec45b00 add _lto_codegen_debug_options so that linker can use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 23:24:06 +00:00
Devang Patel
a93ae711a9 Provide a hook to set the code generation debug options to investigate lto failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 22:53:14 +00:00
Owen Anderson
735e6eabf1 Use ADCE instead of just DCE. ADCE will better clean up after jump threading,
for instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02 18:42:07 +00:00
Devang Patel
ebd69421a2 Rename new lto2 tool as lto.
lto2->lto


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:15:01 +00:00
Devang Patel
5eabc9d4f6 Remove old LTO interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:04:55 +00:00
Devang Patel
687e03b2fa Move dominator info printer into tool/opt/GraphPrinters.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52907 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 17:32:58 +00:00
Argyrios Kyrtzidis
ca29dffa16 Since we are using GCC to assemble the program, make sure the assembly syntax is AT&T.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-27 15:08:59 +00:00
Chris Lattner
c4ab7acc0b jump threading can introduce allocas, make sure we promote
them back to registers!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:54:18 +00:00
Chris Lattner
6c31e87d7c run mem2reg after the second jump threading pass in llvm-ld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:51:55 +00:00
Chris Lattner
8e336eb04d remove some dead options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:44:08 +00:00
Duncan Sands
9954c76f2c Fix some warnings reported by gcc-4.3. Hopefully
this still compiles on windows - I can't test!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52488 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 08:47:31 +00:00
Bill Wendling
e424254897 Refactor the way to get a string containing the features of the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52470 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 21:39:02 +00:00
Bill Wendling
604a818463 If compiling for PPC on an i386 box, the LTO wouldn't get the altivec (and
other) feature information. The workaround is inelegant and could be cleaned up
if this information were available some other way (say, in the IR).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 06:35:30 +00:00
Argyrios Kyrtzidis
48cca1fd46 Add an "exe" suffix only if the output file has no suffix at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 15:20:16 +00:00
Argyrios Kyrtzidis
1662183a83 Make sure all produced executable files have "exe" suffix on Windows.
With this more general way, -native and -native-cbe options are handled too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52287 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 13:48:12 +00:00
Argyrios Kyrtzidis
e2bc1cb711 Make sure that the current executable filename has "exe" suffix on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 12:07:01 +00:00
Argyrios Kyrtzidis
5b90a7296c Append "exe" suffix to executable files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 12:01:16 +00:00
Matthijs Kooijman
ad6996d74f Let bugpoint display generated messages on stderr only if no interpreter was
found, this ensures that messages like "Found gcc" end up on stdout where they
belong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52235 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 13:09:43 +00:00
Matthijs Kooijman
fbea227f41 Add -silence-passes option to bugpoint. This option suppresses output generated
when bugpoint is running passes in a child process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52234 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 13:02:26 +00:00
Mikhail Glushenkov
856e106d20 Make all help strings start in upper case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 21:14:10 +00:00
Mikhail Glushenkov
74a0c28fba Fix the -opt switch and add a test case for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 19:56:27 +00:00
Mikhail Glushenkov
18aac1c622 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 18:53:09 +00:00
Mikhail Glushenkov
7ef36069c8 Add a --dry-run option to llvmc2. Patch by Holger Schurig.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51781 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 18:48:52 +00:00
Mikhail Glushenkov
7329610dfa Add a --save-temps option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:29:17 +00:00
Mikhail Glushenkov
a7d0ae34fb Add a check for side effect-free options (specified only in the OptionList).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:28:37 +00:00
Mikhail Glushenkov
0ab8ac318f Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:28:00 +00:00
Mikhail Glushenkov
ed3ba406c7 Show argv[0] in error messages (like gcc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:26:35 +00:00
Mikhail Glushenkov
e43228958c New feature: OptionList.
It can be handy to have all information about options gathered in a single place
to provide an overview of all supported options. This patch allows the following:

def Options : OptionList<[
(switch_option "E", (help "Help string")),
(alias_option "quiet", "q")
...
]>;

Tool-specific option properties (like 'append_cmd') have (obviously) no meaning in
this context, so the only properties that are allowed are 'help' and 'required'.

See usage example in examples/Clang.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:26:08 +00:00
Mikhail Glushenkov
270cae3bf8 Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51753 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:25:24 +00:00
Mikhail Glushenkov
5fe8475e3a A small optimization: use static char* array instead of StrVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:24:49 +00:00
Mikhail Glushenkov
92b8da75a1 Make it possible to test if the '-o' option is provided.
The following is now allowed:

    (case (not_empty "o"), do_something, ...)

This didn't work previously because "-o" is built-in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51751 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:24:07 +00:00
Mikhail Glushenkov
6be4ffc7c3 Add support for option aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:22:52 +00:00
Mikhail Glushenkov
fb37f39111 Fix some headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:20:54 +00:00
Mikhail Glushenkov
2e73e851d8 New tests for the 'case' expression: not_empty, in_language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:19:52 +00:00
Mikhail Glushenkov
ef4160dff0 -E should print to stdout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:18:50 +00:00
Mikhail Glushenkov
ffcf3a1a69 Make it possible to have multiple input languages for a single tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:18:16 +00:00
Mikhail Glushenkov
aa3bb17fcc Rename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter.cpp).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:17:29 +00:00
Mikhail Glushenkov
35bca4116e Minor error message fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:16:59 +00:00
Mikhail Glushenkov
163dc1eaa8 Documentation and examples improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51739 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:16:32 +00:00
Mikhail Glushenkov
37f509a70c Do not generate empty 'if's for the output_suffix property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:15:20 +00:00
Mikhail Glushenkov
cd0858e170 Update documentation, add examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:14:42 +00:00
Mikhail Glushenkov
1e4bab2c02 Rename LLVMC-Tutorial.rst to LLVMC-Reference.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:14:01 +00:00
Mikhail Glushenkov
5c7578de08 Make it possible to change the output file suffix based on command-line options.
For instance, the following command:

    llvmc2 -E hello.c

now generates a file with the correct suffix (hello.i).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:13:02 +00:00
Mikhail Glushenkov
08bd2e74dc Add support for user-provided hooks and environment variable reads to the cmd_line tool property.
Used like this: (cmd_line "$CALL(MyHook) --option -o $ENV(VARIABLE) $CALL(AnotherHook)")
Also works with case expressions.

Hook declarations are auto-generated, the definitions should be provided by the user
(just drop a .cpp file in the tools/llvmc2 directory).

Hooks should live in the "hooks" namespace and have type std::string hooks::Hook(void).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51732 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:12:24 +00:00
Mikhail Glushenkov
4eaa389519 Enable the response file ('llvmc @file') support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51731 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:11:45 +00:00
Mikhail Glushenkov
706aecf98e Update the code to the fact that StringSet now lives in llvm/ADT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:11:18 +00:00
Mikhail Glushenkov
b5ccfbf0a9 Make it possible to use the generalised 'case' construct in the cmd_line property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:10:19 +00:00
Mikhail Glushenkov
e5557f4da4 Add a generalised 'case' construct.
Besides assigning edge weights, it will also be used by the cmd_line tool property.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:08:50 +00:00
Nick Kledzik
baa154330e remove the StripSymbolsPass. This should not be done by default in libLTO.dylib. The linker will remove the symbol names if needed after LTO is done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 00:59:13 +00:00
Anton Korobeynikov
43d1fd449f For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-29 17:41:17 +00:00
Owen Anderson
c5b271072e Re-enable the newly simplified ADCE. This fixes a regression on
Dhrystone introduced by its removal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-29 08:48:21 +00:00
Nick Kledzik
ed185d6e96 use space insted of tabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-28 00:06:14 +00:00
Nick Kledzik
9178a65263 fix infinite recursion if a global's initializer references the global
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-27 22:07:08 +00:00
Devang Patel
3b75d20c1a Add instcombine after global optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-27 20:42:44 +00:00
Devang Patel
00481ed5db Use IPSCCPPass instead of IPConstantPropagationPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-27 20:18:45 +00:00
Owen Anderson
9e2abd3840 Remove ADCE from the optimization pipeline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51581 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-27 04:27:27 +00:00
Dan Gohman
ee335e35ac Add #includes to make some dependencies explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51496 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 20:40:06 +00:00
Dale Johannesen
ed1ec3aa6b Make LTO expect common and weak to be represented differently.
Reading .bc files from before that change will no longer work.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51457 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 00:15:10 +00:00
Evan Cheng
03dace82f4 Rename -no-lazy to -disable-lazy-compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-21 18:20:21 +00:00
Dale Johannesen
6a6f2dda36 Add CommonLinkage, in a way that preserves the
behavior on old .bc files.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 22:46:40 +00:00
Dale Johannesen
7d5633e907 Add CommonLinkage to lto (treated same as weak AFAICT)
and llvm-nm (prints as C).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 22:44:18 +00:00
Evan Cheng
df0457241d Re-enable tail duplication pass (now with default threshold down to 1 instruction).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 07:57:10 +00:00
Gabor Greif
b1dbcd886a Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 10:04:30 +00:00
Evan Cheng
38503d4046 Remove tail duplication pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 07:43:15 +00:00
Devang Patel
8ffe2e2156 Recover nestedloop regression reported by nightly tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-14 18:04:30 +00:00
Devang Patel
81a1d08cb7 Do not run instruction combiner in middle of loop optimization passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51084 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-14 00:26:11 +00:00
Mikhail Glushenkov
5c98d824f6 Filter option names to escape symbols not allowed as C++ identifiers.
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov
ecb977e64f Make it possible to choose between different compilation graph definitions at compile-time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:32:24 +00:00
Mikhail Glushenkov
a673037097 Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:31:42 +00:00
Owen Anderson
4982babf4a Re-enable loop deletion by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-10 07:10:24 +00:00
Mikhail Glushenkov
910fd57533 Rename Example.td to Graph.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 19:11:28 +00:00
Nick Kledzik
6b89d928ed use doxygen comments for makeBuffer()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50908 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 18:44:41 +00:00
Mikhail Glushenkov
8e7254cd44 Reapply 50867: A small refactoring (extract method) + some comment fixes.
Fixed the build breakage, sorry for that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 08:27:26 +00:00
Nick Kledzik
90dcff7190 <rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero terminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50880 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 01:09:59 +00:00
Tanya Lattner
0561f78a14 Revertin 50867 since it was breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 21:54:20 +00:00
Mikhail Glushenkov
194a78f149 Add -E and -S options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
21607fa63c A small refactoring (extract method) + some comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50867 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 20:02:03 +00:00
Mikhail Glushenkov
4561ab5d81 Use Doxygen-style comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50833 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 21:50:19 +00:00
Owen Anderson
77a895e599 Disable loop deletion until the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 23:56:34 +00:00
Mikhail Glushenkov
e0ff9ae91e Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
29063554d0 Add new edge property combinator: weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
6a6cd729aa Add a help string for the -c option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
77ddce97ad Update documentation to reflect the current state of affairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
be86712de8 Some cosmetic changes (change some comments, move code around a bit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
4c11a62d69 Refactoring: split the function CompilationGraph::Build() into two parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
76b1b24dc8 Use edge weights to choose the right linker based on input language names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
bb8b58dcf3 Add weights to graph edges. Choose between edges based on their weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50757 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
d83038c960 Remove the UnpackValues() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
978d498e40 Add a --linker command-line option, make all tests pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
895820da24 Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
87416b4cea Add -x option (like in gcc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:10:53 +00:00
Mikhail Glushenkov
35a85e8453 Take object file as input and handle files with the same name correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:10:20 +00:00
Mikhail Glushenkov
be9d9a153f Add output redirection, rename namespace llvmcc to namespace llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50746 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
f7bab8c743 Make AutoGenerated.inc depend also on Tools.td and Common.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:08:12 +00:00
Mikhail Glushenkov
3d688228f6 Utilize topological sort in CompilationGraph::Build().
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:07:48 +00:00
Mikhail Glushenkov
0260658079 Add TopologicalSort method to CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:07:14 +00:00
Mikhail Glushenkov
d7bb87a5a3 Do not require positional arguments when we're only printing out the graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:44:16 +00:00
Mikhail Glushenkov
4f6e3a497e Make ChooseEdge more generic and use it to choose between different toolchains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:28:03 +00:00
Mikhail Glushenkov
bbbc9d4384 Remove unnecessary argument from PassThroughGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:27:37 +00:00
Mikhail Glushenkov
c74bfc946d Add inward edge counters to Nodes; Associate JoinLists with JoinTools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50738 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:26:53 +00:00
Mikhail Glushenkov
97fda6d915 Enhancements for --view-graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:26:14 +00:00
Mikhail Glushenkov
2ba4c5abab Split the Build function into two parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:25:51 +00:00
Mikhail Glushenkov
d81887841c Make llvmc return 1 when the compilation fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:25:23 +00:00
Mikhail Glushenkov
b96cb60827 Return const char* instead of std::string in Tool classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:24:26 +00:00
Mikhail Glushenkov
6591c8938c Add an ability to choose between different edges based on edge properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50732 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:23:50 +00:00
Mikhail Glushenkov
64683edb4d Add new edge properties: parameter_equals, element_in_list, and.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:22:47 +00:00
Mikhail Glushenkov
581936a99c Implemented switch_on edge property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:22:03 +00:00
Mikhail Glushenkov
a4db8c070f Cosmetic change: if( -> if (
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:37:33 +00:00
Mikhail Glushenkov
e74420ab24 Remove ExampleWithOpt.td: this file was merged with Example.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:37:12 +00:00
Mikhail Glushenkov
d752c3ffd8 More work on edge properties. Use Edge classes instead of strings in CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:36:50 +00:00
Mikhail Glushenkov
0a174930e2 Ongoing work: add an edge typechecker, rudimentary support for edge properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:36:06 +00:00
Mikhail Glushenkov
0d08db0345 Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50724 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:35:25 +00:00
Mikhail Glushenkov
aa4948f992 Small const-correctness fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50723 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:34:39 +00:00
Mikhail Glushenkov
b90cd834ca Code reorg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:34:12 +00:00
Owen Anderson
3f3d95c75a Enable dead loop elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 23:38:07 +00:00
Anton Korobeynikov
cae8ccd12d Drop llvmc also, it will be replaced by shiny new llvmc2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 06:19:55 +00:00
Anton Korobeynikov
a9d9ca469f Drop llvm2cpp, it's now a llc target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 06:16:50 +00:00
Chris Lattner
866b9e1520 move libcalls to the same place llvm-gcc has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-02 22:05:06 +00:00
Anton Korobeynikov
9ef7425a4d Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-28 20:53:48 +00:00
Chris Lattner
e78109eb3a several multiple-retval fixes for bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-28 00:04:58 +00:00
Nick Lewycky
280a6e607d Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-25 16:53:59 +00:00
Anton Korobeynikov
9692db9c09 Disable building of llvm2cpp. The directory will be removed before 2.3 release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50193 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 22:46:24 +00:00
Anton Korobeynikov
5027652b8a First step of implementing PR1538: move llvm2cpp logic to new 'target'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 22:29:24 +00:00
Bill Wendling
480311b548 Use the Create static method for some of these objects. They no longer
have public constructors. This should fix PR2246.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 07:13:17 +00:00