Dale Johannesen
428972ecad
Fix another case where a dbg.declare meant something
...
had 2 uses instead of 1.
llvm-svn: 66112
2009-03-05 00:39:02 +00:00
Bill Wendling
2eef9340a8
Temporarily revert r65994. It was causing rdar://6646455.
...
llvm-svn: 66083
2009-03-04 22:02:09 +00:00
Dale Johannesen
448293322b
Re-commit 65975 and a fix for the problem that
...
was causing llvm-gcc to fail to build. I've
verified it bootstraps now; good enough for me.
llvm-svn: 66073
2009-03-04 21:24:04 +00:00
Dan Gohman
5eb18fa0bf
Fix this comment.
...
llvm-svn: 66065
2009-03-04 20:50:23 +00:00
Dan Gohman
70fd52251c
Add an assertion for a condition that's always true, and not
...
immediately obvious.
llvm-svn: 66062
2009-03-04 20:49:01 +00:00
Chris Lattner
9cfff838eb
complete comment.
...
llvm-svn: 66055
2009-03-04 19:23:25 +00:00
Chris Lattner
a0d9cc96fe
this wasn't intended to be committed.
...
llvm-svn: 66054
2009-03-04 19:22:30 +00:00
Chris Lattner
5051e7afde
Fix PR3720 by properly propagating alignment information from memcpy/memmove
...
onto element accesses.
llvm-svn: 66053
2009-03-04 19:20:50 +00:00
Dale Johannesen
8ca4d24371
Revert unintended commmit.
...
llvm-svn: 66001
2009-03-04 02:09:48 +00:00
Dale Johannesen
c6bfdb8253
Skip ptr-to-ptr bitcasts when counting in another case.
...
llvm-svn: 66000
2009-03-04 02:06:53 +00:00
Dale Johannesen
e184480072
Always skip ptr-to-ptr bitcasts when counting,
...
per Chris' suggestion. Slightly faster.
llvm-svn: 65999
2009-03-04 01:53:05 +00:00
Devang Patel
94ef615585
If a global constant is dead then global's debug info should not prevent the optimizer in deleting the global. And while deleting global, delete global's debug info also.
...
llvm-svn: 65994
2009-03-04 01:22:23 +00:00
Dale Johannesen
a6f7a45366
Make my earlier patch to skip debug intrinsics
...
when counting work; it was only off by 1.
llvm-svn: 65993
2009-03-04 01:20:34 +00:00
Dale Johannesen
e611f70764
Marking debug info intrinsics as not touching memory
...
caused them to be considered trivially dead. Fix this.
llvm-svn: 65979
2009-03-03 23:30:00 +00:00
Dale Johannesen
81b6cd8ce5
Instruction counters must skip the bitcasts that
...
feed into llvm.dbg.declare nodes, as well as
the debug directives themselves.
llvm-svn: 65976
2009-03-03 22:36:47 +00:00
Devang Patel
9b7c78086b
Recursively remove dead argument while removing llvm.dbg.declare intrinsic.
...
llvm-svn: 65971
2009-03-03 21:31:02 +00:00
Dale Johannesen
ceed180d4c
When removing a store to an alloca that has only one
...
use, check also for the case where it has two uses,
the other being a llvm.dbg.declare. This is needed so
debug info doesn't affect codegen.
llvm-svn: 65970
2009-03-03 21:26:39 +00:00
Bill Wendling
7fdda71ad7
Remove accidental check-ins in r65960. :-(
...
llvm-svn: 65961
2009-03-03 19:25:16 +00:00
Bill Wendling
8244b700bf
Use > instead of >=. We want to promote aggregates of 128-bytes.
...
llvm-svn: 65960
2009-03-03 19:18:49 +00:00
Bill Wendling
a77bedb70b
Reapply r65755, but reversing "<" to ">=".
...
llvm-svn: 65945
2009-03-03 12:12:58 +00:00
Dan Gohman
51d4e8db6a
Fix a bunch of Doxygen syntax issues. Escape special characters,
...
and put @file directives on their own comment line.
llvm-svn: 65920
2009-03-03 02:55:14 +00:00
Dale Johannesen
d4a205b300
Don't count DebugInfo instructions in another limit
...
(lest they affect codegen).
llvm-svn: 65915
2009-03-03 01:43:03 +00:00
Dale Johannesen
33fa9dc8a9
When sinking an insn in InstCombine bring its debug
...
info with it.
Don't count debug info insns against the scan maximum
in FindAvailableLoadedValue (lest they affect codegen).
llvm-svn: 65910
2009-03-03 01:09:07 +00:00
Devang Patel
b69b449ce8
Ignore debug info intrinsics.
...
llvm-svn: 65908
2009-03-03 00:28:44 +00:00
Devang Patel
e98e6bc27c
If branch conditions' one successor is dominating another non-latch successor then this loop's iteration space can not be restricted. In this example block bb5 is always executed.
...
llvm-svn: 65902
2009-03-02 23:39:14 +00:00
Devang Patel
5220700e0d
Remove all dbg symobls, including those with circular references.
...
This is ugly, but I can't figure out a quick way out of this.
llvm-svn: 65889
2009-03-02 22:50:58 +00:00
Duncan Sands
51ce06c788
Fix PR3694: add an instcombine micro-optimization that helps
...
clean up when using variable length arrays in llvm-gcc.
llvm-svn: 65832
2009-03-02 09:18:21 +00:00
Bill Wendling
0dd6d44518
Temporarily revert r65755. It was causing failures in the self-hosting
...
testsuite:
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/nancvt.ll
Failed with exit(1) at line 2
while running: grep 2147027116 nancvt.ll.tmp | count 3
count: expected 3 lines and got 0.
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll
Failed with exit(1) at line 1
while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah | not /usr/bin/grep sub.*esp
subl $28, %esp
subl $28, %esp
child process exited abnormally
And more.
llvm-svn: 65758
2009-03-01 03:55:12 +00:00
Chris Lattner
7228db7662
hoist the check for alloca size up so that it controls CanConvertToScalar
...
as well as isSafeAllocaToScalarRepl.
llvm-svn: 65755
2009-03-01 02:26:47 +00:00
Nick Lewycky
44b8675102
Silence compiler warning about use of uninitialized variables (in reality these
...
are always set by reference on the path that uses them.) No functional change.
llvm-svn: 65621
2009-02-27 06:37:39 +00:00
Nick Lewycky
f5563f28d3
Fix compiler warning about uninitialized variables. No functional change.
...
llvm-svn: 65620
2009-02-27 06:29:31 +00:00
Zhou Sheng
670d50e102
Ignore dbg info intrinsics when folding conditional branch to
...
conditional branch predecessors.
llvm-svn: 65509
2009-02-26 06:56:37 +00:00
Chris Lattner
1443cb8f77
Fix PR3667
...
llvm-svn: 65464
2009-02-25 18:20:01 +00:00
Zhou Sheng
241d74737b
Don't block basic block with only SwitchInst to fold into predecessors.
...
llvm-svn: 65456
2009-02-25 15:34:27 +00:00
Dan Gohman
dd9c79d45b
Rename ScalarEvolution's getIterationCount to getBackedgeTakenCount,
...
to more accurately describe what it does. Expand its doxygen comment
to describe what the backedge-taken count is and how it differs
from the actual iteration count of the loop. Adjust names and
comments in associated code accordingly.
llvm-svn: 65382
2009-02-24 18:55:53 +00:00
Dan Gohman
1197d46ccf
Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simple
...
ashr instcombine to help expose this code. And apply the fix to
SelectionDAG's copy of this code too.
llvm-svn: 65364
2009-02-24 02:00:40 +00:00
Dan Gohman
f5bb2d8747
Generalize the ChangeCompareStride code, in preparation for
...
handling non-constant strides. No functionality change.
llvm-svn: 65363
2009-02-24 01:58:00 +00:00
Dan Gohman
3a3b51162b
Preserve the DominanceFrontier analysis in the LoopDeletion pass.
...
llvm-svn: 65359
2009-02-24 01:21:53 +00:00
Devang Patel
702836b2dd
While folding unconditional return move DbgRegionEndInst into the predecessor, instead of removing it. This fixes following tests from llvmgcc42 testsuite.
...
gcc.c-torture/execute/20000605-3.c
gcc.c-torture/execute/20020619-1.c
gcc.c-torture/execute/20030920-1.c
gcc.c-torture/execute/loop-ivopts-1.c
llvm-svn: 65353
2009-02-24 00:05:16 +00:00
Dan Gohman
1d93a1d2cb
Back out the change in 64918 that used sign-extensions when promoting
...
trip counts that use signed comparisons. It's not obviously the best
approach for preserving trip count information, and at any rate there
isn't anything in the tree right now that makes use of that, so for
now always using zero-extensions is preferable.
llvm-svn: 65347
2009-02-23 23:20:35 +00:00
Dan Gohman
f7d0d6fe22
LoopDeletion needs to inform ScalarEvolution when a loop is deleted,
...
so that ScalarEvolution doesn't hang onto a dangling Loop*, which
could be a problem if another Loop happens to get allocated at the
same address.
llvm-svn: 65323
2009-02-23 17:10:29 +00:00
Dan Gohman
67530bbc77
IndVarSimplify preserves ScalarEvolution. In the
...
-std-compile-opts sequence, this avoids the need for ScalarEvolution to
be rerun before LoopDeletion.
llvm-svn: 65318
2009-02-23 16:29:41 +00:00
Zhou Sheng
d3008c8b1c
Should reset DBI_Prev if DBI_Next == 0.
...
llvm-svn: 65314
2009-02-23 10:14:11 +00:00
Mon P Wang
75d957dba4
Changed option name from inline-threshold to basic-inline-threshold because
...
inline-threshold option is used by the inliner.
llvm-svn: 65309
2009-02-23 07:07:56 +00:00
Chris Lattner
29437eb4c3
fix some typos that Duncan noticed
...
llvm-svn: 65306
2009-02-23 05:56:17 +00:00
Dan Gohman
b105ab4e42
Revert the part of 64623 that attempted to align the source in a
...
memcpy to match the alignment of the destination. It isn't necessary
for making loads and stores handled like the SSE loadu/storeu
intrinsics, and it was causing a performance regression in
MultiSource/Applications/JM/lencod.
The problem appears to have been a memcpy that copies from some
highly aligned array into an alloca; the alloca was then being
assigned a large alignment, which required codegen to perform
dynamic stack-pointer re-alignment, which forced the enclosing
function to have a frame pointer, which led to increased spilling.
llvm-svn: 65289
2009-02-22 18:06:32 +00:00
Dan Gohman
a78fb41553
Properly parenthesize this expression, fixing a real bug in the new
...
-full-lsr code, as well as a GCC warning.
llvm-svn: 65288
2009-02-22 16:40:52 +00:00
Evan Cheng
ba3f6fa814
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.
...
llvm-svn: 65268
2009-02-22 07:31:19 +00:00
Nick Lewycky
2c8f0fd57f
Don't sign extend the char when expanding char -> int during
...
load(bitcast(char[4] to i32*)) evaluation.
llvm-svn: 65246
2009-02-21 20:50:42 +00:00
Evan Cheng
74d0dda00f
Add AddrModeMatcher.cpp
...
llvm-svn: 65228
2009-02-21 07:05:11 +00:00