1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
Commit Graph

62884 Commits

Author SHA1 Message Date
Dan Gohman
1aa32ead98 Move MaximumAlignment to Value.h, now that GlobalValue.h needs it.
llvm-svn: 109656
2010-07-28 21:02:38 +00:00
Dan Gohman
343e4fb4ea Make GlobalValue alignment consistent with load, store, and alloca
alignment, fixing silent truncation of alignment values.

llvm-svn: 109653
2010-07-28 20:56:48 +00:00
Jakob Stoklund Olesen
d4c60eed5e Create a fixed stack object for varargs that is as large as any register.
The size of this object isn't used for anything - technically it is of variable
size.

This avoids a false positive from the assert in
X86InstrInfo::loadRegFromStackSlot, and fixes PR7735.

llvm-svn: 109652
2010-07-28 20:55:38 +00:00
Kevin Enderby
3f202e65e8 Added first bit of support for the dwarf .file directive. This patch collects
the info from the .file directive and makes file and directory tables that
will eventually be put out as part of the dwarf info in the output file.

llvm-svn: 109651
2010-07-28 20:55:35 +00:00
Daniel Dunbar
111cf008aa RegionInfo: Make sure to free cached nodes; Tobias, please check!
llvm-svn: 109650
2010-07-28 20:28:50 +00:00
Daniel Dunbar
1c35389c03 MC: Put back the MCFragment vtable, so subclasses are destroyed properly (duh).
llvm-svn: 109649
2010-07-28 20:28:45 +00:00
Eric Christopher
f68b6caf37 Regenerate.
llvm-svn: 109647
2010-07-28 20:26:43 +00:00
Eric Christopher
fe6294e326 Use a C++ compiler for the atomic builtin check since we'll
be using a C++ compiler to build.

Patch by Török Edwin!

llvm-svn: 109646
2010-07-28 20:26:34 +00:00
Dan Gohman
939744be5f Define a maximum supported alignment value for load, store, and
alloca instructions (constrained by their internal encoding),
and add error checking for it. Fix an instcombine bug which
generated huge alignment values (null is infinitely aligned).
This fixes undefined behavior noticed by John Regehr.

llvm-svn: 109643
2010-07-28 20:12:04 +00:00
Jakob Stoklund Olesen
7ac201b2e3 Print out the regclass of any virtual registers used by a machine instruction.
llvm-svn: 109608
2010-07-28 18:35:46 +00:00
Bob Wilson
c9fcc66f8e Fix a warning from gcc-4.0 (from the ppc buildbot).
llvm-svn: 109605
2010-07-28 18:21:10 +00:00
Rafael Espindola
a618c1e4ec Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

llvm-svn: 109602
2010-07-28 18:12:30 +00:00
Douglas Gregor
4e0ad2b35b Unbreak my CMake build, say you'll compile for me again...
llvm-svn: 109598
2010-07-28 17:17:46 +00:00
Dan Gohman
a4186ab5f0 Fix this code to avoid decrementing an iterator past the beginning
of a std::vector.

llvm-svn: 109597
2010-07-28 17:15:36 +00:00
Dan Gohman
5295c21189 When user code intentionally dereferences null, the alignment of the
dereference is theoretically infinite. Put a cap on the computed
alignment to avoid overflow, noticed by John Regehr.

llvm-svn: 109596
2010-07-28 17:14:23 +00:00
Dan Gohman
041bd99662 Do GEP offset calculations with unsigned math rather than signed math
to avoid undefined behavior on overflow, noticed by John Regehr.

llvm-svn: 109594
2010-07-28 17:11:36 +00:00
Dan Gohman
b4699b3002 Add some extra friend declarations to fix a gcc-4.0 compile error.
This is a temporary fix, until more elaborate changes are ready.

llvm-svn: 109593
2010-07-28 17:09:24 +00:00
Gabor Greif
ecd9b45b05 simplify
llvm-svn: 109589
2010-07-28 15:52:43 +00:00
Daniel Dunbar
4cf25fa76a Support: Add CrashRecoveryContext helper object.
- Designed as a simple wrapper to allow clients to attempt to catch crashes
   (memory errors, assertion violations, etc.) and do some kind of recovery.

 - Currently doesn't actually attempt to catch crashes.

llvm-svn: 109586
2010-07-28 15:40:20 +00:00
Gabor Greif
4909c0a1f1 simplify
llvm-svn: 109585
2010-07-28 15:31:37 +00:00
Gabor Greif
16a98fddef use Value* constructor of CallSite to create potentially improper site, and test that
llvm-svn: 109581
2010-07-28 14:28:18 +00:00
Gabor Greif
9bb43864b1 use Value* constructor of CallSite to create potentially improper site, and test that
llvm-svn: 109580
2010-07-28 12:35:54 +00:00
Gabor Greif
f6966fafe3 use Value* constructor of CallSite to create potentially improper site
llvm-svn: 109579
2010-07-28 12:19:46 +00:00
Gabor Greif
e27a194ce5 simplify
llvm-svn: 109578
2010-07-28 10:57:28 +00:00
Gabor Greif
6dc7dec8c1 simplify
llvm-svn: 109577
2010-07-28 10:46:09 +00:00
Gabor Greif
37e8f2b3b8 we are supposed to only create proper CallSites from an instruction (esp. CallInst and InvokeInst)
llvm-svn: 109576
2010-07-28 10:44:59 +00:00
Eric Christopher
1b1705cfa9 Filter out patterns that have PredicateOperands.
llvm-svn: 109572
2010-07-28 01:52:23 +00:00
Dan Gohman
2bea1e1572 Make SCEVCallbackVH::allUsesReplacedWith update the old SCEVUnknown
object, as it may still be referenced by SCEVs not cleaned up by the
use list traversal.

Also, in ScalarEvolution::forgetValue, only check for a SCEVUnknown
object for the original value, not for any value in the use list,
because other SCEVUnknown values aren't necessary obsolete at that
point.

llvm-svn: 109570
2010-07-28 01:09:07 +00:00
Dan Gohman
9a6ea54d94 Make SCEVCallbackVH::allUsesReplacedWith unconditionally delete
the old value.

llvm-svn: 109567
2010-07-28 00:28:25 +00:00
Nate Begeman
133820e806 Implement a vectorized algorithm for <16 x i8> << <16 x i8>
This is about 4x faster and smaller than the existing scalarization.

llvm-svn: 109566
2010-07-28 00:21:48 +00:00
Dan Gohman
2dcafa2402 Add a comment.
llvm-svn: 109565
2010-07-28 00:21:18 +00:00
Owen Anderson
2d39891e91 Rearrange several datastructures in LazyValueInfo to improve compile time.
This is still not perfect, but better than it was before.

llvm-svn: 109563
2010-07-27 23:58:11 +00:00
Owen Anderson
fd7fc038ac Fill out the interface of DenseSet a bit.
llvm-svn: 109562
2010-07-27 23:55:47 +00:00
Stuart Hastings
d2b44f0739 Testcase for r109556. Radar 8198362.
llvm-svn: 109557
2010-07-27 23:15:25 +00:00
Gabor Greif
ec0c7b2427 reintroduce original (asserting) semantics of CallSite(Instruction *II)
add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize
and use that one in client code

llvm-svn: 109553
2010-07-27 22:53:28 +00:00
Nate Begeman
068e932975 ~40% faster vector shl <4 x i32> on SSE 4.1 Larger improvements for smaller types coming in future patches.
For:

define <2 x i64> @shl(<4 x i32> %r, <4 x i32> %a) nounwind readnone ssp {
entry:
  %shl = shl <4 x i32> %r, %a                     ; <<4 x i32>> [#uses=1]
  %tmp2 = bitcast <4 x i32> %shl to <2 x i64>     ; <<2 x i64>> [#uses=1]
  ret <2 x i64> %tmp2
}

We get:

_shl:                                   ## @shl
	pslld	$23, %xmm1
	paddd	LCPI0_0, %xmm1
	cvttps2dq	%xmm1, %xmm1
	pmulld	%xmm1, %xmm0
	ret

Instead of:

_shl:                                   ## @shl
	pshufd	$3, %xmm0, %xmm2
	movd	%xmm2, %eax
	pshufd	$3, %xmm1, %xmm2
	movd	%xmm2, %ecx
	shll	%cl, %eax
	movd	%eax, %xmm2
	pshufd	$1, %xmm0, %xmm3
	movd	%xmm3, %eax
	pshufd	$1, %xmm1, %xmm3
	movd	%xmm3, %ecx
	shll	%cl, %eax
	movd	%eax, %xmm3
	punpckldq	%xmm2, %xmm3
	movd	%xmm0, %eax
	movd	%xmm1, %ecx
	shll	%cl, %eax
	movd	%eax, %xmm2
	movhlps	%xmm0, %xmm0
	movd	%xmm0, %eax
	movhlps	%xmm1, %xmm1
	movd	%xmm1, %ecx
	shll	%cl, %eax
	movd	%eax, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	punpckldq	%xmm3, %xmm0
	ret

llvm-svn: 109549
2010-07-27 22:37:06 +00:00
Gabor Greif
8c197e5dbb recommit simplification (originally r109504, backed out in r109508) now that problem in CallSiteBase is fixed
llvm-svn: 109547
2010-07-27 22:02:00 +00:00
Gabor Greif
262e51d31d remove bogus assert, use static_cast for additional checking
left two new asserts commented out, because they would fire in clang, have to hunt those down first

llvm-svn: 109544
2010-07-27 21:46:11 +00:00
Devang Patel
38a7221118 It is FE's responsibility to emit proper directory name.
llvm-svn: 109538
2010-07-27 20:51:15 +00:00
Chris Lattner
1cc20eea6f make lookup failures not fatal.
llvm-svn: 109530
2010-07-27 18:59:50 +00:00
Jim Grosbach
2f4adcee5f Grammar
llvm-svn: 109525
2010-07-27 18:36:27 +00:00
Devang Patel
186cbcd229 Update tests to not rely on input file's absolute path.
llvm-svn: 109521
2010-07-27 18:13:53 +00:00
Nate Begeman
15fe179ecb Fix a crash in the dag combiner caused by ConstantFoldBIT_CONVERTofBUILD_VECTOR calling itself
recursively and returning a SCALAR_TO_VECTOR node, but assuming the input was always a BUILD_VECTOR.

llvm-svn: 109519
2010-07-27 18:02:18 +00:00
Jim Grosbach
4d81e796cb 80 column
llvm-svn: 109513
2010-07-27 17:38:47 +00:00
Jim Grosbach
7e561eb81c fix typo
llvm-svn: 109511
2010-07-27 17:14:29 +00:00
Gabor Greif
2778a21978 recommit simplification (r109502, backed out r109509); seems to innocent
llvm-svn: 109510
2010-07-27 16:44:23 +00:00
Gabor Greif
c95e84ab61 back out this too to restore the bots
llvm-svn: 109509
2010-07-27 15:56:07 +00:00
Gabor Greif
981f3d3a31 back out r109504, breaks the bots
llvm-svn: 109508
2010-07-27 15:18:11 +00:00
Gabor Greif
394841cea8 simplify: CallSite::get --> CallSite constructor
llvm-svn: 109506
2010-07-27 15:02:37 +00:00
Gabor Greif
90a627cfaa simplify
llvm-svn: 109504
2010-07-27 14:38:38 +00:00