Chris Lattner
0fc613b85d
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
...
llvm-svn: 43756
2007-11-06 05:58:42 +00:00
Duncan Sands
44b8721de8
Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.
...
The meaning of getTypeSize was not clear - clarifying it is important
now that we have x86 long double and arbitrary precision integers.
The issue with long double is that it requires 80 bits, and this is
not a multiple of its alignment. This gives a primitive type for
which getTypeSize differed from getABITypeSize. For arbitrary precision
integers it is even worse: there is the minimum number of bits needed to
hold the type (eg: 36 for an i36), the maximum number of bits that will
be overwriten when storing the type (40 bits for i36) and the ABI size
(i.e. the storage size rounded up to a multiple of the alignment; 64 bits
for i36).
This patch removes getTypeSize (not really - it is still there but
deprecated to allow for a gradual transition). Instead there is:
(1) getTypeSizeInBits - a number of bits that suffices to hold all
values of the type. For a primitive type, this is the minimum number
of bits. For an i36 this is 36 bits. For x86 long double it is 80.
This corresponds to gcc's TYPE_PRECISION.
(2) getTypeStoreSizeInBits - the maximum number of bits that is
written when storing the type (or read when reading it). For an
i36 this is 40 bits, for an x86 long double it is 80 bits. This
is the size alias analysis is interested in (getTypeStoreSize
returns the number of bytes). There doesn't seem to be anything
corresponding to this in gcc.
(3) getABITypeSizeInBits - this is getTypeStoreSizeInBits rounded
up to a multiple of the alignment. For an i36 this is 64, for an
x86 long double this is 96 or 128 depending on the OS. This is the
spacing between consecutive elements when you form an array out of
this type (getABITypeSize returns the number of bytes). This is
TYPE_SIZE in gcc.
Since successive elements in a SequentialType (arrays, pointers
and vectors) need to be aligned, the spacing between them will be
given by getABITypeSize. This means that the size of an array
is the length times the getABITypeSize. It also means that GEP
computations need to use getABITypeSize when computing offsets.
Furthermore, if an alloca allocates several elements at once then
these too need to be aligned, so the size of the alloca has to be
the number of elements multiplied by getABITypeSize. Logically
speaking this doesn't have to be the case when allocating just
one element, but it is simpler to also use getABITypeSize in this
case. So alloca's and mallocs should use getABITypeSize. Finally,
since gcc's only notion of size is that given by getABITypeSize, if
you want to output assembler etc the same as gcc then getABITypeSize
is the size you want.
Since a store will overwrite no more than getTypeStoreSize bytes,
and a read will read no more than that many bytes, this is the
notion of size appropriate for alias analysis calculations.
In this patch I have corrected all type size uses except some of
those in ScalarReplAggregates, lib/Codegen, lib/Target (the hard
cases). I will get around to auditing these too at some point,
but I could do with some help.
Finally, I made one change which I think wise but others might
consider pointless and suboptimal: in an unpacked struct the
amount of space allocated for a field is now given by the ABI
size rather than getTypeStoreSize. I did this because every
other place that reserves memory for a type (eg: alloca) now
uses getABITypeSize, and I didn't want to make an exception
for unpacked structs, i.e. I did it to make things more uniform.
This only effects structs containing long doubles and arbitrary
precision integers. If someone wants to pack these types more
tightly they can always use a packed struct.
llvm-svn: 43620
2007-11-01 20:53:16 +00:00
Dan Gohman
1961c28d46
Add explicit keywords.
...
llvm-svn: 43464
2007-10-29 19:52:04 +00:00
Owen Anderson
b7971bbdd7
Make a comment better.
...
llvm-svn: 43379
2007-10-26 03:47:14 +00:00
Hartmut Kaiser
1207cd6b1b
Silenced a VC++ warning.
...
llvm-svn: 43374
2007-10-25 23:49:14 +00:00
Owen Anderson
7827a3f366
Fix for PR1741.
...
llvm-svn: 43326
2007-10-25 02:36:18 +00:00
Owen Anderson
9c614117da
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
...
llvm-svn: 43259
2007-10-23 20:58:37 +00:00
Dan Gohman
a37eaf2bf9
Move the SCEV object factors from being static members of the individual
...
SCEV subclasses to being non-static member functions of the ScalarEvolution
class.
llvm-svn: 43224
2007-10-22 18:31:58 +00:00
Owen Anderson
4187801f85
Template DominatorTreeBase by node type. This is the next major step towards
...
having dominator information on MBB's.
llvm-svn: 43036
2007-10-16 19:59:25 +00:00
Gordon Henriksen
c3d661a0ee
Bindings for the verifier.
...
llvm-svn: 42707
2007-10-06 21:00:36 +00:00
Owen Anderson
8313e75ea7
Completely merge the implementation details of DomTree and PostDomTree.
...
Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this,
llvm-svn: 42593
2007-10-03 21:25:45 +00:00
Dan Gohman
c731c97fac
Use empty() member functions when that's what's being tested for instead
...
of comparing begin() and end().
llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Owen Anderson
b60f254975
Factor some code from the DomTree and PostDomTree calculate methods up into
...
each one's runOnFunction method.
llvm-svn: 42563
2007-10-03 03:20:17 +00:00
Dale Johannesen
4d4e77af8e
Rewrite sqrt and powi to use anyfloat. By popular demand.
...
llvm-svn: 42537
2007-10-02 17:43:59 +00:00
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
Owen Anderson
0ac1fc8ac1
Fix a bug that was causing several miscompilations on SPEC.
...
llvm-svn: 40746
2007-08-02 17:56:05 +00:00
Christopher Lamb
531f260ac0
Implement review feedback.
...
llvm-svn: 40745
2007-08-02 17:52:00 +00:00
Christopher Lamb
1a80201426
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
c321e5e272
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
34d442f274
More explicit keywords.
...
llvm-svn: 40673
2007-08-01 15:32:29 +00:00
David Greene
87801e8773
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
283152404d
Revert overly aggressive interpretation of noalias
...
llvm-svn: 40635
2007-07-31 16:18:07 +00:00
Devang Patel
cc2b233b62
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
b08423b36e
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
212d5c27f6
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
0f692f27a3
Fix a bug introduced in my last commit.
...
llvm-svn: 40542
2007-07-26 18:57:04 +00:00
Owen Anderson
dbf23ccaa0
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
9b796348bd
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
5e5599b7ce
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
d998be79cc
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
13b25df0e9
Unreachable block is not a root node in post dominator tree.
...
llvm-svn: 40458
2007-07-24 01:02:25 +00:00
Owen Anderson
edb926bfe3
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
a273d1cd3a
Verify loop info.
...
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Duncan Sands
60f28bff4c
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
7fcaaadf1c
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
72efc04d8e
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
06c60b6032
Fix comments about vectors to use the current wording.
...
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Nick Lewycky
5246026c8c
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
1e1bace52b
Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
...
llvm-svn: 39769
2007-07-12 00:06:21 +00:00
Owen Anderson
c432490b4c
Calculate the size of a array allocation correctly.
...
llvm-svn: 38511
2007-07-10 20:48:38 +00:00
Owen Anderson
faf9e42479
Fix a crasher when finding the dependency of a call.
...
llvm-svn: 38510
2007-07-10 20:39:07 +00:00
Owen Anderson
1279eaf776
Make this pass registration static as well.
...
llvm-svn: 38509
2007-07-10 20:21:08 +00:00
Owen Anderson
1fa6132e85
Handle vaarg instructions correctly.
...
llvm-svn: 38504
2007-07-10 18:43:15 +00:00
Owen Anderson
94a21dd1e0
Volatile loads and stores depend on each other.
...
llvm-svn: 38502
2007-07-10 18:11:42 +00:00
Owen Anderson
9c88457abe
Add support for finding the dependencies of call and invoke instructions.
...
llvm-svn: 38497
2007-07-10 17:59:22 +00:00
Owen Anderson
2552a12e65
Fix the build, and fix the handling of pointer sizes.
...
llvm-svn: 38494
2007-07-10 17:25:03 +00:00
Owen Anderson
47352db672
Fix a bunch of things from Chris' feedback
...
llvm-svn: 38493
2007-07-10 17:08:11 +00:00
Dan Gohman
0a76e7f678
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
c0daf5fe53
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
1eb8ed47f5
Add explicit keywords.
...
llvm-svn: 37839
2007-07-02 14:53:37 +00:00
Devang Patel
88197332e7
Add loop info verification mechanism.
...
llvm-svn: 37822
2007-06-29 23:13:42 +00:00
Devang Patel
703de8fea8
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
32f53bbd85
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
eed125f315
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
02b0997b28
Make BasicAliasAnalysis correctly register itself. Patch by Devang
...
llvm-svn: 37627
2007-06-18 17:13:29 +00:00
Dan Gohman
00cb117b07
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
cb9e09ad57
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
a6ff5bf9ba
Break DominatorTree from ETNode.
...
Remove unused PostETForest.
llvm-svn: 37551
2007-06-12 00:54:38 +00:00
Devang Patel
aee309e353
Use DominatorTree instead of ETForest.
...
llvm-svn: 37507
2007-06-08 00:17:13 +00:00
Devang Patel
31257adce9
Use DominatorTree instead of ETForest.
...
llvm-svn: 37505
2007-06-07 23:53:38 +00:00
Devang Patel
af41e4a192
Maintain ETNode as part of DomTreeNode.
...
This adds redundancy for now.
llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Nick Lewycky
df543f4b84
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
3e84212897
Fix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll
...
llvm-svn: 37459
2007-06-06 04:12:20 +00:00
Devang Patel
3e6519e9fa
Fix PR 1497
...
Use separate pass id for CFGOnlyPrinter.
llvm-svn: 37439
2007-06-05 20:24:36 +00:00
Devang Patel
bdd1aaef10
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
0e8aa7b69a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Chris Lattner
688b2807df
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
90d97ac1e6
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
e7da2d6ac3
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
e95c6ad802
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
41223586a2
Fix build error.
...
llvm-svn: 36648
2007-05-02 20:37:47 +00:00
Devang Patel
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Zhou Sheng
aafe4e216e
Make use of ConstantInt::isZero instead of ConstantInt::isNullValue.
...
llvm-svn: 36261
2007-04-19 05:39:12 +00:00
Devang Patel
883ff07672
Cache DT[*SI] lookup.
...
llvm-svn: 36239
2007-04-18 01:19:55 +00:00
Devang Patel
5976db0103
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
135a077c93
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
672db8eab5
Remove use of Instruction::getNext
...
llvm-svn: 36201
2007-04-17 17:52:45 +00:00
Anton Korobeynikov
fb80151c42
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
a3cfb8a683
Revert last patch. It was already fixed.
...
llvm-svn: 36102
2007-04-16 02:24:41 +00:00
Reid Spencer
8be22e4e04
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
f064c92298
Tabs -> Spaces
...
llvm-svn: 36094
2007-04-15 23:14:18 +00:00
Chris Lattner
cad61e81c1
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
f35a1dbc7a
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
e71f1447f7
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
2852d99a48
Eliminate unnecessary APInt construction.
...
llvm-svn: 35740
2007-04-07 17:48:27 +00:00
Zhou Sheng
c0297896aa
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
1459c73481
Eliminate unnecessary zext/trunc stuffs.
...
llvm-svn: 35737
2007-04-07 17:12:38 +00:00
Owen Anderson
8763ba1b88
Completely purge DomSet. This is the (hopefully) final patch for PR1171.
...
llvm-svn: 35731
2007-04-07 07:17:27 +00:00
Owen Anderson
1a290bbddf
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
a3e0bb4ebb
Treat xor of signbit like an add.
...
llvm-svn: 35586
2007-04-02 05:41:38 +00:00
Reid Spencer
add6123405
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
6bba6c8143
For PR1297:
...
Support overloaded intrinsics bswap, ctpop, cttz, ctlz.
llvm-svn: 35547
2007-04-01 07:35:23 +00:00
Dan Gohman
dcb291faa4
Change uses of Function::front to Function::getEntryBlock for readability.
...
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Devang Patel
2ac57e1f02
Now IndVarSimplify is a LoopPass.
...
llvm-svn: 35003
2007-03-07 06:39:01 +00:00
Devang Patel
901a27d892
Now LoopUnswitch is a LoopPass.
...
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Devang Patel
db0db9740b
Insert loop into LQ before visiting children.
...
llvm-svn: 34982
2007-03-06 19:50:49 +00:00
Devang Patel
4a8725cf2f
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
ef7ac13406
Add LPPassManager::insertLoop().
...
llvm-svn: 34979
2007-03-06 19:00:02 +00:00
Devang Patel
fca3aa3645
LPPassManager::deleteLoopFromQueue() add meat. Cut-n-paste code from
...
LoopUnswitch pass.
llvm-svn: 34977
2007-03-06 18:38:33 +00:00
Devang Patel
1699384509
LPPassManager. Implement preparePassManager() hook.
...
llvm-svn: 34975
2007-03-06 17:59:37 +00:00