Commit Graph

2648 Commits

Author SHA1 Message Date
Daniel Dunbar
f6ccee5a9d Switch to getNameStr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 08:24:36 +00:00
Reid Kleckner
10b4fc552f Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 21:46:56 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:17:34 +00:00
Reid Kleckner
4bf370698a Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:40:54 +00:00
Devang Patel
104cf9e02b Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:07:34 +00:00
Reid Kleckner
81ce3ed08c Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

Also, switch function stubs and global data over to using the BumpPtrAllocator.

This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs.  I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 00:49:59 +00:00
Daniel Dunbar
3d5126fbad Switch some clients to Value::getName(), and other getName() user
simplification.
 - NFC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 21:33:09 +00:00
Sanjiv Gupta
d7de7bc297 Added -b option to override the default bitcode output file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 18:41:45 +00:00
Devang Patel
e54abc90fe Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase. 
Introduce new bitcode block to hold metadata.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 17:43:22 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Evan Cheng
49419e28fe 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 19:25:09 +00:00
Daniel Dunbar
fbee579ed4 Simplify / normalize some uses of Value::getName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:54:24 +00:00
Kevin Enderby
5026ae4514 Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API.  Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:25:37 +00:00
Daniel Dunbar
dbd692a66e Add MCAsmLexer interface.
- This provides the AsmLexer interface to the target specific assembly parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:01:54 +00:00
Daniel Dunbar
a3af370dc1 Add MCAsmParser interface.
- This provides the AsmParser interface to the target specific assembly
   parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 18:55:04 +00:00
David Goodwin
91cf361516 For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:15:03 +00:00
Daniel Dunbar
1488670076 Add -std-{compile,link}-opts to bugpoint.
- Sheesh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 07:01:01 +00:00
Bill Wendling
3d10a5a757 Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 01:03:30 +00:00
Chris Lattner
e0d5c17921 fix test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:19:25 +00:00
Chris Lattner
4285d15703 DisambiguateGlobalSymbols should not mangle intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:19:04 +00:00
Viktor Kutuzov
fc2271f3f5 Require a remote command to exit with the exit status of the test program or with 255 if an error occurred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76323 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 18:39:24 +00:00
Daniel Dunbar
4dc31369eb Switch lli back to using allocate-gvs-with-code behavior.
- Otherwise we get two regressions in llvm-test for applications which run out
   of space.

 - Once the JIT memory manager is improved, this can be switched back.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 08:07:13 +00:00
Reid Kleckner
4b1511b027 Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:42:18 +00:00
Daniel Dunbar
867aadfedf llvm-mc: Default -triple to LLVM_HOSTTRIPLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76260 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:51:20 +00:00
Daniel Dunbar
b4b53e5c13 llvm-mc: Add -triple, and start fetching the target asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:38:58 +00:00
Daniel Dunbar
f8bd844fb3 Reenable asmparser dependency generation, now with improved Perl foo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:26:27 +00:00
Daniel Dunbar
e02fae8a79 Disable llvm-config magic for AsmParser, it is isn't right & is breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:22:20 +00:00
Daniel Dunbar
092a9dda2d Sketch support for target specific assembly parser.
- Not fully enabled yet, need a configure regeneration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:42:00 +00:00
Bob Wilson
d8aa9fc062 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:05:13 +00:00
Daniel Dunbar
adc82888b5 opt: Add -std-link-opts argument, matches llvm-ld's optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:09:39 +00:00
Kevin Enderby
f96db468fc Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic
EmitAssemblerFlag API which takes a value from the added AssemblerFlag
enumerated constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 17:56:39 +00:00
Kevin Enderby
358ab1dbb0 Clean up the definition of Str in AsmParser::ParseDirectiveDarwinDumpOrLoad
so it is defined with a lifetime that is as short as possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 17:17:46 +00:00
Dan Gohman
ac95cc79ac Convert more tools code from cerr and cout to errs() and outs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:30:09 +00:00
Chris Lattner
8e25e2d801 implement .include in the lexer/parser instead of passing it into the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 06:14:39 +00:00
Daniel Dunbar
ff9834ab9d Kill off last uses of TargetMachineRegistry class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:41:19 +00:00
Daniel Dunbar
1d92921691 Switch llc and createJIT to use simpler command line parsing for -march.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:23:53 +00:00
Daniel Dunbar
494d663175 Make sure targets are initialized before we do anything, even command line
processing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:04:54 +00:00
Dan Gohman
e017fd1b20 Fix this comment to mention outs() rather than cout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:33:14 +00:00
Owen Anderson
0d7c695c74 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:16:10 +00:00
Daniel Dunbar
51b198af83 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 20:24:03 +00:00
Dan Gohman
a1bdcedc38 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:29:42 +00:00
Stuart Hastings
2286f8dc4c Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:27:11 +00:00
Dan Gohman
65f57c233c Use errs() instead of std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 16:35:29 +00:00
Kevin Enderby
6e68cd96b2 Added llvm-mc support for parsing the .dump and .load directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 15:30:11 +00:00
Daniel Dunbar
54785e6df0 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...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 11:36:15 +00:00
Daniel Dunbar
dec9803b69 Switch some obvious clients to using the new TargetRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 10:05:03 +00:00
Daniel Dunbar
8cca8f98bb 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. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 07:43:34 +00:00
Chris Lattner
9d5511b7db eliminate the Mangler::PreserveAsmNames bit, the sole client of this
can do it perfectly well itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:50:47 +00:00
Evan Cheng
f975e011fb control reaches end of non-void function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:55:32 +00:00
Kevin Enderby
1f049b24c7 Added llvm-mc support for parsing the .include directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:21:55 +00:00