OSDN Git Service
Bruno Cardoso Lopes [Wed, 30 Jun 2010 18:49:10 +0000 (18:49 +0000)]
Move MOVD/MODQ code around, creating sections for each of them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107308
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Jun 2010 18:41:20 +0000 (18:41 +0000)]
Some fool committed without testing (or even building) first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107307
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 18:38:10 +0000 (18:38 +0000)]
Add AVX SSE2 mask creation and conditional store instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107306
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 30 Jun 2010 18:19:08 +0000 (18:19 +0000)]
Remember to track spill slot uses in VirtRegMap when inserting loads and stores.
LocalRewriter::runOnMachineFunction uses this information to mark dead spill
slots.
This means that InlineSpiller now also works for functions that spill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107302
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 18:06:01 +0000 (18:06 +0000)]
Fix a bug introduced in r107211 where instructions with memory operands are declared as commutable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107300
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 30 Jun 2010 17:27:11 +0000 (17:27 +0000)]
Revert the part of r107257 which introduced new logic for using
nsw and nuw flags from IR Instructions. On further consideration,
this isn't valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107298
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 30 Jun 2010 17:24:28 +0000 (17:24 +0000)]
Rename NextPowerOfTwo to RoundUpToPowerOfTwo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107297
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 30 Jun 2010 17:22:28 +0000 (17:22 +0000)]
Remove an unused variable. The call to getRoot has side-effects, so
this could break something (but doesn't seem to).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107295
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Wed, 30 Jun 2010 17:03:03 +0000 (17:03 +0000)]
Add AVX SSE2 packed integer extract/insert instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107293
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 30 Jun 2010 15:29:46 +0000 (15:29 +0000)]
Clarify that the NextPowerOfTwo template is idempotent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107286
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 30 Jun 2010 15:02:37 +0000 (15:02 +0000)]
Rather than giving SmallPtrSetImpl a member field SmallArray which is magically
replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a
pointer to the start of the storage, and have SmallPtrSet pass in the value to use.
This has the disadvantage that SmallPtrSet becomes bigger by one pointer. It has
the advantage that it no longer uses tricky C++ rules, and is clearly correct while
I'm not sure the previous version was. This was inspired by g++-4.6 pointing out
that SmallPtrSetImpl was writing off the end of SmallArray, which it was. Since
SmallArray is replaced with a bigger array in SmallPtrSet, the write was still to
valid memory. But it was writing off the end of the declared array type - sounds
kind of dubious to me, like it sounded dubious to g++-4.6. Maybe g++-4.6 is wrong
and this construct is perfectly valid and correctly compiled by all compilers, but
I think it is better to avoid the whole can of worms by avoiding this construct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107285
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 13:45:50 +0000 (13:45 +0000)]
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107282
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 13:03:37 +0000 (13:03 +0000)]
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107280
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 12:55:46 +0000 (12:55 +0000)]
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107279
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 12:42:43 +0000 (12:42 +0000)]
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107278
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 12:40:35 +0000 (12:40 +0000)]
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107277
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 12:39:23 +0000 (12:39 +0000)]
use CallSite::arg_end instead of CallInst::op_end
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107276
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 12:38:26 +0000 (12:38 +0000)]
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107275
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 09:19:23 +0000 (09:19 +0000)]
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107273
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 09:17:53 +0000 (09:17 +0000)]
use getNumArgOperands instead of getNumOperands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107272
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 09:16:16 +0000 (09:16 +0000)]
use getArgOperand instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107271
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 09:15:28 +0000 (09:15 +0000)]
use getArgOperand instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107270
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 30 Jun 2010 09:14:26 +0000 (09:14 +0000)]
use getArgOperand instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107269
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 30 Jun 2010 07:17:47 +0000 (07:17 +0000)]
Add a testcase for scev-aa's new capability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107258
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 30 Jun 2010 07:16:37 +0000 (07:16 +0000)]
Improve ScalarEvolution's nsw and nuw preservation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107257
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 30 Jun 2010 06:58:35 +0000 (06:58 +0000)]
When computing a new ConservativeResult, intersect it with
the old one instead of replacing it, to be more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107256
91177308-0d34-0410-b5e6-
96231b3b80d8
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