Kevin Enderby
312f8559cb
Added llvm-mc support for parsing the .dump and .load directives.
...
llvm-svn: 75786
2009-07-15 15:30:11 +00:00
Daniel Dunbar
1d5b4e20c9
Migrate llc and the JIT to using the TargetRegistry for lookups.
...
- They still use the TargetMachineRegistry to populate the contents of the
-march option (via the listener interface). We can't just populate it in the
option parser because we can't expect the TargetRegistry to be populated yet
(we no longer rely on static constructors).
- There are a couple ways to finish killing off TargetMachineRegistry, but I
haven't figured out the cleanest one yet...
llvm-svn: 75773
2009-07-15 11:36:15 +00:00
Daniel Dunbar
e4ac57c0d1
Switch some obvious clients to using the new TargetRegistry.
...
llvm-svn: 75767
2009-07-15 10:05:03 +00:00
Daniel Dunbar
9df1ce1251
Teach Makefiles & CMake to link in the <TARGET>Info library when linking the
...
TARGET component.
- Also, updated some CMake library dependencies, it is still missing some
though. :(
llvm-svn: 75755
2009-07-15 07:43:34 +00:00
Chris Lattner
48e30f6d1f
eliminate the Mangler::PreserveAsmNames bit, the sole client of this
...
can do it perfectly well itself.
llvm-svn: 75743
2009-07-15 04:50:47 +00:00
Evan Cheng
ec2df6b4f5
control reaches end of non-void function.
...
llvm-svn: 75714
2009-07-14 23:55:32 +00:00
Kevin Enderby
3e47cf1dda
Added llvm-mc support for parsing the .include directive.
...
llvm-svn: 75711
2009-07-14 23:21:55 +00:00
Owen Anderson
8c85061ee6
Move EVER MORE stuff over to LLVMContext.
...
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Kevin Enderby
5821cee99b
Added llvm-mc support for parsing the .lsym directive.
...
llvm-svn: 75685
2009-07-14 21:35:03 +00:00
David Greene
9c8a1b9b90
Have asm printers use formatted_raw_ostream directly to avoid a
...
dynamic_cast<>.
llvm-svn: 75670
2009-07-14 20:18:05 +00:00
Viktor Kutuzov
8171eaada3
Fix for bugpoint -remote-client
...
llvm-svn: 75665
2009-07-14 19:10:55 +00:00
Chris Lattner
6ec578688d
Reapply my previous asmprinter changes now with more testing and two
...
additional bug fixes:
1. The bug that everyone hit was a problem in the asmprinter where it
would remove $stub but keep the L prefix on a name when emitting the
indirect symbol. This is easy to fix by keeping the name of the stub
and the name of the symbol in a StringMap instead of just keeping a
StringSet and trying to reconstruct it late.
2. There was a problem printing the personality function. The current
logic to print out the personality function from the DWARF information
is a bit of a cesspool right now that duplicates a bunch of other
logic in the asm printer. The short version of it is that it depends
on emitting both the L and _ prefix for symbols (at least on darwin)
and until I can untangle it, it is best to switch the mangler back to
emitting both prefixes.
llvm-svn: 75646
2009-07-14 18:17:16 +00:00
Kevin Enderby
0b1331c43b
Added llvm-mc support for parsing the .desc directive.
...
llvm-svn: 75645
2009-07-14 18:17:10 +00:00
Daniel Dunbar
dbbc49bb29
Revert r7561{9,8,7,6}, which depend on r75610.
...
--- Reverse-merging r75619 into '.':
U lib/Target/DarwinTargetAsmInfo.cpp
U lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U lib/CodeGen/ELFWriter.cpp
U lib/CodeGen/MachOCodeEmitter.cpp
U lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U tools/bugpoint/Miscompilation.cpp
U tools/lto/LTOCodeGenerator.cpp
U tools/lto/LTOModule.cpp
llvm-svn: 75638
2009-07-14 16:25:11 +00:00
Daniel Dunbar
c0f30f5384
Move main llvm-prof functionality into a ModulePass.
...
- To support using the ProfileInfo analysis results instead of accessing the
ProfileInfoLoader directly.
- Based on (part of) a patch by Andreas Neustifter.
- No functionality change.
llvm-svn: 75625
2009-07-14 07:41:11 +00:00
Chris Lattner
a90ef5eb4a
rename getValueName -> getMangledName
...
llvm-svn: 75616
2009-07-14 06:19:07 +00:00
Kevin Enderby
af095fcfb8
Added llvm-mc support for parsing the .abort directive.
...
llvm-svn: 75545
2009-07-13 23:15:14 +00:00
Dan Gohman
7d880c801b
#include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
...
llvm-svn: 75542
2009-07-13 22:56:37 +00:00
Owen Anderson
1169a91099
Fix the build.
...
llvm-svn: 75536
2009-07-13 22:40:32 +00:00
Owen Anderson
7b2ee7dc21
As Chris pointed out, this doesn't actually need an LLVMContext to operate.
...
llvm-svn: 75508
2009-07-13 21:27:19 +00:00
Kevin Enderby
a461788d6a
add llvm-mc support for parsing the .subsections_via_symbols directive.
...
llvm-svn: 75500
2009-07-13 21:03:15 +00:00
Sanjiv Gupta
afb0db5554
Added a fixme for platform specific GetDirSeparator().
...
llvm-svn: 75461
2009-07-13 10:58:55 +00:00
Sanjiv Gupta
2a0e3440ff
allow mcc16 users to specify --save-temps even though it is hidden by mcc16.
...
link libstd.so with llvm-ld by default with all the programs user is trying to build.
llvm-svn: 75460
2009-07-13 10:56:29 +00:00
Owen Anderson
393d8b0a0c
Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
...
This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.
llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Daniel Dunbar
c6592df02d
Match declaration to definition.
...
llvm-svn: 75440
2009-07-12 23:50:34 +00:00
Chris Lattner
1e7e5e5de0
silence vc++ warning.
...
llvm-svn: 75394
2009-07-11 22:32:37 +00:00
Daniel Dunbar
054effb8e8
Fix unused function warning.
...
llvm-svn: 75386
2009-07-11 21:24:52 +00:00
Mikhail Glushenkov
e779ca7370
Update documentation.
...
llvm-svn: 75375
2009-07-11 19:27:40 +00:00
Sanjiv Gupta
52c87f84a6
Erase the temp dir before starting.
...
llvm-svn: 75367
2009-07-11 17:35:46 +00:00
Chris Lattner
84bf9fed2b
add support for .zerofill, patch by Kevin Enderby!
...
llvm-svn: 75301
2009-07-10 22:20:30 +00:00
David Goodwin
85da1c6622
Support remote execute for ARM.
...
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Jeffrey Yasskin
4f8961d587
Add a --with-oprofile flag to configure, which uses OProfile's agent
...
library to tell it the addresses of JITted functions. For a
particular program, this changes the opreport -l output from:
samples % image name symbol name
48182 98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000)
11 0.0226 libstdc++.so.6.0.9 /usr/lib/libstdc++.so.6.0.9
to:
samples % image name symbol name
24565 60.7308 19814.jo fib_left
15365 37.9861 19814.jo fib_right
22 0.0544 ld-2.7.so do_lookup_x
llvm-svn: 75279
2009-07-10 21:08:20 +00:00
Sanjiv Gupta
af27aae5b9
Link std.lib (.bc code) with llvm-ld.
...
Link devices.lib (processor specific variables) with mplink.
llvm-svn: 75263
2009-07-10 19:04:05 +00:00
Owen Anderson
49226b1075
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
...
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Mikhail Glushenkov
b067c19529
Documentation update.
...
llvm-svn: 75166
2009-07-09 19:39:16 +00:00
Mikhail Glushenkov
d338e3f9dd
We don't need to set SaveTemps here.
...
'--temp-dir' always overrides 'save-temps'.
llvm-svn: 75165
2009-07-09 19:38:32 +00:00
Mikhail Glushenkov
ac5de493e5
Adjust comment.
...
llvm-svn: 75164
2009-07-09 19:37:58 +00:00
Sanjiv Gupta
d7c9ab8477
By default -t is always on for mcc16 and it uses ./tmp-objs as the temp directory.
...
llvm-svn: 75155
2009-07-09 18:09:26 +00:00
Chris Lattner
56638bb644
add llvm-mc support for parsing the .lcomm directive, patch by Kevin Enderby!
...
llvm-svn: 75148
2009-07-09 17:25:12 +00:00
Sanjiv Gupta
d56a55276e
Added few more options to individual tools.
...
llvm-svn: 75120
2009-07-09 08:20:25 +00:00
Sanjiv Gupta
5a28f85997
Return dir separator as per platform.
...
llvm-svn: 75119
2009-07-09 08:17:55 +00:00
Nick Lewycky
8fde54aae1
Don't create undefined symbols for aliases.
...
llvm-svn: 75111
2009-07-09 06:03:04 +00:00
Owen Anderson
332aae685b
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
...
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Owen Anderson
7a1f69e433
Push LLVMContext through GlobalVariables and IRBuilder.
...
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Jeffrey Yasskin
946cb41a12
Fix http://llvm.org/PR4481 : Make llvm-config print the right include paths when
...
srcdir!=objdir.
llvm-svn: 74956
2009-07-07 22:15:37 +00:00
Chris Lattner
2bea79b45b
Implement parsing support for the .comm directive. Patch by
...
Kevin Enderby!
llvm-svn: 74944
2009-07-07 20:30:46 +00:00
Chris Lattner
f2acd8e359
Fix lli to print an error and exit when EE returns null but no string. Patch
...
by Eric Rannaud!
llvm-svn: 74930
2009-07-07 18:31:09 +00:00
Mikhail Glushenkov
93e0649f0b
Documentation update.
...
llvm-svn: 74913
2009-07-07 16:43:49 +00:00
Mikhail Glushenkov
e2ed2abeac
Show how to modify built-in options.
...
Sanjiv complained about the need to maintain local changes to
lib/CompilerDriver.
llvm-svn: 74912
2009-07-07 16:39:33 +00:00
Mikhail Glushenkov
90cd77a1b9
Documentation update.
...
llvm-svn: 74907
2009-07-07 16:09:29 +00:00
Bruno Cardoso Lopes
38373542a1
Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
...
cleanup, removed some #includes and moved Object Code Emitter out-of-line.
llvm-svn: 74813
2009-07-06 05:09:34 +00:00
Mikhail Glushenkov
1056032a99
LLVMC doesn't need ENABLE_PIC to build now.
...
llvm-svn: 74783
2009-07-04 03:54:54 +00:00
Duncan Sands
bf3c14a658
Add newline at end of file.
...
llvm-svn: 74774
2009-07-03 15:38:01 +00:00
Torok Edwin
644892577f
Fix typo: intepreter->interpreter.
...
llvm-svn: 74770
2009-07-03 12:11:32 +00:00
Chris Lattner
739a32b190
switch the .ll parser into SMDiagnostic.
...
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Chris Lattner
448c0a2708
implement error recovery in the llvm-mc parser. Feel the power!
...
llvm-svn: 74728
2009-07-02 21:53:43 +00:00
Sanjiv Gupta
45b575e63c
Prefix bin dir to executables.
...
llvm-svn: 74713
2009-07-02 17:51:09 +00:00
Sanjiv Gupta
8fd0b5db12
Fixed handling of -c option.wq
...
llvm-svn: 74711
2009-07-02 17:35:38 +00:00
Daniel Dunbar
0afb18f239
llvm-mc/x86: Fix various nit-picky bugs in displacement parsing.
...
- Test case to follow.
llvm-svn: 74687
2009-07-02 02:26:39 +00:00
Daniel Dunbar
b87d6f328e
llvm-mc/x86: Fix bug in disambiguation of displacement operand, introduced by me
...
(I think).
- We weren't properly parsing the leading parenthesized expression in something
like 'push (4)(%eax)'.
- Added ParseParenRelocatableExpression to support this. I suspect we should
just use lookahead, though.
- Test case to follow.
llvm-svn: 74685
2009-07-02 02:09:07 +00:00
Daniel Dunbar
ffbf6228a2
llvm-mc/x86: Factor out ParseX86Register.
...
llvm-svn: 74684
2009-07-02 01:58:24 +00:00
Daniel Dunbar
7c83d0ed14
llvm-mc/x86: Rename X86Operand::ScaleReg to IndexReg and make order consistent
...
with syntax.
llvm-svn: 74679
2009-07-02 00:51:52 +00:00
Owen Anderson
9e109b6077
Maintain the old LTO API, by using the global context.
...
llvm-svn: 74678
2009-07-02 00:31:14 +00:00
Dan Gohman
e89dc58a7e
Fix a bunch of other places that used operator[] to test whether
...
a key is present in a std::map or DenseMap to use find instead.
llvm-svn: 74676
2009-07-02 00:17:47 +00:00
John Mosby
c7b8abb0ec
fix ld error with -no-undefined switch, which is undefined on darwin8
...
llvm-svn: 74674
2009-07-02 00:10:23 +00:00
Owen Anderson
4fa7e54329
Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
...
moment, that I will need to make far-reaching changes.
llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Owen Anderson
cf112e59c3
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Jeffrey Yasskin
29ea777c1e
Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
...
Windows variant, strerror_s, but I couldn't test that.
I'll update configure and config.h.in in a subsequent patch.
llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Owen Anderson
81b8dabb53
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
...
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Sanjiv Gupta
a7b306188b
Executables will be at InstallDir/bin directory. Std header files will be at InstallDir/include, libs will be at InstallDir/lib. Define hooks for these and use them in the options for various tools.
...
llvm-svn: 74611
2009-07-01 16:10:29 +00:00
Daniel Dunbar
351a228c46
llvm-mc: Add some more doxyments.
...
llvm-svn: 74607
2009-07-01 15:14:50 +00:00
Daniel Dunbar
f234f1f312
llvm-mc: Fill in the rest of tokens for 'as-lex' mode.
...
llvm-svn: 74598
2009-07-01 06:56:54 +00:00
Daniel Dunbar
7f47cc9423
Rename MCValue::isConstant to isAbsolute.
...
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
db3d640a42
add some of the new tokens, others are still missing.
...
llvm-svn: 74595
2009-07-01 06:36:49 +00:00
Daniel Dunbar
1960440e70
llvm-mc: Emit parsed instructions to the MCStreamer.
...
llvm-svn: 74594
2009-07-01 06:35:48 +00:00
Daniel Dunbar
cae97fa7a9
llvm-mc: Introduce method to match a parsed x86 instruction into an MCInst.
...
llvm-svn: 74573
2009-06-30 23:38:38 +00:00
Daniel Dunbar
3f34774b4a
llvm-mc: Accept relocatable expressions when parsing displacements and
...
immediates.
llvm-svn: 74568
2009-06-30 23:02:44 +00:00
Daniel Dunbar
d0589c59b3
llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
...
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.
llvm-svn: 74565
2009-06-30 22:49:27 +00:00
Daniel Dunbar
f3f3e60b4f
Suppress may-be-used-uninitialized warning.
...
llvm-svn: 74529
2009-06-30 16:02:47 +00:00
Douglas Gregor
2373782453
Fix CMake build
...
llvm-svn: 74527
2009-06-30 14:37:26 +00:00
Daniel Dunbar
2d92d62fb2
llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
...
llvm-svn: 74498
2009-06-30 02:10:03 +00:00
Daniel Dunbar
a702c280bb
llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
...
legally negate an MCValue.
llvm-svn: 74497
2009-06-30 02:08:27 +00:00
Daniel Dunbar
c3cac19cfe
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Daniel Dunbar
5bec168037
Normalize SourceMgr messages.
...
- Don't print "Parsing" in front of every message.
- Take additional "type" argument which is prepended to the message (with ": ")
if given.
- Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...
llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Daniel Dunbar
e4fd18eda8
llvm-mc: Parse symbol attribute directives.
...
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
2a0fc1e1a3
Clang is now production quality (at least for C).
...
llvm-svn: 74484
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
8f8b5ff837
Add a way to access argv[0] in hooks.
...
llvm-svn: 74483
2009-06-30 00:16:00 +00:00
Daniel Dunbar
72c0434597
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Daniel Dunbar
37b8fe7db3
llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
...
- For example, we diagnose errors on:
--
a:
a = 10
--
- For now we reject code like:
--
.long a
a = 10
--
which "as" accepts (on Darwin).
llvm-svn: 74476
2009-06-29 23:43:14 +00:00
Daniel Dunbar
fca88cf26b
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
67828e6e0a
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Daniel Dunbar
8be858eeb4
Fix uninitialized variable warning.
...
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
a33d10fc4d
Don't build LLVMC when configured with --disable-pic (it needs requires shared
...
module support to build).
llvm-svn: 74456
2009-06-29 21:12:26 +00:00
Daniel Dunbar
41782dbbcd
MC: Improve expression parsing and implement evaluation of absolute expressions
...
(missed files).
llvm-svn: 74450
2009-06-29 20:40:36 +00:00
Daniel Dunbar
ade4f03bd0
MC: Improve expression parsing and implement evaluation of absolute expressions.
...
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Evan Cheng
05451335e6
Indentation.
...
llvm-svn: 74281
2009-06-26 06:57:16 +00:00
Daniel Dunbar
bfc585a86e
MC: Parse .org directives.
...
llvm-svn: 74218
2009-06-25 22:44:51 +00:00
Daniel Dunbar
d7a883b5e5
MC: Parse .set and assignments.
...
llvm-svn: 74208
2009-06-25 21:56:11 +00:00
Mikhail Glushenkov
c40a28803f
Update documentation.
...
llvm-svn: 74191
2009-06-25 18:20:44 +00:00
Jeffrey Yasskin
c431f61520
Add a JITEventListener interface that gets called back when a new function is
...
emitted or the machine code for a function is freed. Chris mentioned that we
may also want a notification when a stub is emitted, but that'll be a future
change. I intend to use this to tell oprofile where functions are emitted and
what lines correspond to what addresses.
llvm-svn: 74157
2009-06-25 02:04:04 +00:00