Daniel Dunbar
36d5769ab0
Reenable asmparser dependency generation, now with improved Perl foo.
...
llvm-svn: 76243
2009-07-17 21:26:27 +00:00
Daniel Dunbar
6b35d3c9de
Disable llvm-config magic for AsmParser, it is isn't right & is breaking the build.
...
llvm-svn: 76242
2009-07-17 21:22:20 +00:00
Daniel Dunbar
71475775b9
Sketch support for target specific assembly parser.
...
- Not fully enabled yet, need a configure regeneration.
llvm-svn: 76230
2009-07-17 20:42:00 +00:00
Bob Wilson
46f079e33f
Fix a crash in SROA. The FunctionPass::doInitialization method was never
...
being called so that Context was never initialized. I'm not sure if this
is the right fix but at least it keeps opt from crashing.
llvm-svn: 76220
2009-07-17 19:05:13 +00:00
Daniel Dunbar
41f9a3afdb
opt: Add -std-link-opts argument, matches llvm-ld's optimizations.
...
llvm-svn: 76199
2009-07-17 18:09:39 +00:00
Kevin Enderby
dd27e5e10a
Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic
...
EmitAssemblerFlag API which takes a value from the added AssemblerFlag
enumerated constants.
llvm-svn: 76087
2009-07-16 17:56:39 +00:00
Kevin Enderby
7bef8bc320
Clean up the definition of Str in AsmParser::ParseDirectiveDarwinDumpOrLoad
...
so it is defined with a lifetime that is as short as possible.
llvm-svn: 76082
2009-07-16 17:17:46 +00:00
Dan Gohman
ee05152cfa
Convert more tools code from cerr and cout to errs() and outs().
...
llvm-svn: 76070
2009-07-16 15:30:09 +00:00
Chris Lattner
693fbb8fee
implement .include in the lexer/parser instead of passing it into the streamer.
...
llvm-svn: 75896
2009-07-16 06:14:39 +00:00
Daniel Dunbar
4580638808
Kill off last uses of TargetMachineRegistry class.
...
llvm-svn: 75892
2009-07-16 02:41:19 +00:00
Daniel Dunbar
d3706458df
Switch llc and createJIT to use simpler command line parsing for -march.
...
llvm-svn: 75890
2009-07-16 02:23:53 +00:00
Daniel Dunbar
3d92d936b9
Make sure targets are initialized before we do anything, even command line
...
processing.
llvm-svn: 75888
2009-07-16 02:04:54 +00:00
Dan Gohman
2b30e8be44
Fix this comment to mention outs() rather than cout.
...
llvm-svn: 75858
2009-07-15 23:33:14 +00:00
Owen Anderson
19251ec836
To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.
...
This will let us to hardwire stuff to the global context in the short term while the API is sorted out.
llvm-svn: 75846
2009-07-15 22:16:10 +00:00
Daniel Dunbar
e833810a5e
Reapply TargetRegistry refactoring commits.
...
--- Reverse-merging r75799 into '.':
U test/Analysis/PointerTracking
U include/llvm/Target/TargetMachineRegistry.h
U include/llvm/Target/TargetMachine.h
U include/llvm/Target/TargetRegistry.h
U include/llvm/Target/TargetSelect.h
U tools/lto/LTOCodeGenerator.cpp
U tools/lto/LTOModule.cpp
U tools/llc/llc.cpp
U lib/Target/PowerPC/PPCTargetMachine.h
U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U lib/Target/PowerPC/PPCTargetMachine.cpp
U lib/Target/PowerPC/PPC.h
U lib/Target/ARM/ARMTargetMachine.cpp
U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U lib/Target/ARM/ARMTargetMachine.h
U lib/Target/ARM/ARM.h
U lib/Target/XCore/XCoreTargetMachine.cpp
U lib/Target/XCore/XCoreTargetMachine.h
U lib/Target/PIC16/PIC16TargetMachine.cpp
U lib/Target/PIC16/PIC16TargetMachine.h
U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U lib/Target/Alpha/AlphaTargetMachine.cpp
U lib/Target/Alpha/AlphaTargetMachine.h
U lib/Target/X86/X86TargetMachine.h
U lib/Target/X86/X86.h
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
U lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
U lib/Target/X86/X86TargetMachine.cpp
U lib/Target/MSP430/MSP430TargetMachine.cpp
U lib/Target/MSP430/MSP430TargetMachine.h
U lib/Target/CppBackend/CPPTargetMachine.h
U lib/Target/CppBackend/CPPBackend.cpp
U lib/Target/CBackend/CTargetMachine.h
U lib/Target/CBackend/CBackend.cpp
U lib/Target/TargetMachine.cpp
U lib/Target/IA64/IA64TargetMachine.cpp
U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U lib/Target/IA64/IA64TargetMachine.h
U lib/Target/IA64/IA64.h
U lib/Target/MSIL/MSILWriter.cpp
U lib/Target/CellSPU/SPUTargetMachine.h
U lib/Target/CellSPU/SPU.h
U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U lib/Target/CellSPU/SPUTargetMachine.cpp
U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
U lib/Target/Mips/MipsTargetMachine.cpp
U lib/Target/Mips/MipsTargetMachine.h
U lib/Target/Mips/Mips.h
U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U lib/Target/Sparc/SparcTargetMachine.cpp
U lib/Target/Sparc/SparcTargetMachine.h
U lib/ExecutionEngine/JIT/TargetSelect.cpp
U lib/Support/TargetRegistry.cpp
llvm-svn: 75820
2009-07-15 20:24:03 +00:00
Dan Gohman
607818a2c1
Add a Force option to raw_fd_ostream to specify whether opening
...
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.
llvm-svn: 75801
2009-07-15 17:29:42 +00:00
Stuart Hastings
338191cd67
Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
...
Will revert 75770 in the llvm-gcc trunk.
llvm-svn: 75799
2009-07-15 17:27:11 +00:00
Dan Gohman
d8db376071
Use errs() instead of std::cerr.
...
llvm-svn: 75791
2009-07-15 16:35:29 +00:00
Kevin Enderby
09ea5709a2
Added llvm-mc support for parsing the .dump and .load directives.
...
llvm-svn: 75786
2009-07-15 15:30:11 +00:00
Daniel Dunbar
5eb9700578
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
a8d73996ce
Switch some obvious clients to using the new TargetRegistry.
...
llvm-svn: 75767
2009-07-15 10:05:03 +00:00
Daniel Dunbar
2179d73133
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
c35b5bac32
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
d1c4705577
control reaches end of non-void function.
...
llvm-svn: 75714
2009-07-14 23:55:32 +00:00
Kevin Enderby
d1ea5393c9
Added llvm-mc support for parsing the .include directive.
...
llvm-svn: 75711
2009-07-14 23:21:55 +00:00
Owen Anderson
b6b2530000
Move EVER MORE stuff over to LLVMContext.
...
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Kevin Enderby
cbe475dfe8
Added llvm-mc support for parsing the .lsym directive.
...
llvm-svn: 75685
2009-07-14 21:35:03 +00:00
David Greene
a31f96cf2b
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
1518de130e
Fix for bugpoint -remote-client
...
llvm-svn: 75665
2009-07-14 19:10:55 +00:00
Chris Lattner
8c9a96b966
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
4c21caa656
Added llvm-mc support for parsing the .desc directive.
...
llvm-svn: 75645
2009-07-14 18:17:10 +00:00
Daniel Dunbar
eb3e4271e8
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
277e11b116
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
0639a72834
rename getValueName -> getMangledName
...
llvm-svn: 75616
2009-07-14 06:19:07 +00:00
Kevin Enderby
56523ceba1
Added llvm-mc support for parsing the .abort directive.
...
llvm-svn: 75545
2009-07-13 23:15:14 +00:00
Dan Gohman
e2d31aa132
#include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
...
llvm-svn: 75542
2009-07-13 22:56:37 +00:00
Owen Anderson
b258410a1b
Fix the build.
...
llvm-svn: 75536
2009-07-13 22:40:32 +00:00
Owen Anderson
e4dcecd006
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
c9d93ef2c6
add llvm-mc support for parsing the .subsections_via_symbols directive.
...
llvm-svn: 75500
2009-07-13 21:03:15 +00:00
Sanjiv Gupta
63bdb56274
Added a fixme for platform specific GetDirSeparator().
...
llvm-svn: 75461
2009-07-13 10:58:55 +00:00
Sanjiv Gupta
ed5db9dd30
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
53a52215b5
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
65553d4505
Match declaration to definition.
...
llvm-svn: 75440
2009-07-12 23:50:34 +00:00
Chris Lattner
a797d376de
silence vc++ warning.
...
llvm-svn: 75394
2009-07-11 22:32:37 +00:00
Daniel Dunbar
9dc326fbaa
Fix unused function warning.
...
llvm-svn: 75386
2009-07-11 21:24:52 +00:00
Mikhail Glushenkov
bee767fa26
Update documentation.
...
llvm-svn: 75375
2009-07-11 19:27:40 +00:00
Sanjiv Gupta
594006524b
Erase the temp dir before starting.
...
llvm-svn: 75367
2009-07-11 17:35:46 +00:00
Chris Lattner
07cadaf113
add support for .zerofill, patch by Kevin Enderby!
...
llvm-svn: 75301
2009-07-10 22:20:30 +00:00
David Goodwin
73f4e3f442
Support remote execute for ARM.
...
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Jeffrey Yasskin
bf3d6ba557
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
62609a4131
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
1e5f00e7a7
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
7ab20c7cf9
Documentation update.
...
llvm-svn: 75166
2009-07-09 19:39:16 +00:00
Mikhail Glushenkov
163f93e434
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
353b8cc112
Adjust comment.
...
llvm-svn: 75164
2009-07-09 19:37:58 +00:00
Sanjiv Gupta
f3b8609c6f
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
28ad7547d2
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
c378299f79
Added few more options to individual tools.
...
llvm-svn: 75120
2009-07-09 08:20:25 +00:00
Sanjiv Gupta
772924295d
Return dir separator as per platform.
...
llvm-svn: 75119
2009-07-09 08:17:55 +00:00
Nick Lewycky
0661b93de9
Don't create undefined symbols for aliases.
...
llvm-svn: 75111
2009-07-09 06:03:04 +00:00
Owen Anderson
b17f32945f
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
5948fdf68b
Push LLVMContext through GlobalVariables and IRBuilder.
...
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Jeffrey Yasskin
90b081ac15
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
a1e11f530e
Implement parsing support for the .comm directive. Patch by
...
Kevin Enderby!
llvm-svn: 74944
2009-07-07 20:30:46 +00:00
Chris Lattner
f840ed7ed4
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
2512c2a1f6
Documentation update.
...
llvm-svn: 74913
2009-07-07 16:43:49 +00:00
Mikhail Glushenkov
244821fbe5
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
f4cc0cddbc
Documentation update.
...
llvm-svn: 74907
2009-07-07 16:09:29 +00:00
Bruno Cardoso Lopes
5661ea68e7
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
29d06ea46c
LLVMC doesn't need ENABLE_PIC to build now.
...
llvm-svn: 74783
2009-07-04 03:54:54 +00:00
Duncan Sands
31554aba47
Add newline at end of file.
...
llvm-svn: 74774
2009-07-03 15:38:01 +00:00
Torok Edwin
f011f28767
Fix typo: intepreter->interpreter.
...
llvm-svn: 74770
2009-07-03 12:11:32 +00:00
Chris Lattner
a76611a535
switch the .ll parser into SMDiagnostic.
...
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Chris Lattner
73f3611be9
implement error recovery in the llvm-mc parser. Feel the power!
...
llvm-svn: 74728
2009-07-02 21:53:43 +00:00
Sanjiv Gupta
6c41ac5b38
Prefix bin dir to executables.
...
llvm-svn: 74713
2009-07-02 17:51:09 +00:00
Sanjiv Gupta
2b65d1aac1
Fixed handling of -c option.wq
...
llvm-svn: 74711
2009-07-02 17:35:38 +00:00
Daniel Dunbar
0224b65f0a
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
9bff6531fd
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
36a2007059
llvm-mc/x86: Factor out ParseX86Register.
...
llvm-svn: 74684
2009-07-02 01:58:24 +00:00
Daniel Dunbar
142f104b29
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
0ff993839c
Maintain the old LTO API, by using the global context.
...
llvm-svn: 74678
2009-07-02 00:31:14 +00:00
Dan Gohman
43f33dd550
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
f4f2f14f57
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
2a15443aa8
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
1cf085d558
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Jeffrey Yasskin
1a93330ffa
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
6773d388aa
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
8ff5a6c262
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
b442e04259
llvm-mc: Add some more doxyments.
...
llvm-svn: 74607
2009-07-01 15:14:50 +00:00
Daniel Dunbar
9c4809a887
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
0d5fc9a5b0
Rename MCValue::isConstant to isAbsolute.
...
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
e4dfc89615
add some of the new tokens, others are still missing.
...
llvm-svn: 74595
2009-07-01 06:36:49 +00:00
Daniel Dunbar
fc35841077
llvm-mc: Emit parsed instructions to the MCStreamer.
...
llvm-svn: 74594
2009-07-01 06:35:48 +00:00
Daniel Dunbar
d0a08e0430
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
cfcdf5c1ac
llvm-mc: Accept relocatable expressions when parsing displacements and
...
immediates.
llvm-svn: 74568
2009-06-30 23:02:44 +00:00
Daniel Dunbar
8561b6aea0
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
3971273aa2
Suppress may-be-used-uninitialized warning.
...
llvm-svn: 74529
2009-06-30 16:02:47 +00:00
Douglas Gregor
16f652876f
Fix CMake build
...
llvm-svn: 74527
2009-06-30 14:37:26 +00:00
Daniel Dunbar
75630b355a
llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
...
llvm-svn: 74498
2009-06-30 02:10:03 +00:00
Daniel Dunbar
19f847fa68
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
bd4bf3d4f7
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Daniel Dunbar
c9dc78ae40
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
a5508c893a
llvm-mc: Parse symbol attribute directives.
...
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
8a4d713e48
Clang is now production quality (at least for C).
...
llvm-svn: 74484
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
3fcdada6b4
Add a way to access argv[0] in hooks.
...
llvm-svn: 74483
2009-06-30 00:16:00 +00:00
Daniel Dunbar
cc566a714b
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Daniel Dunbar
ae7ac01059
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
5992b4a211
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
6b22f9ca45
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Daniel Dunbar
231898baf5
Fix uninitialized variable warning.
...
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
fdbbc52cfd
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
84bfd7b184
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
7e8d6c7215
MC: Improve expression parsing and implement evaluation of absolute expressions.
...
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Evan Cheng
d6460965a5
Indentation.
...
llvm-svn: 74281
2009-06-26 06:57:16 +00:00
Daniel Dunbar
4a5a561a24
MC: Parse .org directives.
...
llvm-svn: 74218
2009-06-25 22:44:51 +00:00
Daniel Dunbar
2d2ee150eb
MC: Parse .set and assignments.
...
llvm-svn: 74208
2009-06-25 21:56:11 +00:00
Mikhail Glushenkov
d1d21a1ce9
Update documentation.
...
llvm-svn: 74191
2009-06-25 18:20:44 +00:00
Jeffrey Yasskin
0b08f3d7cc
Add a JITEventListener interface that gets called back when a new function is
...
emitted or the machine code for a function is freed. Chris mentioned that we
may also want a notification when a stub is emitted, but that'll be a future
change. I intend to use this to tell oprofile where functions are emitted and
what lines correspond to what addresses.
llvm-svn: 74157
2009-06-25 02:04:04 +00:00
Mikhail Glushenkov
73da626340
Remove duplication.
...
Factor out common preprocessor-related bits to Makefile.rules.
llvm-svn: 74153
2009-06-25 01:07:00 +00:00
Daniel Dunbar
a10e519e04
Basic .s parsing for .asci[iz], .fill, .space, {.byte, .short, ... }
...
- Includes some DG tests in test/MC/AsmParser, which are rather primitive since
we don't have a -verify mode yet.
llvm-svn: 74139
2009-06-24 23:30:00 +00:00
Owen Anderson
b70adf2b92
Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
...
Update other uses in the codebase for this change.
llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Chris Lattner
3912036c25
remove dead makefile flags.
...
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Chris Lattner
f7ebca4db6
implement a bunch of synonyms for section switching.
...
llvm-svn: 74062
2009-06-24 05:13:15 +00:00
Chris Lattner
bedf6c2995
add support for parsing and emitting .section directives. We can now parse
...
things like:
.section __TEXT,__cstring,cstring_literals
llvm-svn: 74058
2009-06-24 04:43:34 +00:00
Chris Lattner
3f5738d599
add trivial support for passing label definitions through the MCStreamer.
...
This is suboptimal in several aspects, see the commented out assertion.
I need to talk to Daniel about this.
llvm-svn: 74057
2009-06-24 04:31:49 +00:00
Chris Lattner
92ffdd15f8
create an MCStreamer and provide it to AsmParser.
...
llvm-svn: 74039
2009-06-24 00:52:40 +00:00
Chris Lattner
4c501fc196
make the lexer unique strings it lexes instead of passing them back as
...
std::strings.
llvm-svn: 74036
2009-06-24 00:33:19 +00:00
Daniel Dunbar
ca29e4d7f4
Start flushing out MCContext.
...
- Lives inside new library lib/MC (LLVMMC.a)
llvm-svn: 74013
2009-06-23 22:01:43 +00:00
Mikhail Glushenkov
8b4e03898c
Temporary copy-pasto to make examples compile.
...
llvm-svn: 74001
2009-06-23 20:47:24 +00:00
Mikhail Glushenkov
248c414024
Make llvmc work again.
...
Chris recently broke llvmc with his Makefile changes (r75379). That patch made
the global change .o -> .a, which caused built-in llvmc plugins to stop working
since plugin initialization in llvmc is based on static variables not referenced
from the main executable. This patch implements auto-generated forced references
to the plugin libraries.
llvm-svn: 74000
2009-06-23 20:46:48 +00:00
Chris Lattner
3417d71ff4
refactor a bunch of X86 specific stuff out to its own file.
...
llvm-svn: 73982
2009-06-23 18:41:30 +00:00
Douglas Gregor
e324ceeced
CMake: remove support for llvm-config-generated dependencies in the build
...
llvm-svn: 73979
2009-06-23 18:30:17 +00:00
Chris Lattner
f97d8bbe73
implement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s
...
llvm-svn: 73950
2009-06-23 05:57:07 +00:00
Chris Lattner
9ec76a0b79
get a definition of strull on windows, thanks to Howard Su.
...
llvm-svn: 73929
2009-06-23 00:24:36 +00:00
Bob Wilson
b8b636d145
Recognize and handle ARM v7 target triples for Darwin.
...
llvm-svn: 73889
2009-06-22 18:01:28 +00:00
Duncan Sands
376c6f16de
Include cstdio to get EOF, needed with gcc-4.4.
...
llvm-svn: 73879
2009-06-22 06:59:32 +00:00
Chris Lattner
1d1fe918de
process memory operands with a parenthesized expression for a displacement,
...
like "(4+5)(%eax)".
llvm-svn: 73878
2009-06-22 06:35:58 +00:00
Chris Lattner
7fdbce7a60
Implement full support for parsing primary expressions. We can now parse
...
all of health and voronoi (ignoring directives). We only get 409 lines into
176.gcc though because we don't have binary operators yet:
Parsing 176.gcc.llc.s:409: unexpected token in operand list
movsbl _arityvec+1(,%edi,8), %eax
^
llvm-svn: 73877
2009-06-22 06:32:03 +00:00
Chris Lattner
a7b51ed5e6
implement parser support for '*' operands, as in "call *%eax".
...
llvm-svn: 73876
2009-06-22 06:02:13 +00:00
Chris Lattner
78db36271c
implement memory operand parsing.
...
llvm-svn: 73875
2009-06-22 05:51:26 +00:00
Chris Lattner
e5074c46b2
start implementing some simple operand parsing.
...
llvm-svn: 73867
2009-06-22 01:29:09 +00:00
Chris Lattner
2adc9e739c
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
36e0212c16
set up the top-level parsing loop.
...
llvm-svn: 73860
2009-06-21 20:54:55 +00:00
Chris Lattner
b013345338
stub out parser for asm files. Change invariant on lexer to always
...
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode. Add new
-as-lex option to enable lexing mode (vs parsing mode).
llvm-svn: 73859
2009-06-21 20:16:42 +00:00
Chris Lattner
419a97491a
add string literals.
...
llvm-svn: 73858
2009-06-21 19:56:35 +00:00
Chris Lattner
99f0b60f45
hopefully fix the build on linux.
...
llvm-svn: 73857
2009-06-21 19:43:50 +00:00
Chris Lattner
d0765617d2
implement enough of a lexer to get through Olden/health/Output/health.llc.s
...
without errors.
llvm-svn: 73855
2009-06-21 19:21:25 +00:00
Chris Lattner
d485848229
oh yeah, cmake needs to be told explicitly about new files :)
...
llvm-svn: 73849
2009-06-21 07:19:34 +00:00
Chris Lattner
c8dfbcbb31
some baby steps.
...
llvm-svn: 73848
2009-06-21 07:19:10 +00:00
Chris Lattner
d70e15b46f
start wiring up support for asm parsing.
...
llvm-svn: 73846
2009-06-21 05:22:37 +00:00