Commit Graph

1358 Commits

Author SHA1 Message Date
Chris Lattner
69b3992154 Make Loop::getExitBlocks significantly faster for large loops. Instead of
pounding on Loop::contains (which is O(n) in the size of the loop), use a
sorted vector, which is O(log(N)) for each query.  This speeds up Duraid's
horrible testcase from ~72s to ~31s in a debug build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29645 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-12 05:02:03 +00:00
Chris Lattner
880ddb018a Speed up Loop::isLCSSAForm by using a binary search and single-entry cache.
This reduces LCSSA pass time from 1.5s to 0.96s when run on eon in release+asserts mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 00:14:16 +00:00
Chris Lattner
d85340f4ec Change the callgraph representation to store the callsite along with the
target CG node.  This allows the inliner to properly update the callgraph
when using the pruning inliner.  The pruning inliner may not copy over all
call sites from a callee to a caller, so the edges corresponding to those
call sites should not be copied over either.

This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-12 18:29:36 +00:00
Jim Laskey
16d42c6ac6 It was pointed out that DEBUG() is only available with -debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 18:25:13 +00:00
Jim Laskey
e37fe9b3a1 Ensure that dump calls that are associated with asserts are removed from
non-debug build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 17:58:07 +00:00
Chris Lattner
9525528a7d Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28975 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 23:17:24 +00:00
Andrew Lenharth
cc131c4032 add some missing externals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28955 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 01:16:06 +00:00
Chris Lattner
356d8c2499 Handle alias sets that have been unified, and thus can have other references
to them.  This fixes a regression in my previous checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28951 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 23:56:13 +00:00
Chris Lattner
f299857496 Don't implement AliasSetTracker::remove in terms of deleteValue. deleteValue
causes the pointer to be removed from the underlying alias analysis
implementation as well.  This impl of remove is also significantly faster than
the old one.  This fixes:
Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28950 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 23:48:59 +00:00
Reid Spencer
9d5b532de9 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 16:49:46 +00:00
Chris Lattner
959e321a1b Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 19:20:48 +00:00
Andrew Lenharth
ab390d045a Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 18:23:36 +00:00
Andrew Lenharth
3770500f88 Fix a bug, don't drop indirect call sites, especially if there is nothing known about them yet, and restore a simple version of a removed function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28857 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 15:42:47 +00:00
Chris Lattner
5cff2677a6 Constant fold sqrtf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28853 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 18:17:52 +00:00
Andrew Lenharth
c269c5269a Add a error message to cbu to match bu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28819 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 14:43:36 +00:00
Andrew Lenharth
73a38a9071 move header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28818 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 14:33:53 +00:00
Owen Anderson
3cc86cc11f Update isLCSSAForm to handle PHI nodes specially for live-out detection. This
is the same as the recent patch to LCSSA.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28773 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:45:22 +00:00
Owen Anderson
c2cc15cf9d Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 19:22:28 +00:00
Evan Cheng
b9b2b309d3 Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28747 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 09:32:57 +00:00
Owen Anderson
f25c19c6b5 Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 18:33:30 +00:00
Reid Spencer
4f1bd9e996 For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:00:26 +00:00
Reid Spencer
6df60a9eff For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:00:19 +00:00
Reid Spencer
3e0c154240 For PR798:
Add support for Graphviz. Patch contributed by Anton Korobeynikov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 15:44:46 +00:00
Chris Lattner
080e25d884 Fix -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:17:46 +00:00
Reid Spencer
192913e281 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:02:51 +00:00
Andrew Lenharth
40932272c7 move calltarget to dsa
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28546 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 23:39:48 +00:00
Andrew Lenharth
632cd52162 Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 22:58:38 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Chris Lattner
82db0696a1 Remove dead variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 17:41:45 +00:00
Chris Lattner
97156e7984 Implement Transforms/IndVarsSimplify/complex-scev.ll, a case where we didn't
recognize some simple affine IV's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27982 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-26 18:34:07 +00:00
Andrew Lenharth
94a8d7785c slightly more useful error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-25 19:33:41 +00:00
Andrew Lenharth
ceeb17d8d8 better c99 struct handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-25 19:33:23 +00:00
Andrew Lenharth
9df47b5928 Another simple case type merge case to try
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 15:34:34 +00:00
Andrew Lenharth
613926904f deal with memchr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27830 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 15:34:02 +00:00
Andrew Lenharth
5e091f3e32 friendlier error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27829 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 15:33:35 +00:00
Andrew Lenharth
92e2196f0b stupid stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27821 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 03:45:25 +00:00
Andrew Lenharth
1c212dec24 I understand now. Shoot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27819 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 22:36:11 +00:00
Andrew Lenharth
a544266db7 llvm.memc* improvements. helps PA a lot in some specmarks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 20:59:52 +00:00
Andrew Lenharth
2dbf23afb4 llvm.memc* improvements. helps PA a lot in some specmarks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27811 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 19:54:11 +00:00
Chris Lattner
0fa07f95b6 Implement value #'ing for vector operations, implementing
Regression/Transforms/GCSE/vectorops.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27691 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 05:10:20 +00:00
Andrew Lenharth
99c1942ba7 Handle some kernel code than ends in [0 x sbyte]. I think this is safe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 19:31:49 +00:00
Andrew Lenharth
aed967dbfe revert this, this is safe, if conservative. leave a note to that effect
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27428 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-05 02:42:36 +00:00
Chris Lattner
1f239300d3 Signed shr by a constant is not the same as sdiv by 2^k
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-04 06:11:42 +00:00
Chris Lattner
60a05cc118 Fix Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll and
PR726 by performing consistent signed division, not consistent unsigned
division when evaluating scev's.  Do not touch udivs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-01 04:48:52 +00:00
Andrew Lenharth
79acb69a6f If adding a link to a collapsed, node, ignore offset.
Fixes 2006-03-27-LinkedCollapsed.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27194 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 23:39:58 +00:00
Andrew Lenharth
26c2e73da6 no heap is happening here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 19:03:16 +00:00
Andrew Lenharth
3299cae135 remove qsort for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 18:32:18 +00:00
Andrew Lenharth
0c3a0b6607 allow field sensitivity to be a tunable parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26777 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 05:43:41 +00:00
Andrew Lenharth
4bebcdbca1 Handle one offset with growth case seen in povray. Namely, if we have an offset,
and the offset lands at a field boundary in the old type, construct a new type,
copying the fields masked by the offset from the old type, and unify with that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26775 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 04:04:21 +00:00
Andrew Lenharth
24b1ea159e improve mem intrinsics and add a few things povray uses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26774 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-15 03:43:59 +00:00