Commit Graph

1610 Commits

Author SHA1 Message Date
Owen Anderson 46ade4eb9b Template-ize more of the DomTree internal implementation details. Only the calculate() methods for DomTree and PostDomTree remain to be merged/template-ized.
llvm-svn: 42476
2007-09-30 04:17:16 +00:00
Chris Lattner 18a9273e61 Add a new DenseSet abstraction.
llvm-svn: 42474
2007-09-30 00:47:20 +00:00
Daniel Berlin 342181c51d Switch to densemap rather than std::set
llvm-svn: 42462
2007-09-29 00:50:40 +00:00
Owen Anderson d0d5c11d18 Remove unneeded #include.
llvm-svn: 42428
2007-09-28 01:25:07 +00:00
Owen Anderson 0fbef94cd0 Have PostDomTree use the newly templated DFSPass.
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Dale Johannesen 25a00a63eb Add sqrt and powi intrinsics for long double.
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Daniel Berlin a447de7065 Ignore redundant constraints
llvm-svn: 42397
2007-09-27 15:42:23 +00:00
Nick Lewycky 3934961878 Build the correct range for loops with unusual bounds. Fix from Jay Foad.
llvm-svn: 42394
2007-09-27 14:12:54 +00:00
Duncan Sands 384f4bd878 Add a newline to the end of this file.
llvm-svn: 42314
2007-09-25 20:08:48 +00:00
Bill Wendling d40e795c19 Don't execute dump unless NDEBUG isn't defined.
llvm-svn: 42280
2007-09-24 22:43:48 +00:00
Daniel Berlin c82c9f078a Comment fixups
llvm-svn: 42279
2007-09-24 22:20:45 +00:00
Daniel Berlin 5d7136a1df Implement offline variable substitution in order to reduce memory
and time usage.
Fixup operator == to make this work, and add a resize method to DenseMap
so we can resize our hashtable once we know how big it should be.

llvm-svn: 42269
2007-09-24 19:45:49 +00:00
Owen Anderson 4f7c390939 Merge significant portions of the DomTree and PostDomTree implementations.
The two remaining unmerged parts are DFSPass, and the Calculate().

llvm-svn: 42255
2007-09-24 02:29:29 +00:00
Owen Anderson 15efb43db7 Factor the calculation details for PostDomTree out of PostDominators.cpp and
into a separate header file.

Next step: merging PostDominatorCalculation.h with DominatorCalculation.h.

llvm-svn: 42251
2007-09-23 22:21:00 +00:00
Owen Anderson 46da2a6262 Add partial caching of non-local memory dependence queries. This provides a modest
speedup for GVN.

llvm-svn: 42185
2007-09-21 03:53:52 +00:00
Owen Anderson c201cbc802 Add a flag to mark a dirty cache entry. This is not yet used, but will eventually
help non-local memdep caching.

llvm-svn: 42137
2007-09-19 16:13:57 +00:00
Devang Patel ee35011d01 ooops...
llvm-svn: 42118
2007-09-18 23:58:14 +00:00
Daniel Berlin 90aaa1dcf7 Fix bug in andersen's related to test_and_set.
Add operator == and != to SparseBitVector.
Simplify code for test_and_set

llvm-svn: 42018
2007-09-16 23:59:53 +00:00
Daniel Berlin ffce584d1c Rewrite of andersen's to be about 100x faster, cleaner, and begin to support field sensitivity
llvm-svn: 42016
2007-09-16 21:45:02 +00:00
Dan Gohman a7b26e6bb3 Change "tmp." to "tmp" for temporaries created by ScalarEvolutionExpander
for consistency with many other transforms.

llvm-svn: 41957
2007-09-14 20:11:40 +00:00
Owen Anderson f9203ab36a Fix a typo in memdep, which was causing PR1648.
llvm-svn: 41833
2007-09-11 04:31:00 +00:00
Owen Anderson 82e4fa1020 Remove an un-needed dependence query. This improves compile time marginally on 401.bzip2.
llvm-svn: 41792
2007-09-09 21:43:49 +00:00
Owen Anderson e2f23a3abf Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!

llvm-svn: 41758
2007-09-07 04:06:50 +00:00
Dale Johannesen bed9dc423c Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)

llvm-svn: 41747
2007-09-06 18:13:44 +00:00
Evan Cheng 19ce37a1cd Missing break. Patch by Wojciech Matyjewicz.
llvm-svn: 41727
2007-09-05 21:36:14 +00:00
Devang Patel f5e520d892 Use SmallVector.
llvm-svn: 41230
2007-08-21 16:54:51 +00:00
Devang Patel a9e7c4f827 No need to hardcode SmallVector size.
llvm-svn: 41228
2007-08-21 16:39:43 +00:00
Devang Patel b5933bbbd5 Use SmallVector instead of std::vector.
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Anton Korobeynikov 5849a625ff - Use correct header for SCEV inside LoopPass.cpp
- Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug

llvm-svn: 41197
2007-08-20 21:17:26 +00:00
Owen Anderson 5f208bea91 Cache non-local memory dependence analysis. This is a significant compile
time performance win in most cases.

llvm-svn: 41126
2007-08-16 21:27:05 +00:00
Chris Lattner 460e34afed constant fold ptrtoint(inttoptr) with target data when available. This allows
us to fold the entry block of PR1602 to false instead of:

br i1 icmp eq (i32 and (i32 ptrtoint (void (%struct.S*)* inttoptr (i64
1 to void (%struct.S*)*) to i32), i32 1), i32 0), label %cond_next, label
%cond_true

llvm-svn: 41023
2007-08-11 23:49:01 +00:00
Devang Patel d305c404be Do not overuse std::string. Pass around char * directly.
llvm-svn: 41001
2007-08-10 18:29:32 +00:00
Owen Anderson 9b1cc8cac0 Make NonLocal and None const in the right way. :-)
llvm-svn: 40961
2007-08-09 04:42:44 +00:00
Owen Anderson 2b21c3c7a8 Add more comments to memdep.
llvm-svn: 40953
2007-08-08 22:26:03 +00:00
Owen Anderson fa788358d5 Make memdep fit in 80 cols.
llvm-svn: 40950
2007-08-08 22:01:54 +00:00
Owen Anderson b84d3b1c92 Change the None and NonLocal markers in memdep to be const.
llvm-svn: 40946
2007-08-08 21:39:39 +00:00
Chris Lattner 7574ef3ac4 Handle functions with no name better.
llvm-svn: 40926
2007-08-08 16:07:23 +00:00
Chris Lattner 785f9986bd significantly speed up constant folding of calls (and thus all clients that use
ConstantFoldInstruction on calls) by avoiding Value::getName().  getName() constructs
and returns an std::string, which does heap allocation stuff.  This slightly speeds up
instcombine.

llvm-svn: 40924
2007-08-08 06:55:43 +00:00
Chris Lattner c63d4c2e4e reimplement dfs number computation to be significantly faster. This speeds up
natural loop canonicalization (which does many cfg xforms) by 4.3x, for 
example.  This also fixes a bug in postdom dfnumber computation.

llvm-svn: 40920
2007-08-08 05:51:24 +00:00
Owen Anderson 68c6732d2c Clean up a bunch of caching stuff in memdep. This reduces the time to run GVN
on 403.gcc from ~15s to ~10s.

llvm-svn: 40884
2007-08-07 00:33:45 +00:00
Owen Anderson 4898513d96 Improve the accuracy of memdep for determining the dependencies of loads.
This brings GVN to parity with GCSE+LoadVN.

llvm-svn: 40882
2007-08-06 23:26:03 +00:00
Chandler Carruth bebc3bb2e3 This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
llvm-svn: 40872
2007-08-06 20:57:16 +00:00
Nick Lewycky 96606cec20 Let scalar-evolution analyze loops with an unsigned comparison for the exit
condition. Fixes 1597.

llvm-svn: 40867
2007-08-06 19:21:00 +00:00
Nick Lewycky b9819f3a8b Don't assume it's safe to transform a loop just because it's dominated by any
comparison. Fixes bug 1598.

llvm-svn: 40866
2007-08-06 18:33:46 +00:00
Chris Lattner 6493fc79fe Upgrade BasicAliasAnalysis::getModRefBehavior to not call Value::getName,
which dynamically allocates the string result.  This speeds up dse on the
testcase from PR1432 from 0.3781s to 0.1804s (2.1x).

llvm-svn: 40838
2007-08-05 07:50:06 +00:00
Chris Lattner d2eb0c9653 Fix an iterator invalidation bug I induced.
llvm-svn: 40830
2007-08-05 00:24:30 +00:00
Chris Lattner 0e8f85f87e Switch some std::sets to SmallPtrSet. This speeds up
domtree by 10% and postdomtree by 17%

llvm-svn: 40829
2007-08-05 00:15:57 +00:00
Chris Lattner 77e05fe20d Switch the internal "Info" map from an std::map to a DenseMap. This
speeds up idom by about 45% and postidom by about 33%.

Some extra precautions must be taken not to invalidate densemap iterators.

llvm-svn: 40827
2007-08-05 00:02:00 +00:00
Chris Lattner bd0fe01daf switch the DomTreeNodes and IDoms maps in idom/postidom to a
DenseMap instead of an std::map.  This speeds up postdomtree
by about 25% and domtree by about 23%.  It also speeds up clients,
for example, domfrontier by 11%, mem2reg by 4% and ADCE by 6%.

llvm-svn: 40826
2007-08-04 23:48:07 +00:00
Chandler Carruth 7132e00de7 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00