Commit Graph

1294 Commits

Author SHA1 Message Date
Andrew Lenharth c3cff44880 move calltarget to dsa
llvm-svn: 28546
2006-05-29 23:39:48 +00:00
Andrew Lenharth e465381401 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).

llvm-svn: 28545
2006-05-29 22:58:38 +00:00
Chris Lattner aa2372562e Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.

llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner ce9ac0cdab Remove dead variable
llvm-svn: 28249
2006-05-12 17:41:45 +00:00
Chris Lattner e8cbdbf314 Implement Transforms/IndVarsSimplify/complex-scev.ll, a case where we didn't
recognize some simple affine IV's.

llvm-svn: 27982
2006-04-26 18:34:07 +00:00
Andrew Lenharth 3c775bcd86 slightly more useful error message
llvm-svn: 27971
2006-04-25 19:33:41 +00:00
Andrew Lenharth f5a713d273 better c99 struct handling
llvm-svn: 27970
2006-04-25 19:33:23 +00:00
Andrew Lenharth 02f9df3b7b Another simple case type merge case to try
llvm-svn: 27831
2006-04-19 15:34:34 +00:00
Andrew Lenharth edf349aba6 deal with memchr
llvm-svn: 27830
2006-04-19 15:34:02 +00:00
Andrew Lenharth 7f2cee3d3e friendlier error message
llvm-svn: 27829
2006-04-19 15:33:35 +00:00
Andrew Lenharth 7c8be502e9 stupid stuff
llvm-svn: 27821
2006-04-19 03:45:25 +00:00
Andrew Lenharth 3e642d012a I understand now. Shoot.
llvm-svn: 27819
2006-04-18 22:36:11 +00:00
Andrew Lenharth f70cb84083 llvm.memc* improvements. helps PA a lot in some specmarks
llvm-svn: 27812
2006-04-18 20:59:52 +00:00
Andrew Lenharth 49e188d7f7 llvm.memc* improvements. helps PA a lot in some specmarks
llvm-svn: 27811
2006-04-18 19:54:11 +00:00
Chris Lattner 68c650ca45 Implement value #'ing for vector operations, implementing
Regression/Transforms/GCSE/vectorops.ll

llvm-svn: 27691
2006-04-14 05:10:20 +00:00
Andrew Lenharth 4aa3001625 Handle some kernel code than ends in [0 x sbyte]. I think this is safe
llvm-svn: 27672
2006-04-13 19:31:49 +00:00
Andrew Lenharth 477169e36a Move this to lib/Analysis.
This reduces Core size, yay.

llvm-svn: 27468
2006-04-06 22:58:58 +00:00
Andrew Lenharth 8f321af723 revert this, this is safe, if conservative. leave a note to that effect
llvm-svn: 27428
2006-04-05 02:42:36 +00:00
Chris Lattner 6b2c9748c3 Signed shr by a constant is not the same as sdiv by 2^k
llvm-svn: 27395
2006-04-04 06:11:42 +00:00
Chris Lattner 98e9604d5d 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.

llvm-svn: 27326
2006-04-01 04:48:52 +00:00
Andrew Lenharth d7e612bbc4 If adding a link to a collapsed, node, ignore offset.
Fixes 2006-03-27-LinkedCollapsed.ll

llvm-svn: 27194
2006-03-27 23:39:58 +00:00
Andrew Lenharth b3dae7cfa9 no heap is happening here
llvm-svn: 26781
2006-03-15 19:03:16 +00:00
Andrew Lenharth c0b65305f1 remove qsort for now
llvm-svn: 26779
2006-03-15 18:32:18 +00:00
Andrew Lenharth fb4df2055f allow field sensitivity to be a tunable parameter
llvm-svn: 26777
2006-03-15 05:43:41 +00:00
Andrew Lenharth 3196422df0 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.

llvm-svn: 26775
2006-03-15 04:04:21 +00:00
Andrew Lenharth c254e5b180 improve mem intrinsics and add a few things povray uses
llvm-svn: 26774
2006-03-15 03:43:59 +00:00
Nate Begeman d5811b965d Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator
set construction, rather than intersecting various std::sets.  This reduces
the memory usage for the testcase in PR681 from 496 to 26MB of ram on my
darwin system, and reduces the runtime from 32.8 to 0.8 seconds on a
2.5GHz G5.  This also enables future code sharing between Dom and PostDom
now that they share near-identical implementations.

llvm-svn: 26707
2006-03-11 02:20:46 +00:00
Chris Lattner bb40a9fa58 Use autogenerated mod/ref info for intrinsics.
llvm-svn: 26670
2006-03-09 22:31:29 +00:00
Chris Lattner 3e19c23765 Fix a crash compiling Obsequi
llvm-svn: 26529
2006-03-04 21:48:01 +00:00
Chris Lattner 071faf25e0 Be more conservative with our symbolic alias analysis. In particular,
don't assume that A[1][0] and A[0][i] can't alias.  "i" might be out of
range, or even negative.  This fixes a miscompilation of 188.ammp (which
does bad pointer tricks) with the new CFE.

Testcase here: Analysis/BasicAA/2006-03-03-BadArraySubscript.ll

llvm-svn: 26515
2006-03-04 02:06:34 +00:00
Chris Lattner bce2626d8a updates for recent changes
llvm-svn: 26481
2006-03-03 01:21:36 +00:00
Chris Lattner 093c159efb Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.

llvm-svn: 26476
2006-03-03 00:00:25 +00:00
Chris Lattner 94f936d8ef add an assert
llvm-svn: 26178
2006-02-14 20:14:17 +00:00
Chris Lattner a6da69cab0 Pull the InsertCastOfTo out of the header, implement CSE'ing of arguments.
llvm-svn: 25973
2006-02-04 09:51:53 +00:00
Chris Lattner b6a1865bca Value# select instructions, allowing -gcse to remove duplicates
llvm-svn: 25969
2006-02-04 09:15:29 +00:00
Chris Lattner 6806c02380 Add explicit iostream #includes
llvm-svn: 25513
2006-01-22 23:19:18 +00:00
Chris Lattner 469640e506 Add explicit #includes of <iostream>
llvm-svn: 25509
2006-01-22 22:53:01 +00:00
Reid Spencer b4f9a6f110 For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.

llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Chris Lattner c020bcf850 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!

llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Chris Lattner 00ca8d2de8 Add a new CallGraph::getOrInsertFunction for clients to use when updating
the callgraph.

llvm-svn: 25317
2006-01-14 20:03:00 +00:00
Chris Lattner bc351e171f add a dump method to CallGraph
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Nate Begeman 82049eba2c Add bswap intrinsics as documented in the Language Reference
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Chris Lattner 9db9f8a902 Switch loopinfo to using ETForest instead of DominatorSet to compute itself.
Patch by Daniel Berlin!

llvm-svn: 25199
2006-01-11 05:08:29 +00:00
Reid Spencer cfc60f3484 Remove unused inclusion of SymbolTable.h
llvm-svn: 25170
2006-01-10 03:48:34 +00:00
Chris Lattner a60738316e Fix a problem exposed by the et-forest work. Load-vn needs these passes live
whenever it is live, not just when load-vn is computed initially

llvm-svn: 25146
2006-01-08 09:10:04 +00:00
Chris Lattner 6c9cbdba1a Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!

llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner 44497859f9 Make the -print-alias-sets pass work for printing out something other than
the default aa impl results.

llvm-svn: 25062
2006-01-03 06:05:22 +00:00
Chris Lattner be19877731 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!

llvm-svn: 24944
2005-12-22 06:07:52 +00:00
John Criswell 757035ead9 Prefix DSA specific options with dsa.
Make the dsa-alloc-list and dsa-free-list options hidden.

llvm-svn: 24864
2005-12-19 20:14:38 +00:00
John Criswell 45bb70d8f9 Added an option to specify the names of heap freeing functions.
llvm-svn: 24863
2005-12-19 19:54:23 +00:00