1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

21035 Commits

Author SHA1 Message Date
Bill Wendling
9f02f24469 Checking for "zero operands" during the "CanHoistInst()" method isn't necessary
because those with side effects will be caught by other checks in here.

Also, simplify the check for a BB in a sub loop.

llvm-svn: 44871
2007-12-11 18:45:11 +00:00
Nate Begeman
e9067c13ec Allow the JIT to encode MMX instructions
llvm-svn: 44869
2007-12-11 18:06:14 +00:00
Duncan Sands
9251a8a97f Fix compilation.
llvm-svn: 44864
2007-12-11 12:20:47 +00:00
Christopher Lamb
71a996a387 Regenerate.
llvm-svn: 44859
2007-12-11 09:02:08 +00:00
Christopher Lamb
7368604860 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Chris Lattner
a8b1b4b5d2 Teach VMCore to constant fold shufflevectors with constant operands.
This allows us to compile:

#include <emmintrin.h>
typedef __m128i VSInt16;
typedef short vSInt16 __attribute__ ((__vector_size__ (16)));
VSInt16 t3() {
  return (VSInt16)((vSInt16)_mm_set1_epi16(6518));
}

into:

_t3:
	movaps	LCPI1_0, %xmm0
	ret

instead of:
_t3:
	movl	$6518, %eax
	movd	%eax, %xmm0
	pextrw	$0, %xmm0, %eax
	xorps	%xmm0, %xmm0
	pinsrw	$0, %eax, %xmm0
	punpcklwd	%xmm0, %xmm0
	pshufd	$0, %xmm0, %xmm0
	ret

llvm-svn: 44856
2007-12-11 07:49:37 +00:00
Chris Lattner
568d56425b Implement constant folding if vector<->vector bitcasts where the number
of source/dest elements changes.  This implements
test/Transforms/InstCombine/bitcast-vector-fold.ll

llvm-svn: 44855
2007-12-11 07:29:44 +00:00
Reid Spencer
3a83a29e21 Don't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the
Support libraries separately into their own module.

llvm-svn: 44852
2007-12-11 06:53:58 +00:00
Chris Lattner
b265924121 significantly simplify some code, no functionality change.
llvm-svn: 44850
2007-12-11 06:07:39 +00:00
Chris Lattner
3822e8ee5a refactor some code, no functionality change.
llvm-svn: 44849
2007-12-11 05:55:02 +00:00
Evan Cheng
45c08c8337 Switch over to MachineLoopInfo.
llvm-svn: 44838
2007-12-11 02:09:15 +00:00
Evan Cheng
b5ceb5ae06 Pretty print shuffle mask operand.
llvm-svn: 44837
2007-12-11 02:08:35 +00:00
Evan Cheng
f6c2838f36 - Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much as
possible before resorting to pextrw and pinsrw.
- Better codegen for v4i32 shuffles masquerading as v8i16 or v16i8 shuffles.
- Improves (i16 extract_vector_element 0) codegen by recognizing
  (i32 extract_vector_element 0) does not require a pextrw.

llvm-svn: 44836
2007-12-11 01:46:18 +00:00
Nate Begeman
8b194d1718 x86 doesn't actually want to custom lower v3i32
llvm-svn: 44835
2007-12-11 01:41:33 +00:00
Gordon Henriksen
c6f9e0beef CollectorMetadata and Collector are rejiggered to get along with
per-function collector model. Collector is now the factory for
CollectorMetadata, so the latter may be subclassed.

llvm-svn: 44827
2007-12-11 00:30:17 +00:00
Chris Lattner
f7c53191c0 Move TargetData::hostIsLittleEndian out of line, which means we
don't have to #include config.h in it.  #including config.h breaks
other projects that have their own autoconf stuff and try to #include
the llvm headers.  One obscure example is llvm-gcc.

llvm-svn: 44825
2007-12-11 00:28:59 +00:00
Gordon Henriksen
aff6e2bba2 Adding Ocaml bindings for the bitreader as requested by Sarah
Thompson. Usage should be something like this:

open Llvm
open Llvm_bitreader

match read_bitcode_file fn with
  | Bitreader_failure msg ->
      prerr_endline msg
  | Bitreader_success m -> 
      ...;
      dispose_module m

Compile with: ocamlc llvm.cma llvm_bitreader.cma
              ocamlopt llvm.cmxa llvm_bitreader.cmxa

llvm-svn: 44824
2007-12-11 00:20:48 +00:00
Anton Korobeynikov
005fe34c3b Hey, English is not my native language :)
llvm-svn: 44820
2007-12-10 23:10:20 +00:00
Anton Korobeynikov
b003fb0ed7 Clarify the need of CFI() stuff
llvm-svn: 44819
2007-12-10 23:08:35 +00:00
Anton Korobeynikov
fd74645812 Provide convenient way to disable CFI stuff for old/broken assemblers.
Use it for Darwin.

llvm-svn: 44818
2007-12-10 23:04:38 +00:00
Chris Lattner
5ca42cd342 Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Chris Lattner
b511799808 Disable cfi directives for now, darwin does't support them.
These should probably be something like:

  CFI(".cfi_def_cfa_offset 16\n")

where CFI is defined to a noop on darwin and other platforms
that don't support those directives.

llvm-svn: 44803
2007-12-10 19:10:18 +00:00
Duncan Sands
b7ac459292 Make PruneEH update the nounwind/noreturn attributes
on functions as it calculates them.

llvm-svn: 44802
2007-12-10 19:09:40 +00:00
Duncan Sands
1279851352 Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...

llvm-svn: 44796
2007-12-10 17:43:13 +00:00
Anton Korobeynikov
cd497afc30 And finally annotate X86-64 version of callback.
All bad stuff from SSE version is implicitely inherited :)

llvm-svn: 44794
2007-12-10 15:27:07 +00:00
Anton Korobeynikov
49e2962ad3 Provide annotation for SSE version of callback. It's even more
broken, because doesn't mark xmm regs properly

llvm-svn: 44793
2007-12-10 15:13:55 +00:00
Anton Korobeynikov
0e4780cfe2 Annotate JIT callback function with call frame infromation.
This will allow us (theoretically) to unwind through JITer.
The code wasn't verified, so I'm pretty sure offsets are wrong :)

llvm-svn: 44792
2007-12-10 14:54:42 +00:00
Duncan Sands
948343f861 It looks like this has been broken for some time -
get it to compile.

llvm-svn: 44791
2007-12-10 14:43:10 +00:00
Owen Anderson
4bd6d18e18 A little more progress on StrongPHIElimination, now that I have a better sense of
how the CodeGen machinery works.

llvm-svn: 44786
2007-12-10 08:07:09 +00:00
Christopher Lamb
5c577eb543 Improve branch folding by recgonizing that explict successor relationships impact the value of fall-through choices.
llvm-svn: 44785
2007-12-10 07:24:06 +00:00
Gordon Henriksen
aadbdd1a62 Delete the CollectorNamePool if it should become empty.
llvm-svn: 44775
2007-12-10 03:35:18 +00:00
Gordon Henriksen
5d201e0bcc Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Gordon Henriksen
8430f1ff9a Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day

llvm-svn: 44760
2007-12-10 02:14:30 +00:00
Chris Lattner
11bc69b3c8 fix some warnings.
llvm-svn: 44756
2007-12-10 01:51:22 +00:00
Chris Lattner
3d939a50a5 Fix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-InlineAsm.ll
llvm-svn: 44755
2007-12-10 01:48:29 +00:00
Gordon Henriksen
a18a78e6e5 Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
llvm-svn: 44747
2007-12-09 22:46:10 +00:00
Chris Lattner
ac2bfb78d9 Duncan points out that the subtraction is unneeded since hte code
knows the vector is not pow2

llvm-svn: 44740
2007-12-09 17:56:34 +00:00
Chris Lattner
95f9743c43 Fix PR1782, patch by Wojtek Matyjewicz!
llvm-svn: 44733
2007-12-09 07:35:13 +00:00
Chris Lattner
84241dd771 Add support for splitting the operand of a return instruction.
llvm-svn: 44728
2007-12-09 00:06:19 +00:00
Bill Wendling
8d8d9a2f5e Reverting 44702. It wasn't correct to rename them.
llvm-svn: 44727
2007-12-08 23:58:46 +00:00
Chris Lattner
164d423f91 add many new cases to SplitResult. SplitResult now handles all the cases that LegalizeDAG does.
llvm-svn: 44726
2007-12-08 23:58:27 +00:00
Chris Lattner
6db5e91e16 Implement splitting support for store, allowing us to compile:
%f8 = type <8 x float>

define void @test_f8(%f8* %P, %f8* %Q, %f8* %S) {
	%p = load %f8* %P		; <%f8> [#uses=1]
	%q = load %f8* %Q		; <%f8> [#uses=1]
	%R = add %f8 %p, %q		; <%f8> [#uses=1]
	store %f8 %R, %f8* %S
	ret void
}

into:

_test_f8:
	movaps	16(%rdi), %xmm0
	addps	16(%rsi), %xmm0
	movaps	(%rdi), %xmm1
	addps	(%rsi), %xmm1
	movaps	%xmm0, 16(%rdx)
	movaps	%xmm1, (%rdx)
	ret

llvm-svn: 44725
2007-12-08 23:24:26 +00:00
Chris Lattner
b073361c3e implement vector splitting of load, undef, and binops.
llvm-svn: 44724
2007-12-08 23:08:49 +00:00
Chris Lattner
8942654140 implement some methods.
llvm-svn: 44723
2007-12-08 22:40:18 +00:00
Chris Lattner
cd7fc69c7c add scaffolding for splitting of vectors.
llvm-svn: 44722
2007-12-08 22:37:41 +00:00
Chris Lattner
92a284d220 Remove dead file and directory.
llvm-svn: 44720
2007-12-08 22:17:33 +00:00
Chris Lattner
558d101dbd reorganize header to separate into functional blocks.
llvm-svn: 44719
2007-12-08 21:59:32 +00:00
Chris Lattner
5e6bf4bc6f split scalarization out to its own file.
llvm-svn: 44718
2007-12-08 20:30:28 +00:00
Chris Lattner
b5925fda97 Split expansion out into its own file.
llvm-svn: 44717
2007-12-08 20:27:32 +00:00
Chris Lattner
633c76f607 Split promotion support out to its own file.
llvm-svn: 44716
2007-12-08 20:24:38 +00:00
Chris Lattner
39571d55bc Rename LegalizeDAGTypes.cpp -> LegalizeTypes.cpp
llvm-svn: 44715
2007-12-08 20:17:13 +00:00
Chris Lattner
424de81c2e Split the class definition of DAGTypeLegalizer out into a header.
Leave it visibility hidden, but not in an anon namespace.

llvm-svn: 44714
2007-12-08 20:16:06 +00:00
Chris Lattner
df7a006f45 add #include
llvm-svn: 44710
2007-12-08 19:03:30 +00:00
Chris Lattner
1fe38f35c1 proper #include order.
llvm-svn: 44707
2007-12-08 19:00:03 +00:00
Gordon Henriksen
e187dc4bfa Adding a StringPool data structure, which GC will use.
llvm-svn: 44705
2007-12-08 17:07:47 +00:00
Chris Lattner
12fca81026 aesthetic changes, no functionality change. Evan, it's not clear
what 'Available' is, please add a comment near it and rename it
if appropriate.

llvm-svn: 44703
2007-12-08 07:22:58 +00:00
Bill Wendling
d10837def7 Renaming:
isTriviallyReMaterializable -> hasNoSideEffects
  isReallyTriviallyReMaterializable -> isTriviallyReMaterializable

llvm-svn: 44702
2007-12-08 07:17:56 +00:00
Chris Lattner
e93a775a4d Fix a significant code quality regression I introduced on PPC64 quite
a while ago.  We now produce:

_foo:
	mflr r0
	std r0, 16(r1)
	ld r2, 16(r1)
	std r2, 0(r3)
	ld r0, 16(r1)
	mtlr r0
	blr 

instead of:

_foo:
	mflr r0
	std r0, 16(r1)
	lis r0, 0
	ori r0, r0, 16
	ldx r2, r1, r0
	std r2, 0(r3)
	ld r0, 16(r1)
	mtlr r0
	blr 

for:

void foo(void **X) {
  *X = __builtin_return_address(0);
}

on ppc64.

llvm-svn: 44701
2007-12-08 07:04:58 +00:00
Chris Lattner
e16166b78d implement __builtin_return_addr(0) on ppc.
llvm-svn: 44700
2007-12-08 06:59:59 +00:00
Chris Lattner
1024cda0bd refactor some code to avoid overloading the name 'usesLR' in
different places to mean different things.  Document what the
one in PPCFunctionInfo means and when it is valid.

llvm-svn: 44699
2007-12-08 06:39:11 +00:00
Bill Wendling
3c6bac9686 Incorporated comments from Evan and Chris:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056043.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056048.html

llvm-svn: 44696
2007-12-08 01:47:01 +00:00
Owen Anderson
e3de18ac1d Fix several cache coherence bugs in MemDep/GVN that were found. Also add some (disabled) debugging code
to make such problems easier to diagnose in the future, written by Duncan Sands.

llvm-svn: 44695
2007-12-08 01:37:09 +00:00
Evan Cheng
fdd03d0589 Doh
llvm-svn: 44694
2007-12-08 01:01:07 +00:00
Evan Cheng
28c2b7e647 Fix a compilation warning.
llvm-svn: 44692
2007-12-08 01:00:31 +00:00
Evan Cheng
6bfc0cadf3 Fix a compilation warning.
llvm-svn: 44691
2007-12-08 01:00:21 +00:00
Bill Wendling
c08dedb060 Initial commit of the machine code LICM pass. It successfully hoists this:
_foo:
        li r2, 0
LBB1_1: ; bb
        li r5, 0
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr 

to:

_foo:
        li r2, 0
        li r5, 0
LBB1_1: ; bb
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr

ZOMG!! :-)

Moar to come...

llvm-svn: 44687
2007-12-07 21:42:31 +00:00
Evan Cheng
c4db072c74 Add comment.
llvm-svn: 44686
2007-12-07 21:30:01 +00:00
Evan Cheng
34c7b35135 Much improved v8i16 shuffles. (Step 1).
llvm-svn: 44676
2007-12-07 08:07:39 +00:00
Evan Cheng
d9a07b1c9d Add an option to control this heuristic tweak so I can test it.
llvm-svn: 44671
2007-12-07 00:28:32 +00:00
Evan Cheng
4dc538449d Remove a bogus optimization. It's not possible to do a move to low element to a <8 x i16> or <16 x i8> vector.
llvm-svn: 44669
2007-12-06 22:14:22 +00:00
Dale Johannesen
80dd0c5141 Redo previous patch so optimization only done for i1.
Simpler and safer.

llvm-svn: 44663
2007-12-06 17:53:31 +00:00
Evan Cheng
d53f72dfb1 Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
llvm-svn: 44660
2007-12-06 08:54:31 +00:00
Chris Lattner
64a1a9f502 third time around: instead of disabling this completely,
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)

llvm-svn: 44658
2007-12-06 07:47:55 +00:00
Chris Lattner
bb5fb18af8 Actually, disable this code for now. More analysis and improvements to
the X86 backend are needed before this should be enabled by default.

llvm-svn: 44657
2007-12-06 07:44:31 +00:00
Chris Lattner
c467b49c96 implement a readme entry, compiling the code into:
_foo:
	movl	$12, %eax
	andl	4(%esp), %eax
	movl	_array(%eax), %eax
	ret

instead of:

_foo:
	movl	4(%esp), %eax
	shrl	$2, %eax
	andl	$3, %eax
	movl	_array(,%eax,4), %eax
	ret

As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:

-       movl    8(%eax), %eax
-       shll    $2, %eax
-       andl    $1020, %eax
-       movl    (%esi,%eax), %eax
+       movzbl  8(%eax), %eax
+       movl    (%esi,%eax,4), %eax


-       shll    $2, %edx
-       andl    $1020, %edx
-       movl    (%edi,%edx), %edx
+       andl    $255, %edx
+       movl    (%edi,%edx,4), %edx

Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:

-       andl    $85, %ebx
-       addl    _bit_count(,%ebx,4), %ebp
+       shll    $2, %ebx
+       andl    $340, %ebx
+       addl    _bit_count(%ebx), %ebp

llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner
861df2f4e9 simplify some code.
llvm-svn: 44655
2007-12-06 06:25:04 +00:00
Chris Lattner
91251d1337 implement the rest of the functionality from SelectionDAGLegalize::ScalarizeVectorOp
llvm-svn: 44654
2007-12-06 05:53:43 +00:00
Chuck Rose III
cdc572968c Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.
llvm-svn: 44651
2007-12-06 02:03:01 +00:00
Chris Lattner
1f2a96f9c1 move some ashr-specific code out of commonShiftTransforms into visitAShr.
llvm-svn: 44650
2007-12-06 01:59:46 +00:00
Dale Johannesen
8bc5d4be6a Fix PR1842.
llvm-svn: 44649
2007-12-06 01:43:46 +00:00
Chris Lattner
a7caf360c9 add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT.  This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.

llvm-svn: 44647
2007-12-06 01:34:04 +00:00
Chris Lattner
e297cb5408 simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup.

llvm-svn: 44646
2007-12-06 01:08:09 +00:00
Evan Cheng
1d289d0146 Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.
llvm-svn: 44644
2007-12-06 00:01:56 +00:00
Evan Cheng
9e69c0ada8 If both result of the {s|z}xt and its source are live out, rewrite all uses of the source with result of extension.
llvm-svn: 44643
2007-12-05 23:58:20 +00:00
Chris Lattner
3043dc44cd split the JIT memory management code out from the main JIT logic into its
own JITMemoryManager interface.  There is no functionality change with 
this patch.

llvm-svn: 44640
2007-12-05 23:39:57 +00:00
Chris Lattner
e3f1487574 add a note
llvm-svn: 44638
2007-12-05 23:05:06 +00:00
Chris Lattner
011d2aab51 add a note
llvm-svn: 44637
2007-12-05 22:58:19 +00:00
Scott Michel
a9a40d4347 Minor updates:
- Fix typo in SPUCallingConv.td
- Credit myself for CellSPU work
- Add CellSPU to 'all' host target list

llvm-svn: 44627
2007-12-05 21:23:16 +00:00
Duncan Sands
928143423b Commit 44487 broke bootstrap of llvm-gcc-4.2. It is
not yet clear why, but in the meantime work around the
problem by making less use of readnone/readonly info.

llvm-svn: 44626
2007-12-05 21:03:28 +00:00
Evan Cheng
27986f1ac7 Added canFoldMemoryOperand for PPC.
llvm-svn: 44623
2007-12-05 18:41:29 +00:00
Evan Cheng
aecb76bcc2 Update foldMemoryOperand.
llvm-svn: 44621
2007-12-05 18:36:37 +00:00
Chris Lattner
0914ad3008 fix warnings
llvm-svn: 44620
2007-12-05 18:32:18 +00:00
Chris Lattner
df5cd03710 allow this to build
llvm-svn: 44619
2007-12-05 18:30:11 +00:00
Neil Booth
054a756682 Prior commit updated wrong if, apologies.
llvm-svn: 44614
2007-12-05 13:06:04 +00:00
Neil Booth
b5afbd8e5a Handle zero correctly.
llvm-svn: 44613
2007-12-05 13:01:24 +00:00
Evan Cheng
abc6ab4765 MachineInstr can change. Store indexes instead.
llvm-svn: 44612
2007-12-05 10:24:35 +00:00
Evan Cheng
33ac3dd05f If a split live interval is spilled again, remove the kill marker on its last use.
llvm-svn: 44611
2007-12-05 09:51:10 +00:00
Evan Cheng
32a5877569 Clobber more bugs.
llvm-svn: 44610
2007-12-05 09:05:34 +00:00
Evan Cheng
a5f3ec9e03 Fix kill info for split intervals.
llvm-svn: 44609
2007-12-05 08:16:32 +00:00
Chris Lattner
a43f6b4a08 more scalarization
llvm-svn: 44608
2007-12-05 07:45:02 +00:00
Chris Lattner
e1b35fb035 scalarize vector binops
llvm-svn: 44607
2007-12-05 07:36:58 +00:00
Evan Cheng
1dc8e83707 - Mark last use of a split interval as kill instead of letting spiller track it.
This allows an important optimization to be re-enabled.
- If all uses / defs of a split interval can be folded, give the interval a
  low spill weight so it would not be picked in case spilling is needed (avoid
  pushing other intervals in the same BB to be spilled).

llvm-svn: 44601
2007-12-05 03:22:34 +00:00
Evan Cheng
8464a0bf00 Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether
the stored register is killed.

llvm-svn: 44600
2007-12-05 03:14:33 +00:00
Scott Michel
871b3a4fd4 More stuff for CellSPU -- this should be enough to get an error-free
compilation (no files missing). Test cases remain to be checked in.

llvm-svn: 44598
2007-12-05 02:01:41 +00:00
Scott Michel
8a2cb11b05 Updated source file headers to llvm coding standard.
llvm-svn: 44597
2007-12-05 01:40:25 +00:00
Scott Michel
026ace10b2 Two missing files.
llvm-svn: 44596
2007-12-05 01:31:18 +00:00
Scott Michel
191775d31f Main CellSPU backend files checked in. Intrinsics and autoconf files
remain.

llvm-svn: 44595
2007-12-05 01:24:05 +00:00
Dale Johannesen
15712dc45a Handle 0 correctly in string->APFloat conversion.
llvm-svn: 44594
2007-12-05 01:10:19 +00:00
Evan Cheng
a8e7a09fef Remove a unsafe optimization. This fixes 401.bzip2.
llvm-svn: 44587
2007-12-04 23:57:55 +00:00
Scott Michel
512cb025cc More files in the CellSPU drop...
llvm-svn: 44584
2007-12-04 22:35:58 +00:00
Scott Michel
774da2e74c More of the Cell SPU code drop from "Team Aerospace".
llvm-svn: 44582
2007-12-04 22:23:35 +00:00
Evan Cheng
63d60199aa Spiller unfold optimization bug: do not clobber a reusable stack slot value unless it can be modified.
llvm-svn: 44575
2007-12-04 19:19:45 +00:00
Chris Lattner
914befbc8a Implement framework for scalarizing node results. This is sufficient
to codegen this:

define float @test_extract_elt(<1 x float> * %P) {
	%p = load <1 x float>* %P
	%R = extractelement <1 x float> %p, i32 0
	ret float %R
}

llvm-svn: 44570
2007-12-04 07:48:46 +00:00
Chris Lattner
eead86bbc5 start providing framework for scalarizing vectors.
llvm-svn: 44569
2007-12-04 07:29:51 +00:00
Evan Cheng
ffc584dd21 Discard split intervals made empty due to folding.
llvm-svn: 44565
2007-12-04 00:32:23 +00:00
Scott Michel
3996f647d2 More CellSPU files... more to follow.
llvm-svn: 44559
2007-12-03 23:14:43 +00:00
Scott Michel
c312b999e6 Makefile fragment for CellSPU.
llvm-svn: 44558
2007-12-03 23:12:49 +00:00
Scott Michel
34987128e0 First commit to CellSPU. More to follow
llvm-svn: 44557
2007-12-03 23:09:49 +00:00
Evan Cheng
0b5abc5fcb Bug fixes.
llvm-svn: 44549
2007-12-03 21:31:55 +00:00
Anton Korobeynikov
75a3208bb0 Regenerate
llvm-svn: 44546
2007-12-03 21:01:29 +00:00
Anton Korobeynikov
dcec56301a Fix fallout from my last patch: don't reject varargs functions :)
llvm-svn: 44545
2007-12-03 21:00:45 +00:00
Duncan Sands
1e2e4972ff Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Chris Lattner
0c41f32943 update file comment.
llvm-svn: 44543
2007-12-03 19:43:18 +00:00
Anton Korobeynikov
3f14aef8e9 Regenerate
llvm-svn: 44541
2007-12-03 19:17:47 +00:00
Devang Patel
c47f68e747 If ExitValue operand is also defined in Loop header then
insert new ExitValue after this operand definition.

This fixes PR1828.

llvm-svn: 44539
2007-12-03 19:17:21 +00:00
Anton Korobeynikov
a19d61c50e More sanity checks for function types.
Thanks goes to PyPy folks for generating broken stuff :)

llvm-svn: 44538
2007-12-03 19:16:54 +00:00
Gordon Henriksen
8ef652160a Applying Anton's binmode fix to the other ofstream too.
llvm-svn: 44535
2007-12-03 14:50:37 +00:00
Anton Korobeynikov
2e3b17227f Sorry, typo :)
llvm-svn: 44534
2007-12-03 14:35:57 +00:00
Anton Korobeynikov
8c54cc8456 Open output file correctly. This is extremely important for
windows-based hosts, where files are opened in text mode by default.

llvm-svn: 44533
2007-12-03 14:28:26 +00:00
Evan Cheng
2f539edfe6 Typo
llvm-svn: 44532
2007-12-03 10:00:00 +00:00
Evan Cheng
df066bc833 Update kill info for uses of split intervals.
llvm-svn: 44531
2007-12-03 09:58:48 +00:00
Anton Korobeynikov
ad4a61ed0b Provide hook for _alloca to make JITing on Cygwin slightly happier :)
llvm-svn: 44528
2007-12-03 05:30:41 +00:00
Evan Cheng
58b387dfb0 Remove redundant foldMemoryOperand variants and other code clean up.
llvm-svn: 44517
2007-12-02 08:30:39 +00:00
Duncan Sands
14f11d6836 Integrate the readonly/readnone logic more deeply
into alias analysis.  This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter.  These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function.  Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite.  To reduce the
chance of misuse it is now protected.

llvm-svn: 44487
2007-12-01 07:51:45 +00:00
Evan Cheng
7b13aa1c75 Fix a bug where splitting cause some unnecessary spilling.
llvm-svn: 44482
2007-12-01 04:42:39 +00:00
Evan Cheng
79e8b92dc3 Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
llvm-svn: 44479
2007-12-01 02:07:52 +00:00
Ted Kremenek
74fcbb87af Fixed subtle bug in Deserializer::JumpTo when jumping when the block-nesting
information matching did not exactly match the underlying stream's scoping
information.

llvm-svn: 44470
2007-11-30 22:45:05 +00:00
Evan Cheng
90c548af8e Do not fold reload into an instruction with multiple uses. It issues one extra load.
llvm-svn: 44467
2007-11-30 21:23:43 +00:00
Chris Lattner
c75545d4a8 chain update requests properly.
llvm-svn: 44460
2007-11-30 18:52:58 +00:00
Duncan Sands
97ddf89236 Small optimization of parameter attribute lookup.
llvm-svn: 44458
2007-11-30 18:20:58 +00:00
Duncan Sands
94d751995e Add a convenience method for modifying parameter
attributes.  While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.

llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Duncan Sands
8d9be63cd3 Check that there are not more attributes than
function parameters.

llvm-svn: 44452
2007-11-30 15:52:20 +00:00
Devang Patel
47b368da69 Provide a way to update DescGlobals cache directly.
llvm-svn: 44446
2007-11-30 00:51:33 +00:00
Evan Cheng
9ddd80f2b9 Do not lose rematerialization info when spilling already split live intervals.
llvm-svn: 44443
2007-11-29 23:02:50 +00:00
Owen Anderson
3b893e1f84 Fix a miscompilation in spiff on PPC.
llvm-svn: 44437
2007-11-29 18:02:22 +00:00
Evan Cheng
cf224f3721 Fix a major performance issue with splitting. If there is a def (not def/use)
in the middle of a split basic block, create a new live interval starting at
the def. This avoid artifically extending the live interval over a number of
cycles where it is dead. e.g.

bb1:
       = vr1204   (use / kill) <= new interval starts and ends here.
...
...
vr1204 =          (new def)   <= start a new interval here.
       = vr1204   (use)

llvm-svn: 44436
2007-11-29 10:12:14 +00:00
Evan Cheng
72fe4454e6 Replace the odd kill# hack with something less fragile.
llvm-svn: 44434
2007-11-29 09:49:23 +00:00
Duncan Sands
19a1638e99 Small parameter attributes cleanup.
llvm-svn: 44433
2007-11-29 08:30:15 +00:00
Evan Cheng
20801d1eb5 Fixed various live interval splitting bugs / compile time issues.
llvm-svn: 44428
2007-11-29 01:06:25 +00:00
Evan Cheng
c7959fd80b Kill info update bug.
llvm-svn: 44427
2007-11-29 01:05:47 +00:00