oota-llvm.git
14 years agogive PATypeHolder an explicit copy ctor which initializes the type pointer,
Chris Lattner [Tue, 29 Jun 2010 19:20:38 +0000 (19:20 +0000)]
give PATypeHolder an explicit copy ctor which initializes the type pointer,
and make PATypeHolder work with null pointers.

The implicitly generated one didn't work on numerous levels, but was still
accepted, allowing all sorts of bugs with default constructed pa type holders.

Previously, they "sort of" worked if they were default constructed and then
destructed.  Now they really work, and you can even default construct one,
then assign to it, amazing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107195 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the handling of partial redefines in the fast register allocator.
Jakob Stoklund Olesen [Tue, 29 Jun 2010 19:15:30 +0000 (19:15 +0000)]
Fix the handling of partial redefines in the fast register allocator.

A partial redefine needs to be treated like a tied operand, and the register
must be reloaded while processing use operands.

This fixes a bug where partially redefined registers were processed as normal
defs with a reload added. The reload could clobber another use operand if it was
a kill that allowed register reuse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107193 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a register scavenger crash when dealing with undefined subregs.
Bob Wilson [Tue, 29 Jun 2010 18:42:49 +0000 (18:42 +0000)]
Fix a register scavenger crash when dealing with undefined subregs.
The LowerSubregs pass needs to preserve implicit def operands attached to
EXTRACT_SUBREG instructions when it replaces those instructions with copies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107189 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd AVX non-temporal stores
Bruno Cardoso Lopes [Tue, 29 Jun 2010 18:22:01 +0000 (18:22 +0000)]
Add AVX non-temporal stores

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107178 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a few more interesting testcases.
Dan Gohman [Tue, 29 Jun 2010 18:17:11 +0000 (18:17 +0000)]
Add a few more interesting testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107177 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix whitespace style.
Dan Gohman [Tue, 29 Jun 2010 18:12:34 +0000 (18:12 +0000)]
Fix whitespace style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107175 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove non-temporal movs to their own section
Bruno Cardoso Lopes [Tue, 29 Jun 2010 17:42:37 +0000 (17:42 +0000)]
Move non-temporal movs to their own section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107168 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd support for encoding NEON VMOV (from core register to scalar) instructions.
Bob Wilson [Tue, 29 Jun 2010 17:34:07 +0000 (17:34 +0000)]
Add support for encoding NEON VMOV (from core register to scalar) instructions.
The encoding is the same as VMOV (from scalar to core register) except that
the operands are in different places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107167 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd sqrt, rsqrt and rcp AVX instructions
Bruno Cardoso Lopes [Tue, 29 Jun 2010 17:26:30 +0000 (17:26 +0000)]
Add sqrt, rsqrt and rcp AVX instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107166 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoskip dbg_value instructions
Jim Grosbach [Tue, 29 Jun 2010 16:55:24 +0000 (16:55 +0000)]
skip dbg_value instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107154 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agominor cosmetics
Gabor Greif [Tue, 29 Jun 2010 16:27:38 +0000 (16:27 +0000)]
minor cosmetics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107148 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe t2MOVi16 and t2MOVTi16 instructions do not set CPSR. Trying to add
Bob Wilson [Tue, 29 Jun 2010 16:25:11 +0000 (16:25 +0000)]
The t2MOVi16 and t2MOVTi16 instructions do not set CPSR.  Trying to add
a CPSR operand to them causes an assertion failure, so apparently these
instructions haven't been getting a lot of use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107147 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOffset constant to prepare for operand rotation
Gabor Greif [Tue, 29 Jun 2010 16:21:20 +0000 (16:21 +0000)]
use ArgOffset constant to prepare for operand rotation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107146 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API
Gabor Greif [Tue, 29 Jun 2010 16:17:26 +0000 (16:17 +0000)]
use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107145 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API
Gabor Greif [Tue, 29 Jun 2010 16:01:30 +0000 (16:01 +0000)]
use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107144 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReturn Changed. This required setting Changed if dbg metadata
Duncan Sands [Tue, 29 Jun 2010 14:52:10 +0000 (14:52 +0000)]
Return Changed.  This required setting Changed if dbg metadata
is stripped off.  Currently set unconditionally, since the API
does not provide a way of working out if anything was actually
stripped off.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107142 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIt seems clear that this should return Changed.
Duncan Sands [Tue, 29 Jun 2010 14:49:35 +0000 (14:49 +0000)]
It seems clear that this should return Changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107141 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a VT argument to getMinimalPhysRegClass and replace the copy related uses
Rafael Espindola [Tue, 29 Jun 2010 14:02:34 +0000 (14:02 +0000)]
Add a VT argument to getMinimalPhysRegClass and replace the copy related uses
of getPhysicalRegisterRegClass with it.

If we want to make a copy (or estimate its cost), it is better to use the
smallest class as more efficient operations might be possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107140 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agogetMachineBasicBlockAddress returns a uintptr_t - don't truncate
Duncan Sands [Tue, 29 Jun 2010 13:34:20 +0000 (13:34 +0000)]
getMachineBasicBlockAddress returns a uintptr_t - don't truncate
to unsigned only to extend back to a pointer sized value on the
next line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107139 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe variable ValueSize is set to 1 on both code paths, and then
Duncan Sands [Tue, 29 Jun 2010 13:30:08 +0000 (13:30 +0000)]
The variable ValueSize is set to 1 on both code paths, and then
ignored!  Remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107138 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe variable "Value" is carefully set to Layout.getSymbolAddress,
Duncan Sands [Tue, 29 Jun 2010 13:26:33 +0000 (13:26 +0000)]
The variable "Value" is carefully set to Layout.getSymbolAddress,
but then not actually used - maybe a bug?  Remove the variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107137 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused calls to Lexer.getLoc and the pointless variable HasFillExpr.
Duncan Sands [Tue, 29 Jun 2010 13:24:40 +0000 (13:24 +0000)]
Remove unused calls to Lexer.getLoc and the pointless variable HasFillExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107136 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove pointless variable LastDef.
Duncan Sands [Tue, 29 Jun 2010 13:23:22 +0000 (13:23 +0000)]
Remove pointless variable LastDef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107135 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLooks like this test is missing an XFAIL line.
Duncan Sands [Tue, 29 Jun 2010 13:18:50 +0000 (13:18 +0000)]
Looks like this test is missing an XFAIL line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107134 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused variable Loc and pointless variables unified_syntax
Duncan Sands [Tue, 29 Jun 2010 13:04:35 +0000 (13:04 +0000)]
Remove unused variable Loc and pointless variables unified_syntax
and thumb_mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107133 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand APIs
Gabor Greif [Tue, 29 Jun 2010 13:03:46 +0000 (13:03 +0000)]
use ArgOperand APIs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107132 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove an unused and a pointless variable.
Duncan Sands [Tue, 29 Jun 2010 13:00:29 +0000 (13:00 +0000)]
Remove an unused and a pointless variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107131 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove pointless and unused variables.
Duncan Sands [Tue, 29 Jun 2010 12:48:49 +0000 (12:48 +0000)]
Remove pointless and unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107130 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoencode operand initializations (at fixed index)
Gabor Greif [Tue, 29 Jun 2010 11:41:38 +0000 (11:41 +0000)]
encode operand initializations (at fixed index)
in terms of Op<> and ArgOffset. This works for
values of {0, 1} for ArgOffset.
Please note that ArgOffset will become 0 soon and
will go away eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107129 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a pointless variable.
Duncan Sands [Tue, 29 Jun 2010 11:39:45 +0000 (11:39 +0000)]
Remove a pointless variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107128 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove initialized but otherwise unused variables.
Duncan Sands [Tue, 29 Jun 2010 11:22:26 +0000 (11:22 +0000)]
Remove initialized but otherwise unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107127 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove variables that are written by not read.
Duncan Sands [Tue, 29 Jun 2010 11:07:47 +0000 (11:07 +0000)]
Remove variables that are written by not read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107126 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse a more obvious way to avoid compiling functions which are only used when XDEBUG...
Benjamin Kramer [Tue, 29 Jun 2010 10:03:11 +0000 (10:03 +0000)]
Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107125 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoJump through some silly hoops to make GCC accept that a function may not always
Chandler Carruth [Tue, 29 Jun 2010 06:46:00 +0000 (06:46 +0000)]
Jump through some silly hoops to make GCC accept that a function may not always
be called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107124 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPR7503: uxtb16 is not available for ARMv7-M. Patch by Brian G. Lucas.
Evan Cheng [Tue, 29 Jun 2010 05:38:36 +0000 (05:38 +0000)]
PR7503: uxtb16 is not available for ARMv7-M. Patch by Brian G. Lucas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107122 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange if-cvt options to something that actually as useable.
Evan Cheng [Tue, 29 Jun 2010 05:37:59 +0000 (05:37 +0000)]
Change if-cvt options to something that actually as useable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107121 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen processing loops for scheduling latencies (used for live outs on loop
Jim Grosbach [Tue, 29 Jun 2010 04:48:13 +0000 (04:48 +0000)]
When processing loops for scheduling latencies (used for live outs on loop
back-edges), make sure not to include dbg_value instructions in the count.
Closing in on the end of rdar://7797940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107119 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoJust as its not safe to blindly transfer the nsw bit from an add
Dan Gohman [Tue, 29 Jun 2010 01:41:41 +0000 (01:41 +0000)]
Just as its not safe to blindly transfer the nsw bit from an add
instruction to an add scev, it's not safe to blindly transfer the
inbounds flag from a gep instruction to an nsw on the scev for the
gep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107117 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactoring of arithmetic instruction classes with unary operator
Bruno Cardoso Lopes [Tue, 29 Jun 2010 01:33:09 +0000 (01:33 +0000)]
Refactoring of arithmetic instruction classes with unary operator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107116 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen no memoperands are present, assume unaligned, volatile.
Jakob Stoklund Olesen [Tue, 29 Jun 2010 01:13:07 +0000 (01:13 +0000)]
When no memoperands are present, assume unaligned, volatile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107114 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStrip resulting binaries.
Bill Wendling [Tue, 29 Jun 2010 01:08:57 +0000 (01:08 +0000)]
Strip resulting binaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107112 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReapply my if-conversion cleanup from svn r106939 with fixes.
Bob Wilson [Tue, 29 Jun 2010 00:55:23 +0000 (00:55 +0000)]
Reapply my if-conversion cleanup from svn r106939 with fixes.
There are 2 changes relative to the previous version of the patch:

1) For the "simple" if-conversion case, there's no need to worry about
RemoveExtraEdges not handling an unanalyzable branch.  Predicated terminators
are ignored in this context, so RemoveExtraEdges does the right thing.
This might break someday if we ever treat indirect branches (BRIND) as
predicable, but for now, I just removed this part of the patch, because
in the case where we do not add an unconditional branch, we rely on keeping
the fall-through edge to CvtBBI (which is empty after this transformation).

The change relative to the previous patch is:

@@ -1036,10 +1036,6 @@
     IterIfcvt = false;
   }

-  // RemoveExtraEdges won't work if the block has an unanalyzable branch,
-  // which is typically the case for IfConvertSimple, so explicitly remove
-  // CvtBBI as a successor.
-  BBI.BB->removeSuccessor(CvtBBI->BB);
   RemoveExtraEdges(BBI);

   // Update block info. BB can be iteratively if-converted.

2) My patch exposed a bug in the code for merging the tail of a "diamond",
which had previously never been exercised.  The code was simply checking that
the tail had a single predecessor, but there was a case in
MultiSource/Benchmarks/VersaBench/dbms where that single predecessor was
neither edge of the diamond.  I added the following change to check for
that:

@@ -1276,7 +1276,18 @@
   // tail, add a unconditional branch to it.
   if (TailBB) {
     BBInfo TailBBI = BBAnalysis[TailBB->getNumber()];
-    if (TailBB->pred_size() == 1 && !TailBBI.HasFallThrough) {
+    bool CanMergeTail = !TailBBI.HasFallThrough;
+    // There may still be a fall-through edge from BBI1 or BBI2 to TailBB;
+    // check if there are any other predecessors besides those.
+    unsigned NumPreds = TailBB->pred_size();
+    if (NumPreds > 1)
+      CanMergeTail = false;
+    else if (NumPreds == 1 && CanMergeTail) {
+      MachineBasicBlock::pred_iterator PI = TailBB->pred_begin();
+      if (*PI != BBI1->BB && *PI != BBI2->BB)
+        CanMergeTail = false;
+    }
+    if (CanMergeTail) {
       MergeBlocks(BBI, TailBBI);
       TailBBI.IsDone = true;
     } else {

With these fixes, I was able to run all the SingleSource and MultiSource
tests successfully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107110 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an Intraprocedural form of BasicAliasAnalysis, which aims to
Dan Gohman [Tue, 29 Jun 2010 00:50:39 +0000 (00:50 +0000)]
Add an Intraprocedural form of BasicAliasAnalysis, which aims to
properly handles instructions and arguments defined in different
functions, or across recursive function iterations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107109 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDescribed the missing AVX forms of SSE2 convert instructions
Bruno Cardoso Lopes [Tue, 29 Jun 2010 00:36:02 +0000 (00:36 +0000)]
Described the missing AVX forms of SSE2 convert instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107108 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix Thumb encoding of VMOV (scalar to ARM core register). The encoding is
Bob Wilson [Tue, 29 Jun 2010 00:26:13 +0000 (00:26 +0000)]
Fix Thumb encoding of VMOV (scalar to ARM core register).  The encoding is
the same as ARM except that the condition code field is always set to ARMCC::AL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107107 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe comment string does not match for all targets. PowerPC uses ;.
Devang Patel [Tue, 29 Jun 2010 00:04:40 +0000 (00:04 +0000)]
The comment string does not match for all targets. PowerPC uses ;.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107103 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUnlike other targets, ARM now uses BUILD_VECTORs post-legalization so they
Bob Wilson [Mon, 28 Jun 2010 23:40:25 +0000 (23:40 +0000)]
Unlike other targets, ARM now uses BUILD_VECTORs post-legalization so they
can't be changed arbitrarily by the DAGCombiner without checking if it is
running after legalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107097 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefix XTARGET. Previous attempt matches on powerpc-apple-darwin,
Dale Johannesen [Mon, 28 Jun 2010 22:45:33 +0000 (22:45 +0000)]
Refix XTARGET.  Previous attempt matches on powerpc-apple-darwin,
although I don't see why.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107090 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAttempt to fix XTARGET.
Dale Johannesen [Mon, 28 Jun 2010 22:31:52 +0000 (22:31 +0000)]
Attempt to fix XTARGET.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107088 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake the ARMCodeEmitter identify Thumb functions via ARMFunctionInfo instead
Bob Wilson [Mon, 28 Jun 2010 22:23:17 +0000 (22:23 +0000)]
Make the ARMCodeEmitter identify Thumb functions via ARMFunctionInfo instead
of the Subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107086 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse DW_FORM_addr for DW_AT_entry_pc.
Devang Patel [Mon, 28 Jun 2010 22:22:47 +0000 (22:22 +0000)]
Use DW_FORM_addr for DW_AT_entry_pc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107085 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a blurb about -scev-aa.
Dan Gohman [Mon, 28 Jun 2010 22:09:52 +0000 (22:09 +0000)]
Add a blurb about -scev-aa.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107080 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIn asm's, output operands with matching input constraints
Dale Johannesen [Mon, 28 Jun 2010 22:09:45 +0000 (22:09 +0000)]
In asm's, output operands with matching input constraints
have to be registers, per gcc documentation.  This affects
the logic for determining what "g" should lower to.  PR 7393.
A couple of existing testcases are affected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107079 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded the darwin .secure_log_unique and .secure_log_reset directives.
Kevin Enderby [Mon, 28 Jun 2010 21:45:58 +0000 (21:45 +0000)]
Added the darwin .secure_log_unique and .secure_log_reset directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107077 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConstant fold x == undef to undef.
Dan Gohman [Mon, 28 Jun 2010 21:30:07 +0000 (21:30 +0000)]
Constant fold x == undef to undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107074 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up style. no functional change.
Jim Grosbach [Mon, 28 Jun 2010 21:29:17 +0000 (21:29 +0000)]
tidy up style. no functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107073 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix Value::stripPointerCasts and BasicAA to avoid trouble on
Dan Gohman [Mon, 28 Jun 2010 21:16:52 +0000 (21:16 +0000)]
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107071 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor encoding function for NEON 1-register with modified immediate format.
Bob Wilson [Mon, 28 Jun 2010 21:16:30 +0000 (21:16 +0000)]
Refactor encoding function for NEON 1-register with modified immediate format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107070 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport Thumb mode encoding of NEON instructions.
Bob Wilson [Mon, 28 Jun 2010 21:12:19 +0000 (21:12 +0000)]
Support Thumb mode encoding of NEON instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107068 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReduce indentation via early exit. NFC.
Bill Wendling [Mon, 28 Jun 2010 21:08:32 +0000 (21:08 +0000)]
Reduce indentation via early exit. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107067 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInclude inlined function in list of processed subprograms.
Devang Patel [Mon, 28 Jun 2010 20:53:04 +0000 (20:53 +0000)]
Include inlined function in list of processed subprograms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107065 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonew, no longer brain-dead, r106907
Jim Grosbach [Mon, 28 Jun 2010 20:26:00 +0000 (20:26 +0000)]
new, no longer brain-dead, r106907

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107060 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove this weak test.
Devang Patel [Mon, 28 Jun 2010 20:24:35 +0000 (20:24 +0000)]
Remove this weak test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107059 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTestcase for llvm-gcc fix 107051.
Dale Johannesen [Mon, 28 Jun 2010 20:07:30 +0000 (20:07 +0000)]
Testcase for llvm-gcc fix 107051.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107052 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't write temporary files in test directory
Jakob Stoklund Olesen [Mon, 28 Jun 2010 20:01:15 +0000 (20:01 +0000)]
Don't write temporary files in test directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107049 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAfter physreg coalescing, physical registers might not have live ranges where
Jakob Stoklund Olesen [Mon, 28 Jun 2010 19:39:57 +0000 (19:39 +0000)]
After physreg coalescing, physical registers might not have live ranges where
you would expect.

Don't assert on that case, just give up.

This fixes PR7513.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107046 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a triple so test runs on Linux as well.
Jakob Stoklund Olesen [Mon, 28 Jun 2010 19:31:15 +0000 (19:31 +0000)]
Add a triple so test runs on Linux as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107045 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd more special treatment for inline asm in RegAllocFast.
Jakob Stoklund Olesen [Mon, 28 Jun 2010 18:34:34 +0000 (18:34 +0000)]
Add more special treatment for inline asm in RegAllocFast.

When an instruction has tied operands and physreg defines, we must take extra
care that the tied operands conflict with neither physreg defs nor uses.

The special treatment is given to inline asm and instructions with tied operands
/ early clobbers and physreg defines.

This fixes PR7509.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107043 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix thinko.
Eric Christopher [Mon, 28 Jun 2010 18:33:48 +0000 (18:33 +0000)]
Fix thinko.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107042 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPull in the libCrashReporterClient.a information with a warning comment.
Eric Christopher [Mon, 28 Jun 2010 18:25:51 +0000 (18:25 +0000)]
Pull in the libCrashReporterClient.a information with a warning comment.

Remove library check and regenerate configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107028 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPreserve deleted function's local variables' debug info.
Devang Patel [Mon, 28 Jun 2010 18:25:03 +0000 (18:25 +0000)]
Preserve deleted function's local variables' debug info.
Radar 8122864.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107027 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake this test darwin specific.
Devang Patel [Mon, 28 Jun 2010 18:04:03 +0000 (18:04 +0000)]
Make this test darwin specific.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107025 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API
Gabor Greif [Mon, 28 Jun 2010 16:50:57 +0000 (16:50 +0000)]
use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107017 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API
Gabor Greif [Mon, 28 Jun 2010 16:45:00 +0000 (16:45 +0000)]
use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107016 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoemploy CallInst::ArgOffset (for now)
Gabor Greif [Mon, 28 Jun 2010 16:43:57 +0000 (16:43 +0000)]
employ CallInst::ArgOffset (for now)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107015 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosimplify: we have solid argument iterator range
Gabor Greif [Mon, 28 Jun 2010 16:40:52 +0000 (16:40 +0000)]
simplify: we have solid argument iterator range

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107014 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGeneralize AAEval so that it can be used both per-function and
Dan Gohman [Mon, 28 Jun 2010 16:01:37 +0000 (16:01 +0000)]
Generalize AAEval so that it can be used both per-function and
interprocedurally. Note that as of this writing, existing alias
analysis passes are not prepared to be used interprocedurally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107013 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix this build message so that it displays the correct library
Dan Gohman [Mon, 28 Jun 2010 15:55:15 +0000 (15:55 +0000)]
Fix this build message so that it displays the correct library
name, specifically the "lib" prefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107011 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r106907, "make sure to handle dbg_value instructions in the middle of the
Daniel Dunbar [Mon, 28 Jun 2010 15:47:17 +0000 (15:47 +0000)]
Revert r106907, "make sure to handle dbg_value instructions in the middle of the
block, not...", it caused a bunch of nightly test regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107009 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse setArgOperand
Gabor Greif [Mon, 28 Jun 2010 12:31:35 +0000 (12:31 +0000)]
use setArgOperand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107004 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse CallInst::ArgOffset
Gabor Greif [Mon, 28 Jun 2010 12:30:07 +0000 (12:30 +0000)]
use CallInst::ArgOffset

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107003 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API and CallInst::ArgOffset
Gabor Greif [Mon, 28 Jun 2010 12:29:20 +0000 (12:29 +0000)]
use ArgOperand API and CallInst::ArgOffset

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107002 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoextend ArgOperand interface: setArgOperand
Gabor Greif [Mon, 28 Jun 2010 12:23:36 +0000 (12:23 +0000)]
extend ArgOperand interface: setArgOperand
(in both CallInst and InvokeInst)

also add a (short-lived) constant to CallInst, that names
the operand index of the first call argument. This is
strictly transitional and should not be used for new code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107001 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse cached value
Gabor Greif [Mon, 28 Jun 2010 11:20:42 +0000 (11:20 +0000)]
use cached value

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107000 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead code.
Devang Patel [Mon, 28 Jun 2010 05:59:13 +0000 (05:59 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106990 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit...
Devang Patel [Mon, 28 Jun 2010 05:53:08 +0000 (05:53 +0000)]
Use named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit  local variable's debug info of deleted functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106989 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agominor housekeeping cleanup: 80-column, trailing whitespace, spelling, etc.. No functi...
Jim Grosbach [Mon, 28 Jun 2010 04:27:01 +0000 (04:27 +0000)]
minor housekeeping cleanup: 80-column, trailing whitespace, spelling, etc.. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106988 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDo not forget last element, function, while creating Subprogram definition MDNode...
Devang Patel [Sun, 27 Jun 2010 21:04:31 +0000 (21:04 +0000)]
Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106985 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agominor cleanup to SROA: when lowering type unsafe accesses to
Chris Lattner [Sun, 27 Jun 2010 07:58:26 +0000 (07:58 +0000)]
minor cleanup to SROA: when lowering type unsafe accesses to
large integers, the first inserted value would always create
an 'or X, 0'.  Even though this is trivially zapped by
instcombine, don't bother creating this pointless instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106979 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some named accessors for StoreInst
Chris Lattner [Sat, 26 Jun 2010 23:26:37 +0000 (23:26 +0000)]
add some named accessors for StoreInst

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106969 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofit in 80 cols
Chris Lattner [Sat, 26 Jun 2010 23:26:22 +0000 (23:26 +0000)]
fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106968 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agothis test is failing nondeterministically and blaming me, just disable
Chris Lattner [Sat, 26 Jun 2010 22:08:30 +0000 (22:08 +0000)]
this test is failing nondeterministically and blaming me, just disable
it for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106960 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix test weirdness.
Benjamin Kramer [Sat, 26 Jun 2010 22:06:50 +0000 (22:06 +0000)]
Fix test weirdness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106959 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix some tests that didn't test anything.
Benjamin Kramer [Sat, 26 Jun 2010 20:05:06 +0000 (20:05 +0000)]
Fix some tests that didn't test anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106954 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPartial specialization test should not depend on the order of specialization operatio...
Kenneth Uildriks [Sat, 26 Jun 2010 18:47:40 +0000 (18:47 +0000)]
Partial specialization test should not depend on the order of specialization operations or the names assigned to the specialized functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106953 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen splitting a VAARG, remember its alignment.
Rafael Espindola [Sat, 26 Jun 2010 18:22:20 +0000 (18:22 +0000)]
When splitting a VAARG, remember its alignment.
This produces terrible but correct code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106952 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert my if-conversion cleanup since it caused a bunch of nightly test
Bob Wilson [Sat, 26 Jun 2010 17:47:06 +0000 (17:47 +0000)]
Revert my if-conversion cleanup since it caused a bunch of nightly test
regressions.

--- Reverse-merging r106939 into '.':
U    test/CodeGen/Thumb2/thumb2-ifcvt3.ll
U    lib/CodeGen/IfConversion.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106951 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR7328: when turning a tail recursion into a loop, need to preserve
Duncan Sands [Sat, 26 Jun 2010 12:53:31 +0000 (12:53 +0000)]
Fix PR7328: when turning a tail recursion into a loop, need to preserve
the returned value after the tail call if it differs from other return
values.  The optimal thing to do would be to introduce a phi node for
the return value, but for the moment just fix the miscompile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106947 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API
Gabor Greif [Sat, 26 Jun 2010 12:17:21 +0000 (12:17 +0000)]
use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106946 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse ArgOperand API
Gabor Greif [Sat, 26 Jun 2010 12:09:10 +0000 (12:09 +0000)]
use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106945 91177308-0d34-0410-b5e6-96231b3b80d8