Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Implement a new DecomposeGEPExpression method, which decomposes a GEP into a ↵ | Chris Lattner | 2009-11-26 | 1 | -40/+121 | |
| | | | | | | list of scaled offsets. Use this to eliminate some previous ad-hoc code which was subtly broken (it assumed all Constant*'s were non-zero, but strange constant express could be zero). llvm-svn: 89915 | |||||
* | Use GEPOperator more pervasively to simplify code. | Chris Lattner | 2009-11-26 | 1 | -29/+27 | |
| | | | | llvm-svn: 89914 | |||||
* | fix comment, thanks all :) | Chris Lattner | 2009-11-23 | 1 | -1/+3 | |
| | | | | llvm-svn: 89666 | |||||
* | use the new isNoAlias method to simplify some code, only do an escaping ↵ | Chris Lattner | 2009-11-23 | 1 | -10/+13 | |
| | | | | | | | | check if we have a non-constant pointer. Constant pointers can't be local. llvm-svn: 89665 | |||||
* | whitespace cleanup, tidying | Chris Lattner | 2009-11-23 | 1 | -16/+17 | |
| | | | | llvm-svn: 89664 | |||||
* | speed up BasicAA a bit by implementing a long-standing TODO. | Chris Lattner | 2009-11-23 | 1 | -9/+20 | |
| | | | | llvm-svn: 89663 | |||||
* | add fixme for dubious code. Duncan, what do you think? | Chris Lattner | 2009-11-22 | 1 | -0/+1 | |
| | | | | llvm-svn: 89602 | |||||
* | remove a silly condition that doesn't make a lot of sense anymore. | Chris Lattner | 2009-11-22 | 1 | -5/+0 | |
| | | | | llvm-svn: 89601 | |||||
* | reduce indentation, no functionality change. | Chris Lattner | 2009-11-22 | 1 | -85/+91 | |
| | | | | llvm-svn: 89600 | |||||
* | Remove the AliasAnalysis::getMustAliases method, which is dead. | Chris Lattner | 2009-11-22 | 1 | -6/+0 | |
| | | | | | | | | The hasNoModRefInfoForCalls isn't worth it as a filter because basicaa provides m/r info and everything chains to it, so remove it. llvm-svn: 89599 | |||||
* | Extend CaptureTracking to indicate when a value is never stored, even | Dan Gohman | 2009-11-19 | 1 | -10/+19 | |
| | | | | | | | | if it is not ultimately captured. Teach BasicAliasAnalysis that a local object address which does not escape and is never stored does not alias with a value resulting from a load. llvm-svn: 89398 | |||||
* | Teach BasicAA that a constant expression can't alias memory provably not | Nick Lewycky | 2009-11-14 | 1 | -1/+6 | |
| | | | | | | allocated until runtime (such as an alloca). Patch by Hans Wennborg! llvm-svn: 88760 | |||||
* | Default-addressspace null pointers don't alias anything. This allows | Dan Gohman | 2009-11-09 | 1 | -0/+9 | |
| | | | | | | GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me) llvm-svn: 86582 | |||||
* | remove a bunch of extraneous LLVMContext arguments | Chris Lattner | 2009-11-06 | 1 | -22/+18 | |
| | | | | | | from various APIs, addressing PR5325. llvm-svn: 86231 | |||||
* | Rename MallocFreeHelper as MemoryBuiltins | Victor Hernandez | 2009-10-27 | 1 | -1/+1 | |
| | | | | llvm-svn: 85286 | |||||
* | Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵ | Victor Hernandez | 2009-10-26 | 1 | -1/+1 | |
| | | | | | | to free() llvm-svn: 85181 | |||||
* | Teach BasicAA how to analyze Select instructions, and make it more | Dan Gohman | 2009-10-26 | 1 | -2/+76 | |
| | | | | | | aggressive on PHI instructions. llvm-svn: 85158 | |||||
* | Remove includes of Support/Compiler.h that are no longer needed after the | Nick Lewycky | 2009-10-25 | 1 | -1/+0 | |
| | | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043 | |||||
* | Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces. | Nick Lewycky | 2009-10-25 | 1 | -2/+2 | |
| | | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042 | |||||
* | Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵ | Victor Hernandez | 2009-10-23 | 1 | -4/+4 | |
| | | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969 | |||||
* | inline isGEP away. | Chris Lattner | 2009-10-17 | 1 | -10/+6 | |
| | | | | llvm-svn: 84373 | |||||
* | When checking aliases between phi sources and V2, we know the sources are ↵ | Evan Cheng | 2009-10-16 | 1 | -3/+3 | |
| | | | | | | not themselves phi nodes. However, V2 may be. Call aliasCheck with V2 first to potentially eliminate a std::swap call. llvm-svn: 84226 | |||||
* | Add missing break statements! Thanks to Duncan Sands for pointing this out! | Nick Lewycky | 2009-10-15 | 1 | -0/+2 | |
| | | | | llvm-svn: 84191 | |||||
* | Teach basicaa about memcpy/memmove/memset. The length argument can be used to | Nick Lewycky | 2009-10-15 | 1 | -0/+22 | |
| | | | | | | improve alias results if constant, and the source pointer can't be modified. llvm-svn: 84175 | |||||
* | Teach BasicAA to use the size parameter of the memory use marker intrinsics. | Nick Lewycky | 2009-10-15 | 1 | -18/+29 | |
| | | | | llvm-svn: 84174 | |||||
* | Take advantage of TargetData when available; we know that the atomic intrinsics | Nick Lewycky | 2009-10-15 | 1 | -18/+23 | |
| | | | | | | only dereference the element they point to directly with no pointer arithmetic. llvm-svn: 84159 | |||||
* | Clear VisitedPHIs after use. | Evan Cheng | 2009-10-14 | 1 | -1/+3 | |
| | | | | llvm-svn: 84080 | |||||
* | Another BasicAA fix. If a value does not alias a GEP's base pointer, then it | Evan Cheng | 2009-10-14 | 1 | -39/+46 | |
| | | | | | | | | cannot alias the GEP. GEP pointer alias rule states this clearly: A pointer value formed from a getelementptr instruction is associated with the addresses associated with the first operand of the getelementptr. llvm-svn: 84079 | |||||
* | More code clean up based on patch feedback. | Evan Cheng | 2009-10-14 | 1 | -12/+16 | |
| | | | | llvm-svn: 84074 | |||||
* | Change VisitedPHIs into an instance variable that's freed by each alias() call. | Evan Cheng | 2009-10-14 | 1 | -22/+22 | |
| | | | | llvm-svn: 84072 | |||||
* | Teach basic AA about PHI nodes. If all operands of a phi NoAlias another ↵ | Evan Cheng | 2009-10-13 | 1 | -12/+69 | |
| | | | | | | value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias. llvm-svn: 84038 | |||||
* | Refactor some code. No functionality changes. | Evan Cheng | 2009-10-13 | 1 | -105/+119 | |
| | | | | llvm-svn: 84000 | |||||
* | Teach BasicAA a little something about the atomic intrinsics: they can only | Nick Lewycky | 2009-10-13 | 1 | -0/+21 | |
| | | | | | | modify through the pointer they're given. llvm-svn: 83959 | |||||
* | Enhance analysis passes so that they apply the same analysis to malloc calls ↵ | Victor Hernandez | 2009-09-18 | 1 | -3/+11 | |
| | | | | | | | | as to MallocInst. Reviewed by Eli Friedman. llvm-svn: 82281 | |||||
* | Use stripPointerCasts instead of doing the same manually. | Dan Gohman | 2009-08-27 | 1 | -14/+3 | |
| | | | | llvm-svn: 80267 | |||||
* | Push LLVMContexts through the IntegerType APIs. | Owen Anderson | 2009-08-13 | 1 | -11/+14 | |
| | | | | llvm-svn: 78948 | |||||
* | Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵ | Owen Anderson | 2009-07-31 | 1 | -9/+7 | |
| | | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721 | |||||
* | Move ConstantExpr to 2.5 API. | Owen Anderson | 2009-07-29 | 1 | -4/+4 | |
| | | | | llvm-svn: 77494 | |||||
* | Make AliasAnalysis and related classes use | Dan Gohman | 2009-07-25 | 1 | -18/+20 | |
| | | | | | | getAnalysisIfAvailable<TargetData>(). llvm-svn: 77028 | |||||
* | Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵ | Owen Anderson | 2009-07-24 | 1 | -2/+2 | |
| | | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011 | |||||
* | Get rid of the Pass+Context magic. | Owen Anderson | 2009-07-22 | 1 | -16/+16 | |
| | | | | llvm-svn: 76702 | |||||
* | Revert the addition of hasNoPointerOverflow to GEPOperator. | Dan Gohman | 2009-07-20 | 1 | -7/+2 | |
| | | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437 | |||||
* | Make BasicAliasAnalysis and Value::getUnderlyingObject use | Dan Gohman | 2009-07-17 | 1 | -4/+6 | |
| | | | | | | | | GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine that create GEPs that may overflow clear the NoOverflow value. Among other things, this partially addresses PR2831. llvm-svn: 76252 | |||||
* | Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵ | Owen Anderson | 2009-07-16 | 1 | -0/+4 | |
| | | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089 | |||||
* | llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable. | Torok Edwin | 2009-07-14 | 1 | -1/+1 | |
| | | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640 | |||||
* | assert(0) -> LLVM_UNREACHABLE. | Torok Edwin | 2009-07-11 | 1 | -1/+2 | |
| | | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379 | |||||
* | "LLVMContext* " --> "LLVMContext *" | Owen Anderson | 2009-07-06 | 1 | -1/+1 | |
| | | | | llvm-svn: 74878 | |||||
* | Thread LLVMContext through the constant folding APIs, which touches a lot of ↵ | Owen Anderson | 2009-07-06 | 1 | -15/+19 | |
| | | | | | | files. llvm-svn: 74844 | |||||
* | Remove unneeded #include. | Owen Anderson | 2009-06-22 | 1 | -1/+0 | |
| | | | | llvm-svn: 73911 | |||||
* | Teach BasicAliasAnalysis to understand constant gep indices that fall | Dan Gohman | 2009-05-27 | 1 | -4/+25 | |
| | | | | | | | | | | | | | beyond their associated static array type. I believe that this fixes a legitimate bug, because BasicAliasAnalysis already has code to check for this condition that works for non-constant indices, however it was missing the case of constant indices. With this change, it checks for both. This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href. llvm-svn: 72451 |