Duncan Sands
bfb85b9a67
Make bugpoint pass -load arguments to LLI. This lets one use bugpoint with
...
programs that depend on native shared libraries. Patch by Timo Lindfors.
llvm-svn: 89087
2009-11-17 10:20:22 +00:00
Benjamin Kramer
da70783da7
Add compare_lower and equals_lower methods to StringRef. Switch all users of
...
StringsEqualNoCase (from StringExtras.h) to it.
llvm-svn: 87020
2009-11-12 20:36:59 +00:00
Daniel Dunbar
656c9bf461
Stop running get_target_triple more than we need to.
...
llvm-svn: 86418
2009-11-07 23:52:20 +00:00
Kenneth Uildriks
e711736014
Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
...
llvm-svn: 85900
2009-11-03 15:29:06 +00:00
Nick Lewycky
6623dcf203
Line this up as well.
...
llvm-svn: 85748
2009-11-01 22:08:51 +00:00
Nick Lewycky
2f3164a81c
Fix whitespace.
...
llvm-svn: 85747
2009-11-01 22:07:54 +00:00
Douglas Gregor
16c6819959
Reverting 85714, 85715, 85716, which are breaking the build
...
llvm-svn: 85717
2009-11-01 16:42:53 +00:00
Dan Gohman
1d0b06c139
Remove the #include of Pass.h from PassManager.h. This breaks a significant
...
#include dependency, as frontends commonly pull in PassManager.h.
llvm-svn: 85714
2009-11-01 15:20:19 +00:00
Viktor Kutuzov
4da1a5215a
Fix to pass options from Gold plugin to LTO codegen
...
llvm-svn: 85419
2009-10-28 18:55:55 +00:00
Jeffrey Yasskin
5e379247c1
Revert the API changes from r85295 to make it easier for people to build
...
against both 2.6 and HEAD. The default is still changed to eager jitting.
llvm-svn: 85330
2009-10-27 22:39:42 +00:00
Jeffrey Yasskin
2d123f7740
Change the JIT to compile eagerly by default as agreed in
...
http://llvm.org/PR5184 , and beef up the comments to describe what both options
do and the risks of lazy compilation in the presence of threads.
llvm-svn: 85295
2009-10-27 20:30:28 +00:00
Chandler Carruth
766362c707
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
...
direct inclusion edge from System to Support.
llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Mikhail Glushenkov
5f133de5c2
Document OptionPreprocessor.
...
llvm-svn: 85030
2009-10-25 01:44:11 +00:00
Duncan Sands
728eebe8e2
Include config.h in order to have HAVE_STDINT_H be defined.
...
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.
llvm-svn: 84861
2009-10-22 16:03:32 +00:00
Chris Lattner
e38519a01a
llvm-ld doesn't throw.
...
llvm-svn: 84819
2009-10-22 00:52:28 +00:00
Chris Lattner
55ecceb5bf
this doesn't use EH either.
...
llvm-svn: 84818
2009-10-22 00:50:24 +00:00
Chris Lattner
824a67ab25
nothing opt uses can throw, remove the try block and -fexceptions when
...
building opt.
llvm-svn: 84816
2009-10-22 00:46:41 +00:00
Chris Lattner
381a6ff95c
Add some command line options for twiddling the default data layout
...
used by opt when a module doesn't specify one. Patch from Kenneth Uildriks!
llvm-svn: 84814
2009-10-22 00:44:10 +00:00
Sanjiv Gupta
021ed336bd
Added more options to mcc16 driver.
...
llvm-svn: 84752
2009-10-21 10:38:59 +00:00
Mikhail Glushenkov
f7fe2d2ea9
Clarify documentation on multi_val options.
...
llvm-svn: 84729
2009-10-21 02:13:52 +00:00
Jeffrey Yasskin
4ea1de7bcf
Delete the MacOSJITEventListener per echristo's request. It was disabled by
...
default and didn't work anyway.
llvm-svn: 84720
2009-10-21 00:43:48 +00:00
Mikhail Glushenkov
e29aaa858c
First draft of the OptionPreprocessor.
...
More to follow...
llvm-svn: 84352
2009-10-17 20:09:29 +00:00
Mikhail Glushenkov
887e9cde48
-O[0-3] options should be also forwarded to opt and llc.
...
This will require implementing OptionPreprocessor to forbid invalid invocations
such as 'llvmc -O1 -O2'.
llvm-svn: 84349
2009-10-17 20:07:49 +00:00
Daniel Dunbar
64f0182a28
llvm-as: Simplify, and don't create empty output files with -disable-output.
...
llvm-svn: 84304
2009-10-17 03:28:28 +00:00
Evan Cheng
96e3c797d1
Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not want post-regalloc scheduling.
...
llvm-svn: 84272
2009-10-16 21:02:20 +00:00
Daniel Dunbar
022b59a0b5
MC: Remove unneeded context argument to MCExpr::Evaluate*.
...
llvm-svn: 84233
2009-10-16 01:57:52 +00:00
Daniel Dunbar
af3162e523
MC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
...
variables and symbols invalid.
llvm-svn: 84232
2009-10-16 01:57:39 +00:00
Daniel Dunbar
a4df6e46a4
MC: When parsing a variable reference, substitute absolute variables immediately
...
since they are allowed to be redefined.
llvm-svn: 84230
2009-10-16 01:34:54 +00:00
Duncan Sands
08d519c2b7
There seems to be no reason for opt's -S option to be hidden.
...
Make it visible.
llvm-svn: 84127
2009-10-14 20:01:39 +00:00
Nick Lewycky
4c87d257a4
Fix Makefile to build correctly on Darwin. Patch by Sandeep Patel!
...
llvm-svn: 83813
2009-10-11 23:10:09 +00:00
Mikhail Glushenkov
a3577841cf
Slight rewording.
...
llvm-svn: 83620
2009-10-09 05:45:38 +00:00
Mikhail Glushenkov
1b7df9c598
Use llvm-as only for compiling .ll -> .bc.
...
llc can compile .ll files directly these days.
llvm-svn: 83618
2009-10-09 05:45:01 +00:00
Mikhail Glushenkov
289914c8d4
Unbreak the build.
...
Forgot about the need to reconfigure after modifying Base.td.in....
llvm-svn: 83529
2009-10-08 06:03:38 +00:00
Mikhail Glushenkov
337e15f9a7
Make the Base plugin understand -MF and -MT.
...
llvm-svn: 83525
2009-10-08 04:40:28 +00:00
Duncan Sands
2400ad7236
Introduce and use convenience methods for getting pointer types
...
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
llvm-svn: 83379
2009-10-06 15:40:36 +00:00
Chris Lattner
1aa661ce46
remove llvm-db: it is completely broken and if anyone wants to do a debugger,
...
they should not base it on llvm-db (which not following almost any "best practices").
llvm-svn: 83288
2009-10-05 02:29:51 +00:00
Oscar Fuentes
eeafcc6fab
CMake: remove .so file extension from library names when building
...
dependency info.
Patch by Peter Collingbourne!
llvm-svn: 83275
2009-10-04 06:24:57 +00:00
Mikhail Glushenkov
b676fc15a0
Add a way to query the number of input files.
...
llvm-svn: 82957
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov
251988b823
Document the 'not' combinator.
...
llvm-svn: 82956
2009-09-28 01:16:07 +00:00
Chris Lattner
4ab9414b7c
add a new DirectiveMap stringmap, which allows more efficient dispatching
...
to directive handlers and allows for easier extensibility.
I only switched a few over for now.
llvm-svn: 82926
2009-09-27 21:16:52 +00:00
Chris Lattner
80349d5875
avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
...
llvm-svn: 82911
2009-09-27 19:38:39 +00:00
Daniel Dunbar
827ef5a368
Make llvm-bcanalyzer percentages more readable.
...
llvm-svn: 82772
2009-09-25 16:04:21 +00:00
Daniel Dunbar
e963728182
Strip trailing whitespace.
...
llvm-svn: 82771
2009-09-25 16:03:57 +00:00
Duncan Sands
79ffac01fb
Print INST_INBOUNDS_GEP rather than UnknownCode30.
...
Likewise for constant inbounds GEP.
llvm-svn: 82763
2009-09-25 12:28:37 +00:00
Gabor Greif
ea0ff5468d
pretty mechanical changes to match coding guidelines (blessed by sabre on IRC)
...
llvm-svn: 82603
2009-09-23 02:46:12 +00:00
Daniel Dunbar
0ba272283d
Fix llvm-config --src-root and --obj-root for CMake builds.
...
llvm-svn: 82529
2009-09-22 06:09:31 +00:00
Daniel Dunbar
25f8e30355
llvm-config: Remove unused variables.
...
llvm-svn: 82528
2009-09-22 06:09:22 +00:00
Chris Lattner
f411f53f9c
Add an intel syntax MCInstPrinter implementation. You can now
...
transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1"
llvm-svn: 82385
2009-09-20 07:17:49 +00:00
Nick Lewycky
3b7df4bbd5
Remove the default value for ConstantStruct::get's isPacked parameter and
...
update the code which was broken by this.
llvm-svn: 82327
2009-09-19 20:30:26 +00:00
Devang Patel
c195f74dee
Write and read metadata attachments.
...
llvm-svn: 82259
2009-09-18 19:26:43 +00:00
Dan Gohman
f289d3a1c9
Now that llc can read .ll files directly, teach it to recognize .ll as
...
an extension, so that the default output filename for foo.ll is foo.s,
not foo.ll.s
llvm-svn: 82071
2009-09-16 19:18:41 +00:00
Kevin Enderby
41b1d4288a
Fixed some problems with the logic of parsing line comments by adding
...
isAtStartOfComment and using that instead in two places where a loop
to check if the char was in MAI.getCommentString().
llvm-svn: 82059
2009-09-16 18:08:00 +00:00
Xerxes Ranby
d7ea8f55c2
Make cmake generated llvm-config output correct JIT backend for non X86 targets.
...
llvm-svn: 82049
2009-09-16 14:36:35 +00:00
Chris Lattner
fab7b49bb0
use an accessor to simplify code.
...
llvm-svn: 81997
2009-09-16 04:12:47 +00:00
Dan Gohman
98752b1ba2
Give llvm-link a -S option.
...
llvm-svn: 81859
2009-09-15 15:35:07 +00:00
Dan Gohman
5a8cf339b0
Don't bother using a PassManager just to print a Module.
...
llvm-svn: 81858
2009-09-15 15:33:42 +00:00
Chris Lattner
4a33f01892
Change MCAsmStreamer to take an MCInstPrinter instead of a
...
full AsmPrinter, and change TargetRegistry to keep track
of registered MCInstPrinters.
llvm-mc is still linking in the entire
target foo to get the code emitter stuff, but this is an
important step in the right direction.
llvm-svn: 81754
2009-09-14 03:02:37 +00:00
Dan Gohman
358e5c9bad
Convert llvm-link to IRReader.
...
llvm-svn: 81632
2009-09-12 21:55:12 +00:00
Douglas Gregor
adef81e26c
De-bork CMake build. llvm-extract depends on asmparser
...
llvm-svn: 81574
2009-09-11 21:26:24 +00:00
Dan Gohman
149ac38d37
Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
...
working. To support this, add an is_displayed() function to raw_ostream,
and generalize Process::StandardOutIsDisplayed and friends in order to
support it.
Also, call RemoveFileOnSignal before creating a file instead of after, so
that the file isn't left behind if the program is interrupted between when
the file is created and RemoveFileOnSignal is called.
While here, add a -S to llvm-extract and port it to IRReader so that it
supports assembly input.
llvm-svn: 81568
2009-09-11 20:46:33 +00:00
Kevin Enderby
9f0fb453d8
Added the ParseInstruction() hook for target specific assembler directives so
...
that things like .word can be parsed as target specific. Moved parsing .word
out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
for other targets that support the .word directive.
llvm-svn: 81461
2009-09-10 20:51:44 +00:00
Mikhail Glushenkov
77f3e5deee
Allow llvmc to take .bc files as input.
...
llvm-svn: 81452
2009-09-10 17:04:32 +00:00
Nuno Lopes
a79196d2a9
fix leakage of Module
...
llvm-svn: 81445
2009-09-10 14:56:31 +00:00
Daniel Dunbar
bae4e52bd0
MC: Give target specific parsers access to the MCStreamer.
...
llvm-svn: 81416
2009-09-10 00:59:15 +00:00
Daniel Dunbar
072b03693f
Add -output-prefix option to bugpoint (to change the default output name).
...
llvm-svn: 81154
2009-09-07 19:26:11 +00:00
Benjamin Kramer
38666b8c1c
Fix an integer truncation noticed by MSVC.
...
llvm-svn: 81109
2009-09-06 09:35:10 +00:00
Daniel Dunbar
9690cc9913
opt: Add -S option to print output as LLVM assembly.
...
llvm-svn: 81082
2009-09-05 11:34:53 +00:00
Kevin Enderby
8aeb8c1f8c
Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
...
preparation of supporting other targets. Then changed the lexer to parse these
as tokens.
llvm-svn: 81050
2009-09-04 22:40:31 +00:00
Kevin Enderby
f697ad5e30
Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
...
supporting other targets. Changed the code to pass MCAsmInfo to the parser
and the lexer. Then changed the lexer to use CommentString from MCAsmInfo
instead of a literal '#' character.
llvm-svn: 81046
2009-09-04 21:45:34 +00:00
Kevin Enderby
5f29771ea2
Removed the non-target independent AsmToken::Register enum constant
...
from MCAsmLexer.h in preparation of supporting other targets. Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.
llvm-svn: 80929
2009-09-03 17:15:07 +00:00
Dan Gohman
3727dda74f
Make bugpoint use ParseIRFile instead of doing the same thing manually.
...
llvm-svn: 80927
2009-09-03 16:32:58 +00:00
Dan Gohman
7a60ef0f45
Use IRReader.h in opt, to support reading of LLVM Assembly files directly.
...
llvm-svn: 80922
2009-09-03 16:00:08 +00:00
Chris Lattner
344ada1f5e
TAI -> MAI
...
llvm-svn: 80899
2009-09-03 06:13:54 +00:00
Daniel Dunbar
92d6efefb4
Tweak comment.
...
llvm-svn: 80891
2009-09-03 05:47:22 +00:00
Douglas Gregor
d7f58a6cb0
Unbreak my CMake build. Say you'll link again.
...
llvm-svn: 80842
2009-09-02 22:45:31 +00:00
Dan Gohman
6ebdbf7f07
Switch llc from ParseBitcodeFile to ParseIRFile. This lets llc
...
transparently read either LLVM Assembly or LLVM Bitcode files.
llvm-svn: 80829
2009-09-02 19:35:19 +00:00
Daniel Dunbar
3a44b6da61
llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.
...
llvm-svn: 80578
2009-08-31 08:09:28 +00:00
Daniel Dunbar
b897e807c4
llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').
...
llvm-svn: 80577
2009-08-31 08:09:09 +00:00
Daniel Dunbar
11035eeb11
llvm-mc: Remove MCAsmParser::Parse[Paren]RelocatableExpression.
...
llvm-svn: 80576
2009-08-31 08:08:50 +00:00
Daniel Dunbar
5fbaad8079
llvm-mc: Add MCAsmParser::Parse[Paren]Expression forms which return an MCExpr.
...
llvm-svn: 80574
2009-08-31 08:08:17 +00:00
Daniel Dunbar
22505125c8
llvm-mc: Add MCAsmParser::getContext.
...
llvm-svn: 80571
2009-08-31 08:07:44 +00:00
Daniel Dunbar
053a5f22a0
llvm-mc: Switch MCExpr construction to using static member functions, and taking the MCContext (which now owns all MCExprs).
...
llvm-svn: 80569
2009-08-31 08:07:22 +00:00
Daniel Dunbar
b882c70ff2
llvm-mc: Move AsmExpr into MC lib (as MCExpr).
...
llvm-svn: 80567
2009-08-31 08:06:59 +00:00
Chris Lattner
2081eaa21d
only print the override triple if it exists!
...
llvm-svn: 80534
2009-08-31 03:22:35 +00:00
Chris Lattner
085c521fe2
Fix some nasty callgraph dangling pointer problems in
...
argpromotion and structretpromote. Basically, when replacing
a function, they used the 'changeFunction' api which changes
the entry in the function map (and steals/reuses the callgraph
node).
This has some interesting effects: first, the problem is that it doesn't
update the "callee" edges in any callees of the function in the call graph.
Second, this covers for a major problem in all the CGSCC pass stuff, which
is that it is completely broken when functions are deleted if they *don't*
reuse a CGN. (there is a cute little fixme about this though :).
This patch changes the protocol that CGSCC passes must obey: now the CGSCC
pass manager copies the SCC and preincrements its iterator to avoid passes
invalidating it. This allows CGSCC passes to mutate the current SCC. However
multiple passes may be run on that SCC, so if passes do this, they are now
required to *update* the SCC to be current when they return.
Other less interesting parts of this patch are that it makes passes update
the CG more directly, eliminates changeFunction, and requires clients of
replaceCallSite to specify the new callee CGN if they are changing it.
llvm-svn: 80527
2009-08-31 00:19:58 +00:00
Daniel Dunbar
bc61205626
llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now.
...
- Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency).
llvm-svn: 80484
2009-08-30 06:17:16 +00:00
Andreas Neustifter
44bd609b7b
Since all std::cout is gone, also remove iostream include.
...
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090824/085620.html )
llvm-svn: 80349
2009-08-28 06:48:25 +00:00
Daniel Dunbar
09ed9fabde
llvm-mc: Emit .lcomm as .zerofill.
...
llvm-svn: 80343
2009-08-28 05:48:46 +00:00
Daniel Dunbar
42ad4294d0
llvm-mc: Unique zero fill sections.
...
llvm-svn: 80342
2009-08-28 05:48:29 +00:00
Daniel Dunbar
f0714ea058
Revert r80305, I forgot a dependent change.
...
--- Reverse-merging r80305 into '.':
U tools/llvm-mc/AsmParser.cpp
llvm-svn: 80309
2009-08-27 23:58:10 +00:00
Daniel Dunbar
2c48439750
llvm-mc: Unique sections in .zerofill.
...
llvm-svn: 80305
2009-08-27 23:45:06 +00:00
Benjamin Kramer
ad022f0b66
Inverse logic to increase portability.
...
llvm-svn: 80240
2009-08-27 12:02:34 +00:00
Sanjiv Gupta
4e396dbbb9
To make mcc16 run correctly on mac.
...
llvm-svn: 80239
2009-08-27 11:54:38 +00:00
Daniel Dunbar
e30a44267c
llvm-mc/Mach-O: Add MCCodeEmitter support, for encoding instructions.
...
- No relocations yet, of course.
llvm-svn: 80235
2009-08-27 08:17:51 +00:00
Daniel Dunbar
7e83346fd9
llvm-mc: Only show instruction encodings with --show-encoding.
...
llvm-svn: 80230
2009-08-27 07:56:39 +00:00
Daniel Dunbar
4316774ac1
llvm-mc: Tweak MCCodeEmitter skeleton.
...
llvm-svn: 80193
2009-08-27 01:34:22 +00:00
Daniel Dunbar
fd042a5019
Sketch TargetRegistry support for MCCodeEmitter abstract interface.
...
- Of course, nothing actually can provide this interface yet.
llvm-svn: 80188
2009-08-27 00:51:57 +00:00
Daniel Dunbar
f2e919b79e
llvm-mc/Mach-O: Unique sections properly, so we don't get duplicate text
...
sections, etc.
- The quick and dirty way, just clone the TargetLoweringObjectFile
code. Eventually this should be shared... somehow.
llvm-svn: 80168
2009-08-26 22:49:51 +00:00
Daniel Dunbar
1f70368155
llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
...
- I moved section creation back into AsmParser. I think policy decisions like
this should be pushed higher, not lower, when possible (in addition the
assembler has flags which change this behavior, for example).
llvm-svn: 80162
2009-08-26 22:13:22 +00:00
Daniel Dunbar
e1f51a4fed
llvm-mc: Make MCValue take const MCSymbol*s.
...
llvm-svn: 80078
2009-08-26 09:16:46 +00:00