summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate use of uint32_t to improve compatibility with cygwinChris Lattner2009-01-201-6/+6
| | | | llvm-svn: 62590
* Verify debug info.Devang Patel2009-01-191-0/+94
| | | | llvm-svn: 62545
* CMake: Add lib/Analysis/CaptureTracking.cppOscar Fuentes2009-01-181-0/+1
| | | | llvm-svn: 62462
* BasicAliasAnalysis and FunctionAttrs were bothDuncan Sands2009-01-182-52/+113
| | | | | | | | | doing very similar pointer capture analysis. Factor out the common logic. The new version is from FunctionAttrs since it does a better job than the version in BasicAliasAnalysis llvm-svn: 62461
* add a commentGabor Greif2009-01-181-0/+1
| | | | llvm-svn: 62436
* switch over some other methods from indices to iteratorsGabor Greif2009-01-171-8/+8
| | | | llvm-svn: 62430
* speed up iterative loop by using iterators. changes direction, but ↵Gabor Greif2009-01-171-4/+4
| | | | | | | | functionally equivalent if this works out, I'll change the others next. llvm-svn: 62385
* Reinstate r60509 from Dale:Nick Lewycky2009-01-161-0/+1
| | | | | | Make the debugging dump be a full line. llvm-svn: 62325
* Add the private linkage.Rafael Espindola2009-01-153-5/+5
| | | | llvm-svn: 62279
* minor simplificationGabor Greif2009-01-141-2/+2
| | | | llvm-svn: 62232
* Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,Nick Lewycky2009-01-132-211/+41
| | | | | | PR3296 and PR3302. llvm-svn: 62160
* Add classof() methods to support isa<> and other related facilities.Devang Patel2009-01-121-8/+2
| | | | llvm-svn: 62104
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-123-3/+3
| | | | | | suggested by Chris. llvm-svn: 62099
* make tblgen autogenerate the nocapture intrinsics for Chris Lattner2009-01-121-4/+0
| | | | | | | llvm.memcpy/memset/memmove. This allows removal of some hackish code from basicaa. llvm-svn: 62071
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-092-4/+4
| | | | llvm-svn: 61991
* ValueTracker can't assume that an alloca with no specified alignment Chris Lattner2009-01-081-1/+1
| | | | | | | | will get its preferred alignment. It has to be careful and cautiously assume it will just get the ABI alignment. This prevents instcombine from rounding up the alignment of a load/store without adjusting the alignment of the alloca. llvm-svn: 61934
* When checking if an Argument escapes, check ifDuncan Sands2009-01-051-7/+13
| | | | | | | | the argument is marked nocapture - no need to analyze the argument if the answer is already known! llvm-svn: 61753
* Add classof() methods so that dwarf writer can decide what DIDescriptor is ↵Devang Patel2009-01-051-0/+5
| | | | | | in its hand. llvm-svn: 61740
* Construct array/vector type DIEs using DebugInfo.Devang Patel2009-01-051-1/+6
| | | | llvm-svn: 61724
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-052-0/+10
| | | | llvm-svn: 61715
* We know it's always a SCEVConstant if it gets here, so just cast it andNick Lewycky2009-01-031-6/+2
| | | | | | inline the only use of isNegative. Fixes warning reported by Mike Stump. llvm-svn: 61600
* Don't try to analyze this "backward" case. This is overly conservative Nick Lewycky2009-01-021-0/+12
| | | | | | pending a correct solution. llvm-svn: 61589
* Check that the function prototypes are correct before assuming that the Nick Lewycky2008-12-271-18/+28
| | | | | | parameters are pointers. llvm-svn: 61451
* Resubmit support for the 'nocapture' attribute.Nick Lewycky2008-12-191-6/+17
| | | | | | | | | | The problematic part of this patch is that we were out of attribute bits, requiring some fancy bit hacking to make it fit (by shrinking alignment) without breaking existing users or the file format. This change will require users to rebuild llvm-gcc to match llvm. llvm-svn: 61239
* Remove dead comments.Evan Cheng2008-12-181-3/+0
| | | | llvm-svn: 61201
* Today the front-ends (llvm-gcc and clang) generate multiple ↵Devang Patel2008-12-171-13/+39
| | | | | | | | llvm.dbg.compile_units to identify source file for various debug entities. Each llvm.dbg.compile_unit matches one file on the disk. However, the backend only supports one DW_TAG_compile_unit per .o file. The backend selects first compile_unit from the vector to construct DW_TAG_compile_unit entry, which is not correct in all cases. First step to resolve this is, record file name and directory directly in debug info for various debug entities. llvm-svn: 61164
* Temporarily revert r61019, r61030, and r61040. These were breaking LLVM ReleaseBill Wendling2008-12-161-17/+6
| | | | | | builds. llvm-svn: 61094
* CMake: Added DbgInfoPrinter.cpp to lib/Analysis/CMakeFiles.txt.Oscar Fuentes2008-12-161-0/+1
| | | | llvm-svn: 61087
* Add -print-dbginfo pass that prints LLVM IR with comments inserted to showTorok Edwin2008-12-161-0/+145
| | | | | | | which source/line a certain BB/instruction comes from, original variable names, and original (unmangled) C++ name of functions. llvm-svn: 61085
* Add utility functions to search for DbgStopPointInst corresponding to anTorok Edwin2008-12-161-0/+73
| | | | | | | instruction or BasicBlock, and to search for DbgDeclareInst corresponding to a variable. llvm-svn: 61084
* use different name for parameter to make it clear that we set DIDescriptor::GVTorok Edwin2008-12-161-2/+2
| | | | llvm-svn: 61083
* Generalize support for analyzing loops to include SLE/SGE loop exit conditionsNick Lewycky2008-12-161-24/+23
| | | | | | and support for non-unit strides with signed exit conditions. llvm-svn: 61082
* fix PR3217: fully cached queries need to be verified against the Chris Lattner2008-12-161-1/+21
| | | | | | | | visited set before they are used. If used, their blocks need to be added to the visited set so that subsequent queries don't use conflicting pointer values in the cache result blocks. llvm-svn: 61080
* Teach basicaa to use the nocapture attribute when possible. When theChris Lattner2008-12-151-6/+17
| | | | | | intrinsics are properly marked nocapture, the fixme should be addressed. llvm-svn: 61040
* if we have a phi translation failure of the start block,Chris Lattner2008-12-151-0/+1
| | | | | | | return *just* a clobber of the start block, not other random stuff as well. llvm-svn: 61026
* Implement initial support for PHI translation in memdep. This means thatChris Lattner2008-12-151-39/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memdep keeps track of how PHIs affect the pointer in dep queries, which allows it to eliminate the load in cases like rle-phi-translate.ll, which basically end up being: BB1: X = load P br BB3 BB2: Y = load Q br BB3 BB3: R = phi [P] [Q] load R turning "load R" into a phi of X/Y. In addition to additional exposed opportunities, this makes memdep safe in many cases that it wasn't before (which is required for load PRE) and also makes it substantially more efficient. For example, consider: bb1: // has many predecessors. P = some_operator() load P In this example, previously memdep would scan all the predecessors of BB1 to see if they had something that would mustalias P. In some cases (e.g. test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end up eliminating something. In many other cases though, it would scan and not find anything useful. MemDep now stops at a block if the pointer is defined in that block and cannot be phi translated to predecessors. This causes it to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not scanning tons of stuff that is unlikely to be useful. For example, this speeds up GVN as a whole from 3.928s to 2.448s (60%)!. IMO, scalar GVN should be enhanced to simplify the rle-must-alias pointer base anyway, which would allow the loads to be eliminated. In the future, this should be enhanced to phi translate through geps and bitcasts as well (as indicated by FIXMEs) making memdep even more powerful. llvm-svn: 61022
* Fix whitespace in comment.Nick Lewycky2008-12-151-2/+1
| | | | | | | Remove TODO; icmp isn't a binary operator, so this function will never deal with them. llvm-svn: 61020
* Fix getFieldAs() to use the parameter instead of 6.Torok Edwin2008-12-131-0/+8
| | | | | | Add missing DIType constructor, needed by DIVariable::getType(). llvm-svn: 60976
* Revert my re-instated reverted commit, fixes the bootstrap build on x86-64 ↵Nick Lewycky2008-12-121-15/+15
| | | | | | linux. llvm-svn: 60951
* Sneaky, sneaky: move the -1 to the outside of the SMax. Reinstate theNick Lewycky2008-12-111-15/+15
| | | | | | optimization of SGE/SLE with unit stride, now that it works properly. llvm-svn: 60881
* Don't dereference the end() iterator. This wasDuncan Sands2008-12-101-2/+3
| | | | | | | causing a bunch of failures when running "make ENABLE_EXPENSIVE_CHECKS=1 check". llvm-svn: 60832
* Allow basicaa to walk through geps with identical indices in Chris Lattner2008-12-101-18/+32
| | | | | | | | | | | parallel, allowing it to decide that P/Q must alias if A/B must alias in things like: P = gep A, 0, i, 1 Q = gep B, 0, i, 1 This allows GVN to delete 62 more instructions out of 403.gcc. llvm-svn: 60820
* loosen up an assertion that isn't valid when called fromChris Lattner2008-12-091-1/+1
| | | | | | | invalidateCachedPointerInfo. Thanks to Bill for sending me a testcase. llvm-svn: 60805
* Teach GVN to invalidate some memdep information when it does an RAUWChris Lattner2008-12-091-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | of a pointer. This allows is to catch more equivalencies. For example, the type_lists_compatible_p function used to require two iterations of the gvn pass (!) to delete its 18 redundant loads because the first pass would CSE all the addressing computation cruft, which would unblock the second memdep/gvn passes from recognizing them. This change allows memdep/gvn to catch all 18 when run just once on the function (as is typical :) instead of just 3. On all of 403.gcc, this bumps up the # reundandancies found from: 63 gvn - Number of instructions PRE'd 153991 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted to: 63 gvn - Number of instructions PRE'd 154137 gvn - Number of instructions deleted 50185 gvn - Number of loads deleted +120 loads deleted isn't bad. llvm-svn: 60799
* Teach BasicAA::getModRefInfo(CallSite, CallSite) someChris Lattner2008-12-092-21/+52
| | | | | | | | | | | | | | | | | | | | | | tricks based on readnone/readonly functions. Teach memdep to look past readonly calls when analyzing deps for a readonly call. This allows elimination of a few more calls from 403.gcc: before: 63 gvn - Number of instructions PRE'd 153986 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted after: 63 gvn - Number of instructions PRE'd 153991 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted 5 calls isn't much, but this adds plumbing for the next change. llvm-svn: 60794
* Fix a fixme: allow memdep to see past read-only calls when doingChris Lattner2008-12-091-4/+13
| | | | | | | | | | | | | load dependence queries. This allows GVN to eliminate a few more instructions on 403.gcc: 152598 gvn - Number of instructions deleted 49240 gvn - Number of loads deleted after: 153986 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted llvm-svn: 60786
* rename getNonLocalDependency -> getNonLocalCallDependency, and removeChris Lattner2008-12-091-48/+22
| | | | | | pointer stuff from it, simplifying the code a bit. llvm-svn: 60783
* Back out 60748 for now. It's breaking SPASS, 254.gap, and 464.h264ref.Evan Cheng2008-12-091-5/+1
| | | | llvm-svn: 60776
* fix typos gabor noticedChris Lattner2008-12-091-1/+1
| | | | llvm-svn: 60754
* restructure the top level non-local ptr dep query to handle Chris Lattner2008-12-091-19/+26
| | | | | | | | the first block of a query specially. This makes the "complete query caching" subsystem more effective, avoiding predecessor queries. This speeds up GVN another 4%. llvm-svn: 60752
OpenPOWER on IntegriCloud