summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,Dan Gohman2009-07-131-1/+1
| | | | | | | | | | using the Curiously Recurring Template Pattern with LoopBase. This will help further refactoring, and future functionality for Loop. Also, Headers can now foward-declare Loop, instead of pulling in LoopInfo.h or doing tricks. llvm-svn: 75519
* Reapply 75252, with a fix to avoid the infinite recursion case. TheDan Gohman2009-07-131-114/+527
| | | | | | | check for avoiding re-analyzing a widening cast needed to happen earlier, as getSCEV itself may result in a isLoopGuardedByCond query. llvm-svn: 75511
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-3/+6
| | | | llvm-svn: 75497
* Move the memoization check for SCEVSignExtendExpr andDan Gohman2009-07-131-10/+22
| | | | | | | | SCEVZeroExtendExpr ahead of the most expensive analysis. This speeds up analysis and helps avoid pathologically bad behavior on the testcase in PR4534. llvm-svn: 75496
* Convert SCEV from FoldingSetNode to FastFoldingSetNode. This eliminatesDan Gohman2009-07-131-67/+33
| | | | | | | a bunch of redundent code in Profile methods, and prepares for upcoming changes to do improved memoization. llvm-svn: 75494
* factor the 'optimized sort' code out into a static helper functionChris Lattner2009-07-131-28/+38
| | | | | | and use it from one more place. Patch by Jakub Staszak! llvm-svn: 75478
* Move the re-sort of invalidated NonLocalPointerDeps cache earlierChris Lattner2009-07-131-14/+14
| | | | | | | | | | | so that all code paths get it. PR4256 was about a case where the phi translation loop would find all preds in the Visited cache, so it could get by without re-sorting the NonLocalPointerDeps cache. Fix this by resorting it earlier, there is no reason not to do this. This patch inspired by Jakub Staszak's patch. llvm-svn: 75476
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-133-7/+8
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Revert r75252 which was causing some crashes at compile time.Nick Lewycky2009-07-111-521/+111
| | | | llvm-svn: 75384
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-117-24/+30
| | | | | | | | | 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
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-112-2/+4
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Remove ScalarEvolution::hasSCEV, which isn't being used, and whichDan Gohman2009-07-101-8/+2
| | | | | | breaks encapsulation. Also remove a dead prototype for setSCEV. llvm-svn: 75272
* Generalize ScalarEvolution's cast-folding code to support more kindsDan Gohman2009-07-101-111/+521
| | | | | | | of loops. Add several new functions to for working with ScalarEvolution's add-hoc value-range analysis functionality. llvm-svn: 75252
* Make the code that updates ScalarEvolution's internal state in responseDan Gohman2009-07-081-30/+70
| | | | | | | | | | | | to a loop deletion more thorough. Don't prune the def-use tree search at instructions that don't have SCEVs computed, because an instruction with a user that has a computed SCEV may itself lack a computed SCEV. Also, remove loop-related values from the ValuesAtScopes and ConstantEvolutionLoopExitValues maps as well. This fixes a regression in 483.xalancbmk. llvm-svn: 75030
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-24/+24
| | | | | | module is required. llvm-svn: 75025
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-2/+0
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-12/+12
| | | | llvm-svn: 74985
* Re-LLVMContext-ize DebugInfo, now with less breakage.Owen Anderson2009-07-071-58/+72
| | | | llvm-svn: 74920
* Change all SCEV* to SCEV *.Dan Gohman2009-07-074-256/+256
| | | | llvm-svn: 74918
* Revert part of r74873 that broke Clang's debug info generation.Owen Anderson2009-07-071-81/+57
| | | | llvm-svn: 74910
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-064-15/+15
| | | | llvm-svn: 74878
* Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's ↵Owen Anderson2009-07-066-97/+139
| | | | | | through the ValueTracking API. llvm-svn: 74873
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-063-121/+147
| | | | | | files. llvm-svn: 74844
* When comparing constants, consider a less wide constant to be "less complex"Nick Lewycky2009-07-041-0/+2
| | | | | | | than a wider one, before trying to compare their contents which will crash if their sizes are different. llvm-svn: 74792
* Minor improvement to the LDA debug output.Andreas Bolka2009-07-031-2/+7
| | | | llvm-svn: 74754
* Simplify debug info intrisinc lowering.Devang Patel2009-07-021-6/+0
| | | | llvm-svn: 74733
* Fix typo.Devang Patel2009-07-021-5/+5
| | | | | | Thanks Duncan! llvm-svn: 74706
* do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. ↵Chris Lattner2009-07-021-1/+4
| | | | | | | | | While we could do this, doing so requires adjusting the demanded mask and the code isn't doing that yet. This fixes PR4495 llvm-svn: 74699
* Add debug info utility routines.Devang Patel2009-07-021-0/+111
| | | | llvm-svn: 74680
* Keep DIDescriptor methods together. Devang Patel2009-07-011-123/+127
| | | | | | No functionality change. llvm-svn: 74652
* Use AA to check objects before LDA.Andreas Bolka2009-07-011-15/+14
| | | | llvm-svn: 74647
* improve the APIs for creating struct and function types with no ↵Chris Lattner2009-07-011-1/+1
| | | | | | | | arguments/elements to not have to create a temporary vector (in the API at least). Patch by Jay Foad! llvm-svn: 74584
* Minor code cleanups.Dan Gohman2009-06-301-2/+6
| | | | llvm-svn: 74551
* Fix the build on Cygwin. Patch by Aaron Gray.Owen Anderson2009-06-301-2/+2
| | | | llvm-svn: 74510
* Array accesses are independent if the underlying arrays differ.Andreas Bolka2009-06-301-0/+47
| | | | llvm-svn: 74499
* Minor formatting, whitespace, and 80-column fixes.Dan Gohman2009-06-301-7/+7
| | | | llvm-svn: 74492
* Use getSCEV instead of getUnknown to create a SCEV for aDan Gohman2009-06-291-3/+3
| | | | | | | | | | Constant. This lets ConstantInts be handled as SCEVConstant instead of SCEVUnknown, as getUnknown no longer has special-case code for ConstantInt and friends. This usually doesn't affect the final output, since the constants end up getting folded later, but it does make intermediate expressions more obvious in many cases. llvm-svn: 74459
* Don't cache PHI exit values from exhaustive evaluations, becauseDan Gohman2009-06-291-1/+0
| | | | | | | | an individual exhaustive evaluation reflects only the exit value implied by an individual exit, which may differ from the actual exit value of the loop if there are other exits. This fixes PR4477. llvm-svn: 74447
* Relax LDA memory instruction checks.Andreas Bolka2009-06-291-4/+7
| | | | llvm-svn: 74439
* Call doInitialization(), releaseMemory(), and doFinalization() for ↵Torok Edwin2009-06-291-0/+3
| | | | | | | | | | on-the-fly passes as well. Also don't call finalizers for LoopPass if initialization was not called. Add a unittest that tests that these methods are called, in the proper order, and the correct number of times. llvm-svn: 74438
* Simplify this code, and avoid using APInt(). This fixesDan Gohman2009-06-291-4/+2
| | | | | | | (otherwise harmless) uninitialized value warnings that Duncan found with gcc-4.4. llvm-svn: 74437
* Missed one.Andreas Bolka2009-06-291-1/+1
| | | | llvm-svn: 74416
* Fix case in LDA util function names.Andreas Bolka2009-06-291-4/+4
| | | | llvm-svn: 74415
* Print pairwise dependence results, add testcases.Andreas Bolka2009-06-281-2/+26
| | | | llvm-svn: 74402
* Minimal LDA interface, maximally conservative tester.Andreas Bolka2009-06-281-0/+24
| | | | llvm-svn: 74401
* LDA analysis output scaffolding.Andreas Bolka2009-06-281-1/+19
| | | | llvm-svn: 74400
* Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.Dan Gohman2009-06-271-1/+1
| | | | llvm-svn: 74394
* Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, insteadDan Gohman2009-06-271-141/+222
| | | | | | of a team of individual allocations and a team of std::maps. llvm-svn: 74393
* Change SCEVExpander to use an IRBuilder to emit instructions.Dan Gohman2009-06-271-72/+70
| | | | llvm-svn: 74391
* Incorporate the insertion point into the key of SCEVExpander's CSE map.Dan Gohman2009-06-261-14/+19
| | | | | | | | | | | | | | This helps it avoid reusing an instruction that doesn't dominate all of the users, in cases where the original instruction was inserted before all of the users were known. This may result in redundant expansions of sub-expressions that depend on loop-unpredictable values in some cases, however this isn't very common, and it primarily impacts IndVarSimplify, so GVN can be expected to clean these up. This eliminates the need for IndVarSimplify's FixUsesBeforeDefs, which fixes several bugs. llvm-svn: 74352
OpenPOWER on IntegriCloud