oota-llvm.git
14 years agoadd a knob to turn off PrettyStackTrace globally. Patch by Zoltan
Chris Lattner [Thu, 16 Jul 2009 06:17:45 +0000 (06:17 +0000)]
add a knob to turn off PrettyStackTrace globally.  Patch by Zoltan
Varga!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75897 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement .include in the lexer/parser instead of passing it into the streamer.
Chris Lattner [Thu, 16 Jul 2009 06:14:39 +0000 (06:14 +0000)]
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

14 years agofix some casts that I improperly refactored, patch by Artur Pietrek!
Chris Lattner [Thu, 16 Jul 2009 04:34:33 +0000 (04:34 +0000)]
fix some casts that I improperly refactored, patch by Artur Pietrek!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75894 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused header.
Daniel Dunbar [Thu, 16 Jul 2009 04:01:35 +0000 (04:01 +0000)]
Remove unused header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75893 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off last uses of TargetMachineRegistry class.
Daniel Dunbar [Thu, 16 Jul 2009 02:41:19 +0000 (02:41 +0000)]
Kill off last uses of TargetMachineRegistry class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75892 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix gcc 4.0 build failure, can't rely on access inside nested friended class.
Daniel Dunbar [Thu, 16 Jul 2009 02:38:28 +0000 (02:38 +0000)]
Fix gcc 4.0 build failure, can't rely on access inside nested friended class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75891 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch llc and createJIT to use simpler command line parsing for -march.
Daniel Dunbar [Thu, 16 Jul 2009 02:23:53 +0000 (02:23 +0000)]
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

14 years agoAdd registered target list to --version output.
Daniel Dunbar [Thu, 16 Jul 2009 02:06:09 +0000 (02:06 +0000)]
Add registered target list to --version output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75889 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake sure targets are initialized before we do anything, even command line
Daniel Dunbar [Thu, 16 Jul 2009 02:04:54 +0000 (02:04 +0000)]
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

14 years agoKill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
Daniel Dunbar [Thu, 16 Jul 2009 01:55:13 +0000 (01:55 +0000)]
Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
variables.
 - Module initialization functions supplanted the need for these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75886 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoformatted_raw_ostream both is-a raw_ostream and has-a raw_ostream. This
Dan Gohman [Thu, 16 Jul 2009 01:32:46 +0000 (01:32 +0000)]
formatted_raw_ostream both is-a raw_ostream and has-a raw_ostream. This
means that two separate raw_ostreams are doing buffering before data is
sent to the underlying stream. Besides the inefficiency of redundant
buffering, the second level of buffering doesn't recieve flush()
requests.

Fix this by having formatted_raw_ostream set the underlying raw_ostream
to be unbuffered. This eliminates inefficiency due to redundant buffering,
and it makes the flush() disconnect harmless.

This fixes PR4559.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75883 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix section switching to ensure that stubs are emitted to the right
Chris Lattner [Thu, 16 Jul 2009 01:23:26 +0000 (01:23 +0000)]
fix section switching to ensure that stubs are emitted to the right
section on ppc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75881 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd explicit comment that clients can call target initialization functions
Daniel Dunbar [Thu, 16 Jul 2009 01:13:00 +0000 (01:13 +0000)]
Add explicit comment that clients can call target initialization functions
multiple times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75880 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSkip special LLVM prefix '1' while emitting linknage name.
Devang Patel [Thu, 16 Jul 2009 01:01:22 +0000 (01:01 +0000)]
Skip special LLVM prefix '1' while emitting linknage name.
This prefix is used by LLVM to inform the asm printer to not emit usual global symbol prefix before the symbol name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75875 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegerate CMake library dependencies.
Daniel Dunbar [Thu, 16 Jul 2009 00:43:36 +0000 (00:43 +0000)]
Regerate CMake library dependencies.
 - Added a sed script to do this in the comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75872 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off cmake magic to force linking.
Daniel Dunbar [Thu, 16 Jul 2009 00:35:05 +0000 (00:35 +0000)]
Kill off cmake magic to force linking.
 - This isn't needed anymore, we require clients to call the appropriate
   initialization routines using TargetSelect.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75871 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate llvm{do,grep} to also search cmake / .cmake files
Daniel Dunbar [Thu, 16 Jul 2009 00:06:36 +0000 (00:06 +0000)]
Update llvm{do,grep} to also search cmake / .cmake files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75867 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNow that we have contexts on types, convert some more internals to use contexts.
Owen Anderson [Thu, 16 Jul 2009 00:03:07 +0000 (00:03 +0000)]
Now that we have contexts on types, convert some more internals to use contexts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75866 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWe don't need to use llvm_report_error, this interface can deal with errors
Daniel Dunbar [Wed, 15 Jul 2009 23:54:01 +0000 (23:54 +0000)]
We don't need to use llvm_report_error, this interface can deal with errors
(although we don't get a very good error message).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75864 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert yesterday's change by removing the LLVMContext parameter to AllocaInst and...
Owen Anderson [Wed, 15 Jul 2009 23:53:25 +0000 (23:53 +0000)]
Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75863 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd missing includes.
Daniel Dunbar [Wed, 15 Jul 2009 23:48:37 +0000 (23:48 +0000)]
Add missing includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75862 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVerify that there is no kill flag on tied operands on two-address instructions.
Jakob Stoklund Olesen [Wed, 15 Jul 2009 23:37:26 +0000 (23:37 +0000)]
Verify that there is no kill flag on tied operands on two-address instructions.
This extra check is not trigged when runnning "make check" on top-of-tree.

Change error message to better match llvm_unreachable() grammar.

Don't call llvm_unreachable() when writing error messages to a file, but keep going.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75860 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLift addAssemblyEmitter into LLVMTargetMachine.
Daniel Dunbar [Wed, 15 Jul 2009 23:34:19 +0000 (23:34 +0000)]
Lift addAssemblyEmitter into LLVMTargetMachine.
 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75859 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix this comment to mention outs() rather than cout.
Dan Gohman [Wed, 15 Jul 2009 23:33:14 +0000 (23:33 +0000)]
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

14 years agoChange raw_ostream so that it doesn't call llvm_report_error
Dan Gohman [Wed, 15 Jul 2009 23:25:33 +0000 (23:25 +0000)]
Change raw_ostream so that it doesn't call llvm_report_error
immediately on every output error. Instead, add a flag to
raw_ostream, and set the flag whenever an error is detected.

The flag can be queried and cleared from the public API. This
gives applications more flexibility to handling errors in
application-specific ways.

If the flag is not cleared when the raw_ostream is destructed,
llvm_report_error is called from the destructor. This ensures
that errors are not implicitly silenced, and provides
convenient default behavior for tools like llc and opt.
Clients wishing to avoid llvm_report_error calls from
raw_ostream should check for errors and clear the error flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75857 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegister AsmPrinter for XCore, MSP430, and PIC16 targets.
Daniel Dunbar [Wed, 15 Jul 2009 23:17:20 +0000 (23:17 +0000)]
Register AsmPrinter for XCore, MSP430, and PIC16 targets.
 - Switch to standard addAssemblyEmitter logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75854 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an LLVMContext to Type, hardwired to the global context until Type uniquing is...
Owen Anderson [Wed, 15 Jul 2009 22:50:23 +0000 (22:50 +0000)]
Add an LLVMContext to Type, hardwired to the global context until Type uniquing is moved on the contexts themselves.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75853 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch invars away from using isTrapping when it really shouldn't be
Eli Friedman [Wed, 15 Jul 2009 22:48:29 +0000 (22:48 +0000)]
Switch invars away from using isTrapping when it really shouldn't be
using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75852 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClean up some comments.
Bob Wilson [Wed, 15 Jul 2009 22:43:51 +0000 (22:43 +0000)]
Clean up some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75851 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.
Daniel Dunbar [Wed, 15 Jul 2009 22:33:19 +0000 (22:33 +0000)]
Lift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.
 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75848 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix bug in RegScavenger::scavengeRegister().
Jakob Stoklund Olesen [Wed, 15 Jul 2009 22:32:11 +0000 (22:32 +0000)]
Fix bug in RegScavenger::scavengeRegister().

Reserved registers are not candidates for scavenging, and they were removed
from the candidate list like this:

CreateRegClassMask(RC, Candidates);
Candidates ^= ReservedRegs;

However, when there are reserved registers outside RC, this causes invalid
bits to be set in Candidates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75847 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTo simplify the upcoming context-on-type change, switch all command line tools to...
Owen Anderson [Wed, 15 Jul 2009 22:16:10 +0000 (22:16 +0000)]
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

14 years agoDon't restrict the set of instructions where we try to constant-fold the
Eli Friedman [Wed, 15 Jul 2009 22:13:34 +0000 (22:13 +0000)]
Don't restrict the set of instructions where we try to constant-fold the
operands; it's possible to end up with a constant-foldable operand to
most instructions, even those which can't trap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75845 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove old style hacks to register AsmPrinter into TargetMachine.
Daniel Dunbar [Wed, 15 Jul 2009 22:01:32 +0000 (22:01 +0000)]
Remove old style hacks to register AsmPrinter into TargetMachine.
 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75843 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate the C bindings to keep the LLVMTypeKind up to date between the C/C++
Chris Lattner [Wed, 15 Jul 2009 22:00:31 +0000 (22:00 +0000)]
Update the C bindings to keep the LLVMTypeKind up to date between the C/C++
stuff.  Patch by Zoltan Varga!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75842 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove mismatched and unnecessary declaration.
Daniel Dunbar [Wed, 15 Jul 2009 21:52:40 +0000 (21:52 +0000)]
Remove mismatched and unnecessary declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75841 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove a few more convenience factory functions from Constant to LLVMContext.
Owen Anderson [Wed, 15 Jul 2009 21:51:10 +0000 (21:51 +0000)]
Move a few more convenience factory functions from Constant to LLVMContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75840 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove createAlphaLLRPPass out of addAssemblyEmitter to make Alpha
Chris Lattner [Wed, 15 Jul 2009 21:40:24 +0000 (21:40 +0000)]
move createAlphaLLRPPass out of addAssemblyEmitter to make Alpha
more like other targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75839 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoShortenDeadCopySrcLiveRange needs to be more conservative in multi-kill situations.
Evan Cheng [Wed, 15 Jul 2009 21:39:50 +0000 (21:39 +0000)]
ShortenDeadCopySrcLiveRange needs to be more conservative in multi-kill situations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75838 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd script 'UpdateCMakeLists.pl'. This script can be used (manually) to update
Ted Kremenek [Wed, 15 Jul 2009 21:10:57 +0000 (21:10 +0000)]
Add script 'UpdateCMakeLists.pl'. This script can be used (manually) to update
the list of files in the CMakeLists.txt files.

It works by scanning (starting from the working directory from which it is run)
all subdirectories containing CMakeLists.txt files. It then updates the list of
C and C++ files in the 'add_llvm_library' and 'add_clang_library' lists. Sources
file lists are emitted in lexical order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75833 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLexically order files in CMakeLists.txt files.
Ted Kremenek [Wed, 15 Jul 2009 21:08:16 +0000 (21:08 +0000)]
Lexically order files in CMakeLists.txt files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75831 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the ConstantStruct factory methods over to LLVMContext.
Owen Anderson [Wed, 15 Jul 2009 21:00:46 +0000 (21:00 +0000)]
Move the ConstantStruct factory methods over to LLVMContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75830 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused function.
Daniel Dunbar [Wed, 15 Jul 2009 20:59:20 +0000 (20:59 +0000)]
Remove unused function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75829 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse std::vector instead of std::list for both Section and Symbol lists because
Bruno Cardoso Lopes [Wed, 15 Jul 2009 20:49:10 +0000 (20:49 +0000)]
use std::vector instead of std::list for both Section and Symbol lists because
we care more about random access than insertion/deletion of elements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75828 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix test so it works on systems where wchar_t != int.
Dale Johannesen [Wed, 15 Jul 2009 20:40:53 +0000 (20:40 +0000)]
Fix test so it works on systems where wchar_t != int.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75827 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate CMakeLists for reapplication.
Daniel Dunbar [Wed, 15 Jul 2009 20:34:36 +0000 (20:34 +0000)]
Update CMakeLists for reapplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75825 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest for llvm-gcc patch 75822.
Dale Johannesen [Wed, 15 Jul 2009 20:27:44 +0000 (20:27 +0000)]
Test for llvm-gcc patch 75822.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75824 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReapply TargetRegistry refactoring commits.
Daniel Dunbar [Wed, 15 Jul 2009 20:24:03 +0000 (20:24 +0000)]
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

14 years agoAdd a note about the raw_fd_ostream API change.
Dan Gohman [Wed, 15 Jul 2009 19:59:19 +0000 (19:59 +0000)]
Add a note about the raw_fd_ostream API change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75818 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix cmake build, add TargetMachineRegistry.cpp that got restored in r75807
Xerxes Ranby [Wed, 15 Jul 2009 19:58:35 +0000 (19:58 +0000)]
Fix cmake build, add TargetMachineRegistry.cpp that got restored in r75807

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75817 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoApparently Darwin doesn't have /dev/full :-(.
Dan Gohman [Wed, 15 Jul 2009 18:41:11 +0000 (18:41 +0000)]
Apparently Darwin doesn't have /dev/full :-(.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75809 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRestore file lost during reversion.
Stuart Hastings [Wed, 15 Jul 2009 18:30:44 +0000 (18:30 +0000)]
Restore file lost during reversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75807 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGet rid of postInstructionAction and call EmitComments directly.
David Greene [Wed, 15 Jul 2009 18:24:03 +0000 (18:24 +0000)]
Get rid of postInstructionAction and call EmitComments directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75806 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 75798 to fix llvm build.
Rafael Espindola [Wed, 15 Jul 2009 17:40:42 +0000 (17:40 +0000)]
Revert 75798 to fix llvm build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75805 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a typo in a comment that Duncan noticed.
Dan Gohman [Wed, 15 Jul 2009 17:38:23 +0000 (17:38 +0000)]
Fix a typo in a comment that Duncan noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75804 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a thinko in a comment that Duncan spotted.
Dan Gohman [Wed, 15 Jul 2009 17:34:43 +0000 (17:34 +0000)]
Fix a thinko in a comment that Duncan spotted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75803 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a Force option to raw_fd_ostream to specify whether opening
Dan Gohman [Wed, 15 Jul 2009 17:29:42 +0000 (17:29 +0000)]
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

14 years agoRevert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken...
Stuart Hastings [Wed, 15 Jul 2009 17:27:11 +0000 (17:27 +0000)]
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

14 years agoThe static function TypeToFloatSemantics is now
Duncan Sands [Wed, 15 Jul 2009 17:19:24 +0000 (17:19 +0000)]
The static function TypeToFloatSemantics is now
unused - remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75798 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix pattern for LD16S_3r, add basic tests to check load / store instructions
Richard Osborne [Wed, 15 Jul 2009 17:06:59 +0000 (17:06 +0000)]
Fix pattern for LD16S_3r, add basic tests to check load / store instructions
are being properly selected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75797 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a raw_ostream version of CheckBitcodeOutputToConsole.
Dan Gohman [Wed, 15 Jul 2009 17:04:50 +0000 (17:04 +0000)]
Add a raw_ostream version of CheckBitcodeOutputToConsole.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75796 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a testcase for raw_ostream error checking.
Dan Gohman [Wed, 15 Jul 2009 16:47:02 +0000 (16:47 +0000)]
Add a testcase for raw_ostream error checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75795 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment noting that raw_os_ostream does not check for errors.
Dan Gohman [Wed, 15 Jul 2009 16:45:52 +0000 (16:45 +0000)]
Add a comment noting that raw_os_ostream does not check for errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75794 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheck for errors on close(2) too. And lseek(2).
Dan Gohman [Wed, 15 Jul 2009 16:43:01 +0000 (16:43 +0000)]
Check for errors on close(2) too. And lseek(2).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75793 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse 0664 instead of 0644 for the default open mode. This is
Dan Gohman [Wed, 15 Jul 2009 16:39:40 +0000 (16:39 +0000)]
Use 0664 instead of 0644 for the default open mode. This is
consistent with common std::ostream implmentations, and it gives
the user the option of using the umask group write bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75792 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse errs() instead of std::cerr.
Dan Gohman [Wed, 15 Jul 2009 16:35:29 +0000 (16:35 +0000)]
Use errs() instead of std::cerr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a raw_ostream operator<< to sys::Path.
Dan Gohman [Wed, 15 Jul 2009 16:33:33 +0000 (16:33 +0000)]
Add a raw_ostream operator<< to sys::Path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75790 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThumb-2 only support [base_reg + offset_reg] addressing, not [base_reg - offset_reg].
David Goodwin [Wed, 15 Jul 2009 15:50:19 +0000 (15:50 +0000)]
Thumb-2 only support [base_reg + offset_reg] addressing, not [base_reg - offset_reg].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75789 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix XCoreTargetLowering::isLegalAddressingMode to handle non simple VTs.
Richard Osborne [Wed, 15 Jul 2009 15:46:56 +0000 (15:46 +0000)]
Fix XCoreTargetLowering::isLegalAddressingMode to handle non simple VTs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75788 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove the xcore-file-directive option now that LLVM has proper support for
Richard Osborne [Wed, 15 Jul 2009 15:36:37 +0000 (15:36 +0000)]
Remove the xcore-file-directive option now that LLVM has proper support for
emitting file directives with one parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75787 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded llvm-mc support for parsing the .dump and .load directives.
Kevin Enderby [Wed, 15 Jul 2009 15:30:11 +0000 (15:30 +0000)]
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

14 years agoRemove the v3i32 and v3f32 value types: they are not
Duncan Sands [Wed, 15 Jul 2009 15:28:52 +0000 (15:28 +0000)]
Remove the v3i32 and v3f32 value types: they are not
native for any supported targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75785 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded myself to the blame list.
Xerxes Ranby [Wed, 15 Jul 2009 13:01:49 +0000 (13:01 +0000)]
Added myself to the blame list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75783 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReplace large swaths of copy-n-paste code with obvious helper function...
Daniel Dunbar [Wed, 15 Jul 2009 12:49:15 +0000 (12:49 +0000)]
Replace large swaths of copy-n-paste code with obvious helper function...
 - Which was already present in the module!

 - I skipped this xform for Alpha, since it runs an extra pass during assembly
   emission, but not when emitting assembly via the DumpAsm flag.

 - No functionality change.

--
ddunbar@giles:llvm$ svn diff | grep '^- ' | sort | uniq -c
  18 -      PM.add(AsmPrinterCtor(ferrs(), *this, true));
  18 -    assert(AsmPrinterCtor && "AsmPrinter was not linked in");
  18 -    if (AsmPrinterCtor)
  18 -  if (DumpAsm) {
  18 -  }
ddunbar@giles:llvm$ svn diff | grep '^+ ' | sort | uniq -c
  18 +    addAssemblyEmitter(PM, OptLevel, true, ferrs());
  18 +  if (DumpAsm)
--

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75782 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove StringConstantPrefix now that the only user
Duncan Sands [Wed, 15 Jul 2009 12:39:48 +0000 (12:39 +0000)]
Remove StringConstantPrefix now that the only user
(llvm-gcc) has gone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75781 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off old (TargetMachine level, not Target level) match quality functions.
Daniel Dunbar [Wed, 15 Jul 2009 12:26:05 +0000 (12:26 +0000)]
Kill off old (TargetMachine level, not Target level) match quality functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75780 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix cmake build lib/Target/TargetMachineRegistry.cpp removed.
Xerxes Ranby [Wed, 15 Jul 2009 12:19:36 +0000 (12:19 +0000)]
Fix cmake build lib/Target/TargetMachineRegistry.cpp removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75779 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProvide TargetMachine implementations with reference to Target they were created
Daniel Dunbar [Wed, 15 Jul 2009 12:11:05 +0000 (12:11 +0000)]
Provide TargetMachine implementations with reference to Target they were created
from.
 - This commit is almost entirely propogating the reference through the
   TargetMachine subclasses' constructor calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75778 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoString constants are now output with private linkage.
Duncan Sands [Wed, 15 Jul 2009 12:09:18 +0000 (12:09 +0000)]
String constants are now output with private linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75777 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTweak svn:ignore
Daniel Dunbar [Wed, 15 Jul 2009 11:49:25 +0000 (11:49 +0000)]
Tweak svn:ignore

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75775 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoKill off unused TargetMachineRegistry methods and ivars.
Daniel Dunbar [Wed, 15 Jul 2009 11:48:36 +0000 (11:48 +0000)]
Kill off unused TargetMachineRegistry methods and ivars.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75774 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMigrate llc and the JIT to using the TargetRegistry for lookups.
Daniel Dunbar [Wed, 15 Jul 2009 11:36:15 +0000 (11:36 +0000)]
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

14 years agoInclude the Target& in the TargetMachineRegisterEntry.
Daniel Dunbar [Wed, 15 Jul 2009 11:23:49 +0000 (11:23 +0000)]
Include the Target& in the TargetMachineRegisterEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75772 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow multiple registrations of the same target.
Daniel Dunbar [Wed, 15 Jul 2009 10:32:44 +0000 (10:32 +0000)]
Allow multiple registrations of the same target.
 - This doesn't necessarily seem like a good idea, but the JIT unittest
   currently relies on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75769 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitialize the target info via the InitializeNativeTarget() hook.
Daniel Dunbar [Wed, 15 Jul 2009 10:29:55 +0000 (10:29 +0000)]
Initialize the target info via the InitializeNativeTarget() hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75768 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch some obvious clients to using the new TargetRegistry.
Daniel Dunbar [Wed, 15 Jul 2009 10:05:03 +0000 (10:05 +0000)]
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

14 years agoReimplement TargetMachineRegistry in terms of TargetRegistry.
Daniel Dunbar [Wed, 15 Jul 2009 09:53:37 +0000 (09:53 +0000)]
Reimplement TargetMachineRegistry in terms of TargetRegistry.
 - This is a temporary hack to aid in incremental refactoring, for now we
   allocate a new TargetMachineRegistryEntry on every getClosest... call.

 - No intended functionality change, other than the leaked memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75766 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMark Target's creation routines as const.
Daniel Dunbar [Wed, 15 Jul 2009 09:38:10 +0000 (09:38 +0000)]
Mark Target's creation routines as const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75763 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegister Target's TargetMachine and AsmPrinter in the new registry.
Daniel Dunbar [Wed, 15 Jul 2009 09:22:31 +0000 (09:22 +0000)]
Register Target's TargetMachine and AsmPrinter in the new registry.
 - This abuses TargetMachineRegistry's constructor for now, this will get
   cleaned up in time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75762 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix thinko
Daniel Dunbar [Wed, 15 Jul 2009 08:56:49 +0000 (08:56 +0000)]
Fix thinko

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75760 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTweak svn:ignore
Daniel Dunbar [Wed, 15 Jul 2009 08:20:44 +0000 (08:20 +0000)]
Tweak svn:ignore

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75759 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDetect write failures on raw_fd_ostream.
Daniel Dunbar [Wed, 15 Jul 2009 08:11:46 +0000 (08:11 +0000)]
Detect write failures on raw_fd_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75758 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTweak CMake component lookup, I misunderstood what was happening here.though. :(
Daniel Dunbar [Wed, 15 Jul 2009 07:52:36 +0000 (07:52 +0000)]
Tweak CMake component lookup, I misunderstood what was happening here.though. :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75757 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInclude Target specific Info initialization routine when initializing all
Daniel Dunbar [Wed, 15 Jul 2009 07:48:39 +0000 (07:48 +0000)]
Include Target specific Info initialization routine when initializing all
targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75756 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach Makefiles & CMake to link in the <TARGET>Info library when linking the
Daniel Dunbar [Wed, 15 Jul 2009 07:43:34 +0000 (07:43 +0000)]
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

14 years agoFix stupid thinko
Daniel Dunbar [Wed, 15 Jul 2009 07:37:49 +0000 (07:37 +0000)]
Fix stupid thinko

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75754 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAddress some review comments on TargetRegistry.
Daniel Dunbar [Wed, 15 Jul 2009 07:09:29 +0000 (07:09 +0000)]
Address some review comments on TargetRegistry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75753 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd TargetInfo directories to CMake's list.
Daniel Dunbar [Wed, 15 Jul 2009 07:04:27 +0000 (07:04 +0000)]
Add TargetInfo directories to CMake's list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75752 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd TargetInfo libraries for all targets.
Daniel Dunbar [Wed, 15 Jul 2009 06:35:19 +0000 (06:35 +0000)]
Add TargetInfo libraries for all targets.
 - Intended to match current TargetMachine implementations.

 - No facilities for linking these in yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75751 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove load / store folding alignment require into the table(s).
Evan Cheng [Wed, 15 Jul 2009 06:10:07 +0000 (06:10 +0000)]
Move load / store folding alignment require into the table(s).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75749 91177308-0d34-0410-b5e6-96231b3b80d8