Dan Gohman [Wed, 30 Jun 2010 06:12:16 +0000 (06:12 +0000)]
Rework scev-aa's basic computation so that it doesn't depend
on ScalarEvolution successfully folding and preserving
range information for both A-B and B-A. Now, if it gets
either one, it's sufficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107249
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 30 Jun 2010 06:09:46 +0000 (06:09 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107248
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 04:06:39 +0000 (04:06 +0000)]
Add AVX SSE2 integer unpack instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107246
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 03:47:56 +0000 (03:47 +0000)]
Add AVX SSE2 packed integer shuffle instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107245
91177308-0d34-0410-b5e6-
96231b3b80d8
John Mosby [Wed, 30 Jun 2010 03:40:54 +0000 (03:40 +0000)]
Remove trailing whitespace, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107244
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 03:29:36 +0000 (03:29 +0000)]
Small refactoring of SSE2 packed integer shuffle instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107243
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 02:30:25 +0000 (02:30 +0000)]
Add AVX SSE2 pack with saturation integer instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107241
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 02:21:09 +0000 (02:21 +0000)]
Add AVX SSE2 integer packed compare instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107240
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 01:58:37 +0000 (01:58 +0000)]
- Add AVX form of all SSE2 logical instructions
- Add VEX encoding bits to x86 MRM0r-MRM7r
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107238
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 30 Jun 2010 01:40:11 +0000 (01:40 +0000)]
Do not construct DIE for already processed MDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107237
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Jun 2010 00:30:36 +0000 (00:30 +0000)]
Use skipInstruction() as a simpler way of iterating over instructions using SrcReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107234
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Jun 2010 00:24:51 +0000 (00:24 +0000)]
Use clEnumValN macro to work around keyword clash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107233
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 30 Jun 2010 00:11:08 +0000 (00:11 +0000)]
Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107228
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 29 Jun 2010 23:58:39 +0000 (23:58 +0000)]
Begin implementation of an inline spiller.
InlineSpiller inserts loads and spills immediately instead of deferring to
VirtRegMap. This is possible now because SlotIndexes allows instructions to be
inserted and renumbered.
This is work in progress, and is mostly a copy of TrivialSpiller so far. It
works very well for functions that don't require spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107227
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 29 Jun 2010 23:47:49 +0000 (23:47 +0000)]
Add *several* AVX integer packed binop instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107225
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jun 2010 23:43:06 +0000 (23:43 +0000)]
Fix ScalarEvolution's tripcount computation for chains of loops
where each loop's induction variable's start value is the exit
value of a preceding loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107224
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 29 Jun 2010 22:34:52 +0000 (22:34 +0000)]
Revert r107205 and r107207.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Jun 2010 22:29:15 +0000 (22:29 +0000)]
Print InlinedAt location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107214
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 29 Jun 2010 22:22:22 +0000 (22:22 +0000)]
Add another bswap idiom that isn't matched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107213
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 29 Jun 2010 22:17:37 +0000 (22:17 +0000)]
Use -l option to remove symbols from i386.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107212
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 29 Jun 2010 22:12:16 +0000 (22:12 +0000)]
Move SSE2 Packed Integer instructions around, and create specific sections for each of them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107211
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Jun 2010 21:51:32 +0000 (21:51 +0000)]
Print InlinedAt location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107208
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 29 Jun 2010 21:41:58 +0000 (21:41 +0000)]
Improve explanation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107207
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 29 Jun 2010 21:25:12 +0000 (21:25 +0000)]
Add AVX Move Aligned/Unaligned packed integers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107206
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 29 Jun 2010 21:24:00 +0000 (21:24 +0000)]
Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 29 Jun 2010 20:35:48 +0000 (20:35 +0000)]
Add AVX ld/st XCSR register.
Add VEX encoding bits for MRMXm x86 form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107204
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Jun 2010 20:17:53 +0000 (20:17 +0000)]
Do not hardcode DW_AT_stmt_list value.
Inspired by Artur Pietrek.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107202
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 29 Jun 2010 20:13:29 +0000 (20:13 +0000)]
Add support for encoding VDUP (ARM core register) instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107201
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 29 Jun 2010 20:12:02 +0000 (20:12 +0000)]
Fix a buffer overflow noticed by gcc-4.6: zero is written into
SmallArray[SmallSize] in the SmallPtrSetIteratorImpl, and this is
one off the end of the array. For those who care, right now gcc
warns about writing off the end because it is confused about the
declaration of SmallArray as having length 1 in the parent class
SmallPtrSetIteratorImpl. However if you tweak code to unconfuse
it, then it still warns about writing off the end of the array,
because of this buffer overflow. In short, even with this fix
gcc-4.6 will warn about writing off the end of the array, but now
that is only because it is confused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107200
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 29 Jun 2010 20:05:34 +0000 (20:05 +0000)]
NextPowerOfTwo was already used to ensure that SmallSizePowTwo is a power
of two, no need to do it a second time (NextPowerOfTwo is idempotent).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107199
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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