oota-llvm.git
14 years agoRename the new unsigned and signed keywords to nuw and nsw,
Dan Gohman [Wed, 22 Jul 2009 22:44:56 +0000 (22:44 +0000)]
Rename the new unsigned and signed keywords to nuw and nsw,
which stand for no-unsigned-wrap and no-signed-wrap.

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

14 years agoReorder if-else branches as suggested by Bill.
David Greene [Wed, 22 Jul 2009 22:32:19 +0000 (22:32 +0000)]
Reorder if-else branches as suggested by Bill.

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

14 years agoFix typo in addrmode definition.
David Goodwin [Wed, 22 Jul 2009 22:24:31 +0000 (22:24 +0000)]
Fix typo in addrmode definition.

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

14 years agoAdd -march=ppc32 lines so that this test doesn't ever default to ppc64.
Dan Gohman [Wed, 22 Jul 2009 22:08:31 +0000 (22:08 +0000)]
Add -march=ppc32 lines so that this test doesn't ever default to ppc64.

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

14 years agoUse getTargetConstant instead of getConstant since it's meant as an constant operand.
Evan Cheng [Wed, 22 Jul 2009 22:03:29 +0000 (22:03 +0000)]
Use getTargetConstant instead of getConstant since it's meant as an constant operand.

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

14 years agoMake the grep line in this test more specific, to avoid
Dan Gohman [Wed, 22 Jul 2009 22:02:42 +0000 (22:02 +0000)]
Make the grep line in this test more specific, to avoid
unintended matches.

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

14 years agoConstify the key in Mi2IndexMap.
David Greene [Wed, 22 Jul 2009 21:56:14 +0000 (21:56 +0000)]
Constify the key in Mi2IndexMap.

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

14 years agoIgnore undef uses.
Evan Cheng [Wed, 22 Jul 2009 21:51:42 +0000 (21:51 +0000)]
Ignore undef uses.

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

14 years agoSwitch some clients to Value::getName(), and other getName() user
Daniel Dunbar [Wed, 22 Jul 2009 21:33:09 +0000 (21:33 +0000)]
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

14 years agoFix indentation.
Devang Patel [Wed, 22 Jul 2009 21:10:50 +0000 (21:10 +0000)]
Fix indentation.

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

14 years agoSimplify some uses of Value::getName()
Daniel Dunbar [Wed, 22 Jul 2009 21:10:12 +0000 (21:10 +0000)]
Simplify some uses of Value::getName()

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

14 years agoDefine npos in a way that should make MSVC happier.
Daniel Dunbar [Wed, 22 Jul 2009 21:08:31 +0000 (21:08 +0000)]
Define npos in a way that should make MSVC happier.

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

14 years agoRemove unnecessary store to temporary std::string.
Daniel Dunbar [Wed, 22 Jul 2009 20:46:46 +0000 (20:46 +0000)]
Remove unnecessary store to temporary std::string.

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

14 years agoPut comment printing under asm-verbose.
David Greene [Wed, 22 Jul 2009 20:33:26 +0000 (20:33 +0000)]
Put comment printing under asm-verbose.

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

14 years agoFix indentation.
Daniel Dunbar [Wed, 22 Jul 2009 20:26:37 +0000 (20:26 +0000)]
Fix indentation.

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

14 years agoMake some changes suggested by Bill and Evan.
David Greene [Wed, 22 Jul 2009 20:08:25 +0000 (20:08 +0000)]
Make some changes suggested by Bill and Evan.

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

14 years agoFix thinko.
Devang Patel [Wed, 22 Jul 2009 18:56:16 +0000 (18:56 +0000)]
Fix thinko.

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

14 years agoAdded -b option to override the default bitcode output file name.
Sanjiv Gupta [Wed, 22 Jul 2009 18:41:45 +0000 (18:41 +0000)]
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

14 years agoUse isa<> instead of dyn_cast<>.
Devang Patel [Wed, 22 Jul 2009 18:35:25 +0000 (18:35 +0000)]
Use isa<> instead of dyn_cast<>.

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

14 years agoAdd replaceAllUsesWith() to FE replace debug info constructs while building complex...
Devang Patel [Wed, 22 Jul 2009 18:23:44 +0000 (18:23 +0000)]
Add replaceAllUsesWith() to FE replace debug info constructs while building complex types.

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

14 years agoDo not print "metadata" twice while printing MDString.
Devang Patel [Wed, 22 Jul 2009 18:10:23 +0000 (18:10 +0000)]
Do not print "metadata" twice while printing MDString.
This fixes unittest failure.

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

14 years agoRemove empty test.
Devang Patel [Wed, 22 Jul 2009 18:09:11 +0000 (18:09 +0000)]
Remove empty test.

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

14 years agoEliminate a redudant check Eli pointed out.
Evan Cheng [Wed, 22 Jul 2009 18:08:05 +0000 (18:08 +0000)]
Eliminate a redudant check Eli pointed out.

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

14 years agoFixed build warning. No functionality change.
Sanjiv Gupta [Wed, 22 Jul 2009 17:58:47 +0000 (17:58 +0000)]
Fixed build warning. No functionality change.

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

14 years agoIntroduce MetadataBase, a base class for MDString and MDNode.
Devang Patel [Wed, 22 Jul 2009 17:43:22 +0000 (17:43 +0000)]
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

14 years agoSupport writing a StringRef to a raw_ostream directly.
Daniel Dunbar [Wed, 22 Jul 2009 17:13:20 +0000 (17:13 +0000)]
Support writing a StringRef to a raw_ostream directly.

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

14 years agofix some wording problems Daniel pointed out, make a example actually real.
Chris Lattner [Wed, 22 Jul 2009 16:54:14 +0000 (16:54 +0000)]
fix some wording problems Daniel pointed out, make a example actually real.

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

14 years agodoxygenify
Chris Lattner [Wed, 22 Jul 2009 16:53:56 +0000 (16:53 +0000)]
doxygenify

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

14 years agofix typo noticed by Duncan
Chris Lattner [Wed, 22 Jul 2009 16:30:39 +0000 (16:30 +0000)]
fix typo noticed by Duncan

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

14 years agocast signed APInt constructor params to uint64_t to suppress signedness warning
Ryan Flynn [Wed, 22 Jul 2009 16:17:36 +0000 (16:17 +0000)]
cast signed APInt constructor params to uint64_t to suppress signedness warning

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

14 years agoAdd newline at end of file.
Duncan Sands [Wed, 22 Jul 2009 13:20:41 +0000 (13:20 +0000)]
Add newline at end of file.

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

14 years agoThread local globals don't require special handling by the linker and so can
Richard Osborne [Wed, 22 Jul 2009 11:01:00 +0000 (11:01 +0000)]
Thread local globals don't require special handling by the linker and so can
be placed in the standard data / bss sections.

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

14 years agoRemove a comment that was copy+pasted from the wrong place,
Torok Edwin [Wed, 22 Jul 2009 10:49:23 +0000 (10:49 +0000)]
Remove a comment that was copy+pasted from the wrong place,
there is no MachineFunction here.

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

14 years agoRevert commit 76707, it was breaking the llvm-gcc build
Duncan Sands [Wed, 22 Jul 2009 10:35:05 +0000 (10:35 +0000)]
Revert commit 76707, it was breaking the llvm-gcc build
on linux platforms.  The binutils assembler does not
recognize the "s" flag, see for example
http://sourceware.org/binutils/docs/as/Section.html

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

14 years agoDon't give a massive inlining cost bonus to available_externally
Eli Friedman [Wed, 22 Jul 2009 08:12:59 +0000 (08:12 +0000)]
Don't give a massive inlining cost bonus to available_externally
functions with a single use; eliminating the single use may eliminate
the function from the current module, but usually doesn't eliminate
it from the final program.

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

14 years agoDon't forget D16 - D31 are clobbered by calls and sjlj eh.
Evan Cheng [Wed, 22 Jul 2009 06:46:53 +0000 (06:46 +0000)]
Don't forget D16 - D31 are clobbered by calls and sjlj eh.

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

14 years agoAdd R12 to the list of registers clobbered by 16-bit Thumb calls as a pre-caution...
Evan Cheng [Wed, 22 Jul 2009 06:37:28 +0000 (06:37 +0000)]
Add R12 to the list of registers clobbered by 16-bit Thumb calls as a pre-caution. r12 could be live once we have mixed 32-bit and 16-bit instructions.

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

14 years agoFix a obvious copy-n-paste bug.
Evan Cheng [Wed, 22 Jul 2009 06:12:40 +0000 (06:12 +0000)]
Fix a obvious copy-n-paste bug.

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

14 years agoGet rid one of the getRegisterNumbering. Also add D16 - D31.
Evan Cheng [Wed, 22 Jul 2009 05:55:18 +0000 (05:55 +0000)]
Get rid one of the getRegisterNumbering. Also add D16 - D31.

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

14 years agoremove Bill from the author list: his contribution (describing llvm::Ostream
Chris Lattner [Wed, 22 Jul 2009 05:43:01 +0000 (05:43 +0000)]
remove Bill from the author list: his contribution (describing llvm::Ostream
and friends) has been removed awhile ago.

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

14 years agoadd some more topics to the coding standards doc:
Chris Lattner [Wed, 22 Jul 2009 05:40:54 +0000 (05:40 +0000)]
add some more topics to the coding standards doc:

* Use Early Exits and 'continue' to Simplify Code
* Turn Predicate Loops into Predicate Functions
* Spaces Before Parentheses
* Namespace Indentation
* Anonymous Namespaces

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

14 years agoAttempt to fix BuildBot breakage with MSVC.
Eli Friedman [Wed, 22 Jul 2009 05:06:41 +0000 (05:06 +0000)]
Attempt to fix BuildBot breakage with MSVC.

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

14 years agofix some formatting stuff, patch by Edward O'Callaghan!
Chris Lattner [Wed, 22 Jul 2009 04:21:40 +0000 (04:21 +0000)]
fix some formatting stuff, patch by Edward O'Callaghan!

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

14 years agoRemove intrinsic support for __builtin_ia32_vec_set_v16qi and
Eric Christopher [Wed, 22 Jul 2009 01:11:48 +0000 (01:11 +0000)]
Remove intrinsic support for __builtin_ia32_vec_set_v16qi and
__builtin_ia32_vec_set_v4si as these should be lowered in the
front-end to inserts.

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

14 years agoAdd support for MMX VSETCC.
Eli Friedman [Wed, 22 Jul 2009 01:06:52 +0000 (01:06 +0000)]
Add support for MMX VSETCC.

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

14 years agoAdded the unconditional JMP with an 8-bit relocation for the
Sean Callanan [Wed, 22 Jul 2009 01:05:20 +0000 (01:05 +0000)]
Added the unconditional JMP with an 8-bit relocation for the
assembler / disassembler.

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

14 years agoAdd an entry.
Evan Cheng [Wed, 22 Jul 2009 00:58:27 +0000 (00:58 +0000)]
Add an entry.

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

14 years agoinline the two MergeableConstSection implementations into their
Chris Lattner [Wed, 22 Jul 2009 00:47:11 +0000 (00:47 +0000)]
inline the two MergeableConstSection implementations into their
only caller.

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

14 years agoset the ELF "small" flag on objects that end up in .rodata.cst4 consistently,
Chris Lattner [Wed, 22 Jul 2009 00:41:56 +0000 (00:41 +0000)]
set the ELF "small" flag on objects that end up in .rodata.cst4 consistently,
updating a mips testcase to expect it.

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

14 years agodon't set the small flag yet.
Chris Lattner [Wed, 22 Jul 2009 00:30:39 +0000 (00:30 +0000)]
don't set the small flag yet.

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

14 years agoremove the SelectSectionForMachineConst hook, replacing it with
Chris Lattner [Wed, 22 Jul 2009 00:28:43 +0000 (00:28 +0000)]
remove the SelectSectionForMachineConst hook, replacing it with
a new getSectionForMergableConstant hook.  This removes one dependence
of TAI on Type, and provides the hook with enough info to make the
right decision based on whether the global has relocations etc.

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

14 years agoLet each target determines whether a machine instruction is dead. If true, that allow...
Evan Cheng [Wed, 22 Jul 2009 00:25:27 +0000 (00:25 +0000)]
Let each target determines whether a machine instruction is dead. If true, that allows late codeine passes to delete it.

This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround.

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

14 years agoGet rid of the Pass+Context magic.
Owen Anderson [Wed, 22 Jul 2009 00:24:57 +0000 (00:24 +0000)]
Get rid of the Pass+Context magic.

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

14 years agoreimplement Constant::ContainsRelocations as
Chris Lattner [Wed, 22 Jul 2009 00:05:44 +0000 (00:05 +0000)]
reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler
to use API.  It still should not be part of libvmcore, but
is better than it was.  Also teach it to be smart about
hidden visibility.

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

14 years agoMisc. doc fixes following suggestions from Eli.
Dan Gohman [Wed, 22 Jul 2009 00:04:19 +0000 (00:04 +0000)]
Misc. doc fixes following suggestions from Eli.

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

14 years agoFixing cp island pass. Step 1: Determine whether the constant pool offset can be
Evan Cheng [Tue, 21 Jul 2009 23:56:01 +0000 (23:56 +0000)]
Fixing cp island pass. Step 1: Determine whether the constant pool offset can be
negative on an individual bases rather than basing on whether it's in thumb
mode.

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

14 years agoFix comment.
Evan Cheng [Tue, 21 Jul 2009 23:54:22 +0000 (23:54 +0000)]
Fix comment.

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

14 years agosimplify code now that it is inlined.
Chris Lattner [Tue, 21 Jul 2009 23:49:55 +0000 (23:49 +0000)]
simplify code now that it is inlined.

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

14 years agoExposed PHIElimination pass within CodeGen.
Lang Hames [Tue, 21 Jul 2009 23:47:33 +0000 (23:47 +0000)]
Exposed PHIElimination pass within CodeGen.

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

14 years agoNow that RelocBehaviour() is never overloaded, it doesn't need to be
Chris Lattner [Tue, 21 Jul 2009 23:47:11 +0000 (23:47 +0000)]
Now that RelocBehaviour() is never overloaded, it doesn't need to be
virtual.  Just inline it into its two current call sites in preparation
for simplifying the code.

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

14 years agoAdd intrinsic for __builtin_ia32_vec_set_v4si which turns out to be
Eric Christopher [Tue, 21 Jul 2009 23:43:14 +0000 (23:43 +0000)]
Add intrinsic for __builtin_ia32_vec_set_v4si which turns out to be
pinsrd in sse4.1.

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

14 years agothis doesn't break any of the 4 ia64 tests.
Chris Lattner [Tue, 21 Jul 2009 23:42:24 +0000 (23:42 +0000)]
this doesn't break any of the 4 ia64 tests.

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

14 years agoalpha doesn't need to redefine this: it only supports PIC codegen anyway.
Chris Lattner [Tue, 21 Jul 2009 23:41:35 +0000 (23:41 +0000)]
alpha doesn't need to redefine this: it only supports PIC codegen anyway.

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

14 years agoAdd some support for iterative coalescers to calculate a joined live
David Greene [Tue, 21 Jul 2009 23:36:14 +0000 (23:36 +0000)]
Add some support for iterative coalescers to calculate a joined live
range's weight properly.  This is turned off right now in the sense that
you'll get an assert if you get into a situation that can only be caused
by an iterative coalescer.  All other code paths operate exactly as
before so there is no functional change with this patch.  The asserts
should be disabled if/when an iterative coalescer gets added to trunk.

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

14 years agono really, I can spell!
Chris Lattner [Tue, 21 Jul 2009 23:36:01 +0000 (23:36 +0000)]
no really, I can spell!

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

14 years agoadd an API so target-independent codegen can determine if a constant
Chris Lattner [Tue, 21 Jul 2009 23:34:23 +0000 (23:34 +0000)]
add an API so target-independent codegen can determine if a constant
pool entry will require relocations against it.  I implemented this
conservatively for ARM, someone who is knowledgable about it should
see if this can be improved.

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

14 years agoConvert instcombine from using using getAnalysis<TargetData> to
Dan Gohman [Tue, 21 Jul 2009 23:21:54 +0000 (23:21 +0000)]
Convert instcombine from using using getAnalysis<TargetData> to
getAnalysisIfAvailable<TargetData>.

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

14 years agoPermit the IntPtrTy argument to isEliminableCastPair to be null,
Dan Gohman [Tue, 21 Jul 2009 23:19:40 +0000 (23:19 +0000)]
Permit the IntPtrTy argument to isEliminableCastPair to be null,
to help support use when TargetData is not available.

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

14 years agofix typo
Chris Lattner [Tue, 21 Jul 2009 23:17:26 +0000 (23:17 +0000)]
fix typo

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

14 years agoChange ELFCodeEmitter logic to emit the constant pool and jump tables to
Bruno Cardoso Lopes [Tue, 21 Jul 2009 23:13:26 +0000 (23:13 +0000)]
Change ELFCodeEmitter logic to emit the constant pool and jump tables to
their appropriate sections before the code itself. They need to be emitted
before the function because on some targets (x86 but not x86_64) the later
may reference a JT or CP entry address

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

14 years agoReplace the original ad-hoc code for determining whether (v pred w) implies
Dan Gohman [Tue, 21 Jul 2009 23:03:19 +0000 (23:03 +0000)]
Replace the original ad-hoc code for determining whether (v pred w) implies
(x pred y) with more thorough code that does more complete canonicalization
before resorting to range checks. This helps it find more cases where
the canonicalized expressions match.

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

14 years agoRemove a big test case.
Evan Cheng [Tue, 21 Jul 2009 22:52:04 +0000 (22:52 +0000)]
Remove a big test case.

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

14 years agoVarious doc updates from Edward O'Callaghan!
Chris Lattner [Tue, 21 Jul 2009 22:47:03 +0000 (22:47 +0000)]
Various doc updates from Edward O'Callaghan!

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

14 years agoremove the last bits of SectionFlagsForGlobal. There is some flag here that
Chris Lattner [Tue, 21 Jul 2009 22:42:37 +0000 (22:42 +0000)]
remove the last bits of SectionFlagsForGlobal.  There is some flag here that
depends on XS1A, but I think the ReadOnlySection is already set up for this
and there is no testcase that this breaks.  If this is really needed, we can
add the appropriate parameterization to TargetAsmInfo in the future to support
this.

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

14 years agodon't mask out the small flag and then reapply it later.
Chris Lattner [Tue, 21 Jul 2009 22:39:28 +0000 (22:39 +0000)]
don't mask out the small flag and then reapply it later.

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

14 years agoif Xcore doesn't support TLS, it doesn't have to worry about thread local LLVM IR...
Chris Lattner [Tue, 21 Jul 2009 22:37:38 +0000 (22:37 +0000)]
if Xcore doesn't support TLS, it doesn't have to worry about thread local LLVM IR, it should be rejected by a front-end.

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

14 years agoremove the Xcore implementation of SelectSectionForGlobal. While you have
Chris Lattner [Tue, 21 Jul 2009 22:36:53 +0000 (22:36 +0000)]
remove the Xcore implementation of SelectSectionForGlobal.  While you have
to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal.

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

14 years agosimplify based on the fact that darwin always uses L/l.
Chris Lattner [Tue, 21 Jul 2009 22:32:55 +0000 (22:32 +0000)]
simplify based on the fact that darwin always uses L/l.

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

14 years agomake some stuff private.
Chris Lattner [Tue, 21 Jul 2009 22:30:39 +0000 (22:30 +0000)]
make some stuff private.

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

14 years agoimprove comments.
Chris Lattner [Tue, 21 Jul 2009 22:30:25 +0000 (22:30 +0000)]
improve comments.

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

14 years agoRemove the XCore custom implementation of MergeableConstSection, relying on
Chris Lattner [Tue, 21 Jul 2009 22:25:52 +0000 (22:25 +0000)]
Remove the XCore custom implementation of MergeableConstSection, relying on
the generic ELF version instead.  This will result in its mergable constant
sections getting named ".rodata.cst4" instead of ".cp.const4", but the
linker looks at the section flags, not the name of the section AFAICT.

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

14 years agoFix ocaml tests for 64-bit MacOS systems. LLVM is currently built
Bob Wilson [Tue, 21 Jul 2009 21:56:46 +0000 (21:56 +0000)]
Fix ocaml tests for 64-bit MacOS systems.  LLVM is currently built
as 32-bit code by default, and if gcc defaults to 64-bit code then ocamlc
requires a -cc "gcc -arch i386" option.  We were hardcoding -cc g++
and throwing away any other compiler options that were determined when
ocamlc was configured and built.

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

14 years agoReorder the "Metadata" entry to match the C bindings.
Bob Wilson [Tue, 21 Jul 2009 21:52:57 +0000 (21:52 +0000)]
Reorder the "Metadata" entry to match the C bindings.
This fixes a regression in the vmcore.ml dejagnu test.

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

14 years agoAdd missing include
Daniel Dunbar [Tue, 21 Jul 2009 21:33:58 +0000 (21:33 +0000)]
Add missing include

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

14 years agoinline a trivial method into its only call site and fix indentation of cases
Chris Lattner [Tue, 21 Jul 2009 21:29:08 +0000 (21:29 +0000)]
inline a trivial method into its only call site and fix indentation of cases

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

14 years agoRemove some overridden functions in XCoreTargetAsmInfo that are
Chris Lattner [Tue, 21 Jul 2009 21:26:32 +0000 (21:26 +0000)]
Remove some overridden functions in XCoreTargetAsmInfo that are
implemented exactly the same way as its ELFTargetAsmInfo subclass
has them.

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

14 years agorevert r76602, 76603, and r76615, pending design discussions.
Chris Lattner [Tue, 21 Jul 2009 21:12:58 +0000 (21:12 +0000)]
revert r76602, 76603, and r76615, pending design discussions.

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

14 years agominor cleanups.
Chris Lattner [Tue, 21 Jul 2009 21:09:35 +0000 (21:09 +0000)]
minor cleanups.

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

14 years agoPrivatize the ConstantArray table.
Owen Anderson [Tue, 21 Jul 2009 20:55:28 +0000 (20:55 +0000)]
Privatize the ConstantArray table.

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

14 years agoAdd a few fairly obvious API changes I noticed while porting some old code.
Torok Edwin [Tue, 21 Jul 2009 20:27:10 +0000 (20:27 +0000)]
Add a few fairly obvious API changes I noticed while porting some old code.

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

14 years agoMissed a piece of the commit to remove the shift flavor.
Eli Friedman [Tue, 21 Jul 2009 20:15:24 +0000 (20:15 +0000)]
Missed a piece of the commit to remove the shift flavor.

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

14 years agoPrivatize the first of the value maps.
Owen Anderson [Tue, 21 Jul 2009 20:13:12 +0000 (20:13 +0000)]
Privatize the first of the value maps.

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

14 years agoRemove shift amount flavor. It isn't actually complete enough to
Eli Friedman [Tue, 21 Jul 2009 20:12:16 +0000 (20:12 +0000)]
Remove shift amount flavor.  It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)

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

14 years agoRemove a couple of already-implemented notes.
Eli Friedman [Tue, 21 Jul 2009 20:05:43 +0000 (20:05 +0000)]
Remove a couple of already-implemented notes.

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

14 years ago80 col violation.
Evan Cheng [Tue, 21 Jul 2009 19:25:09 +0000 (19:25 +0000)]
80 col violation.

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

14 years agoPrefix IR dumps with LiveInterval indices when possible. This turns
David Greene [Tue, 21 Jul 2009 18:56:32 +0000 (18:56 +0000)]
Prefix IR dumps with LiveInterval indices when possible.  This turns
this:

%ESI<def> = MOV32rr %EDI<kill>
ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
%reg1027<def> = MOVZX64rr32 %ESI
%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
%RDI<def> = MOV64rr %RSP
%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
%RSP<def> = MOV64rr %RDI

into this:

4 %reg1024<def> = MOV32rr %EDI<kill>
12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20 %reg1025<def> = MOVZX64rr32 %reg1024
28 %reg1026<def> = MOV64rr %reg1025<kill>
36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44 %reg1027<def> = MOV64rr %reg1026<kill>
52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60 %reg1028<def> = MOV64rr %RSP
68 %reg1029<def> = MOV64rr %reg1028<kill>
76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84 %RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.

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

14 years agoAdd fake v7 itineraries for now.
Evan Cheng [Tue, 21 Jul 2009 18:54:14 +0000 (18:54 +0000)]
Add fake v7 itineraries for now.

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

14 years agomake AsmPrinter::doFinalization iterate over the global variables
Chris Lattner [Tue, 21 Jul 2009 18:38:57 +0000 (18:38 +0000)]
make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.

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

14 years agoAdd PrefixPrinter arguments to the dump routines for MachineFunction and
David Greene [Tue, 21 Jul 2009 18:27:05 +0000 (18:27 +0000)]
Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.

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

14 years agoAdd a small utility class to configure IR printers. This will allow
David Greene [Tue, 21 Jul 2009 18:21:46 +0000 (18:21 +0000)]
Add a small utility class to configure IR printers.  This will allow
printers to do neat and wonderful things when printing debug
information.  The ideas is to allow passes to configer printers to emit
pass-specific information when dumping IR.

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