Dan Gohman
9c8e4ef9a9
Fix a typo in a comment.
...
llvm-svn: 49504
2008-04-10 23:02:38 +00:00
Owen Anderson
392a40e40a
Fix for PR2190. Memdep's non-local caching was checking dirtied blocks in the
...
wrong order.
llvm-svn: 49499
2008-04-10 22:13:32 +00:00
Daniel Berlin
b8533b394a
Fix PR 2169.
...
llvm-svn: 49339
2008-04-07 14:20:50 +00:00
Gabor Greif
6c6b8a57f3
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Dan Gohman
f7dfe555d7
Set blockBegin to point to the beginning of the block,
...
not the end.
llvm-svn: 48999
2008-03-31 22:08:00 +00:00
Erick Tryzelaar
847ee3e279
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
...
llvm-svn: 48982
2008-03-31 16:22:09 +00:00
Chris Lattner
a69d949942
minor code cleanups, allow constant folding sinf/cosf.
...
llvm-svn: 48961
2008-03-30 18:02:00 +00:00
Dan Gohman
a363ba510c
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Devang Patel
1b64c7d1e5
These passes preserve CFG.
...
This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester
llvm-svn: 48623
2008-03-20 23:27:18 +00:00
Andrew Lenharth
6e32942dfa
enable -analyze for andersens
...
llvm-svn: 48601
2008-03-20 15:36:44 +00:00
Devang Patel
f15fe34521
Restore isCFGOnly property of various analysis passes.
...
llvm-svn: 48579
2008-03-20 02:25:21 +00:00
Devang Patel
5e8cbbea65
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Devang Patel
38f181fa8c
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Daniel Berlin
0f20fa71ba
Fix PR 2160 by making sure arguments to external functions get marked as pointing to anything
...
llvm-svn: 48509
2008-03-18 22:22:53 +00:00
Scott Michel
889ee011f7
Dial down gcc's warnings: don't use 0UL when 0U suffices (and when the
...
variables and methods themselves only use unsigned.)
llvm-svn: 48492
2008-03-18 16:55:06 +00:00
Devang Patel
811ca3ddba
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Daniel Berlin
2a8fd44b9d
Add Hybrid Cycle Detection to Andersen's analysis.
...
Patch by Curtis Dunham.
llvm-svn: 47959
2008-03-05 19:31:47 +00:00
Gabor Greif
fd0fb616f8
Fix http://llvm.org/bugs/show_bug.cgi?id=2104 by ordering lexicographically what gets printed. Be const-correct in PrintResults and uninline it too
...
llvm-svn: 47712
2008-02-28 08:38:45 +00:00
Bill Wendling
af80fae2a7
De-tabify.
...
llvm-svn: 47598
2008-02-26 10:51:52 +00:00
Evan Cheng
e283043860
Temporarily reverting 46959.
...
llvm-svn: 47542
2008-02-25 03:57:32 +00:00
Dan Gohman
0220a930c7
Change a C-style cast to const_cast, to avoid a -Wcast-qual warning.
...
llvm-svn: 47437
2008-02-21 17:33:24 +00:00
Nick Lewycky
3df036a7bf
Simplify this code, no functionality change.
...
llvm-svn: 47434
2008-02-21 09:14:53 +00:00
Nick Lewycky
5f7dc506e1
GlobalValues are Constants, remove redundant code. Also fix typo in a comment.
...
llvm-svn: 47433
2008-02-21 08:34:02 +00:00
Anton Korobeynikov
0c5e186924
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Nick Lewycky
4df6c66b42
Use getConstant for ConstantInts.
...
llvm-svn: 47361
2008-02-20 06:58:55 +00:00
Nick Lewycky
0b6cdd1eff
Add 'umax' similar to 'smax' SCEV. Closes PR2003.
...
Parse reversed smax and umax as smin and umin and express them with negative
or binary-not SCEVs (which are really just subtract under the hood).
Parse 'xor %x, -1' as (-1 - %x).
Remove dead code (ConstantInt::get always returns a ConstantInt).
Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets
passed into a uint64_t. Instead, create the -1 directly from
ConstantInt::getAllOnesValue().
llvm-svn: 47360
2008-02-20 06:48:22 +00:00
Duncan Sands
1bba49ca55
Fix a compiler warning.
...
llvm-svn: 47328
2008-02-19 09:28:48 +00:00
Owen Anderson
3efff61819
In addition to arguments passed to it, memcpy (and all other calls) can ModRef pointers that alias their arguments as well. This fixes PR2057.
...
llvm-svn: 47317
2008-02-19 06:47:18 +00:00
Chris Lattner
57eff5b5f5
don't bother calling getUnderlyingObject for non-pointers.
...
llvm-svn: 47272
2008-02-18 17:28:21 +00:00
Owen Anderson
f3107c8546
Since we're not checking for the more general AllocationInst first, we need to explicitly check
...
that Object is an Argument before casting it to one.
llvm-svn: 47268
2008-02-18 10:11:00 +00:00
Owen Anderson
1b743c32fd
This check is not correct for mallocs, so exclude them earlier.
...
llvm-svn: 47263
2008-02-18 09:11:02 +00:00
Owen Anderson
b0891af18b
Fix a comment, and a bug where we weren't applying the tail call logic in cases that failed the first test.
...
llvm-svn: 47253
2008-02-18 03:52:21 +00:00
Owen Anderson
0ef73a5d06
Fix bugs that Chris noticed in my last patch.
...
llvm-svn: 47252
2008-02-18 02:31:23 +00:00
Chris Lattner
d5885d43ef
bitcasts of pointers are always pointers.
...
If we see a memcpy of a pointer, make sure to check later
uses of the pointer as well.
llvm-svn: 47250
2008-02-18 02:11:28 +00:00
Owen Anderson
884f6801df
Teach getModRefInfo that memcpy, memmove, and memset don't "capture" memory addresses.
...
Also, noalias arguments are be considered "like" stack allocated ones for this purpose, because
the only way they can be modref'ed is if they escape somewhere in the current function.
llvm-svn: 47247
2008-02-17 21:29:08 +00:00
Wojciech Matyjewicz
a62f8557d9
Fix typo. Thanks to Duncan for noticing.
...
llvm-svn: 47062
2008-02-13 12:21:32 +00:00
Wojciech Matyjewicz
86032c3a2f
Add comments as per review feedback.
...
llvm-svn: 47061
2008-02-13 11:51:34 +00:00
Owen Anderson
274aa2846e
Re-apply the patch to improve the optimizations of memcpy's, with several
...
bugs fixed. This now passes PPC bootstrap.
llvm-svn: 47026
2008-02-12 21:15:18 +00:00
Wojciech Matyjewicz
b6e6dacc60
Fix PR2002. Suppose n is the initial value for the induction
...
variable (with step 1) and m is its final value. Then, the correct trip
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may
overflow and can't in general be interpreted as signed.
Patch by Nick Lewycky.
llvm-svn: 47007
2008-02-12 15:09:36 +00:00
Wojciech Matyjewicz
2874a19254
If the LHS of the comparison is a loop-invariant we also want to move it
...
to the RHS. This simple change allows to compute loop iteration count
for loops with condition similar to the one in the testcase (which seems
to be quite common).
llvm-svn: 46959
2008-02-11 18:37:34 +00:00
Wojciech Matyjewicz
76c2b22ee4
Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
...
arbitrary iteration.
The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the
computations (essentially, the division) in BinomialCoefficient() are
performed with the apprioprate bitwidth necessary to avoid overflow;
unsigned division is used instead of the signed one.
Computations in BinomialCoefficient() require support from the code
generator for APInts. Currently, we use a hack rounding up the
neccessary bitwidth to the nearest power of 2. The hack is easy to turn
off in future.
One remaining issue: we assume the divisor of the binomial coefficient
formula can be computed accurately using 16 bits. It means we can handle
AddRecs of length up to 9. In future, we should use APInts to evaluate
the divisor.
Thanks to Nicholas for cooperation!
llvm-svn: 46955
2008-02-11 11:03:14 +00:00
Wojciech Matyjewicz
8095000596
We should check that existing cast operation has the appropriate opcode before we reuse it.
...
llvm-svn: 46908
2008-02-09 18:30:13 +00:00
Tanya Lattner
1234229bc7
Throttle the non-local dependence analysis for basic blocks with more than 50 predecessors. Added command line option to play with this threshold.
...
llvm-svn: 46790
2008-02-06 00:54:55 +00:00
Owen Anderson
28d90a4a6a
Fix an obscure read-after-free bug that Duncan found.
...
llvm-svn: 46738
2008-02-05 04:34:03 +00:00
Dan Gohman
562ed58408
Avoid unnecessarily casting away const, fixing a FIXME.
...
llvm-svn: 46591
2008-01-31 01:05:10 +00:00
Owen Anderson
7d21431939
Fix an issue where, under very specific circumstances, memdep could end up dereferencing the end
...
of one of its internal maps.
llvm-svn: 46541
2008-01-30 01:24:05 +00:00
Chris Lattner
2c3646ea4a
getUnderlyingObject can return null, handle this.
...
llvm-svn: 46318
2008-01-24 19:07:10 +00:00
Chris Lattner
cd5013eb2f
Teach basicaa that 'byval' arguments define a new memory location that
...
can't be aliased to other known objects. This allows us to know that byval
pointer args don't alias globals, etc.
llvm-svn: 46315
2008-01-24 18:00:32 +00:00
Nick Lewycky
ea4de32234
Don't be rude, emit debugging info where asked to.
...
llvm-svn: 45485
2008-01-02 02:49:20 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00