Commit Graph

30327 Commits

Author SHA1 Message Date
Chris Lattner
fb3431aec5 reduce api exposure: clients shouldn't call SectionKindForGlobal directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:49:17 +00:00
Chris Lattner
083a1e0597 make Constant::getRelocationInfo return an enum, as suggested by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:27:21 +00:00
Chris Lattner
ad733cd851 remove more bits of small section support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:16:53 +00:00
Chris Lattner
d94061f123 remove more remnants of small section support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:14:35 +00:00
Chris Lattner
013e6b6309 Remove SectionKind::Small*. This was only used on mips, and is apparently
a sad mistake that is regretted. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76935 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:11:51 +00:00
Evan Cheng
865763bf80 Thumb2 should use the register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76930 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 01:05:51 +00:00
Dan Gohman
d1e5db6c7c Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 01:03:59 +00:00
Evan Cheng
b74bb1a7a4 FLDD, FLDS, FCPYD, FCPYS, FSTD, FSTS, VMOVD, VMOVQ maps to the same instructions on all sub-targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:53:56 +00:00
Owen Anderson
5bd68393ed Privatize the ConstantVector tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:36:24 +00:00
Eric Christopher
fbd6687cf1 Update insertps handling based on feedback. Move to a v4f32 style
to support vector arguments and scalar arguments correctly. Update
lowering and fix comment to refer to pinsr* instead of insertps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:33:09 +00:00
Dan Gohman
d2cb3d2c32 Remove the IA-64 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:30:09 +00:00
David Goodwin
5ff58b5c3a Correctly handle the Thumb-2 imm8 addrmode. Specialize frame index elimination more exactly for Thumb-2 to get better code gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:16:18 +00:00
Sean Callanan
74e5210809 Added a 2+-byte NOP instruction to the Intel tables,
for the assembler/disassembler to use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:39:34 +00:00
Owen Anderson
006c77df8c Privatize the ConstantStruct table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:25:33 +00:00
David Greene
ed0e2adc70 Write space padding as one string to speed up comment printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:21:10 +00:00
Evan Cheng
eee839dd3c Thumb2 does not allow the use of "pc" register as part of the load / store address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76909 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:09:51 +00:00
Reid Kleckner
10b4fc552f Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 21:46:56 +00:00
Chris Lattner
50340f666b "fix" PR4612, which is a crash on:
%0 = malloc [3758096384 x i32]

The "malloc" instruction doesn't support 64-bits correctly (see PR715),
and should be removed.  Victor is actively working on fixing this, in 
the meantime just don't crash.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76899 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 21:26:18 +00:00
Duncan Sands
daf2212e83 Revert r75581: it causes massive breakage in the Ada
testsuite, due to exception handling not working
correctly.  Maybe because the libgcc unwinder is
miscompiled - not sure, and I won't have time to
look into it before leaving on holiday.  Note that
miscompilations of libgcc are not picked up by the
nightly testers, because they dynamically link with
libgcc, so pick up the system version rather than
the version built as part of llvm-gcc.  This is a
nasty flaw in the nightly testers.  (On the other
hand the Ada testsuite links with the just built
libgcc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 19:00:02 +00:00
Daniel Dunbar
bc8d813f71 Switch ValueSymbolTable to StringRef based API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:52:12 +00:00
Daniel Dunbar
e6c42dd6d3 Add llvm::Value::getNameRef, for help in API migration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:50:53 +00:00
Reid Kleckner
8f51a62b41 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
2009-07-23 18:34:13 +00:00
Evan Cheng
d3d9d66dd2 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
2009-07-23 18:27:47 +00:00
Evan Cheng
81c102ba66 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
2009-07-23 18:26:03 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

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

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:17:34 +00:00
David Goodwin
b53cc014d0 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
2009-07-23 17:06:46 +00:00
Andreas Bolka
b4c28e97f4 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
2009-07-23 14:32:46 +00:00
Evan Cheng
697712c7d4 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 07:58:08 +00:00
Chris Lattner
5414cc5d6d 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
2009-07-23 05:46:22 +00:00
Lang Hames
20354634eb 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
2009-07-23 05:44:24 +00:00
Chris Lattner
f98d253bc5 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
2009-07-23 05:32:17 +00:00
Chris Lattner
42d1be0c63 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
2009-07-23 05:14:02 +00:00
Lang Hames
287b8b0301 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
2009-07-23 04:34:03 +00:00
Eric Christopher
1e5cdea9d7 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
2009-07-23 02:22:41 +00:00
Sanjiv Gupta
0f009d2ea5 Do not call getMangledName on Intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 02:11:04 +00:00
Devang Patel
2f9c3b002d 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
2009-07-23 02:00:51 +00:00
Andreas Bolka
3b59dd886a Minor cosmetics: indentation, formatting, naming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:57:06 +00:00
Reid Kleckner
4bf370698a Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:40:54 +00:00
Zhongxing Xu
54e650f2c7 add header for 'memset'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:38:47 +00:00
Devang Patel
db5e90078e Silence "uninitialized use" warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:36:16 +00:00
Devang Patel
104cf9e02b Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:07:34 +00:00
Eric Christopher
0aaf4e91c2 Fix error message for correct opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76829 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:01:32 +00:00
Reid Kleckner
81ce3ed08c Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 00:49:59 +00:00
Reid Kleckner
95eb3ad353 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
2009-07-23 00:30:41 +00:00
Chris Lattner
819c4f365f 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
2009-07-22 23:27:22 +00:00
Dan Gohman
41d0b9d952 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
2009-07-22 23:26:55 +00:00
Dan Gohman
08d012eba4 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
2009-07-22 22:44:56 +00:00
David Greene
92b78bbc7f 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
2009-07-22 22:32:19 +00:00
David Goodwin
e1e52edfff Fix typo in addrmode definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76806 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 22:24:31 +00:00
Evan Cheng
eadf04992a 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
2009-07-22 22:03:29 +00:00