Chris Lattner
dfd5ee9b42
Remove dead return. Thanks to Bill for the review!
...
llvm-svn: 50863
2008-05-08 18:26:56 +00:00
Chris Lattner
9011ceba89
Add support for constant folding the 'offsetof' pattern even if the
...
base is not zero. This fixes test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp
llvm-svn: 50840
2008-05-08 04:54:43 +00:00
Chris Lattner
3ee18d7c51
Add a new LibCallAliasAnalysis pass, which is parameterized
...
by an instance of LibCallInfo to provide mod/ref info of
standard library functions. This is powerful enough to
say that 'sqrt' is readonly except that it modifies errno,
or that "printf doesn't store to memory unless the %n
constraint is present" etc.
llvm-svn: 50827
2008-05-07 19:53:05 +00:00
Chris Lattner
e70ff7b21c
Add a new interface for describing the behavior of library calls. This
...
Currently is sufficient to describe mod/ref behavior but will hopefully
eventually be extended for other purposes.
This isn't used by anything yet.
llvm-svn: 50820
2008-05-07 18:21:13 +00:00
Nick Lewycky
6705f7577b
Fix typo and indentation.
...
llvm-svn: 50706
2008-05-06 04:03:18 +00:00
Dan Gohman
d4a670284c
Make several variable declarations static.
...
llvm-svn: 50696
2008-05-06 01:53:16 +00:00
Dan Gohman
a84b75df17
Remove uses of llvm/System/IncludeFile.h that are no longer needed.
...
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Torok Edwin
d016bb2685
Implement destructor for PostDominatorTree to eliminate a memory leak.
...
llvm-svn: 50607
2008-05-03 20:25:26 +00:00
Devang Patel
4b2359feec
Add assert.
...
llvm-svn: 50596
2008-05-02 22:13:33 +00:00
Dan Gohman
8f3ee5a54d
Fix the way AliasSet::print prints "may alias".
...
llvm-svn: 50051
2008-04-21 19:48:48 +00:00
Duncan Sands
79654e36ce
Fix a "large integer implicitly truncated to unsigned type"
...
warning.
llvm-svn: 50033
2008-04-21 07:35:28 +00:00
Dale Johannesen
3453a89a31
(re)fix handling of UGT. Pointed out by Nick Lewycky.
...
llvm-svn: 49991
2008-04-20 16:58:57 +00:00
Chris Lattner
f390d62b7f
Switch to using Simplified ConstantFP::get API.
...
llvm-svn: 49977
2008-04-20 00:41:09 +00:00
Dale Johannesen
c1b7e0b477
Fix a scalar evolution bug. Reversing everything
...
does not work because of 0; 2>0 but -2U is also >0.
llvm-svn: 49928
2008-04-18 21:38:31 +00:00
Owen Anderson
cd1b9c4b43
Make GVN able to remove unnecessary calls to read-only functions again.
...
llvm-svn: 49842
2008-04-17 05:36:50 +00:00
Owen Anderson
030428b435
Major repairs to the post-dominators implementation. Patch from Florian Brandner!
...
llvm-svn: 49768
2008-04-16 04:21:16 +00:00
Dale Johannesen
45e14f7753
Don't assume a tail call can't reference a byval
...
argument to the outer function, this isn't correct.
llvm-svn: 49731
2008-04-15 17:41:34 +00:00
Dan Gohman
14dce3e51c
Teach AliasSetTracker about VAArgInst.
...
llvm-svn: 49674
2008-04-14 18:34:50 +00:00
Dan Gohman
5c71910cf6
In the special case, call the comparison function instead of
...
manually performing the comparison. This allows the special
case to work correctly even in the case where someone is
experimenting with a different comparison function :-).
llvm-svn: 49670
2008-04-14 18:23:56 +00:00
Chris Lattner
f63bdaf0b5
add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
...
llvm-svn: 49617
2008-04-13 19:41:25 +00:00
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