Dan Gohman
9576645a84
Don't use operator[] here, because it's not desirable to insert a default
...
value if the search fails.
llvm-svn: 107368
2010-07-01 01:33:21 +00:00
Bruno Cardoso Lopes
05166740eb
- Add AVX SSE2 Move doubleword and quadword instructions.
...
- Add encode bits for VEX_W
- All 128-bit SSE 1 & SSE2 instructions that are described
in the .td file now have a AVX encoded form already working.
llvm-svn: 107365
2010-07-01 01:20:06 +00:00
Mikhail Glushenkov
0354891d98
Test for the -filelist fix.
...
llvm-svn: 107363
2010-07-01 01:00:37 +00:00
Mikhail Glushenkov
ed6aea770d
Make -filelist work with -linker=c++.
...
llvm-svn: 107362
2010-07-01 01:00:32 +00:00
Mikhail Glushenkov
22fa66cf2b
80-col violation.
...
llvm-svn: 107361
2010-07-01 01:00:27 +00:00
Mikhail Glushenkov
4721ad855e
Trailing whitespace.
...
llvm-svn: 107360
2010-07-01 01:00:22 +00:00
Jakob Stoklund Olesen
8656a4549a
Add memory operand folding support to InlineSpiller.
...
llvm-svn: 107355
2010-07-01 00:13:04 +00:00
Jakob Stoklund Olesen
bde96ad23e
Add support for rematerialization to InlineSpiller.
...
llvm-svn: 107351
2010-06-30 23:03:52 +00:00
Bill Wendling
e0dfb98ea0
Use the catch-all selectors we already found when converting them to use the
...
correct catch-all value. This saves having to iterate through all of the
selectors in the program again.
llvm-svn: 107345
2010-06-30 22:49:53 +00:00
Jim Grosbach
e74c78d539
lowerinvoke needs to handle aggregate function args like sjlj eh does.
...
llvm-svn: 107335
2010-06-30 22:22:59 +00:00
Daniel Dunbar
4d92b64b8d
build: Update install-clang target.
...
llvm-svn: 107334
2010-06-30 22:22:46 +00:00
Jim Grosbach
e8c97a7cd7
Handle array and vector typed parameters in sjljehprepare like we do
...
structs. rdar://8145832
llvm-svn: 107332
2010-06-30 22:20:38 +00:00
Devang Patel
db735cbbab
Remove all debug info related named mdnodes.
...
llvm-svn: 107323
2010-06-30 21:29:00 +00:00
Jim Grosbach
caf9b3ab7d
grammar tweak in comment.
...
llvm-svn: 107321
2010-06-30 21:27:56 +00:00
Dan Gohman
f638f4ff84
In ScalarEvolution::forgetValue, eliminate any SCEVUnknown
...
entries associated with the value being erased in the
folding set map. These entries used to be harmless, because
a SCEVUnknown doesn't store any information about its Value*,
so having a new Value allocated at the old Value's address
wasn't a problem. But now that ScalarEvolution is storing more
information about values, this is no longer safe.
llvm-svn: 107316
2010-06-30 20:21:12 +00:00
Bruno Cardoso Lopes
d0eacf715f
Move MOVD/MODQ code around, creating sections for each of them
...
llvm-svn: 107308
2010-06-30 18:49:10 +00:00
Jakob Stoklund Olesen
59e1cae377
Some fool committed without testing (or even building) first.
...
llvm-svn: 107307
2010-06-30 18:41:20 +00:00
Bruno Cardoso Lopes
cbcebe2950
Add AVX SSE2 mask creation and conditional store instructions
...
llvm-svn: 107306
2010-06-30 18:38:10 +00:00
Jakob Stoklund Olesen
c39d3497c8
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.
llvm-svn: 107302
2010-06-30 18:19:08 +00:00
Bruno Cardoso Lopes
5c768e4915
Fix a bug introduced in r107211 where instructions with memory operands are declared as commutable
...
llvm-svn: 107300
2010-06-30 18:06:01 +00:00
Dan Gohman
c0cca7fdda
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.
llvm-svn: 107298
2010-06-30 17:27:11 +00:00
Duncan Sands
b4591efa93
Rename NextPowerOfTwo to RoundUpToPowerOfTwo.
...
llvm-svn: 107297
2010-06-30 17:24:28 +00:00
Duncan Sands
945a347478
Remove an unused variable. The call to getRoot has side-effects, so
...
this could break something (but doesn't seem to).
llvm-svn: 107295
2010-06-30 17:22:28 +00:00
Bruno Cardoso Lopes
d079c91683
Add AVX SSE2 packed integer extract/insert instructions
...
llvm-svn: 107293
2010-06-30 17:03:03 +00:00
Duncan Sands
7764ae2c98
Clarify that the NextPowerOfTwo template is idempotent.
...
llvm-svn: 107286
2010-06-30 15:29:46 +00:00
Duncan Sands
7b90966d4a
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.
llvm-svn: 107285
2010-06-30 15:02:37 +00:00
Gabor Greif
647d9c9797
use ArgOperand API
...
llvm-svn: 107282
2010-06-30 13:45:50 +00:00
Gabor Greif
12ca3d9fac
use ArgOperand API
...
llvm-svn: 107280
2010-06-30 13:03:37 +00:00
Gabor Greif
f69acfe133
use ArgOperand API
...
llvm-svn: 107279
2010-06-30 12:55:46 +00:00
Gabor Greif
74470192d7
use ArgOperand API
...
llvm-svn: 107278
2010-06-30 12:42:43 +00:00
Gabor Greif
d50572802e
use ArgOperand API
...
llvm-svn: 107277
2010-06-30 12:40:35 +00:00
Gabor Greif
3390e746fa
use CallSite::arg_end instead of CallInst::op_end
...
llvm-svn: 107276
2010-06-30 12:39:23 +00:00
Gabor Greif
3abd881bea
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
...
llvm-svn: 107275
2010-06-30 12:38:26 +00:00
Gabor Greif
743b3fd196
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
...
llvm-svn: 107273
2010-06-30 09:19:23 +00:00
Gabor Greif
f628ecd15f
use getNumArgOperands instead of getNumOperands
...
llvm-svn: 107272
2010-06-30 09:17:53 +00:00
Gabor Greif
fe252e6fa0
use getArgOperand instead of getOperand
...
llvm-svn: 107271
2010-06-30 09:16:16 +00:00
Gabor Greif
8ae3095286
use getArgOperand instead of getOperand
...
llvm-svn: 107270
2010-06-30 09:15:28 +00:00
Gabor Greif
e9acc46f65
use getArgOperand instead of getOperand
...
llvm-svn: 107269
2010-06-30 09:14:26 +00:00
Dan Gohman
725ed0364b
Add a testcase for scev-aa's new capability.
...
llvm-svn: 107258
2010-06-30 07:17:47 +00:00
Dan Gohman
16206132b6
Improve ScalarEvolution's nsw and nuw preservation.
...
llvm-svn: 107257
2010-06-30 07:16:37 +00:00
Dan Gohman
9396b42ca4
When computing a new ConservativeResult, intersect it with
...
the old one instead of replacing it, to be more precise.
llvm-svn: 107256
2010-06-30 06:58:35 +00:00
Dan Gohman
0865966440
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.
llvm-svn: 107249
2010-06-30 06:12:16 +00:00
Dan Gohman
37f145c55b
Simplify.
...
llvm-svn: 107248
2010-06-30 06:09:46 +00:00
Bruno Cardoso Lopes
e82689fea2
Add AVX SSE2 integer unpack instructions
...
llvm-svn: 107246
2010-06-30 04:06:39 +00:00
Bruno Cardoso Lopes
ec0115c9b7
Add AVX SSE2 packed integer shuffle instructions
...
llvm-svn: 107245
2010-06-30 03:47:56 +00:00
John Mosby
5364655e02
Remove trailing whitespace, no functionality changes.
...
llvm-svn: 107244
2010-06-30 03:40:54 +00:00
Bruno Cardoso Lopes
51ceead19c
Small refactoring of SSE2 packed integer shuffle instructions
...
llvm-svn: 107243
2010-06-30 03:29:36 +00:00
Bruno Cardoso Lopes
be792feb8b
Add AVX SSE2 pack with saturation integer instructions
...
llvm-svn: 107241
2010-06-30 02:30:25 +00:00
Bruno Cardoso Lopes
2686ea4555
Add AVX SSE2 integer packed compare instructions
...
llvm-svn: 107240
2010-06-30 02:21:09 +00:00
Bruno Cardoso Lopes
2e2caefff9
- Add AVX form of all SSE2 logical instructions
...
- Add VEX encoding bits to x86 MRM0r-MRM7r
llvm-svn: 107238
2010-06-30 01:58:37 +00:00
Devang Patel
c5b3109bec
Do not construct DIE for already processed MDNode.
...
llvm-svn: 107237
2010-06-30 01:40:11 +00:00
Jakob Stoklund Olesen
b3b89c3bc0
Use skipInstruction() as a simpler way of iterating over instructions using SrcReg
...
llvm-svn: 107234
2010-06-30 00:30:36 +00:00
Jakob Stoklund Olesen
08baf59da1
Use clEnumValN macro to work around keyword clash
...
llvm-svn: 107233
2010-06-30 00:24:51 +00:00
Devang Patel
648df7bf64
Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
...
llvm-svn: 107228
2010-06-30 00:11:08 +00:00
Jakob Stoklund Olesen
f888911932
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.
llvm-svn: 107227
2010-06-29 23:58:39 +00:00
Bruno Cardoso Lopes
3f71ddfaad
Add *several* AVX integer packed binop instructions
...
llvm-svn: 107225
2010-06-29 23:47:49 +00:00
Dan Gohman
ae36b1ed42
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.
llvm-svn: 107224
2010-06-29 23:43:06 +00:00
Bill Wendling
3632171750
Revert r107205 and r107207.
...
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Devang Patel
be30551600
Print InlinedAt location.
...
llvm-svn: 107214
2010-06-29 22:29:15 +00:00
Eric Christopher
e34471bb31
Add another bswap idiom that isn't matched.
...
llvm-svn: 107213
2010-06-29 22:22:22 +00:00
Bill Wendling
7839c493e8
Use -l option to remove symbols from i386.
...
llvm-svn: 107212
2010-06-29 22:17:37 +00:00
Bruno Cardoso Lopes
7fee95a38e
Move SSE2 Packed Integer instructions around, and create specific sections for each of them
...
llvm-svn: 107211
2010-06-29 22:12:16 +00:00
Devang Patel
c728518bfe
Print InlinedAt location.
...
llvm-svn: 107208
2010-06-29 21:51:32 +00:00
Bill Wendling
7d7a50a0ae
Improve explanation.
...
llvm-svn: 107207
2010-06-29 21:41:58 +00:00
Bruno Cardoso Lopes
ba21eb8054
Add AVX Move Aligned/Unaligned packed integers
...
llvm-svn: 107206
2010-06-29 21:25:12 +00:00
Bill Wendling
1767723dbe
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".
llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Bruno Cardoso Lopes
30689a3a7f
Add AVX ld/st XCSR register.
...
Add VEX encoding bits for MRMXm x86 form
llvm-svn: 107204
2010-06-29 20:35:48 +00:00
Devang Patel
24bc1b5b2f
Do not hardcode DW_AT_stmt_list value.
...
Inspired by Artur Pietrek.
llvm-svn: 107202
2010-06-29 20:17:53 +00:00
Bob Wilson
be157b0ea8
Add support for encoding VDUP (ARM core register) instructions.
...
llvm-svn: 107201
2010-06-29 20:13:29 +00:00
Duncan Sands
29933505b6
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.
llvm-svn: 107200
2010-06-29 20:12:02 +00:00
Duncan Sands
585c38e776
NextPowerOfTwo was already used to ensure that SmallSizePowTwo is a power
...
of two, no need to do it a second time (NextPowerOfTwo is idempotent).
llvm-svn: 107199
2010-06-29 20:05:34 +00:00
Chris Lattner
3f617c1125
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.
llvm-svn: 107195
2010-06-29 19:20:38 +00:00
Jakob Stoklund Olesen
dadea5b178
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.
llvm-svn: 107193
2010-06-29 19:15:30 +00:00
Bob Wilson
d91d5bfc95
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.
llvm-svn: 107189
2010-06-29 18:42:49 +00:00
Bruno Cardoso Lopes
a4575f5b31
Add AVX non-temporal stores
...
llvm-svn: 107178
2010-06-29 18:22:01 +00:00
Dan Gohman
9bbd007f15
Add a few more interesting testcases.
...
llvm-svn: 107177
2010-06-29 18:17:11 +00:00
Dan Gohman
1be9e7c0b6
Fix whitespace style.
...
llvm-svn: 107175
2010-06-29 18:12:34 +00:00
Bruno Cardoso Lopes
049f4ffab1
Move non-temporal movs to their own section
...
llvm-svn: 107168
2010-06-29 17:42:37 +00:00
Bob Wilson
ab0819e10d
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.
llvm-svn: 107167
2010-06-29 17:34:07 +00:00
Bruno Cardoso Lopes
21a9433e9e
Add sqrt, rsqrt and rcp AVX instructions
...
llvm-svn: 107166
2010-06-29 17:26:30 +00:00
Jim Grosbach
5bee07ec68
skip dbg_value instructions
...
llvm-svn: 107154
2010-06-29 16:55:24 +00:00
Gabor Greif
e31bba37f3
minor cosmetics
...
llvm-svn: 107148
2010-06-29 16:27:38 +00:00
Bob Wilson
83b993a977
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.
llvm-svn: 107147
2010-06-29 16:25:11 +00:00
Gabor Greif
6964ab16f6
use ArgOffset constant to prepare for operand rotation
...
llvm-svn: 107146
2010-06-29 16:21:20 +00:00
Gabor Greif
eab748d409
use ArgOperand API
...
llvm-svn: 107145
2010-06-29 16:17:26 +00:00
Gabor Greif
a28615ce31
use ArgOperand API
...
llvm-svn: 107144
2010-06-29 16:01:30 +00:00
Duncan Sands
17f1ca8793
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.
llvm-svn: 107142
2010-06-29 14:52:10 +00:00
Duncan Sands
83d1dd637a
It seems clear that this should return Changed.
...
llvm-svn: 107141
2010-06-29 14:49:35 +00:00
Rafael Espindola
38a7d7cbc3
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.
llvm-svn: 107140
2010-06-29 14:02:34 +00:00
Duncan Sands
d34bb4e9b0
getMachineBasicBlockAddress returns a uintptr_t - don't truncate
...
to unsigned only to extend back to a pointer sized value on the
next line.
llvm-svn: 107139
2010-06-29 13:34:20 +00:00
Duncan Sands
a85a90773c
The variable ValueSize is set to 1 on both code paths, and then
...
ignored! Remove it.
llvm-svn: 107138
2010-06-29 13:30:08 +00:00
Duncan Sands
1245e4c07d
The variable "Value" is carefully set to Layout.getSymbolAddress,
...
but then not actually used - maybe a bug? Remove the variable.
llvm-svn: 107137
2010-06-29 13:26:33 +00:00
Duncan Sands
5667a08468
Remove unused calls to Lexer.getLoc and the pointless variable HasFillExpr.
...
llvm-svn: 107136
2010-06-29 13:24:40 +00:00
Duncan Sands
193bb1ee6a
Remove pointless variable LastDef.
...
llvm-svn: 107135
2010-06-29 13:23:22 +00:00
Duncan Sands
dddf876e96
Looks like this test is missing an XFAIL line.
...
llvm-svn: 107134
2010-06-29 13:18:50 +00:00
Duncan Sands
257eba4df7
Remove unused variable Loc and pointless variables unified_syntax
...
and thumb_mode.
llvm-svn: 107133
2010-06-29 13:04:35 +00:00
Gabor Greif
e73d64c2cf
use ArgOperand APIs
...
llvm-svn: 107132
2010-06-29 13:03:46 +00:00
Duncan Sands
78ad27ca2b
Remove an unused and a pointless variable.
...
llvm-svn: 107131
2010-06-29 13:00:29 +00:00
Duncan Sands
67bfa9d109
Remove pointless and unused variables.
...
llvm-svn: 107130
2010-06-29 12:48:49 +00:00
Gabor Greif
eec74583ca
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.
llvm-svn: 107129
2010-06-29 11:41:38 +00:00
Duncan Sands
67aa21d7b5
Remove a pointless variable.
...
llvm-svn: 107128
2010-06-29 11:39:45 +00:00
Duncan Sands
6d28e73acc
Remove initialized but otherwise unused variables.
...
llvm-svn: 107127
2010-06-29 11:22:26 +00:00
Duncan Sands
b69a3e27df
Remove variables that are written by not read.
...
llvm-svn: 107126
2010-06-29 11:07:47 +00:00
Benjamin Kramer
80b7bc042a
Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.
...
llvm-svn: 107125
2010-06-29 10:03:11 +00:00
Chandler Carruth
b1adb88d05
Jump through some silly hoops to make GCC accept that a function may not always
...
be called.
llvm-svn: 107124
2010-06-29 06:46:00 +00:00
Evan Cheng
b59dd8f10a
PR7503: uxtb16 is not available for ARMv7-M. Patch by Brian G. Lucas.
...
llvm-svn: 107122
2010-06-29 05:38:36 +00:00
Evan Cheng
0c30739cbb
Change if-cvt options to something that actually as useable.
...
llvm-svn: 107121
2010-06-29 05:37:59 +00:00
Jim Grosbach
907673c48d
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
llvm-svn: 107119
2010-06-29 04:48:13 +00:00
Dan Gohman
90db61d638
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.
llvm-svn: 107117
2010-06-29 01:41:41 +00:00
Bruno Cardoso Lopes
de736a6494
Refactoring of arithmetic instruction classes with unary operator
...
llvm-svn: 107116
2010-06-29 01:33:09 +00:00
Jakob Stoklund Olesen
c1eccbc468
When no memoperands are present, assume unaligned, volatile.
...
llvm-svn: 107114
2010-06-29 01:13:07 +00:00
Bill Wendling
9a925bec36
Strip resulting binaries.
...
llvm-svn: 107112
2010-06-29 01:08:57 +00:00
Bob Wilson
1e5da550e5
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.
llvm-svn: 107110
2010-06-29 00:55:23 +00:00
Dan Gohman
0824affeff
Add an Intraprocedural form of BasicAliasAnalysis, which aims to
...
properly handles instructions and arguments defined in different
functions, or across recursive function iterations.
llvm-svn: 107109
2010-06-29 00:50:39 +00:00
Bruno Cardoso Lopes
d6a091a4d4
Described the missing AVX forms of SSE2 convert instructions
...
llvm-svn: 107108
2010-06-29 00:36:02 +00:00
Bob Wilson
3d12ff797b
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.
llvm-svn: 107107
2010-06-29 00:26:13 +00:00
Devang Patel
1575e9f5ce
The comment string does not match for all targets. PowerPC uses ;.
...
llvm-svn: 107103
2010-06-29 00:04:40 +00:00
Bob Wilson
269a89fd3a
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.
llvm-svn: 107097
2010-06-28 23:40:25 +00:00
Dale Johannesen
764b056c30
Refix XTARGET. Previous attempt matches on powerpc-apple-darwin,
...
although I don't see why.
llvm-svn: 107090
2010-06-28 22:45:33 +00:00
Dale Johannesen
65cd5ba74d
Attempt to fix XTARGET.
...
llvm-svn: 107088
2010-06-28 22:31:52 +00:00
Bob Wilson
4469a892b4
Make the ARMCodeEmitter identify Thumb functions via ARMFunctionInfo instead
...
of the Subtarget.
llvm-svn: 107086
2010-06-28 22:23:17 +00:00
Devang Patel
1de21ec498
Use DW_FORM_addr for DW_AT_entry_pc.
...
llvm-svn: 107085
2010-06-28 22:22:47 +00:00
Dan Gohman
b160ba46e8
Add a blurb about -scev-aa.
...
llvm-svn: 107080
2010-06-28 22:09:52 +00:00
Dale Johannesen
17feb07c53
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.
llvm-svn: 107079
2010-06-28 22:09:45 +00:00
Kevin Enderby
e233dda2e2
Added the darwin .secure_log_unique and .secure_log_reset directives.
...
llvm-svn: 107077
2010-06-28 21:45:58 +00:00
Dan Gohman
e697a6f24f
Constant fold x == undef to undef.
...
llvm-svn: 107074
2010-06-28 21:30:07 +00:00
Jim Grosbach
f31c004666
tidy up style. no functional change.
...
llvm-svn: 107073
2010-06-28 21:29:17 +00:00
Dan Gohman
7c34ece501
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
...
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.
llvm-svn: 107071
2010-06-28 21:16:52 +00:00
Bob Wilson
544317dfda
Refactor encoding function for NEON 1-register with modified immediate format.
...
llvm-svn: 107070
2010-06-28 21:16:30 +00:00
Bob Wilson
584387d5e3
Support Thumb mode encoding of NEON instructions.
...
llvm-svn: 107068
2010-06-28 21:12:19 +00:00
Bill Wendling
0a5bb081cc
Reduce indentation via early exit. NFC.
...
llvm-svn: 107067
2010-06-28 21:08:32 +00:00
Devang Patel
d10b2af260
Include inlined function in list of processed subprograms.
...
llvm-svn: 107065
2010-06-28 20:53:04 +00:00
Jim Grosbach
ee6e29aa72
new, no longer brain-dead, r106907
...
llvm-svn: 107060
2010-06-28 20:26:00 +00:00
Devang Patel
68c81196f9
Remove this weak test.
...
llvm-svn: 107059
2010-06-28 20:24:35 +00:00
Dale Johannesen
0e4d964bfe
Testcase for llvm-gcc fix 107051.
...
llvm-svn: 107052
2010-06-28 20:07:30 +00:00
Jakob Stoklund Olesen
fde9c348e9
Don't write temporary files in test directory
...
llvm-svn: 107049
2010-06-28 20:01:15 +00:00
Jakob Stoklund Olesen
ffd628ec0a
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.
llvm-svn: 107046
2010-06-28 19:39:57 +00:00
Jakob Stoklund Olesen
0117091c16
Add a triple so test runs on Linux as well.
...
llvm-svn: 107045
2010-06-28 19:31:15 +00:00
Jakob Stoklund Olesen
0d94d7af78
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.
llvm-svn: 107043
2010-06-28 18:34:34 +00:00
Eric Christopher
7f103a2653
Fix thinko.
...
llvm-svn: 107042
2010-06-28 18:33:48 +00:00
Eric Christopher
51f2908328
Pull in the libCrashReporterClient.a information with a warning comment.
...
Remove library check and regenerate configure.
llvm-svn: 107028
2010-06-28 18:25:51 +00:00
Devang Patel
f3b2db68c6
Preserve deleted function's local variables' debug info.
...
Radar 8122864.
llvm-svn: 107027
2010-06-28 18:25:03 +00:00
Devang Patel
6e34f19b17
Make this test darwin specific.
...
llvm-svn: 107025
2010-06-28 18:04:03 +00:00
Gabor Greif
5b1370ee80
use ArgOperand API
...
llvm-svn: 107017
2010-06-28 16:50:57 +00:00
Gabor Greif
e23efeef10
use ArgOperand API
...
llvm-svn: 107016
2010-06-28 16:45:00 +00:00
Gabor Greif
18c5bae727
employ CallInst::ArgOffset (for now)
...
llvm-svn: 107015
2010-06-28 16:43:57 +00:00
Gabor Greif
cd09869dfc
simplify: we have solid argument iterator range
...
llvm-svn: 107014
2010-06-28 16:40:52 +00:00
Dan Gohman
875a296011
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.
llvm-svn: 107013
2010-06-28 16:01:37 +00:00
Dan Gohman
8a62f18091
Fix this build message so that it displays the correct library
...
name, specifically the "lib" prefix.
llvm-svn: 107011
2010-06-28 15:55:15 +00:00
Daniel Dunbar
b8c058cbb0
Revert r106907, "make sure to handle dbg_value instructions in the middle of the
...
block, not...", it caused a bunch of nightly test regressions.
llvm-svn: 107009
2010-06-28 15:47:17 +00:00
Gabor Greif
2dd4307e45
use setArgOperand
...
llvm-svn: 107004
2010-06-28 12:31:35 +00:00
Gabor Greif
ec60adf161
use CallInst::ArgOffset
...
llvm-svn: 107003
2010-06-28 12:30:07 +00:00
Gabor Greif
2de43a7c5c
use ArgOperand API and CallInst::ArgOffset
...
llvm-svn: 107002
2010-06-28 12:29:20 +00:00
Gabor Greif
70a0e4e0a0
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.
llvm-svn: 107001
2010-06-28 12:23:36 +00:00
Gabor Greif
4300fc77ae
use cached value
...
llvm-svn: 107000
2010-06-28 11:20:42 +00:00
Devang Patel
fb6f22f010
Remove dead code.
...
llvm-svn: 106990
2010-06-28 05:59:13 +00:00
Devang Patel
f7869a4b81
Use named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit local variable's debug info of deleted functions.
...
llvm-svn: 106989
2010-06-28 05:53:08 +00:00
Jim Grosbach
7ea5fc0794
minor housekeeping cleanup: 80-column, trailing whitespace, spelling, etc.. No functional change.
...
llvm-svn: 106988
2010-06-28 04:27:01 +00:00
Devang Patel
81170d23de
Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.
...
llvm-svn: 106985
2010-06-27 21:04:31 +00:00
Chris Lattner
25a843fcd2
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.
llvm-svn: 106979
2010-06-27 07:58:26 +00:00
Chris Lattner
0875802d0f
add some named accessors for StoreInst
...
llvm-svn: 106969
2010-06-26 23:26:37 +00:00
Chris Lattner
8e17fa098e
fit in 80 cols
...
llvm-svn: 106968
2010-06-26 23:26:22 +00:00
Chris Lattner
93e63a0218
this test is failing nondeterministically and blaming me, just disable
...
it for now.
llvm-svn: 106960
2010-06-26 22:08:30 +00:00
Benjamin Kramer
c1ecfd86a3
Fix test weirdness.
...
llvm-svn: 106959
2010-06-26 22:06:50 +00:00
Benjamin Kramer
3bbc52ce3e
Fix some tests that didn't test anything.
...
llvm-svn: 106954
2010-06-26 20:05:06 +00:00
Kenneth Uildriks
7228d98b85
Partial specialization test should not depend on the order of specialization operations or the names assigned to the specialized functions
...
llvm-svn: 106953
2010-06-26 18:47:40 +00:00
Rafael Espindola
2041abd958
When splitting a VAARG, remember its alignment.
...
This produces terrible but correct code.
llvm-svn: 106952
2010-06-26 18:22:20 +00:00
Bob Wilson
418e64a385
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
llvm-svn: 106951
2010-06-26 17:47:06 +00:00
Duncan Sands
3a5cb69cb8
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.
llvm-svn: 106947
2010-06-26 12:53:31 +00:00
Gabor Greif
7d4038dd88
use ArgOperand API
...
llvm-svn: 106946
2010-06-26 12:17:21 +00:00
Gabor Greif
c2ac8c4261
use ArgOperand API
...
llvm-svn: 106945
2010-06-26 12:09:10 +00:00
Gabor Greif
83205af3fa
use ArgOperand API
...
llvm-svn: 106944
2010-06-26 11:51:52 +00:00
Benjamin Kramer
a000002428
VNInfos don't need to be destructed anymore.
...
llvm-svn: 106943
2010-06-26 11:30:59 +00:00
Gabor Greif
e9afee2910
resort to ArgOperand API
...
llvm-svn: 106942
2010-06-26 09:35:09 +00:00
Eli Friedman
b9bdc5a52d
Remove bogus test.
...
llvm-svn: 106941
2010-06-26 04:59:56 +00:00
Eli Friedman
8cfa7713e9
Followup to r106770: actually generate SXTB and SXTH for sign-extensions.
...
llvm-svn: 106940
2010-06-26 04:36:50 +00:00
Bob Wilson
c72da6bb56
Clean up some problems with extra CFG edges being introduced during
...
if-conversion. The RemoveExtraEdges function doesn't work for blocks that
end with unanalyzable branches, so in those cases, the "extra" edges must
be explicitly removed. The CopyAndPredicateBlock and MergeBlocks methods
can also avoid copying successor edges due to branches that have already
been removed. The latter case is especially helpful when MergeBlocks is
called for handling "diamond" if-conversions, where otherwise you can end
up with some weird intermediate states in the CFG. Unfortunately I've
been unable to find cases where this cleanup actually makes a significant
difference in the code. There is one test where we manage to remove an
empty block at the end of a function. Radar 6911268.
llvm-svn: 106939
2010-06-26 04:27:33 +00:00
Bob Wilson
0248da9db4
Add support for encoding NEON VMOV (from scalar to core register) instructions.
...
llvm-svn: 106938
2010-06-26 04:07:15 +00:00
Evan Cheng
b71233f34d
It's now possible to run code placement pass for ARM.
...
llvm-svn: 106935
2010-06-26 01:52:05 +00:00
Jakob Stoklund Olesen
d7d0d4e882
When creating X86 MUL8 and DIV8 instructions, make sure we don't produce
...
CopyFromReg nodes for aliasing registers (AX and AL). This confuses the fast
register allocator.
Instead of CopyFromReg(AL), use ExtractSubReg(CopyFromReg(AX), sub_8bit).
This fixes PR7312.
llvm-svn: 106934
2010-06-26 00:39:23 +00:00
Bob Wilson
b4d39841e4
Renumber NEON instruction formats to be consecutive.
...
llvm-svn: 106927
2010-06-26 00:05:09 +00:00
Bob Wilson
cc386fb125
Rename ARM instruction formats NEONGetLnFrm, NEONSetLnFrm and NEONDupFrm to
...
"N..." instead of "NEON..." for consistency with the other NEON format names.
llvm-svn: 106921
2010-06-25 23:56:05 +00:00
Bruno Cardoso Lopes
74d716b9cd
Add AVX convert CVTSS2SI{rr,rm} and CVTDQ2PS{rr,rm} instructions
...
llvm-svn: 106917
2010-06-25 23:47:23 +00:00
Bob Wilson
d66f66a5cf
Remove unused NEONFrm and ThumbMiscFrm ARM instruction formats.
...
Renumber MiscFrm to 25.
llvm-svn: 106916
2010-06-25 23:45:37 +00:00
Bruno Cardoso Lopes
83651094ad
Reapply r106896:
...
Add several AVX MOV flavors
Support VEX encoding for MRMDestReg
llvm-svn: 106912
2010-06-25 23:33:42 +00:00
Daniel Dunbar
acbdf53db4
Thumb2ITBlockPass: Fix a possible dereference of an invalid iterator. This was
...
introduced in r106343, but only showed up recently (with a particular compiler &
linker combination) because of the particular check, and because we have no
builtin checking for dereferencing the end of an array, which is truly
unfortunate.
llvm-svn: 106908
2010-06-25 23:14:54 +00:00
Jim Grosbach
c34befc78f
make sure to handle dbg_value instructions in the middle of the block, not
...
just at the head, when doing diamond if-conversion. rdar://7797940
llvm-svn: 106907
2010-06-25 23:05:46 +00:00
Bruno Cardoso Lopes
4530fed87e
revert this now, it's using avx instead of sse :)
...
llvm-svn: 106906
2010-06-25 23:04:29 +00:00
Jakob Stoklund Olesen
55d738e2e1
Don't track kills in VNInfo. Use interval ends instead.
...
The VNInfo.kills vector was almost unused except for all the code keeping it
updated. The few places using it were easily rewritten to check for interval
ends instead.
The two new methods LiveInterval::killedAt and killedInRange are replacements.
This brings us down to 3 independent data structures tracking kills.
llvm-svn: 106905
2010-06-25 22:53:05 +00:00
Evan Cheng
02b184de5b
Change if-conversion block size limit checks to add some flexibility.
...
llvm-svn: 106901
2010-06-25 22:42:03 +00:00
Bob Wilson
2530ca0647
Add support for encoding 3-register NEON instructions, and fix
...
emitNEON2RegInstruction's handling of 2-address operands.
llvm-svn: 106900
2010-06-25 22:40:46 +00:00
Dan Gohman
fb9712bdae
In GenerateReassociations, don't bother thinking about individual
...
SCEVUnknown values which are loop-variant, as LSR can't do anything
interesting with these values in any case. This fixes very slow compile
times on loops which have large numbers of such values.
llvm-svn: 106897
2010-06-25 22:32:18 +00:00
Bruno Cardoso Lopes
a34d9b6d84
Add several AVX MOV flavors
...
Support VEX encoding for MRMDestReg
llvm-svn: 106896
2010-06-25 22:27:51 +00:00
Devang Patel
5c0f85c7dd
Collect debug info for optimized variables of inlined functions.
...
llvm-svn: 106895
2010-06-25 22:07:34 +00:00
Jim Grosbach
8a6deefec6
80 column and typo fix
...
llvm-svn: 106894
2010-06-25 22:02:28 +00:00
Dale Johannesen
ce97d55ad9
The hasMemory argument is irrelevant to how the argument
...
for an "i" constraint should get lowered; PR 6309. While
this argument was passed around a lot, this is the only
place it was used, so it goes away from a lot of other
places.
llvm-svn: 106893
2010-06-25 21:55:36 +00:00
Bob Wilson
e70c8b150b
Add support for encoding 2-register NEON instructions.
...
llvm-svn: 106891
2010-06-25 21:17:19 +00:00
Dan Gohman
8de1fe3ccf
pcmpeqd and friends are Commutable.
...
llvm-svn: 106886
2010-06-25 21:05:35 +00:00
Jim Grosbach
a1c1db3808
80-column and trailing whitespace cleanup
...
llvm-svn: 106885
2010-06-25 21:02:24 +00:00
Bob Wilson
574f68f815
Fix indentation.
...
llvm-svn: 106881
2010-06-25 20:54:44 +00:00
Bill Wendling
e41e40f689
- Reapply r106066 now that the bzip2 build regression has been fixed.
...
- 2010-06-25-CoalescerSubRegDefDead.ll is the testcase for r106878.
llvm-svn: 106880
2010-06-25 20:48:10 +00:00
Bill Wendling
ef7acd9a24
We should remove the live range from the destination register only if *all* defs
...
are dead, not just the def of this register. I.e., a register could be dead, but
it's subreg isn't.
Testcase to follow with a subsequent patch.
llvm-svn: 106878
2010-06-25 20:42:55 +00:00
Bruno Cardoso Lopes
553fafc6ce
Move the last piece of SSE2 convert instructions to the Convert Instructions section
...
llvm-svn: 106877
2010-06-25 20:29:27 +00:00
Bruno Cardoso Lopes
62d1403a03
More SSE refactoring, this time with different types of MOVs
...
llvm-svn: 106876
2010-06-25 20:22:12 +00:00
Dan Gohman
89dd42af31
Eliminate a redundant FoldingSet lookup.
...
llvm-svn: 106872
2010-06-25 18:47:08 +00:00
Jim Grosbach
ba3ece6f27
IT instructions are considered to be scheduling hazards, but are scheduled
...
with the following instructions. This is done via trickery by considering the
instruction preceding the IT to be the hazard. Care must be taken to ensure
it's the first non-debug instruction, or the presence of debug info will
affect codegen.
Part of the continuing work for rdar://7797940, making ARM code-gen unaffected
by the presence of debug information.
llvm-svn: 106871
2010-06-25 18:43:14 +00:00
Bruno Cardoso Lopes
e76c0b13b9
Refactoring of more SSE conversion instructions. Also add some AVX instrinsics Int_V... placeholders
...
llvm-svn: 106867
2010-06-25 18:06:22 +00:00
Dale Johannesen
2ac3b9cbd4
Cosmetic.
...
llvm-svn: 106865
2010-06-25 17:41:07 +00:00
Devang Patel
27510cc623
XFAIL this test on powerpc for now.
...
llvm-svn: 106862
2010-06-25 17:32:23 +00:00
Daniel Dunbar
1dc887cf3b
Fix LLVM CMake PACKAGE_VERSION variable.
...
llvm-svn: 106861
2010-06-25 16:29:14 +00:00
Benjamin Kramer
58e6c2eded
Rewrite MemoryBuffer::getSTDIN to use read(2) and a SmallVector buffer.
...
llvm-svn: 106856
2010-06-25 16:07:18 +00:00
Duncan Sands
2dc70bea54
Remove variables which are assigned to but for which the value
...
is not used. Spotted by gcc-4.6.
llvm-svn: 106854
2010-06-25 14:48:39 +00:00
Benjamin Kramer
948dd57945
Bring back the empty vector workaround I removed in r106839. Looks like MSVC needs it.
...
llvm-svn: 106841
2010-06-25 12:51:01 +00:00
Benjamin Kramer
ce2a92220f
Tweak MemoryBuffer to allocate the class itself, the name and possibly the
...
buffer in the same chunk of memory.
2 less mallocs for every uninitialized MemoryBuffer and 1 less malloc for every
MemoryBuffer pointing to a memory range translate into 20% less mallocs on
clang -cc1 -Eonly Cocoa_h.m.
llvm-svn: 106839
2010-06-25 11:50:40 +00:00
Gabor Greif
b890fc8023
use ArgOperand accessors
...
and CallInst for getting hold
of the intrinsic's arguments
simplify along the way (at least for me this is much more legible now)
Bill, Baldrick or Anton, please review\!
llvm-svn: 106838
2010-06-25 11:25:30 +00:00
Gabor Greif
7dd3afdff3
use ArgOperand API (the simple part)
...
llvm-svn: 106837
2010-06-25 09:44:37 +00:00
Gabor Greif
eba0be7dc9
use ArgOperand API
...
llvm-svn: 106836
2010-06-25 09:38:13 +00:00
Gabor Greif
41b81ee2fb
use ArgOperand API
...
llvm-svn: 106835
2010-06-25 09:36:23 +00:00
Duncan Sands
cfdaac1cb0
Remove unused variables.
...
llvm-svn: 106834
2010-06-25 09:35:33 +00:00
Gabor Greif
ed9ae7bf21
use ArgOperand API and CallSite to access arguments of CallInst
...
llvm-svn: 106833
2010-06-25 09:03:52 +00:00
Gabor Greif
b5874dea6e
use ArgOperand API and CallSite to access arguments of CallInst
...
llvm-svn: 106829
2010-06-25 08:48:19 +00:00
Gabor Greif
e4eed709d4
use ArgOperand API
...
llvm-svn: 106828
2010-06-25 08:24:59 +00:00
Gabor Greif
f6207e0a80
prune an include
...
llvm-svn: 106827
2010-06-25 08:16:50 +00:00
Gabor Greif
e3ba486c9f
use ArgOperand API (one more hunk I could split)
...
llvm-svn: 106825
2010-06-25 07:58:41 +00:00
Gabor Greif
5f3e656a1b
use ArgOperand API (some hunks I could split)
...
llvm-svn: 106824
2010-06-25 07:57:14 +00:00
Gabor Greif
07e9284c75
use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be able to use isFreeCall whithout a cast or new overload
...
llvm-svn: 106823
2010-06-25 07:40:32 +00:00
Bob Wilson
07aead2f8d
Add missing ARM and Thumb data layout info for vector types.
...
Radar 8128745.
llvm-svn: 106820
2010-06-25 04:41:08 +00:00
Bob Wilson
eadbf9732f
Reduce indentation.
...
llvm-svn: 106819
2010-06-25 04:12:31 +00:00
Dale Johannesen
e9eaaa91d8
Fix a case where an earlyclobber operand of an asm
...
is reused as an input. PR 4118. Testcase is too big,
as usual with bugs in this area, but there's one in
the PR.
llvm-svn: 106816
2010-06-25 00:49:43 +00:00
Bruno Cardoso Lopes
cbdcce6478
Add some AVX convert instructions
...
llvm-svn: 106815
2010-06-25 00:39:30 +00:00
Jakob Stoklund Olesen
889ab7d158
Make sure all eliminated kills are removed from VNInfo lists.
...
This fixes PR7479 and PR7485. The test cases from those PRs are big, so not
included. However, PR7485 comes from self hosting on FreeBSD, so we will surely
hear about any regression.
llvm-svn: 106811
2010-06-24 23:57:35 +00:00
Dan Gohman
600658a4ba
Don't write an output file to cwd, and put an rdar prefix on
...
an rdar number.
llvm-svn: 106810
2010-06-24 23:45:15 +00:00
Dan Gohman
5f0bf64c0c
Add some comments.
...
llvm-svn: 106809
2010-06-24 23:41:59 +00:00
Bruno Cardoso Lopes
447735aa98
Refactoring of SSE convert intrinsics
...
llvm-svn: 106808
2010-06-24 23:37:07 +00:00
Dan Gohman
9a2f0473b2
Teach EmitLiveInCopies to omit copies for unused virtual registers,
...
and to clean up unused incoming physregs from the live-in list.
llvm-svn: 106805
2010-06-24 22:23:02 +00:00
Bruno Cardoso Lopes
78827d1952
Refactoring of SSE conversion instructions
...
llvm-svn: 106804
2010-06-24 22:22:21 +00:00
Bob Wilson
99f28dad6e
Change array references to match my previous change to use the public type
...
names for the array fields.
llvm-svn: 106803
2010-06-24 22:21:19 +00:00
Oscar Fuentes
c377941c68
DataTypes.h.cmake (MSVC): Protect some #define's and use specific
...
suffixes for integer types.
llvm-svn: 106797
2010-06-24 22:05:52 +00:00
Bruno Cardoso Lopes
6b6b605917
Refactor SSE cmp intrinsics and declare the same for AVX
...
llvm-svn: 106796
2010-06-24 22:04:40 +00:00
Bob Wilson
e26d710335
Fix up some comments.
...
llvm-svn: 106795
2010-06-24 22:04:30 +00:00
Bob Wilson
3808684055
Use the struct tags mandated by ARM's ABI. Also use the public type names for
...
the array fields in these structs.
llvm-svn: 106794
2010-06-24 22:03:41 +00:00
Bill Wendling
2d3c490026
It's possible that a flag is added to the SDNode that points back to the
...
original SDNode. This is badness. Also, this function allows one SDNode to point
multiple flags to another SDNode. Badness as well.
llvm-svn: 106793
2010-06-24 22:00:37 +00:00
Devang Patel
c657c621b7
DBG_VALUE machine instruction pointing to undefined register for a variable justify a separate scope if the variable is inlined function's argument.
...
Radar 8122864.
llvm-svn: 106792
2010-06-24 21:51:19 +00:00
Jakob Stoklund Olesen
2b87d44c5d
Don't return a std::vector in the Spiller interface, but take a reference to a
...
vector instead. This avoids needless copying and allocation.
Add documentation.
llvm-svn: 106788
2010-06-24 20:54:29 +00:00
Bruno Cardoso Lopes
4398fd7b83
- Add AVX COMI{SS,SD}{rr,rm} and UCOMI{SS,SD}{rr,rm}.
...
- Fix a small VEX encoding issue.
- Move compare instructions to their appropriate place.
llvm-svn: 106787
2010-06-24 20:48:23 +00:00
Jakob Stoklund Olesen
9b659142a6
Remove the now unused LiveIntervals::getVNInfoSourceReg().
...
This method was always a bit too simplistic for the real world. It didn't really
deal with subregisters and such.
llvm-svn: 106781
2010-06-24 20:18:15 +00:00
Jakob Stoklund Olesen
487ed997d0
Teach AdjustCopiesBackFrom to also use CoalescerPair to identify compatible copies.
...
llvm-svn: 106780
2010-06-24 20:16:00 +00:00
Dale Johannesen
5ad5226c58
Disallow matching "i" constraint to symbol addresses when
...
address requires a register or secondary load to compute
(most PIC modes). This improves "g" constraint handling. 8015842.
The test from 2007 is attempting to test the fix for PR1761,
but since -relocation-model=static doesn't work on Darwin
x86-64, it was not testing what it was supposed to be testing
and was passing erroneously. Fixed to use Linux x86-64.
llvm-svn: 106779
2010-06-24 20:14:51 +00:00
Eric Christopher
a0d44f9c62
Silence some unused variable warnings.
...
llvm-svn: 106778
2010-06-24 20:14:34 +00:00
Jakob Stoklund Olesen
7f894d8fdc
Remove the -fast-spill option.
...
This code path has never really been used, and we are going to be handling
spilling through the Spiller interface in the future.
llvm-svn: 106777
2010-06-24 19:56:08 +00:00
Dan Gohman
a3de0186b8
Document problems that I encountered when working on -scev-aa.
...
llvm-svn: 106776
2010-06-24 19:34:03 +00:00
Evan Cheng
c26e2f4b70
Oops. IT block formation pass needs to be run at any optimization level.
...
llvm-svn: 106775
2010-06-24 19:10:14 +00:00
Bill Wendling
3f0e992af1
Loosen up the requirements in the Horrible Hack(tm) to include all selectors
...
which don't have a catch-all associated with them not just clean-ups. This fixes
the SingleSource/Benchmarks/Shootout-C++/except.cpp testcase that broke because
of my change r105902.
llvm-svn: 106772
2010-06-24 18:49:10 +00:00
Eli Friedman
246c41d93e
Always allow Thumb-2 SXTB, SXTH, UXTB, and UXTH. Fixes PR7324.
...
llvm-svn: 106770
2010-06-24 18:20:04 +00:00
Jakob Stoklund Olesen
45230239e4
Replace a big gob of old coalescer logic with the new CoalescerPair class.
...
CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.
This second attempt fixes some crashes that only occurred Linux.
llvm-svn: 106769
2010-06-24 18:15:01 +00:00
Dan Gohman
4143e9deeb
Add an exports file for the Hello example plugin.
...
llvm-svn: 106768
2010-06-24 17:36:51 +00:00
Jakob Stoklund Olesen
a612d7c012
Print the LSBs of a SlotIndex symbolically using letters referring to the
...
[L]oad, [u]se, [d]ef, or [S]tore slots.
This makes it easier to see if two indices refer to the same instruction,
avoiding mental mod 4 calculations.
llvm-svn: 106766
2010-06-24 17:31:07 +00:00
Dan Gohman
8a84cd57ae
Simplify this code; switch lowering shouldn't produce cases
...
which trivially fold away.
llvm-svn: 106765
2010-06-24 17:08:31 +00:00
Dan Gohman
963b1c142e
A few minor micro-optimizations.
...
llvm-svn: 106764
2010-06-24 16:57:52 +00:00
Dan Gohman
47ddf76d89
Teach getExactSDiv to evaluate x/1 to x up front, as it's a common
...
enough special case, and it theoretically allows more folding because
it works even when x is unanalyzable.
llvm-svn: 106763
2010-06-24 16:51:25 +00:00
Bob Wilson
279e55fb2e
PR7458: Try commuting Thumb2 instruction operands to put them into 2-address
...
form so they can be narrowed to 16-bit instructions.
llvm-svn: 106762
2010-06-24 16:50:20 +00:00
Bob Wilson
1cfe454c87
Edit and clarify comments for TargetInstrInfo methods:
...
None of the existing implementations of commuteInstruction create new
instructions unless the NewMI parameter is true, but the comment had
implied otherwise.
findCommutedOpIndices returns false, not true, when it doesn't know
how to commute the instruction.
llvm-svn: 106761
2010-06-24 16:48:26 +00:00
Dan Gohman
5235cc2c25
Don't try to preserve pointer types in SCEVConstants; the old code
...
was over-complicated.
llvm-svn: 106760
2010-06-24 16:47:03 +00:00
Dan Gohman
ab5422200b
Fix copy+pasto issues in isMulSExtable.
...
llvm-svn: 106759
2010-06-24 16:45:11 +00:00
Dan Gohman
3ace9f4e3d
Make the trunc code consistent with the zext and sext code in its
...
handling of pointer types.
llvm-svn: 106757
2010-06-24 16:33:38 +00:00
Dan Gohman
3f9ceb7916
Add a comment about a thread safety issue in Statistic.h.
...
llvm-svn: 106756
2010-06-24 16:31:32 +00:00
Dan Gohman
b377e2828d
Add overloads for getFile and getFileOrSTDIN which take a const char *
...
instead of a StringRef, avoiding the need to copy the string in the
common case.
llvm-svn: 106754
2010-06-24 16:25:50 +00:00
Jakob Stoklund Olesen
3b2b46a700
Be more strict about subreg-to-subreg copies in CoalescerPair.
...
Also keep track of the original DstREg before subregister adjustments.
llvm-svn: 106753
2010-06-24 16:19:28 +00:00
Gabor Greif
7ccec09252
use ArgOperand API
...
llvm-svn: 106752
2010-06-24 16:11:44 +00:00
Jakob Stoklund Olesen
53ccab7d1c
Verify that VNI kills are pointing to existing instructions.
...
In this case it is essential that the kill is real because the spiller will
decide to omit a spill if it thinks there is a later kill.
llvm-svn: 106751
2010-06-24 15:56:59 +00:00
Gabor Greif
a6d75e2cf7
use (even more, still) ArgOperand API
...
llvm-svn: 106750
2010-06-24 15:51:11 +00:00
Dan Gohman
463f26b4be
Eliminate the other half of the BRCOND optimization, and update
...
as many tests as possible.
llvm-svn: 106749
2010-06-24 15:24:03 +00:00
Dan Gohman
df6b33e778
Eliminate the first have of the optimization which eliminates BRCOND
...
when the condition is constant. This optimization shouldn't be
necessary, because codegen shouldn't be able to find dead control
paths that the IR-level optimizer can't find. And it's undesirable,
because it encourages bugpoint to leave "br i1 false" branches
in its output. And it wasn't updating the CFG.
I updated all the tests I could, but some tests are too reduced
and I wasn't able to meaningfully preserve them.
llvm-svn: 106748
2010-06-24 15:04:11 +00:00
Gabor Greif
218f5541b2
use ArgOperand API and CallSite for arg range; add necessary casts and perform some cosmetics
...
llvm-svn: 106747
2010-06-24 14:42:01 +00:00
Dan Gohman
600f62b3ba
Reapply r106634, now that the bug it exposed is fixed.
...
llvm-svn: 106746
2010-06-24 14:30:44 +00:00
Gabor Greif
5aafdf1e43
use ArgOperand API and CallSite for arg range
...
llvm-svn: 106745
2010-06-24 14:13:36 +00:00
Gabor Greif
0a136c9b53
use (even more) ArgOperand API
...
llvm-svn: 106744
2010-06-24 13:54:33 +00:00
Gabor Greif
590d95ed18
use ArgOperand API
...
llvm-svn: 106743
2010-06-24 13:42:49 +00:00
Gabor Greif
589a0b950a
use ArgOperand API
...
llvm-svn: 106740
2010-06-24 12:58:35 +00:00
Gabor Greif
7943017490
use ArgOperand API
...
llvm-svn: 106737
2010-06-24 12:35:13 +00:00
Gabor Greif
75f6943c95
use ArgOperand API, also tighten the type of visitFree to make this work out smoothly
...
llvm-svn: 106736
2010-06-24 12:21:15 +00:00
Gabor Greif
91f9589057
use ArgOperand API; introduce downcasted pointers into scope to facilitate this
...
llvm-svn: 106734
2010-06-24 12:03:56 +00:00
Gabor Greif
e2f482ca0b
use ArgOperand API
...
llvm-svn: 106731
2010-06-24 10:42:46 +00:00
Gabor Greif
2d958d4db5
use ArgOperand API
...
llvm-svn: 106730
2010-06-24 10:17:17 +00:00
Gabor Greif
5bcaa55761
use callsite to obtain all arguments
...
llvm-svn: 106729
2010-06-24 10:04:07 +00:00
Gabor Greif
42f620cc55
use callsite to obtain all arguments
...
llvm-svn: 106728
2010-06-24 09:56:43 +00:00
Chris Lattner
8048662539
Teach the x86 mc assembler that %dr6 = %db6, this implements
...
rdar://8013734
llvm-svn: 106725
2010-06-24 07:29:18 +00:00
Chris Lattner
c4e84309c4
more cleanups
...
llvm-svn: 106724
2010-06-24 07:18:14 +00:00
Chris Lattner
056fd06c5f
reduce indentation
...
llvm-svn: 106723
2010-06-24 07:16:25 +00:00
Chris Lattner
cfed96a410
fix breakage from r98938 by correctly marking msp430 calls as variadic.
...
Patch by Ben Ransford!
llvm-svn: 106722
2010-06-24 06:46:50 +00:00
Dan Gohman
c3e291c560
Fix a bug in the code which determines when it's safe to use the
...
bt instruction, which was exposed by r106263.
llvm-svn: 106718
2010-06-24 02:07:59 +00:00
Eric Christopher
fa6ce139a9
Add a couple more quick comments.
...
llvm-svn: 106717
2010-06-24 02:07:57 +00:00
Dan Gohman
0695e09b09
Optimize the "bit test" code path for switch lowering in the
...
case where the bit mask has exactly one bit.
llvm-svn: 106716
2010-06-24 02:06:24 +00:00
Jakob Stoklund Olesen
dbb58d2974
Revert "Replace a big gob of old coalescer logic with the new CoalescerPair class."
...
Whiny buildbots.
llvm-svn: 106710
2010-06-24 00:52:22 +00:00
Gabor Greif
0f60709f0e
use getNumArgOperands
...
llvm-svn: 106709
2010-06-24 00:48:48 +00:00
Gabor Greif
4a39b84a9d
use ArgOperand API
...
llvm-svn: 106707
2010-06-24 00:44:01 +00:00
Devang Patel
0dc3c2d37e
Use ValueMap instead of DenseMap.
...
The ValueMapper used by various cloning utility maps MDNodes also.
llvm-svn: 106706
2010-06-24 00:33:28 +00:00
Bruno Cardoso Lopes
191a1cd2bb
Add AVX CMP{SS,SD}{rr,rm} instructions and encoding testcases
...
llvm-svn: 106705
2010-06-24 00:32:06 +00:00
Bruno Cardoso Lopes
6af02a6f69
Move SSE and AVX shuffle, unpack and compare code to more appropriate places
...
llvm-svn: 106702
2010-06-24 00:15:50 +00:00
Jakob Stoklund Olesen
f38e6720cc
Replace a big gob of old coalescer logic with the new CoalescerPair class.
...
CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.
llvm-svn: 106701
2010-06-24 00:12:39 +00:00