Devang Patel
8e2e813b48
Update tests. Now DBG_VALUE instruction is created only if alloca corresponding to llvm.dbg.declare is missing.
...
llvm-svn: 102524
2010-04-28 20:27:48 +00:00
Chris Lattner
4629370fa2
fix PR6112 - When globalopt (or any other pass) does RAUW(@G, %G),
...
metadata references in non-function-local MDNodes should drop to
null.
llvm-svn: 102519
2010-04-28 20:16:12 +00:00
Chris Lattner
9867c1a075
Rework global alignment computation again. Now we do round up
...
alignment of globals to the preferred alignment, but only when
there is no section specified on the global (by far the common
case).
llvm-svn: 102515
2010-04-28 19:58:07 +00:00
Evan Cheng
d4fe387eb8
Enable i16 to i32 promotion by default.
...
llvm-svn: 102493
2010-04-28 08:30:49 +00:00
Evan Cheng
08e5f737d2
Update tests.
...
llvm-svn: 102487
2010-04-28 01:53:13 +00:00
Devang Patel
570e9d53a7
Emit debug info for byval parameters.
...
llvm-svn: 102486
2010-04-28 01:39:28 +00:00
Evan Cheng
2aaefc6167
Do not count kill, implicit_def instructions as printed instructions.
...
llvm-svn: 102453
2010-04-27 19:38:45 +00:00
Chris Lattner
a9c1328501
round zero-byte .zerofill directives up to 1 byte. This
...
should fix some "g++.dg-struct-layout-1" failures,
rdar://7886017
llvm-svn: 102421
2010-04-27 07:41:44 +00:00
Dale Johannesen
af026229b2
Un-XFAIL this on ppc. My enabling of dbg_declare handling
...
in ISel fixed it.
llvm-svn: 102404
2010-04-27 00:01:42 +00:00
Chris Lattner
9292bad5f5
on darwin empty functions need to codegen into something of non-zero length,
...
otherwise labels get incorrectly merged. We handled this by emitting a
".byte 0", but this isn't correct on thumb/arm targets where the text segment
needs to be a multiple of 2/4 bytes. Handle this by emitting a noop. This
is more gross than it should be because arm/ppc are not fully mc'ized yet.
This fixes rdar://7908505
llvm-svn: 102400
2010-04-26 23:37:21 +00:00
Bob Wilson
ece63716aa
Handle register-to-register copies within the tGPR class.
...
Radar 7896289
llvm-svn: 102396
2010-04-26 23:20:08 +00:00
Devang Patel
ac2c76f813
Use DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This simplifies debug range entries.
...
llvm-svn: 102394
2010-04-26 22:54:28 +00:00
Dan Gohman
40561dd0ba
When checking whether the special handling for an addrec increment which
...
doesn't dominate the header is needed, don't check whether the increment
expression has computable loop evolution. While the operands of an
addrec are required to be loop-invariant, they're not required to
dominate any part of the loop. This fixes PR6914.
llvm-svn: 102389
2010-04-26 21:46:36 +00:00
Dan Gohman
9c1b7fdc46
Add a comment to this test.
...
llvm-svn: 102387
2010-04-26 21:37:43 +00:00
Chris Lattner
4854eab087
fix PR6921 a different way. Intead of increasing the
...
alignment of globals with a specified alignment, we fix
common variables to obey their alignment. Add a comment
explaining why this behavior is important.
llvm-svn: 102365
2010-04-26 18:46:46 +00:00
Chris Lattner
a8cd2ac893
Revert r102300/102301, which serious broke objc apps.
...
llvm-svn: 102359
2010-04-26 18:30:45 +00:00
Chris Lattner
9065710fcf
fix PR6940: sitofp(undef) folds to 0.0, not undef.
...
llvm-svn: 102358
2010-04-26 18:21:23 +00:00
Chris Lattner
241b92e4ee
testcase for PR6913
...
llvm-svn: 102303
2010-04-25 05:51:14 +00:00
Chris Lattner
454613a18a
this passes now.
...
llvm-svn: 102301
2010-04-25 05:49:31 +00:00
Chris Lattner
e4a25eb35a
Fix PR6921: globals were not getting correctly rounded up to their
...
preferred alignment unless they were common or some other special
case.
llvm-svn: 102300
2010-04-25 05:30:43 +00:00
Dan Gohman
42337e0ee9
Generalize LSR's OptimizeMax to handle the new kinds of max expressions
...
that indvars may use, now that indvars is recognizing le and ge loops.
llvm-svn: 102235
2010-04-24 03:13:44 +00:00
Dan Gohman
231fe284cd
ScalarEvolution support for <= and >= loops.
...
Also, generalize ScalarEvolutions's min and max recognition to handle
some new forms of min and max that this change makes more common.
llvm-svn: 102234
2010-04-24 03:09:42 +00:00
Chris Lattner
ace5b97b5c
no longer xfail
...
llvm-svn: 102220
2010-04-23 22:39:33 +00:00
Stuart Hastings
85b5c330f2
Per Chris, fuse four trivial tests using grep (r102199) into one that uses FileCheck.
...
llvm-svn: 102216
2010-04-23 22:12:57 +00:00
Dan Gohman
6a48222bd8
Change TargetData's algorithm for computing defualt vector type
...
alignment to match what's used in clang and GCC for __alignof, rather
than trying to guess what Legalize is going to be doing.
llvm-svn: 102206
2010-04-23 19:41:15 +00:00
Stuart Hastings
ad81819149
Add some missing x86 patterns for movdq2q. Fixes two (LLVM-)GCC DejaGNU testcases. Radar 6881029.
...
llvm-svn: 102199
2010-04-23 19:03:32 +00:00
Chris Lattner
790231f95e
fix some failures my callgraph dump format change broke.
...
llvm-svn: 102197
2010-04-23 18:38:40 +00:00
Chris Lattner
775c94002d
testcase for the bug that required a patch to be reverted.
...
llvm-svn: 102195
2010-04-23 18:31:01 +00:00
Dan Gohman
38949c2f1f
Fix LSR to tolerate cases where ScalarEvolution initially
...
misses an opportunity to fold add operands, but folds them
after LSR has separated them out. This fixes rdar://7886751.
llvm-svn: 102157
2010-04-23 01:55:05 +00:00
Chris Lattner
85dd1e42b6
disable my previous inliner patch, it appears to be busting self-host.
...
llvm-svn: 102153
2010-04-23 00:41:03 +00:00
Chris Lattner
5d87e1be44
The inliner was choosing to not consider call sites
...
that appear in the SCC as a result of inlining as candidates
for inlining. Change this so that it *does* consider call
sites that change from being indirect to being direct as a
result of inlining. This allows it to completely
"devirtualize" the testcase.
llvm-svn: 102146
2010-04-22 23:37:35 +00:00
Jim Grosbach
b9dccb6103
Update ARM DAGtoDAG for matching UBFX instruction for unsigned bitfield
...
extraction. This fixes PR5998.
llvm-svn: 102144
2010-04-22 23:24:18 +00:00
Devang Patel
01dcb9fa4c
Remove the test for now.
...
llvm-svn: 102135
2010-04-22 22:06:28 +00:00
Devang Patel
cf9bece3dd
Adjust debug range offsets for isWeakForLinker() functions.
...
llvm-svn: 102127
2010-04-22 20:52:00 +00:00
Chris Lattner
66e308198d
add a DEBUG call so that -debug lists when CGSCCPM iterates.
...
Fix RefreshCallGraph to use CGN->replaceCallEdge instead of hand
rolling its own loop. replaceCallEdge properly maintains the
reference counts of the nodes, fixing a crash exposed by the
iterative callgraph stuff.
llvm-svn: 102120
2010-04-22 20:42:33 +00:00
Dan Gohman
31d6b29bae
Don't attempt to analyze values which are obviously undef. This fixes some
...
assertion failures in extreme cases.
llvm-svn: 102042
2010-04-22 01:35:11 +00:00
Evan Cheng
a324da99ae
Do not try to optimize a copy that has already been marked for deletion.
...
llvm-svn: 102027
2010-04-21 20:57:54 +00:00
Evan Cheng
dbfb7dc438
Implement -disable-non-leaf-fp-elim which disable frame pointer elimination
...
optimization for non-leaf functions. This will be hooked up to gcc's
-momit-leaf-frame-pointer option. rdar://7886181
llvm-svn: 101984
2010-04-21 03:18:23 +00:00
Johnny Chen
6e4b1607ee
Thumb instructions which have reglist operands at the end and predicate operands
...
before reglist were not properly handled with respect to IT Block. Fix that by
creating a new method ARMBasicMCBuilder::DoPredicateOperands() used by those
instructions for disassembly. Add a test case.
llvm-svn: 101974
2010-04-21 01:01:19 +00:00
Chris Lattner
c840cfe5c9
Implement (but don't enable) PR6724 and rdar://6295824. In short,
...
we have RefreshCallGraph detect when a function pass devirtualizes
a call, and have CGSCCPassMgr iterate (up to a count) when this
happens. This allows (in the example) GVN to devirtualize the
call in foo, then the inliner to inline it away.
This is not currently enabled because I haven't done any analysis
on the (potentially substantial) code size or performance impact of
doing this, and guess what, it exposes callgraph updating bugs in
various passes. This is progress though, and you can play with it
by passing -max-cg-scc-iterations=5 to opt.
llvm-svn: 101973
2010-04-21 00:47:40 +00:00
Evan Cheng
a0c4b2952f
- Clean up some crappy code which deals with coalescing of copies which look at
...
extract_subreg / insert_subreg, etc.
- Add support for more aggressive insert_subreg coalescing.
llvm-svn: 101971
2010-04-21 00:44:22 +00:00
Dan Gohman
4d1724c3e8
Revert r101471. For tight recursive functions which have multiple
...
recursive callsites, inlining can reduce the number of calls by
exponential factors, as it does in
MultiSource/Benchmarks/Olden/treeadd. More involved heuristics
will be needed.
llvm-svn: 101969
2010-04-21 00:43:30 +00:00
Dan Gohman
570b621976
Add another variant of this test which found a place where
...
CodeGen's ComputeMaskedBits was being over-conservative when computing
bits for an ADD.
llvm-svn: 101963
2010-04-21 00:19:28 +00:00
Chris Lattner
6db0f451a7
teach the x86 address matching stuff to handle
...
(shl (or x,c), 3) the same as (shl (add x, c), 3)
when x doesn't have any bits from c set.
This finishes off PR1135. Before we compiled the block to:
to:
LBB0_3: ## %bb
cmpb $4, %dl
sete %dl
addb %dl, %cl
movb %cl, %dl
shlb $2, %dl
addb %r8b, %dl
shlb $2, %dl
movzbl %dl, %edx
movl %esi, (%rdi,%rdx,4)
leaq 2(%rdx), %r9
movl %esi, (%rdi,%r9,4)
leaq 1(%rdx), %r9
movl %esi, (%rdi,%r9,4)
addq $3, %rdx
movl %esi, (%rdi,%rdx,4)
incb %r8b
decb %al
movb %r8b, %dl
jne LBB0_1
Now we produce:
LBB0_3: ## %bb
cmpb $4, %dl
sete %dl
addb %dl, %cl
movb %cl, %dl
shlb $2, %dl
addb %r8b, %dl
shlb $2, %dl
movzbl %dl, %edx
movl %esi, (%rdi,%rdx,4)
movl %esi, 8(%rdi,%rdx,4)
movl %esi, 4(%rdi,%rdx,4)
movl %esi, 12(%rdi,%rdx,4)
incb %r8b
decb %al
movb %r8b, %dl
jne LBB0_1
llvm-svn: 101958
2010-04-20 23:18:40 +00:00
Johnny Chen
9998480f92
When doing Thumb disassembly, there's no need to consider t2ADDrSPi12/t2SUBrSPi12,
...
as their generic counterparts t2ADDri12/t2SUBri12 should suffice.
llvm-svn: 101929
2010-04-20 18:45:24 +00:00
Bill Wendling
a87efb5d0f
Move CodeGen/X86/2010-04-19-DAGCombineCrash.ll into CodeGen/X86/crash.ll. Also
...
reduce.
llvm-svn: 101925
2010-04-20 18:14:47 +00:00
Johnny Chen
bd5bf58029
For t2LDRT, t2LDRBT, t2LDRHT, t2LDRSBT, and t2LDRSHT, if Rn(Inst{19-16})=='1111',
...
transform the Opcode to the corresponding t2LDR*pci counterpart.
Ref: A8.6.86 LDRT, A8.6.65 LDRBT, A8.6.77 LDRHT, A8.6.81 LDRSBT, A8.6.85 LDRSHT
llvm-svn: 101915
2010-04-20 17:28:50 +00:00
Devang Patel
def402649b
Add RUN:
...
llvm-svn: 101913
2010-04-20 17:20:10 +00:00
Chris Lattner
b66b0c36cd
Bill's change in r95336 broke empty aggregates embedded
...
in other types. fix this by only bumping zero-byte globals
up to a single byte if the *entire global* is zero size,
fixing PR6340.
This also fixes empty arrays etc to be handled correctly,
and only does this on subsection-via-symbols targets (aka
darwin) which is the only place where this matters.
llvm-svn: 101879
2010-04-20 06:20:21 +00:00
Chris Lattner
04fb51984f
teach cellspu how to return i8 and i16 from calls,
...
patch by Kalle Raiskila!
llvm-svn: 101875
2010-04-20 05:36:09 +00:00