Chris Lattner
cd5013eb2f
Teach basicaa that 'byval' arguments define a new memory location that
...
can't be aliased to other known objects. This allows us to know that byval
pointer args don't alias globals, etc.
llvm-svn: 46315
2008-01-24 18:00:32 +00:00
Nick Lewycky
ea4de32234
Don't be rude, emit debugging info where asked to.
...
llvm-svn: 45485
2008-01-02 02:49:20 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33
remove attribution from lib Makefiles.
...
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Gordon Henriksen
46137f1e2e
Adding bindings for memory buffers and module providers. Switching
...
to exceptions rather than variants for error handling in Ocaml.
llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Dan Gohman
80af3e255d
Add explicit keywords, and fix a minor typo that they uncovered.
...
llvm-svn: 45034
2007-12-14 15:41:34 +00:00
Wojciech Matyjewicz
d76f256282
Make these loops follow GetGEPOperands() behavior.
...
Let: %q = GEP %p, X, ...
If %p is a GEP, we can chase baseptr further, only if X==0.
llvm-svn: 44999
2007-12-13 16:22:58 +00:00
Duncan Sands
998cd21867
Revert r44626, which turned off the use of readonly
...
and readnone for functions with bodies because it
broke llvm-gcc-4.2 bootstrap. It turns out that,
because of LLVM's array_ref hack, gcc was computing
pure/const attributes wrong (now fixed by turning
off the gcc ipa-pure-const pass).
llvm-svn: 44937
2007-12-12 16:01:40 +00:00
Chris Lattner
77ca8bde9d
Fix a bug in my previous patch, thanks to Jay Foad for
...
pointing this out and correcting the patch!
llvm-svn: 44907
2007-12-12 03:56:54 +00:00
Daniel Berlin
fcce408d12
Changes from Curtis Dunham implementing lazy cycle detection algorithm.
...
Changes from me implementing different way of representing points-to anything.
Changes from me that improve slightly on LCD.
llvm-svn: 44895
2007-12-12 00:37:04 +00:00
Chris Lattner
568d56425b
Implement constant folding if vector<->vector bitcasts where the number
...
of source/dest elements changes. This implements
test/Transforms/InstCombine/bitcast-vector-fold.ll
llvm-svn: 44855
2007-12-11 07:29:44 +00:00
Chris Lattner
5ca42cd342
Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
...
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe. While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".
llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Chris Lattner
95f9743c43
Fix PR1782, patch by Wojtek Matyjewicz!
...
llvm-svn: 44733
2007-12-09 07:35:13 +00:00
Owen Anderson
e3de18ac1d
Fix several cache coherence bugs in MemDep/GVN that were found. Also add some (disabled) debugging code
...
to make such problems easier to diagnose in the future, written by Duncan Sands.
llvm-svn: 44695
2007-12-08 01:37:09 +00:00
Duncan Sands
928143423b
Commit 44487 broke bootstrap of llvm-gcc-4.2. It is
...
not yet clear why, but in the meantime work around the
problem by making less use of readnone/readonly info.
llvm-svn: 44626
2007-12-05 21:03:28 +00:00
Duncan Sands
1e2e4972ff
Rather than having special rules like "intrinsics cannot
...
throw exceptions", just mark intrinsics with the nounwind
attribute. Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).
llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Duncan Sands
14f11d6836
Integrate the readonly/readnone logic more deeply
...
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.
llvm-svn: 44487
2007-12-01 07:51:45 +00:00
Chris Lattner
c75545d4a8
chain update requests properly.
...
llvm-svn: 44460
2007-11-30 18:52:58 +00:00
Duncan Sands
1b0feb42e2
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
3602011bec
Fix PR1146: parameter attributes are longer part of
...
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Owen Anderson
43d4a82d4b
Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. This involves a small interface change.
...
llvm-svn: 44348
2007-11-27 03:43:35 +00:00
Owen Anderson
8b919de439
Fix a silly bug that Nicholas noticed.
...
llvm-svn: 44324
2007-11-26 03:27:38 +00:00
Owen Anderson
05275b7b14
Allow GVN to eliminate read-only function calls when it can detect that they are redundant.
...
llvm-svn: 44323
2007-11-26 02:26:36 +00:00
Nick Lewycky
1536b3f230
Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
...
llvm-svn: 44319
2007-11-25 22:41:31 +00:00
Chris Lattner
cdc6bbd519
simplify some code.
...
llvm-svn: 44295
2007-11-23 22:36:49 +00:00
Chris Lattner
f9379ef949
splice some lines together, no functionality change.
...
llvm-svn: 44292
2007-11-23 22:34:59 +00:00
Duncan Sands
265752ae8f
Ding dong, the DoesntAccessMemoryFns and
...
OnlyReadsMemoryFns tables are dead! We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.
llvm-svn: 44288
2007-11-23 19:30:27 +00:00
Chris Lattner
ac2de0424b
Fix a bug where we'd try to find a scev value for a bitcast operand,
...
even though the bitcast operand did not have integer type. This fixes
PR1814.
llvm-svn: 44286
2007-11-23 08:46:22 +00:00
Duncan Sands
703986d327
Teach alias analysis about readnone/readonly functions.
...
Based on a patch by Török Edwin.
llvm-svn: 44279
2007-11-22 21:43:27 +00:00
Nick Lewycky
aff0962501
Instead of calculating constant factors, calculate the number of trailing
...
bits. Patch from Wojciech Matyjewicz.
llvm-svn: 44268
2007-11-22 07:59:40 +00:00
Nick Lewycky
e34dd3a90f
Create nodes for inline asm so that we don't crash looking for the node later.
...
llvm-svn: 44267
2007-11-22 03:07:37 +00:00
Nick Lewycky
bb69ad8a1b
Small cleanup. Use APInt::getHighBitsSet method instead of shift left.
...
"setcc" -> "icmp op" in comments. No functionality change.
llvm-svn: 44249
2007-11-20 08:44:50 +00:00
Nick Lewycky
f1d30ded71
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
...
llvm-svn: 44248
2007-11-20 08:24:44 +00:00
Tanya Lattner
a3d1741c70
Fix for PR1801
...
llvm-svn: 44193
2007-11-16 22:44:50 +00:00
Anton Korobeynikov
c9ab2516fa
Reverted r44163 per request
...
llvm-svn: 44177
2007-11-15 18:33:16 +00:00
Nick Lewycky
6690b9499b
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
...
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.
llvm-svn: 44163
2007-11-15 06:30:50 +00:00
Owen Anderson
b88ac41e0e
More templatization.
...
llvm-svn: 44158
2007-11-15 05:00:15 +00:00
Owen Anderson
7b92dab615
Start the process of making MachineLoopInfo possible by templating Loop.
...
llvm-svn: 44097
2007-11-14 02:33:58 +00:00
Chris Lattner
02a91dce21
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
...
llvm-svn: 43756
2007-11-06 05:58:42 +00:00
Duncan Sands
eb464e976f
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
65be3b6502
Add explicit keywords.
...
llvm-svn: 43464
2007-10-29 19:52:04 +00:00
Owen Anderson
8bf547855a
Make a comment better.
...
llvm-svn: 43379
2007-10-26 03:47:14 +00:00
Hartmut Kaiser
d57d01b8e0
Silenced a VC++ warning.
...
llvm-svn: 43374
2007-10-25 23:49:14 +00:00
Owen Anderson
6cc4e90741
Fix for PR1741.
...
llvm-svn: 43326
2007-10-25 02:36:18 +00:00
Owen Anderson
33b9693ab8
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
68fc6d7395
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
43fefb53a6
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
06eeba26c1
Bindings for the verifier.
...
llvm-svn: 42707
2007-10-06 21:00:36 +00:00
Owen Anderson
cb51170957
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
30ba45b569
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
91e23d710c
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
a4e3643cb3
Rewrite sqrt and powi to use anyfloat. By popular demand.
...
llvm-svn: 42537
2007-10-02 17:43:59 +00:00
Owen Anderson
09ba812a80
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
1654385fd0
Add a new DenseSet abstraction.
...
llvm-svn: 42474
2007-09-30 00:47:20 +00:00
Daniel Berlin
90642519e9
Switch to densemap rather than std::set
...
llvm-svn: 42462
2007-09-29 00:50:40 +00:00
Owen Anderson
bc2f1ab49d
Remove unneeded #include.
...
llvm-svn: 42428
2007-09-28 01:25:07 +00:00
Owen Anderson
a533c458f5
Have PostDomTree use the newly templated DFSPass.
...
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Dale Johannesen
e61886cee4
Add sqrt and powi intrinsics for long double.
...
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Daniel Berlin
b3d303b103
Ignore redundant constraints
...
llvm-svn: 42397
2007-09-27 15:42:23 +00:00
Nick Lewycky
a44e458ddc
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
db0b588ea2
Add a newline to the end of this file.
...
llvm-svn: 42314
2007-09-25 20:08:48 +00:00
Bill Wendling
9390abcf16
Don't execute dump unless NDEBUG isn't defined.
...
llvm-svn: 42280
2007-09-24 22:43:48 +00:00
Daniel Berlin
f6cb4c3d65
Comment fixups
...
llvm-svn: 42279
2007-09-24 22:20:45 +00:00
Daniel Berlin
f900d1295f
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
a0a11ee8b9
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
bc099e74d8
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
9070cf6dea
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
5454d4cbc9
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
d9c8d99cac
ooops...
...
llvm-svn: 42118
2007-09-18 23:58:14 +00:00
Daniel Berlin
d44b2016ca
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
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
Chris Lattner
8dbca590f4
modify CheckGEPInstructions to take a pointer and size instead of a vector.
...
llvm-svn: 34166
2007-02-10 22:12:53 +00:00
Chris Lattner
d47f00d794
eliminate use of TargetData::getIndexedOffset that takes a vector
...
llvm-svn: 34163
2007-02-10 20:35:22 +00:00
Chris Lattner
fd0d12756d
completely eliminate a temporary vector
...
llvm-svn: 34162
2007-02-10 20:33:15 +00:00
Chris Lattner
9dafd9fe90
Privatize StructLayout::MemberOffsets, adding an accessor
...
llvm-svn: 34156
2007-02-10 19:55:17 +00:00
Reid Spencer
598f6d293b
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
...
LLVM's footprint and speed up linking.
llvm-svn: 33941
2007-02-05 23:42:17 +00:00
Reid Spencer
591bfa1e0b
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Devang Patel
e5e4a44cca
Dump function names when debug-pass=Executions is used.
...
llvm-svn: 33772
2007-02-01 22:38:33 +00:00
Devang Patel
015a474023
Pretty print pass manager
...
llvm-svn: 33766
2007-02-01 22:09:37 +00:00
Chris Lattner
46ce2a4cca
Fix a minor bug in my patch yesterday that broken ConstProp/bswap.ll
...
llvm-svn: 33704
2007-01-31 18:04:55 +00:00
Chris Lattner
9888e0a048
elimiante a temporary vector
...
llvm-svn: 33694
2007-01-31 04:42:05 +00:00
Chris Lattner
be153e31f3
Move some symbolic constant folding code out of instcombine into a place
...
it can be used by multiple clients. This specifically allows the inliner
to constant fold symbolically.
llvm-svn: 33687
2007-01-31 00:51:48 +00:00
Chris Lattner
937bf05f43
The local "ConstantFold" method is now just a watered down version of
...
ConstantFoldInstOperands. Switch to ConstantFoldInstOperands and remove
ConstantFold.
llvm-svn: 33683
2007-01-30 23:52:44 +00:00
Chris Lattner
1765c2eed8
move a bunch of constant folding code f rom Transforms/Utils/Local.cpp into
...
libanalysis/ConstantFolding.cpp.
llvm-svn: 33679
2007-01-30 23:45:45 +00:00
Chris Lattner
116b82d058
adjust to constant folding api changes.
...
llvm-svn: 33673
2007-01-30 23:15:43 +00:00
Reid Spencer
19af04a142
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Devang Patel
3eb643f21e
Use StartPassTimer() and StopPassManager()
...
llvm-svn: 33640
2007-01-29 23:29:54 +00:00
Devang Patel
dd0a7887fa
Measure timings.
...
llvm-svn: 33627
2007-01-29 20:08:03 +00:00
Devang Patel
f1ef346a53
Remove dead code.
...
CallGraphSCCPass does not need to implement runOnModule().
It supports runOnSCC().
llvm-svn: 33516
2007-01-26 01:08:18 +00:00
Devang Patel
f8db9e212e
Fix typo.
...
llvm-svn: 33467
2007-01-23 21:55:17 +00:00
Devang Patel
cfd7cfeccd
Add CallGraphSCCPass::assignPassManager().
...
This enables CalLGraphPassManager.
llvm-svn: 33466
2007-01-23 21:52:35 +00:00
Reid Spencer
e33c18f4d2
For PR970:
...
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!
llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Reid Spencer
14b42c0040
For PR1043:
...
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*
This also fixes PR1120.
Patch by Sheng Zhou.
llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Devang Patel
756af73d3a
Add CGPassManager.
...
llvm-svn: 33309
2007-01-17 21:45:01 +00:00
Jeff Cohen
c4ab4ae3e1
Unbreak VC++ build.
...
llvm-svn: 33242
2007-01-15 20:27:18 +00:00
Chris Lattner
64205203a5
Constant fold llvm.powi.*. This speeds up tramp3d--v4 by 9.5%
...
llvm-svn: 33229
2007-01-15 06:27:37 +00:00
Chris Lattner
c5e1611848
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
...
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
4d7eed35ae
Update code to eliminate calls to isInteger, calling isIntegral instead.
...
llvm-svn: 33220
2007-01-15 01:58:56 +00:00
Chris Lattner
32e75c19b5
Fix correlated exprs regressions
...
llvm-svn: 33214
2007-01-15 01:02:34 +00:00
Chris Lattner
b1b258fd1e
fit to 80 cols.
...
Remove now-extraneous checks for ptr->ptr bitcasts.
Fix PR1109 and Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll. We
need to consider arbitrary sized objects when checking for nested GEP offsets.
llvm-svn: 33195
2007-01-14 05:57:53 +00:00
Chris Lattner
5ddfa77636
Fix PR1101 and Analysis/ScalarEvolution/trip-count.ll
...
llvm-svn: 33193
2007-01-14 01:24:47 +00:00