OSDN Git Service
Nowar Gu [Thu, 23 Jun 2011 03:08:11 +0000 (11:08 +0800)]
Merge upstream to r133679 at Thu. 23th Jun 2011.
Evan Cheng [Thu, 23 Jun 2011 01:53:43 +0000 (01:53 +0000)]
Get rid of one getStackAlignment(). RegisterInfo shouldn't need to know about stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133679
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 23 Jun 2011 01:06:23 +0000 (01:06 +0000)]
Some skeleton code to emit the compact unwind. If the information is unable to
be emitted in a compact way, we then default to emitting a CIE and FDE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133676
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 23 Jun 2011 00:23:04 +0000 (00:23 +0000)]
Allow the AsmInfo to query for the compact unwind section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133670
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 23 Jun 2011 00:12:58 +0000 (00:12 +0000)]
Allow the AsmInfo to query the TLOF to see if it supports compact unwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133669
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 23 Jun 2011 00:09:43 +0000 (00:09 +0000)]
80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133668
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 22 Jun 2011 23:23:19 +0000 (23:23 +0000)]
lit support for REQUIRES: asserts.
Take #2. Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133664
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 22 Jun 2011 23:16:51 +0000 (23:16 +0000)]
Add a flag that indicates whether a target supports compact unwind info or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133662
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Jun 2011 22:31:57 +0000 (22:31 +0000)]
Reenable tail duplication of bb with just an unconditional jump, but
don't remove blocks that have their address taken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133659
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 22 Jun 2011 22:22:24 +0000 (22:22 +0000)]
Add a __LD,__compact_unwind section.
If the linker supports it, this will hold the CIE and FDE information in a
compact format. The implementation of the compact unwinding emission is coming
soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133658
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 22 Jun 2011 21:13:46 +0000 (21:13 +0000)]
Fix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133648
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 22 Jun 2011 21:13:23 +0000 (21:13 +0000)]
Revert r133607. This is causing failures in the Clang gccTestSuite.
Specifically, gcc.c-torture/compile/pr21356.c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133646
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 22 Jun 2011 21:07:27 +0000 (21:07 +0000)]
Move class methods out-of-line. This reduces the indentation, and is more in
line with LLVM's general coding style.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133645
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 22 Jun 2011 20:56:56 +0000 (20:56 +0000)]
New binops need debug loc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133642
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Jun 2011 20:41:53 +0000 (20:41 +0000)]
test/Unit: Fix enable shared test to follow check that we have actually loaded
the site config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133641
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 22 Jun 2011 20:40:30 +0000 (20:40 +0000)]
Add missing header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133640
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 22 Jun 2011 20:14:52 +0000 (20:14 +0000)]
Move ARMMachObjectWriter to its own file.
Just tidy up a bit. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133638
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 22 Jun 2011 19:52:36 +0000 (19:52 +0000)]
Set debug loc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133636
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 22 Jun 2011 19:42:14 +0000 (19:42 +0000)]
Needs a triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133634
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 22 Jun 2011 18:55:03 +0000 (18:55 +0000)]
Emit trailing padding on constant vectors when TargetData says that the vector
is larger than the sum of the elements (including per-element padding).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133631
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Hines [Wed, 22 Jun 2011 18:42:42 +0000 (11:42 -0700)]
Switch to PSTR from PCSTR.
Change-Id: I500dc66cd86e211aef6d6bf98aa30895ddc90079
Stephen Hines [Wed, 22 Jun 2011 18:28:21 +0000 (11:28 -0700)]
Add comment about PCSTR.
Change-Id: I580282af90c08f8fe81f05270b5a13b1f4283878
Stephen Hines [Wed, 22 Jun 2011 17:41:57 +0000 (10:41 -0700)]
Define WIN32_ELMCB_PCSTR for Windows host builds.
Change-Id: I5233875cd1c07a41897cd732dc9ac67ae3d03af1
Justin Holewinski [Wed, 22 Jun 2011 16:07:03 +0000 (16:07 +0000)]
PTX: Fix FrameIndex mapping bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133619
91177308-0d34-0410-b5e6-
96231b3b80d8
Shih-wei Liao [Wed, 22 Jun 2011 12:48:14 +0000 (05:48 -0700)]
Revision history.
Change-Id: Ic605590bdb044d73428d2e5bbdde4697396def3d
Jay Foad [Wed, 22 Jun 2011 09:24:39 +0000 (09:24 +0000)]
Replace the existing forms of ConstantArray::get() with a single form
that takes an ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133615
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 22 Jun 2011 09:10:19 +0000 (09:10 +0000)]
Make ConstantVector::get() always take an ArrayRef, never a std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133614
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Bailey [Wed, 22 Jun 2011 09:04:30 +0000 (09:04 +0000)]
Test Commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133613
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 22 Jun 2011 08:55:11 +0000 (08:55 +0000)]
Eliminate a temporary std::vector in ConstantStruct::get().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133612
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 22 Jun 2011 08:50:06 +0000 (08:50 +0000)]
Extend ConstantUniqueMap with a new template parameter ValRefType,
representing a constant reference to ValType. Normally this is just
"const ValType &", but when ValType is a std::vector we want to use
ArrayRef as the reference type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133611
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 22 Jun 2011 05:43:36 +0000 (05:43 +0000)]
Only do config-time substitution of LLVM_BUILD_MODE in
test/lit.site.cfg, not Unit/test/lit.site.cfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133608
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 22 Jun 2011 04:01:58 +0000 (04:01 +0000)]
Reenable the optimization added in 133415, but change the definition of a "simple" bb to
be one with only one unconditional branch and no phis. Duplicating the phis in this case
is possible, but requeres liveness analysis or breaking edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133607
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Wed, 22 Jun 2011 02:09:50 +0000 (02:09 +0000)]
PTX: Add signed integer comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133599
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Wed, 22 Jun 2011 00:43:56 +0000 (00:43 +0000)]
PTX: Add .address_size directive if PTX version >= 2.3
Patch by Wei-Ren Chen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133589
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 22 Jun 2011 00:03:42 +0000 (00:03 +0000)]
Test case for r133560.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133585
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 21 Jun 2011 23:19:23 +0000 (23:19 +0000)]
Unbreak the CMake build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133574
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Jun 2011 23:02:36 +0000 (23:02 +0000)]
After register is spilled there should not be any DBG_VALUE referring the same register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133569
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 21 Jun 2011 22:55:50 +0000 (22:55 +0000)]
Consolidate some TableGen diagnostic helper functions.
TableGen had diagnostic printers sprinkled about in a few places. Pull them
together into a single location in Error.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133568
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 21 Jun 2011 22:54:23 +0000 (22:54 +0000)]
Fix some trailing issues from my introduction of MVT::untyped and its use for REGISTER_SEQUENCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133567
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 21 Jun 2011 22:45:41 +0000 (22:45 +0000)]
Add support for assembling "movq" when it's correct to do so, while continuing
to emit "movd" across the board to continue supporting a Darwin assembler bug.
This is the reincarnation of r133452.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133565
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 21 Jun 2011 22:40:24 +0000 (22:40 +0000)]
Add verbose EH table printing to SjLj exception tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133561
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Jun 2011 22:36:03 +0000 (22:36 +0000)]
There could be more than one DBG_VALUE instructions for variables where all of them have offset based on one register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133560
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 21 Jun 2011 22:30:20 +0000 (22:30 +0000)]
Improve the comment printing for the EH table. This gives a much more detailed
explanation of what the EH table describes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133559
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 21 Jun 2011 22:10:57 +0000 (22:10 +0000)]
Handle the memory-ness of all U+ ARM constraints.
Noticed on inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133553
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Jun 2011 19:46:09 +0000 (19:46 +0000)]
Remove r130409, as requested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133536
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 21 Jun 2011 19:00:54 +0000 (19:00 +0000)]
Reorg. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133533
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 21 Jun 2011 17:35:13 +0000 (17:35 +0000)]
Revert r133452: "Emit movq for 64-bit register to XMM register moves..."
This is breaking compiler-rt and llvm-gcc builds on MacOSX when not using
the integrated assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133524
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 21 Jun 2011 17:18:15 +0000 (17:18 +0000)]
Add support for sadd.with.overflow and uadd.with.overflow intrinsics to the CBackend by emitting definitions for each intrinsic that occurs in the module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133522
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 21 Jun 2011 15:43:52 +0000 (15:43 +0000)]
IVUsers no longer needs to record the phis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 21 Jun 2011 15:37:05 +0000 (15:37 +0000)]
Remove deprecated forms of StringMap::GetOrCreateValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133517
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 21 Jun 2011 15:36:24 +0000 (15:36 +0000)]
Remove some unnecessary uses of c_str().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133516
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 21 Jun 2011 14:58:30 +0000 (14:58 +0000)]
Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133514
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 21 Jun 2011 10:33:19 +0000 (10:33 +0000)]
Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133513
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 21 Jun 2011 10:02:43 +0000 (10:02 +0000)]
Don't use PN->replaceUsesOfWith() to change a PHINode's incoming blocks,
because it won't work after my phi operand changes, because the incoming
blocks will no longer be Uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133512
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 21 Jun 2011 08:33:49 +0000 (08:33 +0000)]
Add a reduced test case for the buildbot failure (clang self-hosted
build) caused by r133435.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133509
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Jun 2011 06:22:33 +0000 (06:22 +0000)]
use the MapEntryTy typedef instead of writing it out long form,
add some fixme's about methods that should be removed.
Merged from type-system-rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133504
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 21 Jun 2011 06:01:08 +0000 (06:01 +0000)]
Teach dag combine to match halfword byteswap patterns.
1. (((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8)
=> (bswap x) >> 16
2. ((x&0xff)<<8)|((x&0xff00)>>8)|((x&0xff000000)>>8)|((x&0x00ff0000)<<8))
=> (rotl (bswap x) 16)
This allows us to eliminate most of the def : Pat patterns for ARM rev16
revsh instructions. It catches many more cases for ARM and x86.
rdar://
9609108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133503
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 21 Jun 2011 03:22:38 +0000 (03:22 +0000)]
indvars -disable-iv-rewrite: Adds support for eliminating identity
ops.
This is a rewrite of the IV simplification algorithm used by
-disable-iv-rewrite. To avoid perturbing the default mode, I
temporarily split the driver and created SimplifyIVUsersNoRewrite. The
idea is to avoid doing opcode/pattern matching inside
IndVarSimplify. SCEV already does it. We want to optimize with the
full generality of SCEV, but optimize def-use chains top down on-demand rather
than rewriting the entire expression bottom-up. This was easy to do
for operations that SCEV can prove are identity function. So we're now
eliminating bitmasks and zero extends this way.
A result of this rewrite is that indvars -disable-iv-rewrite no longer
requires IVUsers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133502
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 21 Jun 2011 02:09:03 +0000 (02:09 +0000)]
Revert r133435 and r133449 to appease buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133499
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 Jun 2011 01:28:11 +0000 (01:28 +0000)]
Add A0 and A1 to the list of registers used for returning a value in order to
handle functions with return type Complex long long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133497
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 Jun 2011 01:02:03 +0000 (01:02 +0000)]
Coding style fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133496
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 Jun 2011 00:40:49 +0000 (00:40 +0000)]
Re-apply 132758 and 132768 which were speculatively reverted in 132777.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133494
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 21 Jun 2011 00:35:15 +0000 (00:35 +0000)]
Don't mark the eh.dispatch.setup with a memory access marker. We want this to
stick around even during fast isel.
<rdar://problem/
9637156>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133493
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Jun 2011 23:20:43 +0000 (23:20 +0000)]
Completely short-circuit out ARC optimization if the ARC runtime
functions do not appear in the module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133478
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 20 Jun 2011 22:12:24 +0000 (22:12 +0000)]
Remove the subclassing. This will be moved to the ASM printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133473
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 20 Jun 2011 20:56:05 +0000 (20:56 +0000)]
Skip fields that don't exist in the Register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133470
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 Jun 2011 18:42:48 +0000 (18:42 +0000)]
PTX: Fix conversion between predicates and value types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133454
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 20 Jun 2011 18:33:26 +0000 (18:33 +0000)]
Emit movq for 64-bit register to XMM register moves, but continue to accept
movd when assembling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133452
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 20 Jun 2011 17:46:19 +0000 (17:46 +0000)]
Fix a check for PHINodes with two incoming values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133449
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 Jun 2011 17:08:56 +0000 (17:08 +0000)]
PTX: Fix if-then-else formatting and add missing asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133447
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jun 2011 17:04:08 +0000 (17:04 +0000)]
Disable again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133446
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 20 Jun 2011 15:56:20 +0000 (15:56 +0000)]
PTX: Add basic register spilling code
The current implementation generates stack loads/stores, which are
really just mov instructions from/to "special" registers. This may
not be the most efficient implementation, compared to an approach where
the stack registers are directly folded into instructions, but this is
easier to implement and I have yet to see a case where ptxas is unable
to see through this kind of register usage and know what is really
going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133443
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 20 Jun 2011 15:28:39 +0000 (15:28 +0000)]
Don't apply on PPC64 the 32bit ADDIC optimizations as there's no overflow
with 32bit values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133439
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 20 Jun 2011 14:46:47 +0000 (14:46 +0000)]
This is an automatically reduced test case that crashed in GVN, at some
point during the development of the phi operand changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133436
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 20 Jun 2011 14:38:01 +0000 (14:38 +0000)]
Change how PHINodes store their operands.
Change PHINodes to store simple pointers to their incoming basic blocks,
instead of full-blown Uses.
Note that this loses an optimization in SplitCriticalEdge(), because we
can no longer walk the use list of a BasicBlock to find phi nodes. See
the comment I removed starting "However, the foreach loop is slow for
blocks with lots of predecessors".
Extend replaceAllUsesWith() on a BasicBlock to also update any phi
nodes in the block's successors. This mimics what would have happened
when PHINodes were proper Users of their incoming blocks. (Note that
this only works if OldBB->replaceAllUsesWith(NewBB) is called when
OldBB still has a terminator instruction, so it still has some
successors.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133435
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 20 Jun 2011 14:18:48 +0000 (14:18 +0000)]
Make better use of the PHINode API.
Change various bits of code to make better use of the existing PHINode
API, to insulate them from forthcoming changes in how PHINodes store
their operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133434
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 20 Jun 2011 14:12:33 +0000 (14:12 +0000)]
Remove the AugmentedUse struct.
I don't think the AugmentedUse struct buys us much, either in
correctness or in ease of use. Ditch it, and simplify Use::getUser() and
User::allocHungoffUses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133433
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jun 2011 14:11:42 +0000 (14:11 +0000)]
Re enable 133415 with two fixes
* Don't introduce a duplicated bb in the CFG
* When making a branch unconditional, clear the PredCond array so that it
is really unconditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133432
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 20 Jun 2011 09:26:23 +0000 (09:26 +0000)]
Disable the logic added by rafael in commit 133415 to see if it brings the
dragonegg buildbots back to life. Original commit message:
Teach early dup how to duplicate basic blocks with one successor and only phi instructions
into more complex blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133430
91177308-0d34-0410-b5e6-
96231b3b80d8
Nowar Gu [Fri, 17 Jun 2011 09:05:43 +0000 (17:05 +0800)]
Fix source list of Android.mk.
Nowar Gu [Fri, 17 Jun 2011 06:29:24 +0000 (14:29 +0800)]
Merge upstream to r133240 at Fri. 17th Jun 2011.
Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/ARM/ARMCodeEmitter.cpp
Nowar Gu [Fri, 17 Jun 2011 06:22:53 +0000 (14:22 +0800)]
Suppress un-initialize warning.
We should do bitwise operation on un-initialized variable.
Maybe this stub lose some information, but I don't know.
Anyway, I clear it to 0.
Nadav Rotem [Mon, 20 Jun 2011 07:15:58 +0000 (07:15 +0000)]
Fix PromoteIntRes_TRUNCATE: Add support for cases where the
source vector type is to be split while the target vector is to be promoted.
(eg: <4 x i64> -> <4 x i8> )
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133424
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Mon, 20 Jun 2011 05:19:37 +0000 (05:19 +0000)]
Fix MSVC build. next() function already exists in the MSVC headers. This create a overload conflict. Make sure we pick up the llvm one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133416
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jun 2011 04:16:35 +0000 (04:16 +0000)]
Teach early dup how to duplicate basic blocks with one successor and only phi instructions
into more complex blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133415
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Jun 2011 04:01:31 +0000 (04:01 +0000)]
Revamp the "ConstantStruct::get" methods. Previously, these were scattered
all over the place in different styles and variants. Standardize on two
preferred entrypoints: one that takes a StructType and ArrayRef, and one that
takes StructType and varargs.
In cases where there isn't a struct type convenient, we now add a
ConstantStruct::getAnon method (whose name will make more sense after a few
more patches land).
It would be "really really nice" if the ConstantStruct::get and
ConstantVector::get methods didn't make temporary std::vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133412
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Jun 2011 03:51:04 +0000 (03:51 +0000)]
introduce an isLayoutIdentical() method, which is currently just a pointer
equality check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133409
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 20 Jun 2011 02:50:54 +0000 (02:50 +0000)]
Add a RegisterTuples class to Target.td and TableGen.
A RegisterTuples instance is used to synthesize super-registers by
zipping together lists of sub-registers. This is useful for generating
pseudo-registers representing register sequence constraints like 'two
consecutive GPRs', or 'an even-odd pair of floating point registers'.
The RegisterTuples def can be used in register set operations when
building register classes. That is the only way of accessing the
synthesized super-registers.
For example, the ARM QQ register class of pseudo-registers could have
been formed like this:
// Form pairs Q0_Q1, Q2_Q3, ...
def QQPairs : RegisterTuples<[qsub_0, qsub_1],
[(decimate QPR, 2),
(decimate (shl QPR, 1), 2)]>;
def QQ : RegisterClass<..., (add QQPairs)>;
Similarly, pseudo-registers representing '3 consecutive D-regs with
wraparound' look like:
// Form D0_D1_D2, D1_D2_D3, ..., D30_D31_D0, D31_D0_D1.
def DSeqTriples : RegisterTuples<[dsub_0, dsub_1, dsub_2],
[(rotl DPR, 0),
(rotl DPR, 1),
(rotl DPR, 2)]>;
TableGen automatically computes aliasing information for the synthesized
registers.
Register tuples are still somewhat experimental. We still need to see
how they interact with MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133407
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Sun, 19 Jun 2011 18:37:11 +0000 (18:37 +0000)]
Fix a FIXME by making GlobalVariable::getInitializer() return a
const Constant *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133400
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 19 Jun 2011 12:14:34 +0000 (12:14 +0000)]
Update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133390
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 19 Jun 2011 10:49:57 +0000 (10:49 +0000)]
Code cleanups: Remove duplicated logic in PromotInteRes_BITCAST, reserve vector space, reuse types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133389
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 19 Jun 2011 10:22:39 +0000 (10:22 +0000)]
Calls to AssertZext and getZeroExtendInReg must be made using scalar types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133388
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 19 Jun 2011 08:49:38 +0000 (08:49 +0000)]
When promoting the vector elements in CopyToParts, use vector trunc
instead of scalarizing, and doing an element-by-element truncat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133382
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 19 Jun 2011 08:12:43 +0000 (08:12 +0000)]
Reduce the runtime of the test. Keep only the interesting cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133381
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 19 Jun 2011 03:30:32 +0000 (03:30 +0000)]
Revert r133373. I was going to use this to teach the Verifier to verify constant
expressions, but Chris wants to instead reduce the set of possible constant
expression types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133374
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 19 Jun 2011 02:26:33 +0000 (02:26 +0000)]
Add the remaining instructions/constant expressions as Operators so that code
can manipulate instructions and constantexpr's uniformly. No users yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Jun 2011 00:03:46 +0000 (00:03 +0000)]
Remove support for parsing the "type i32" syntax for defining a numbered
top level type without a specified number. This syntax isn't documented
and blocks forward progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Jun 2011 23:51:31 +0000 (23:51 +0000)]
revert r133368, apparently I missed the tests to be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Jun 2011 23:38:57 +0000 (23:38 +0000)]
Remove support for parsing the "type i32" syntax for defining a numbered
top level type without a specified number. This asmprinter has never
generated this, as you can tell by no tests being updated. It also isn't
documented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133368
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Jun 2011 22:48:56 +0000 (22:48 +0000)]
fix the varargs version of StructType::get to not require an LLVMContext, making usage
much cleaner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133364
91177308-0d34-0410-b5e6-
96231b3b80d8