1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
Commit Graph

1692 Commits

Author SHA1 Message Date
Daniel Berlin
3625ac77e4 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
5f29ab68e1 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
3a7df6cf67 Fix a typo in memdep, which was causing PR1648.
llvm-svn: 41833
2007-09-11 04:31:00 +00:00
Owen Anderson
ab8a978ed7 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
4b71e55287 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
86f367a6b7 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
804e104123 Missing break. Patch by Wojciech Matyjewicz.
llvm-svn: 41727
2007-09-05 21:36:14 +00:00
Devang Patel
b86f1fdb3f Use SmallVector.
llvm-svn: 41230
2007-08-21 16:54:51 +00:00
Devang Patel
e92ff0baef No need to hardcode SmallVector size.
llvm-svn: 41228
2007-08-21 16:39:43 +00:00
Devang Patel
f06e667e9c Use SmallVector instead of std::vector.
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Anton Korobeynikov
4e15adaf04 - 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
03cbda804e 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
afb3c33c2a 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
fa7277dd34 Do not overuse std::string. Pass around char * directly.
llvm-svn: 41001
2007-08-10 18:29:32 +00:00
Owen Anderson
3eba1e8f5c Make NonLocal and None const in the right way. :-)
llvm-svn: 40961
2007-08-09 04:42:44 +00:00
Owen Anderson
3db807751b Add more comments to memdep.
llvm-svn: 40953
2007-08-08 22:26:03 +00:00
Owen Anderson
d791c9f667 Make memdep fit in 80 cols.
llvm-svn: 40950
2007-08-08 22:01:54 +00:00
Owen Anderson
f988c3ee5c Change the None and NonLocal markers in memdep to be const.
llvm-svn: 40946
2007-08-08 21:39:39 +00:00
Chris Lattner
3e94308eb7 Handle functions with no name better.
llvm-svn: 40926
2007-08-08 16:07:23 +00:00
Chris Lattner
606d5bced1 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
65d638a918 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
22d94da65b 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
da58c95cd3 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
67d3119773 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
04447caa7b 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
071a2c6a5e 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
428a773f45 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
4b65325ba7 Fix an iterator invalidation bug I induced.
llvm-svn: 40830
2007-08-05 00:24:30 +00:00
Chris Lattner
7cdaff2298 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
a5a692b9bb 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
5912537997 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
00e56b0e81 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
Owen Anderson
d617e4c963 Fix a bug that was causing several miscompilations on SPEC.
llvm-svn: 40746
2007-08-02 17:56:05 +00:00
Christopher Lamb
f27d856acd Implement review feedback.
llvm-svn: 40745
2007-08-02 17:52:00 +00:00
Christopher Lamb
9a2a58c818 Teach BasicAA about noalias parameter attributes, but do it correctly this time.
llvm-svn: 40711
2007-08-02 01:18:14 +00:00
Owen Anderson
7028dfaf9d Make non-local memdep not be recursive, and fix a bug on 403.gcc that this exposed.
llvm-svn: 40692
2007-08-01 22:01:54 +00:00
Dan Gohman
7dd04fb91c More explicit keywords.
llvm-svn: 40673
2007-08-01 15:32:29 +00:00
David Greene
4251f42689 Fix GLIBCXX_DEBUG error owing to dereference of end iterator. There's
no guarantee that an instruction returned by getDependency exists in
the maps.

llvm-svn: 40647
2007-07-31 20:01:27 +00:00
Christopher Lamb
5487dd14b4 Revert overly aggressive interpretation of noalias
llvm-svn: 40635
2007-07-31 16:18:07 +00:00
Devang Patel
6dd3a5f747 Introduce Simple Analysis interface for loop passes.
Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value.

llvm-svn: 40625
2007-07-31 08:00:57 +00:00
Christopher Lamb
907892e47a Teach BasicAA about noalias function parameters. Passes all of DejaGNU and test-suite.
llvm-svn: 40624
2007-07-31 07:04:51 +00:00
Owen Anderson
fff534d147 Use more caching when computing non-local dependence. This makes bzip2 not
use up the entire 32-bit address space.

llvm-svn: 40596
2007-07-30 17:29:24 +00:00
Owen Anderson
ed3e63a203 Fix a bug introduced in my last commit.
llvm-svn: 40542
2007-07-26 18:57:04 +00:00
Owen Anderson
f2b10d3de3 Fix a couple more bugs in the phi construction by pulling in code that does
almost the same things from LCSSA.

llvm-svn: 40540
2007-07-26 18:26:51 +00:00
Owen Anderson
b215074820 Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
llvm-svn: 40495
2007-07-25 21:26:36 +00:00
Owen Anderson
6a1a8d05b8 Add basic support for performing whole-function RLE.
Note: This has not yet been thoroughly tested.  Use at your own risk.

llvm-svn: 40489
2007-07-25 19:57:03 +00:00
Owen Anderson
b9ad251288 Add initial support for non-local memory dependence analysis.
NOTE: This has only been cursorily tested.  Expected improvements soon.

llvm-svn: 40476
2007-07-24 21:52:37 +00:00
Devang Patel
aa2a753350 Unreachable block is not a root node in post dominator tree.
llvm-svn: 40458
2007-07-24 01:02:25 +00:00
Owen Anderson
3a92d35e62 When removing instructions from the analysis, be sure to check the confirmed
flag when determining what to do with dependencies.

llvm-svn: 40079
2007-07-20 06:16:07 +00:00
Devang Patel
45675e56ad Verify loop info.
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Duncan Sands
8c6657894f Replace mysterious code causing a g++-4.2 warning
with hopefully correct code that pleases g++-4.2.

llvm-svn: 40051
2007-07-19 09:42:01 +00:00
Owen Anderson
efc00e35cf Add support for walking up memory def chains, which enables finding many more
dead stores on 400.perlbench.

llvm-svn: 39929
2007-07-16 21:52:50 +00:00
Dan Gohman
ef7c87f4d8 Use ConstantFoldFP for folding all unary floating-point operations which may
have an error, and refector out the code for binary operators into
ConstantFoldBinaryFP and use it for all binary floating-point operations
which may have an error. These functions still rely exclusively on errno
to detect errors though.

llvm-svn: 39923
2007-07-16 15:26:22 +00:00
Dan Gohman
0ba554c0c8 Fix comments about vectors to use the current wording.
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Nick Lewycky
43e5fd5be7 Handle decrementing loops properly. Fixes PR1533.
Always pass the constant as the second parameter to HowManyLessThans.

Remove obsolete "isSigned" parameter.

llvm-svn: 39893
2007-07-16 02:08:00 +00:00
Owen Anderson
b6211f5b50 Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
llvm-svn: 39769
2007-07-12 00:06:21 +00:00
Owen Anderson
bb0f7c00ab Calculate the size of a array allocation correctly.
llvm-svn: 38511
2007-07-10 20:48:38 +00:00
Owen Anderson
04b3497eb7 Fix a crasher when finding the dependency of a call.
llvm-svn: 38510
2007-07-10 20:39:07 +00:00
Owen Anderson
b11a2f3a32 Make this pass registration static as well.
llvm-svn: 38509
2007-07-10 20:21:08 +00:00
Owen Anderson
6c92149ce5 Handle vaarg instructions correctly.
llvm-svn: 38504
2007-07-10 18:43:15 +00:00
Owen Anderson
f4bea94dbd Volatile loads and stores depend on each other.
llvm-svn: 38502
2007-07-10 18:11:42 +00:00
Owen Anderson
1f5fb875b6 Add support for finding the dependencies of call and invoke instructions.
llvm-svn: 38497
2007-07-10 17:59:22 +00:00
Owen Anderson
1bd416b823 Fix the build, and fix the handling of pointer sizes.
llvm-svn: 38494
2007-07-10 17:25:03 +00:00
Owen Anderson
1fabbda503 Fix a bunch of things from Chris' feedback
llvm-svn: 38493
2007-07-10 17:08:11 +00:00
Dan Gohman
4e45063081 Move the APInt form of SCEVUnknown::getIntegerSCEV to SCEVConstant::get, and
use SCEVConstant::get instead of SCEVUnknown::get when constructing a SCEV
for a ConstantInt.

llvm-svn: 38457
2007-07-09 15:25:17 +00:00
Owen Anderson
23d5d3add4 A first stab at memory dependence analysis. This is an interface on top of
alias analysis, adding caching and lazy computation of queries.  This will
be used in planned improvements to memory access optimizations.

llvm-svn: 37958
2007-07-06 23:14:35 +00:00
Dan Gohman
048c6f805b Add explicit keywords.
llvm-svn: 37839
2007-07-02 14:53:37 +00:00
Devang Patel
593a23252d Add loop info verification mechanism.
llvm-svn: 37822
2007-06-29 23:13:42 +00:00
Devang Patel
0b2cb3ec61 CallGraphSCCPass manager may require other passes.
Use schedulePass() to accomodate these requirement instead of directly
assigning a manager to new CallGraph PassManager.

llvm-svn: 37695
2007-06-21 22:29:02 +00:00
Dan Gohman
bb705e230a Rename ScalarEvolution::deleteInstructionFromRecords to
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.

llvm-svn: 37657
2007-06-19 14:28:31 +00:00
Dan Gohman
5db3ad4b32 In SCEVAddExpr::get, skip over any cast operands before looking for nested
add operands after constant operands. The recent change to recognize
sign-extend expressions caused this to be exposed more often.

llvm-svn: 37628
2007-06-18 19:30:09 +00:00
Anton Korobeynikov
76361958e8 Make BasicAliasAnalysis correctly register itself. Patch by Devang
llvm-svn: 37627
2007-06-18 17:13:29 +00:00
Dan Gohman
1c73ccb4d3 Fold a binary operator with constant operands when expanding code for a SCEV.
llvm-svn: 37602
2007-06-15 19:21:55 +00:00
Dan Gohman
838ba27094 Add a SCEV class and supporting code for sign-extend expressions.
This created an ambiguity for expandInTy to decide when to use
sign-extension or zero-extension, but it turns out that most of its callers
don't actually need a type conversion, now that LLVM types don't have
explicit signedness. Drop expandInTy in favor of plain expand, and change
the few places that actually need a type conversion to do it themselves.

llvm-svn: 37591
2007-06-15 14:38:12 +00:00
Devang Patel
ab4cb51479 Break DominatorTree from ETNode.
Remove unused PostETForest.

llvm-svn: 37551
2007-06-12 00:54:38 +00:00
Devang Patel
d544f5262e Use DominatorTree instead of ETForest.
llvm-svn: 37507
2007-06-08 00:17:13 +00:00
Devang Patel
67ede3d635 Use DominatorTree instead of ETForest.
llvm-svn: 37505
2007-06-07 23:53:38 +00:00
Devang Patel
babcd06827 Maintain ETNode as part of DomTreeNode.
This adds redundancy for now.

llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Nick Lewycky
2897eb89d0 Optimize this test. Firstly, only Instructions may use other Instructions.
Secondly, checking whether removal succeeded tells you whether it was in
the map to begin with.

llvm-svn: 37469
2007-06-06 11:26:20 +00:00
Nick Lewycky
c667323382 Fix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll
llvm-svn: 37459
2007-06-06 04:12:20 +00:00
Devang Patel
606fb412b0 Fix PR 1497
Use separate pass id for CFGOnlyPrinter.

llvm-svn: 37439
2007-06-05 20:24:36 +00:00
Devang Patel
2ef6caf14f s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
d58b82f83a s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Chris Lattner
d339f51afd when merging two alias sets together, be sure to propagate the volatility of
the inner set.  This fixes PR1435 and Transforms/LICM/2007-05-22-VolatileSink.ll

llvm-svn: 37305
2007-05-23 06:36:35 +00:00
Dan Gohman
f704d8f166 Add passes -view-cfg and -view-cfg-only that are like -print-cfg and
-print-cfg-only except they use the ViewCFG function, which displays the
CFG rendered with graphviz with gv.

llvm-svn: 37033
2007-05-14 14:25:08 +00:00
Nick Lewycky
c2306ff5b4 Fix typo in comment.
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Lauro Ramos Venancio
57d03e112b Fix build error.
llvm-svn: 36648
2007-05-02 20:37:47 +00:00
Devang Patel
38a66bc82e Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Zhou Sheng
9339daf407 Make use of ConstantInt::isZero instead of ConstantInt::isNullValue.
llvm-svn: 36261
2007-04-19 05:39:12 +00:00
Devang Patel
ffbee86b8e Cache DT[*SI] lookup.
llvm-svn: 36239
2007-04-18 01:19:55 +00:00
Devang Patel
daba9f7064 Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047971.html

llvm-svn: 36236
2007-04-18 00:53:01 +00:00
Chris Lattner
af290edea7 Be more careful when inserting reused instructions. This fixes CodeGen/Generic/2007-04-17-lsr-crash.ll
llvm-svn: 36231
2007-04-17 23:43:50 +00:00
Chris Lattner
e4323f863a Remove use of Instruction::getNext
llvm-svn: 36201
2007-04-17 17:52:45 +00:00
Anton Korobeynikov
f3e62a428a Removed tabs everywhere except autogenerated & external files. Add make
target for tabs checking.

llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Reid Spencer
85f055a567 Revert last patch. It was already fixed.
llvm-svn: 36102
2007-04-16 02:24:41 +00:00
Reid Spencer
e411fd1f10 For PR1336:
Fix a div-by-zero bug noticed by APInt. This fixes:
test/Transforms/IndVarsSimplify/exit_value_tests.llx

llvm-svn: 36099
2007-04-16 01:48:37 +00:00
Owen Anderson
b371956400 Tabs -> Spaces
llvm-svn: 36094
2007-04-15 23:14:18 +00:00
Chris Lattner
c2762b5d83 Fix a nasty bug introduced when apint'ified. This fixes
Transforms/IndVarsSimplify/exit_value_tests.llx

llvm-svn: 36081
2007-04-15 19:52:49 +00:00
Owen Anderson
ea857029ea Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for
constructing ImmediateDominator is now folded into DomTree construction.

This is part of the ongoing work for PR217.

llvm-svn: 36063
2007-04-15 08:47:27 +00:00
Chris Lattner
335f1cb1f8 CSE simple binary expressions when they are inserted. This makes LSR produce
less huge code that needs to be cleaned up by sdisel.

llvm-svn: 35959
2007-04-13 05:04:18 +00:00
Zhou Sheng
c2cfa6111d Eliminate unnecessary APInt construction.
llvm-svn: 35740
2007-04-07 17:48:27 +00:00
Zhou Sheng
7bcd47dbc1 Make APInt variables do the computation stuffs instead of
ConstantExpr::getXX if possible.

llvm-svn: 35738
2007-04-07 17:40:57 +00:00
Zhou Sheng
21dfc2107a Eliminate unnecessary zext/trunc stuffs.
llvm-svn: 35737
2007-04-07 17:12:38 +00:00
Owen Anderson
85b0e20f2a Completely purge DomSet. This is the (hopefully) final patch for PR1171.
llvm-svn: 35731
2007-04-07 07:17:27 +00:00
Owen Anderson
5403a248af Expunge DomSet from LoadValueNumbering. This is part of the continuing
work on PR1171.

llvm-svn: 35723
2007-04-07 04:43:07 +00:00
Chris Lattner
6668db1331 Treat xor of signbit like an add.
llvm-svn: 35586
2007-04-02 05:41:38 +00:00
Reid Spencer
34b5a64f15 The bit counting intrinsics return i32 not the operand type. This fixes
last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls

llvm-svn: 35556
2007-04-01 18:42:20 +00:00
Reid Spencer
88fb617695 For PR1297:
Support overloaded intrinsics bswap, ctpop, cttz, ctlz.

llvm-svn: 35547
2007-04-01 07:35:23 +00:00
Dan Gohman
d0a0ea9916 Change uses of Function::front to Function::getEntryBlock for readability.
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Devang Patel
6a56e3c1a0 Now IndVarSimplify is a LoopPass.
llvm-svn: 35003
2007-03-07 06:39:01 +00:00
Devang Patel
c35610b9f9 Now LoopUnswitch is a LoopPass.
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Devang Patel
bee9c51214 Insert loop into LQ before visiting children.
llvm-svn: 34982
2007-03-06 19:50:49 +00:00
Devang Patel
57322d0462 Use schedulePass() instead of assignPassManager() to add new LPPassManager.
This ensures that require analysis info is available.

llvm-svn: 34980
2007-03-06 19:11:25 +00:00
Devang Patel
b44e86318e Add LPPassManager::insertLoop().
llvm-svn: 34979
2007-03-06 19:00:02 +00:00
Devang Patel
8490ffbcdc LPPassManager::deleteLoopFromQueue() add meat. Cut-n-paste code from
LoopUnswitch pass.

llvm-svn: 34977
2007-03-06 18:38:33 +00:00
Devang Patel
d3cf506865 LPPassManager. Implement preparePassManager() hook.
llvm-svn: 34975
2007-03-06 17:59:37 +00:00
Devang Patel
e3abf559e5 LPPassManager : Add initialization and finalizatino hooks.
llvm-svn: 34968
2007-03-06 16:59:03 +00:00
Devang Patel
e4da6fa801 Use std::deque to manage loop queue inside LPPassManager.
llvm-svn: 34943
2007-03-06 02:30:46 +00:00
Devang Patel
6668a341ae Avoid constructing std::strings unless pass debugging is ON.
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Jeff Cohen
98c99a3a02 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner
dec6a90a00 Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.
llvm-svn: 34900
2007-03-04 04:06:39 +00:00
Reid Spencer
17000a40e2 Guard further against APInt operations with operands of unequal bit width.
llvm-svn: 34897
2007-03-04 01:25:35 +00:00
Reid Spencer
89154fbfff Fix an unequal bitwidth issue.
llvm-svn: 34831
2007-03-02 02:59:25 +00:00
Reid Spencer
1f970769e8 Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
Constant::isNullValue() in situations where it is possible.

llvm-svn: 34821
2007-03-02 00:28:52 +00:00
Reid Spencer
ee77d22f26 Make it possible to create an SCEVUnknown from an APInt as well as an int.
llvm-svn: 34816
2007-03-01 22:28:51 +00:00
Reid Spencer
30758bbe85 Avoid a potential assert out if the loop increment is > 64 bits.
llvm-svn: 34798
2007-03-01 19:45:00 +00:00
Reid Spencer
288f1db60d Construct ConstantInt with simpler constructor.
llvm-svn: 34795
2007-03-01 19:32:33 +00:00
Reid Spencer
18d663b62c Fix last night's 445.gobmk breakage which was caused by comparison of
APInt's of unequal bitwidth.

llvm-svn: 34790
2007-03-01 17:17:21 +00:00
Reid Spencer
3f3487918c Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it.

Patch by Nicholas Lewycky.

llvm-svn: 34782
2007-03-01 07:54:15 +00:00
Reid Spencer
036051c002 APIntify various computations in ScalarEvolution
llvm-svn: 34780
2007-03-01 07:25:48 +00:00
Reid Spencer
67eedb21b7 For PR1205:
Make GetConstantFactor compute its result using an APInt.

llvm-svn: 34765
2007-02-28 23:31:17 +00:00
Reid Spencer
19e5279a38 For PR1205:
Adjust to changes in ConstantRange interface.

llvm-svn: 34762
2007-02-28 22:03:51 +00:00
Reid Spencer
f119927a6f Move ConstantRange class to lib/Support from lib/Analysis and make its
interface not depend on Type or ICmpInst.

llvm-svn: 34761
2007-02-28 22:02:48 +00:00
Reid Spencer
965067a054 For PR1205:
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.

llvm-svn: 34758
2007-02-28 19:57:34 +00:00
Reid Spencer
e2b4631435 For PR1205:
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.

llvm-svn: 34756
2007-02-28 18:57:32 +00:00
Reid Spencer
2b933467ad For PR1205:
Convert ConstantRange class to use APInt internally as its value type for
the constant range, instead of ConstantInt.

llvm-svn: 34745
2007-02-28 17:36:23 +00:00
Devang Patel
89791371ce Make getPassManagerType() const.
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Devang Patel
e0c0b3bea6 Fix thinko.
llvm-svn: 34528
2007-02-23 18:05:55 +00:00
Devang Patel
06b8983669 Loop passes are set up to accept pointer.
llvm-svn: 34527
2007-02-23 17:53:17 +00:00
Devang Patel
46cad14ab8 Teach LoopPass to assign itself one Loop Pass Manager.
llvm-svn: 34510
2007-02-23 00:36:57 +00:00
Devang Patel
9a7b18fa3d Add facility that allows LoopPass to re-insert a loop into
Loop Pass Manager's queue.

llvm-svn: 34509
2007-02-23 00:16:44 +00:00
Devang Patel
bbfd00e658 Add LPPassManager interface that LoopPass can use to skip
rest of the passes in the queue for a loop.

llvm-svn: 34508
2007-02-23 00:10:16 +00:00
Devang Patel
d7448faaed Populate and walk loop queue.
llvm-svn: 34505
2007-02-22 23:45:15 +00:00
Devang Patel
b170ebf833 Add LoopQueue. This is used by loop pass manager to manage loop nest.
llvm-svn: 34504
2007-02-22 23:30:07 +00:00
Devang Patel
aabb87cffe Add Loop Pass Manager.
llvm-svn: 34487
2007-02-22 08:56:17 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Nick Lewycky
b994bafc0f Fix comments to match names of functions.
llvm-svn: 34173
2007-02-11 00:58:49 +00:00
Chris Lattner
058257bdd2 Switch some std::vector's to SmallVectors. This speeds up -load-vn -gcse
by 6% on tramp3d.

llvm-svn: 34167
2007-02-10 22:15:31 +00:00