oota-llvm.git
15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 years agoUpdate CMake file.
Ted Kremenek [Wed, 15 Jul 2009 05:39:55 +0000 (05:39 +0000)]
Update CMake file.

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

15 years agorename decorateName -> DecorateCygMingName, make it assert if not
Chris Lattner [Wed, 15 Jul 2009 04:55:56 +0000 (04:55 +0000)]
rename decorateName -> DecorateCygMingName, make it assert if not
cygming, make the two callers only call it if cygming.  Other minor
cleanups.

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

15 years agoeliminate the Mangler::PreserveAsmNames bit, the sole client of this
Chris Lattner [Wed, 15 Jul 2009 04:50:47 +0000 (04:50 +0000)]
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

15 years agoremove printSuffixedName.
Chris Lattner [Wed, 15 Jul 2009 04:42:49 +0000 (04:42 +0000)]
remove printSuffixedName.

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

15 years agoconvert arm/darwin stubs to use the mangler to synthesize all the names instead of
Chris Lattner [Wed, 15 Jul 2009 04:41:01 +0000 (04:41 +0000)]
convert arm/darwin stubs to use the mangler to synthesize all the names instead of
doing it with printSuffixedName.

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

15 years agoAdd new TargetRegistry.
Daniel Dunbar [Wed, 15 Jul 2009 04:24:58 +0000 (04:24 +0000)]
Add new TargetRegistry.

Targets implement a single global Target structure which will live in a new
<Target>/TargetInfo library; this will be present in any image which the target
is usable in.
 - Optional target specific classes can then be registered and attached to the
   Target description.

 - Registration for normal Targets will be done via the initialization functions
   instead of using static constructors.

 - This allows clients to use a single interface to obtain target data, without
   requiring the code generator be linked in. It also provides a natural
   extension point for adding new optional target data (assembler parser,
   disassembler, etc.).

 - This also provides a new entry point for obtaining a target for a particular
   triple (without a module).

 - Not yet used, however this should eventually replace the TargetMachineRegistry.

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

15 years agofix an arm codegen bug (the same as PR4482 on ppc) where available_externally
Chris Lattner [Wed, 15 Jul 2009 04:12:33 +0000 (04:12 +0000)]
fix an arm codegen bug (the same as PR4482 on ppc) where available_externally
symbols were not getting stubs.  While I'm at it, add a big testcase for
stub generation to make sure I don't break anything.

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

15 years agoconvert [Hidden]GVNonLazyPtrs to compute the global and stub names
Chris Lattner [Wed, 15 Jul 2009 03:12:43 +0000 (03:12 +0000)]
convert [Hidden]GVNonLazyPtrs to compute the global and stub names
with the mangler (like x86 and ppc), instead of going through
printSuffixedName.

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

15 years agouse makeNameProper to add the globalprefix instead of doing it manually.
Chris Lattner [Wed, 15 Jul 2009 03:01:23 +0000 (03:01 +0000)]
use makeNameProper to add the globalprefix instead of doing it manually.

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

15 years agoget the PPC stub temporary label from the mangler instead of
Chris Lattner [Wed, 15 Jul 2009 02:56:53 +0000 (02:56 +0000)]
get the PPC stub temporary label from the mangler instead of
using horrible string hacking.  This gives us a different label,
but it's just an assembler temporary, so the name doesn't matter.

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

15 years agoturn some if/then's into ?:
Chris Lattner [Wed, 15 Jul 2009 02:36:21 +0000 (02:36 +0000)]
turn some if/then's into ?:

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

15 years agoeliminate a bunch of printSuffixedName's by using info computed from
Chris Lattner [Wed, 15 Jul 2009 02:33:19 +0000 (02:33 +0000)]
eliminate a bunch of printSuffixedName's by using info computed from
Mangler in FnStubs.

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

15 years agoconvert FnStubs to using a more structured form, eliminating
Chris Lattner [Wed, 15 Jul 2009 02:28:57 +0000 (02:28 +0000)]
convert FnStubs to using a more structured form, eliminating
a couple instances of printSuffixedName (in favor of having
the mangler do stuff).

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

15 years agoactually $stub labels *are* private, I just missed that
Chris Lattner [Wed, 15 Jul 2009 01:53:36 +0000 (01:53 +0000)]
actually $stub labels *are* private, I just missed that
printSuffixedName automatically does this.

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

15 years agoconvert this to filecheck style and make it a test of darwin/PPC's
Chris Lattner [Wed, 15 Jul 2009 01:43:31 +0000 (01:43 +0000)]
convert this to filecheck style and make it a test of darwin/PPC's
extremely elaborate pic/nopic stubs.

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

15 years agosimplify this test to test the esentials.
Chris Lattner [Wed, 15 Jul 2009 01:32:33 +0000 (01:32 +0000)]
simplify this test to test the esentials.

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

15 years agotest commit; add self
Ryan Flynn [Wed, 15 Jul 2009 01:32:31 +0000 (01:32 +0000)]
test commit; add self

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

15 years agoFix indentation.
Dan Gohman [Wed, 15 Jul 2009 01:26:32 +0000 (01:26 +0000)]
Fix indentation.

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

15 years agoMake makeLoopInvariant report whether it made any changes or not,
Dan Gohman [Wed, 15 Jul 2009 01:25:43 +0000 (01:25 +0000)]
Make makeLoopInvariant report whether it made any changes or not,
and use this to simplify more code.

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

15 years ago$stub references should not be private ("L") labels.
Chris Lattner [Wed, 15 Jul 2009 01:23:13 +0000 (01:23 +0000)]
$stub references should not be private ("L") labels.

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

15 years agosimplify "EmitExternalGlobal": it is only used to output a
Chris Lattner [Wed, 15 Jul 2009 01:16:38 +0000 (01:16 +0000)]
simplify "EmitExternalGlobal": it is only used to output a
reference to the personality function for a module, and
those are all added to the GVStubs array by looping
over MMI->getPersonalities()

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

15 years agoConvert GVStubs and HiddenGVStubs to work more like the X86 backend, this
Chris Lattner [Wed, 15 Jul 2009 01:14:44 +0000 (01:14 +0000)]
Convert GVStubs and HiddenGVStubs to work more like the X86 backend, this
eliminates a bunch of uses of "printSuffixedName" and "getGlobalLinkName".

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

15 years agominor cleanups: only switch sections once before all function stubs, instead of
Chris Lattner [Wed, 15 Jul 2009 00:55:58 +0000 (00:55 +0000)]
minor cleanups: only switch sections once before all function stubs, instead of
before each one.

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

15 years agollvm-c/Core.h is no longer needed in lto.h, and it brings in
Dan Gohman [Wed, 15 Jul 2009 00:47:00 +0000 (00:47 +0000)]
llvm-c/Core.h is no longer needed in lto.h, and it brings in
several unwanted dependencies.

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

15 years agoFix a fixme, patch by Ryan Flynn!
Chris Lattner [Wed, 15 Jul 2009 00:36:04 +0000 (00:36 +0000)]
Fix a fixme, patch by Ryan Flynn!

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

15 years agocontrol reaches end of non-void function.
Evan Cheng [Tue, 14 Jul 2009 23:55:32 +0000 (23:55 +0000)]
control reaches end of non-void function.

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

15 years agoAdded llvm-mc support for parsing the .include directive.
Kevin Enderby [Tue, 14 Jul 2009 23:21:55 +0000 (23:21 +0000)]
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

15 years agominor syntax cleanup
Chris Lattner [Tue, 14 Jul 2009 23:14:10 +0000 (23:14 +0000)]
minor syntax cleanup

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

15 years agoMove EVER MORE stuff over to LLVMContext.
Owen Anderson [Tue, 14 Jul 2009 23:09:55 +0000 (23:09 +0000)]
Move EVER MORE stuff over to LLVMContext.

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

15 years agoFix path name.
Daniel Dunbar [Tue, 14 Jul 2009 22:58:03 +0000 (22:58 +0000)]
Fix path name.

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

15 years agoUse the right relocation type for X86::MOV64ri64i32
Bruno Cardoso Lopes [Tue, 14 Jul 2009 21:46:40 +0000 (21:46 +0000)]
Use the right relocation type for X86::MOV64ri64i32

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

15 years agoFix bad indentation and 80-col violation.
Bob Wilson [Tue, 14 Jul 2009 21:45:58 +0000 (21:45 +0000)]
Fix bad indentation and 80-col violation.

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

15 years agoAdded llvm-mc support for parsing the .lsym directive.
Kevin Enderby [Tue, 14 Jul 2009 21:35:03 +0000 (21:35 +0000)]
Added llvm-mc support for parsing the .lsym directive.

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

15 years agoCheck for PRE_INC and POST_INC.
David Goodwin [Tue, 14 Jul 2009 21:29:29 +0000 (21:29 +0000)]
Check for PRE_INC and POST_INC.

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

15 years agoFix the expansion of umax and smax in the case where one or more of
Dan Gohman [Tue, 14 Jul 2009 20:57:04 +0000 (20:57 +0000)]
Fix the expansion of umax and smax in the case where one or more of
the operands have pointer type, so that the resulting type matches
the original SCEV type, and so that unnecessary ptrtoints are
avoided in common cases.

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

15 years agofix a bug in my previous patch.
Chris Lattner [Tue, 14 Jul 2009 20:45:41 +0000 (20:45 +0000)]
fix a bug in my previous patch.

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

15 years agoUpdate CMake file.
Ted Kremenek [Tue, 14 Jul 2009 20:44:17 +0000 (20:44 +0000)]
Update CMake file.

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

15 years agoallow default construction of formatted_raw_ostream.
Chris Lattner [Tue, 14 Jul 2009 20:33:33 +0000 (20:33 +0000)]
allow default construction of formatted_raw_ostream.

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

15 years agofix David's merge conflict
Chris Lattner [Tue, 14 Jul 2009 20:25:40 +0000 (20:25 +0000)]
fix David's merge conflict

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

15 years agoreapply r75408, which eliminates MOV64r0 in favor of using
Chris Lattner [Tue, 14 Jul 2009 20:19:57 +0000 (20:19 +0000)]
reapply r75408, which eliminates MOV64r0 in favor of using
MOV32r0 + subregs to do the same thing.  This should work now
that PR4544 is fixed.  Thanks Evan!

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

15 years agoHave asm printers use formatted_raw_ostream directly to avoid a
David Greene [Tue, 14 Jul 2009 20:18:05 +0000 (20:18 +0000)]
Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.

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