1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib
Chris Lattner 8adf14ea21 Implement the first half of PR3290: if there is a store of an
integer to a (transitive) bitcast the alloca and if that integer
has the full size of the alloca, then it clobbers the whole thing.
Handle this by extracting pieces out of the stored integer and 
filing them away in the SROA'd elements.

This triggers fairly frequently because the CFE uses integers to
pass small structs by value and the inliner exposes these.  For 
example, in kimwitu++, I see a bunch of these with i64 stores to
"%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>"

In 176.gcc I see a few i32 stores to "%struct..0anon".

In the testcase, this is a difference between compiling test1 to:

_test1:
	subl	$12, %esp
	movl	20(%esp), %eax
	movl	%eax, 4(%esp)
	movl	16(%esp), %eax
	movl	%eax, (%esp)
	movl	(%esp), %eax
	addl	4(%esp), %eax
	addl	$12, %esp
	ret

vs:

_test1:
	movl	8(%esp), %eax
	addl	4(%esp), %eax
	ret

The second half of this will be to handle loads of the same form.

llvm-svn: 61853
2009-01-07 08:11:13 +00:00
..
Analysis When checking if an Argument escapes, check if 2009-01-05 21:19:53 +00:00
Archive Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
AsmParser fix wordo 2009-01-05 18:56:52 +00:00
Bitcode revert r61368. 2008-12-23 05:43:56 +00:00
CodeGen The coalescer does not coalesce a virtual register to a physical register if any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away: 2009-01-07 02:08:57 +00:00
Debugger Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
ExecutionEngine Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
Linker Make comments and code for QuietWarnings and QuietErrors 2008-10-25 17:57:20 +00:00
Support Tweak --version to include the date and time. 2008-12-23 18:41:47 +00:00
System Don't use plain %x to print pointer values. I had changed it from %p 2008-12-05 23:39:24 +00:00
Target Add patterns to match conditional moves with loads folded 2009-01-07 01:00:24 +00:00
Transforms Implement the first half of PR3290: if there is a store of an 2009-01-07 08:11:13 +00:00
VMCore Improve support for type-generic vector intrinsics by teaching TableGen how 2009-01-07 00:09:01 +00:00
Makefile