summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-2/+2
| | | | | | | | | | | | 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
* Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson2007-11-271-1/+1
| | | | | | This involves a small interface change. llvm-svn: 44348
* Fix a silly bug that Nicholas noticed.Owen Anderson2007-11-261-1/+2
| | | | llvm-svn: 44324
* Allow GVN to eliminate read-only function calls when it can detect that they ↵Owen Anderson2007-11-261-4/+5
| | | | | | are redundant. llvm-svn: 44323
* Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.Nick Lewycky2007-11-252-80/+140
| | | | llvm-svn: 44319
* simplify some code.Chris Lattner2007-11-231-5/+1
| | | | llvm-svn: 44295
* splice some lines together, no functionality change.Chris Lattner2007-11-231-11/+7
| | | | llvm-svn: 44292
* Ding dong, the DoesntAccessMemoryFns andDuncan Sands2007-11-231-113/+0
| | | | | | | | | OnlyReadsMemoryFns tables are dead! We get more, and more accurate, information from gcc via the readnone and readonly function attributes. llvm-svn: 44288
* Fix a bug where we'd try to find a scev value for a bitcast operand,Chris Lattner2007-11-231-0/+8
| | | | | | | even though the bitcast operand did not have integer type. This fixes PR1814. llvm-svn: 44286
* Teach alias analysis about readnone/readonly functions.Duncan Sands2007-11-221-0/+6
| | | | | | Based on a patch by Török Edwin. llvm-svn: 44279
* Instead of calculating constant factors, calculate the number of trailingNick Lewycky2007-11-221-54/+47
| | | | | | bits. Patch from Wojciech Matyjewicz. llvm-svn: 44268
* Create nodes for inline asm so that we don't crash looking for the node later.Nick Lewycky2007-11-221-0/+8
| | | | llvm-svn: 44267
* Small cleanup. Use APInt::getHighBitsSet method instead of shift left.Nick Lewycky2007-11-201-5/+4
| | | | | | "setcc" -> "icmp op" in comments. No functionality change. llvm-svn: 44249
* Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.Nick Lewycky2007-11-201-6/+8
| | | | llvm-svn: 44248
* Fix for PR1801Tanya Lattner2007-11-161-0/+3
| | | | llvm-svn: 44193
* Reverted r44163 per requestAnton Korobeynikov2007-11-151-52/+4
| | | | llvm-svn: 44177
* Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEVNick Lewycky2007-11-151-4/+51
| | | | | | | 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
* More templatization.Owen Anderson2007-11-151-230/+1
| | | | llvm-svn: 44158
* Start the process of making MachineLoopInfo possible by templating Loop.Owen Anderson2007-11-141-396/+0
| | | | llvm-svn: 44097
* Fix PR1774 and BasicAA/2007-11-05-SizeCrash.llChris Lattner2007-11-061-7/+11
| | | | llvm-svn: 43756
* Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.Duncan Sands2007-11-017-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add explicit keywords.Dan Gohman2007-10-291-1/+1
| | | | llvm-svn: 43464
* Make a comment better.Owen Anderson2007-10-261-1/+3
| | | | llvm-svn: 43379
* Silenced a VC++ warning.Hartmut Kaiser2007-10-251-1/+1
| | | | llvm-svn: 43374
* Fix for PR1741.Owen Anderson2007-10-251-2/+3
| | | | llvm-svn: 43326
* Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than ↵Owen Anderson2007-10-231-19/+1
| | | | | | inheriting from it. llvm-svn: 43259
* Move the SCEV object factors from being static members of the individualDan Gohman2007-10-222-177/+193
| | | | | | | SCEV subclasses to being non-static member functions of the ScalarEvolution class. llvm-svn: 43224
* Template DominatorTreeBase by node type. This is the next major step towardsOwen Anderson2007-10-161-1/+1
| | | | | | having dominator information on MBB's. llvm-svn: 43036
* Bindings for the verifier.Gordon Henriksen2007-10-061-0/+38
| | | | llvm-svn: 42707
* Completely merge the implementation details of DomTree and PostDomTree.Owen Anderson2007-10-032-101/+2
| | | | | | Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this, llvm-svn: 42593
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-032-3/+3
| | | | | | of comparing begin() and end(). llvm-svn: 42585
* Factor some code from the DomTree and PostDomTree calculate methods up into Owen Anderson2007-10-032-18/+23
| | | | | | each one's runOnFunction method. llvm-svn: 42563
* Rewrite sqrt and powi to use anyfloat. By popular demand.Dale Johannesen2007-10-021-12/+4
| | | | llvm-svn: 42537
* Template-ize more of the DomTree internal implementation details. Only the ↵Owen Anderson2007-09-301-3/+4
| | | | | | calculate() methods for DomTree and PostDomTree remain to be merged/template-ized. llvm-svn: 42476
* Add a new DenseSet abstraction.Chris Lattner2007-09-301-4/+4
| | | | llvm-svn: 42474
* Switch to densemap rather than std::setDaniel Berlin2007-09-291-3/+26
| | | | llvm-svn: 42462
* Remove unneeded #include.Owen Anderson2007-09-281-1/+0
| | | | llvm-svn: 42428
* Have PostDomTree use the newly templated DFSPass.Owen Anderson2007-09-282-46/+3
| | | | llvm-svn: 42427
* Add sqrt and powi intrinsics for long double.Dale Johannesen2007-09-281-0/+6
| | | | llvm-svn: 42423
* Ignore redundant constraintsDaniel Berlin2007-09-271-2/+20
| | | | llvm-svn: 42397
* Build the correct range for loops with unusual bounds. Fix from Jay Foad.Nick Lewycky2007-09-271-1/+1
| | | | llvm-svn: 42394
* Add a newline to the end of this file.Duncan Sands2007-09-251-1/+1
| | | | llvm-svn: 42314
* Don't execute dump unless NDEBUG isn't defined.Bill Wendling2007-09-241-0/+2
| | | | llvm-svn: 42280
* Comment fixupsDaniel Berlin2007-09-241-12/+11
| | | | llvm-svn: 42279
* Implement offline variable substitution in order to reduce memoryDaniel Berlin2007-09-241-91/+926
| | | | | | | | 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
* Merge significant portions of the DomTree and PostDomTree implementations.Owen Anderson2007-09-241-36/+3
| | | | | | The two remaining unmerged parts are DFSPass, and the Calculate(). llvm-svn: 42255
* Factor the calculation details for PostDomTree out of PostDominators.cpp andOwen Anderson2007-09-232-142/+149
| | | | | | | | into a separate header file. Next step: merging PostDominatorCalculation.h with DominatorCalculation.h. llvm-svn: 42251
* Add partial caching of non-local memory dependence queries. This provides a ↵Owen Anderson2007-09-211-2/+33
| | | | | | | | modest speedup for GVN. llvm-svn: 42185
* Add a flag to mark a dirty cache entry. This is not yet used, but will ↵Owen Anderson2007-09-191-0/+1
| | | | | | | | eventually help non-local memdep caching. llvm-svn: 42137
* ooops...Devang Patel2007-09-181-1/+1
| | | | llvm-svn: 42118
OpenPOWER on IntegriCloud