oota-llvm.git
14 years agoRe-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
Reid Kleckner [Thu, 23 Jul 2009 18:34:13 +0000 (18:34 +0000)]
Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
an off-by-one error.

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

14 years agoFix up ARM constant island pass for Thumb2.
Evan Cheng [Thu, 23 Jul 2009 18:27:47 +0000 (18:27 +0000)]
Fix up ARM constant island pass for Thumb2.

Also fixed up code to fully use the SoImm field for ADR on ARM mode.

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

14 years agoSince we have moved unified assembly, switch to ADR instruction instead of a the...
Evan Cheng [Thu, 23 Jul 2009 18:26:03 +0000 (18:26 +0000)]
Since we have moved unified assembly, switch to ADR instruction instead of a the difficult-to-read .set + add syntax to materialize pc-relative address.

Turns out this also fixed a poor code selection on Thumb1. I have no idea why we were using a mov + add to do the same thing as ADR before.

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

14 years agoConvert StringMap to using StringRef for its APIs.
Daniel Dunbar [Thu, 23 Jul 2009 18:17:34 +0000 (18:17 +0000)]
Convert StringMap to using StringRef for its APIs.
 - Yay for '-'s and simplifications!

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

 - NIFC.

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

14 years agoFix frame index elimination to correctly handle thumb-2 addressing modes that don...
David Goodwin [Thu, 23 Jul 2009 17:06:46 +0000 (17:06 +0000)]
Fix frame index elimination to correctly handle thumb-2 addressing modes that don't allow negative offsets. During frame elimination convert *i12 opcode to a *i8 when necessary due to a negative offset.

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

14 years agoFileCheck'ize and expand LDA testcases.
Andreas Bolka [Thu, 23 Jul 2009 15:56:53 +0000 (15:56 +0000)]
FileCheck'ize and expand LDA testcases.

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

14 years agoemit simple node was using different labels for fields than the rest of the graph...
Andrew Lenharth [Thu, 23 Jul 2009 15:24:38 +0000 (15:24 +0000)]
emit simple node was using different labels for fields than the rest of the graph writter

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

14 years agoCache dependence computation using FoldingSet.
Andreas Bolka [Thu, 23 Jul 2009 14:32:46 +0000 (14:32 +0000)]
Cache dependence computation using FoldingSet.

This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.

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

14 years ago80 col violation.
Evan Cheng [Thu, 23 Jul 2009 07:58:08 +0000 (07:58 +0000)]
80 col violation.

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

14 years agoenhance DepthFirstIterator to support more robust operations in the face
Chris Lattner [Thu, 23 Jul 2009 06:30:28 +0000 (06:30 +0000)]
enhance DepthFirstIterator to support more robust operations in the face
of code mutating the graph while it is being traversed.  Patch by
Olaf Krzikalla!

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

14 years agotestcase for PR4590
Chris Lattner [Thu, 23 Jul 2009 06:07:59 +0000 (06:07 +0000)]
testcase for PR4590

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

14 years agorefactor a blob of code out to a new 'FoldOrOfFCmps' function and
Chris Lattner [Thu, 23 Jul 2009 05:46:22 +0000 (05:46 +0000)]
refactor a blob of code out to a new 'FoldOrOfFCmps' function and
simplify it.

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

14 years agoFor real this time: PHI Def & Kill tracking added to PHIElimination.
Lang Hames [Thu, 23 Jul 2009 05:44:24 +0000 (05:44 +0000)]
For real this time: PHI Def & Kill tracking added to PHIElimination.

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

14 years agomerge vector-casts-0.ll into vector-casts.ll
Chris Lattner [Thu, 23 Jul 2009 05:33:39 +0000 (05:33 +0000)]
merge vector-casts-0.ll into vector-casts.ll

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

14 years agoMake some existing optimizations that would only trigger on scalars
Chris Lattner [Thu, 23 Jul 2009 05:32:17 +0000 (05:32 +0000)]
Make some existing optimizations that would only trigger on scalars
also apply to vectors.  This allows us to compile this:

#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }

to:

_a:
cmpordps %xmm1, %xmm0
ret
_b:
cmpunordps %xmm1, %xmm0
ret

with clang instead of to a ton of horrible code.

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

14 years agoconvert a test to filecheck format. This fixes an endemic problem
Chris Lattner [Thu, 23 Jul 2009 05:27:48 +0000 (05:27 +0000)]
convert a test to filecheck format.  This fixes an endemic problem
with negative tests: this test wasn't checking what it thought it was
because it was grepping .bc, not .ll.

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

14 years agorename test
Chris Lattner [Thu, 23 Jul 2009 05:25:12 +0000 (05:25 +0000)]
rename test

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

14 years agorefactor a bunch of code out into a helper function,
Chris Lattner [Thu, 23 Jul 2009 05:14:02 +0000 (05:14 +0000)]
refactor a bunch of code out into a helper function,
no functionality change.

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

14 years agoremove a really old and dead header
Chris Lattner [Thu, 23 Jul 2009 04:59:02 +0000 (04:59 +0000)]
remove a really old and dead header

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

14 years agomerge one more sse41 test into sse41.ll
Chris Lattner [Thu, 23 Jul 2009 04:49:39 +0000 (04:49 +0000)]
merge one more sse41 test into sse41.ll

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

14 years agomerge another sse41 test into sse41.ll
Chris Lattner [Thu, 23 Jul 2009 04:43:48 +0000 (04:43 +0000)]
merge another sse41 test into sse41.ll

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

14 years agomerge sse41-pmovx.ll into sse41.ll
Chris Lattner [Thu, 23 Jul 2009 04:39:09 +0000 (04:39 +0000)]
merge  sse41-pmovx.ll into sse41.ll

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

14 years agoAdded PHI Def & Kill tracking to PHIElimination pass.
Lang Hames [Thu, 23 Jul 2009 04:34:03 +0000 (04:34 +0000)]
Added PHI Def & Kill tracking to PHIElimination pass.

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

14 years agochange a test to run in filecheck style. Rename it to be a general
Chris Lattner [Thu, 23 Jul 2009 04:33:02 +0000 (04:33 +0000)]
change a test to run in filecheck style.  Rename it to be a general
dumping ground of various SSE4.1 tests, since filecheck can reasonably
handle them all in one file.  Generalize it to check x86-64 stuff as
well since it has a different ABI (a convenient way to test both the
reg and mem forms of these instructions).

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

14 years agoSupport insertps via the intrinsic and add a couple of simple
Eric Christopher [Thu, 23 Jul 2009 02:22:41 +0000 (02:22 +0000)]
Support insertps via the intrinsic and add a couple of simple
testcases to make sure it's being generated.

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

14 years agoDo not call getMangledName on Intrinsics.
Sanjiv Gupta [Thu, 23 Jul 2009 02:11:04 +0000 (02:11 +0000)]
Do not call getMangledName on Intrinsics.

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

14 years agoMDString
Devang Patel [Thu, 23 Jul 2009 02:00:51 +0000 (02:00 +0000)]
MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.

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

14 years agoAdd test for pinsrd and pinsrb instructions.
Eric Christopher [Thu, 23 Jul 2009 01:58:04 +0000 (01:58 +0000)]
Add test for pinsrd and pinsrb instructions.

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

14 years agoMinor cosmetics: indentation, formatting, naming.
Andreas Bolka [Thu, 23 Jul 2009 01:57:06 +0000 (01:57 +0000)]
Minor cosmetics: indentation, formatting, naming.

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

14 years agoReverting r76825 and r76828, since they caused clang runtime errors and some build...
Reid Kleckner [Thu, 23 Jul 2009 01:40:54 +0000 (01:40 +0000)]
Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.

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

14 years agoadd header for 'memset'.
Zhongxing Xu [Thu, 23 Jul 2009 01:38:47 +0000 (01:38 +0000)]
add header for 'memset'.

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

14 years agoSilence "uninitialized use" warning.
Devang Patel [Thu, 23 Jul 2009 01:36:16 +0000 (01:36 +0000)]
Silence "uninitialized use" warning.

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

14 years agoHide constructors.
Devang Patel [Thu, 23 Jul 2009 01:19:53 +0000 (01:19 +0000)]
Hide constructors.

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

14 years agoDerive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK...
Devang Patel [Thu, 23 Jul 2009 01:07:34 +0000 (01:07 +0000)]
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.

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

14 years agoFix error message for correct opcode.
Eric Christopher [Thu, 23 Jul 2009 01:01:32 +0000 (01:01 +0000)]
Fix error message for correct opcode.

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

14 years agoMake the JIT code emitter properly retry and ask for more memory when it runs
Reid Kleckner [Thu, 23 Jul 2009 00:49:59 +0000 (00:49 +0000)]
Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

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

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

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

14 years agoParameterize the BumpPtrAllocator over a slab allocator. It defaults to using
Reid Kleckner [Thu, 23 Jul 2009 00:30:41 +0000 (00:30 +0000)]
Parameterize the BumpPtrAllocator over a slab allocator.  It defaults to using
malloc, so there should be no functional changes to other code.

These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.

I also added some tests which helped me pinpoint some bugs.

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

14 years agoRevert r75663 (and r76805), as it is causing regressions on powerpc.
Dan Gohman [Thu, 23 Jul 2009 00:09:46 +0000 (00:09 +0000)]
Revert r75663 (and r76805), as it is causing regressions on powerpc.

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

14 years agoremove SectionFlags::Small: it is only used on Xcore, and we'll find
Chris Lattner [Wed, 22 Jul 2009 23:27:22 +0000 (23:27 +0000)]
remove SectionFlags::Small: it is only used on Xcore, and we'll find
a better solution for it in the future.

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

14 years agox86 isel tweak: use lea (%reg,%reg) instead of lea (,%reg,2).
Dan Gohman [Wed, 22 Jul 2009 23:26:55 +0000 (23:26 +0000)]
x86 isel tweak: use lea (%reg,%reg) instead of lea (,%reg,2).

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

14 years agoAdd new keywords to the vim syntax highlighting.
Dan Gohman [Wed, 22 Jul 2009 22:45:50 +0000 (22:45 +0000)]
Add new keywords to the vim syntax highlighting.

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

14 years agoAdd new optimization keywords to the polygen grammar.
Dan Gohman [Wed, 22 Jul 2009 22:45:30 +0000 (22:45 +0000)]
Add new optimization keywords to the polygen grammar.

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

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