summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SCCP.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change errs() to dbgs().David Greene2010-01-051-21/+21
| | | | llvm-svn: 92612
* Fix a use of an invalidated iterator in the case where there are multipleDan Gohman2009-11-231-1/+5
| | | | | | adjacent uses of a dead basic block from the same user. This fixes PR5596. llvm-svn: 89658
* Fix IPSCCP's code for deleting dead blocks to tolerate outstandingDan Gohman2009-11-201-2/+6
| | | | | | blockaddress users. This fixes PR5569. llvm-svn: 89483
* fix a crash in SCCP handling extractvalue of an array, pointed out andChris Lattner2009-11-101-3/+8
| | | | | | tracked down by Stephan Reiter! llvm-svn: 86726
* Do map insert+find in one step. TODO -= 2.Benjamin Kramer2009-11-051-15/+15
| | | | llvm-svn: 86133
* Fix an iterator invalidation bug that happens when a hashtableChris Lattner2009-11-041-3/+4
| | | | | | resizes in IPSCCP. This fixes PR5394. llvm-svn: 86036
* reimplement multiple return value handling in IPSCCP, making it Chris Lattner2009-11-031-125/+205
| | | | | | | more aggressive an correct. This survives building llvm in 64-bit mode with optimizations and the built llvm passes make check. llvm-svn: 85973
* finish half thunk thoughtChris Lattner2009-11-031-1/+3
| | | | llvm-svn: 85937
* fix an IPSCCP bug I introduced when I changed IPSCCP to start working on Chris Lattner2009-11-031-19/+31
| | | | | | | | | | functions that don't have local linkage. Basically, we need to be more careful about propagating argument information to functions whose results we aren't tracking. This fixes a miscompilation of LLVMCConfigurationEmitter.cpp when built with an llvm-gcc that has ipsccp enabled. llvm-svn: 85923
* fix a subtle bug I introduced when refactoring SCCP. TestcaseChris Lattner2009-11-031-1/+1
| | | | | | to follow. llvm-svn: 85903
* turn IPSCCP back on now that the iterator invalidation bug is fixed.Chris Lattner2009-11-031-36/+50
| | | | llvm-svn: 85858
* fix a nasty iterator invalidation bug from my conversion fromChris Lattner2009-11-021-3/+2
| | | | | | std::map to DenseMap, exposed on release llvm-gcc bootstrap. llvm-svn: 85840
* revert r8579[56], which are causing unhappiness in buildbot land.Chris Lattner2009-11-021-50/+36
| | | | llvm-svn: 85818
* disable IPSCCP support for multiple return values, it is buggy, so justChris Lattner2009-11-021-1/+2
| | | | | | disable it until I can fix it. llvm-svn: 85810
* improve IPSCCP to be able to propagate the result of "!mayBeOverridden"Chris Lattner2009-11-021-36/+49
| | | | | | | | | function to calls of that function, regardless of whether it has local linkage or has its address taken. Not escaping should only affect whether we make an aggressive assumption about the arguments to a function, not whether we can track the result of it. llvm-svn: 85795
* don't mark the arguments of prototype overdefined, they will never be queried.Chris Lattner2009-11-021-3/+6
| | | | llvm-svn: 85793
* restore some code I removed in r85788, refactor it intoChris Lattner2009-11-021-4/+18
| | | | | | a shared place instead of duplicating it 4 times. llvm-svn: 85792
* remove some confused code that dates from when we hadChris Lattner2009-11-021-10/+2
| | | | | | "multiple return values" but not "first class aggregates" llvm-svn: 85791
* avoid redundant lookups in BBExecutable, and make it a SmallPtrSet.Chris Lattner2009-11-021-14/+16
| | | | llvm-svn: 85790
* Use the libanalysis 'ConstantFoldLoadFromConstPtr' functionChris Lattner2009-11-021-18/+11
| | | | | | | instead of reinventing SCCP-specific logic. This gives us new powers. llvm-svn: 85789
* switch the main 'ValueState' map from being an std::map to beingChris Lattner2009-11-021-311/+281
| | | | | | | | | | | a DenseMap. Doing this required being aware of subtle iterator invalidation issues, but it provides a big speedup. In a release-asserts build, this sped up optimizing 403.gcc from 1.34s -> 0.79s (IPSCCP) and 1.11s -> 0.44s (SCCP). This commit also conflates in a bunch of general cleanups, sorry. llvm-svn: 85788
* only IPSCCP incoming arguments if the function is executable, this fixesChris Lattner2009-11-021-15/+17
| | | | | | an assertion on the buildbot. llvm-svn: 85784
* add a new ValueState::getConstantInt() helper, use it to Chris Lattner2009-11-021-52/+53
| | | | | | simplify some code. llvm-svn: 85783
* tidy up some more: remove some extraneous inline specifiers, return harder.Chris Lattner2009-11-021-126/+95
| | | | llvm-svn: 85780
* eliminate the SCCPSolver::getValueMapping method.Chris Lattner2009-11-021-25/+23
| | | | llvm-svn: 85778
* fix failures introduced in r85774Chris Lattner2009-11-021-1/+2
| | | | llvm-svn: 85777
* factor duplicated code into a new DeleteInstructionInBlockChris Lattner2009-11-021-92/+80
| | | | | | function, eliminate temporary (and pointless) smallvector. llvm-svn: 85776
* Chris used to use '...' instead of proper grammar.Chris Lattner2009-11-021-30/+32
| | | | llvm-svn: 85775
* remove some extraneous llvmcontext stuff.Chris Lattner2009-11-021-31/+26
| | | | llvm-svn: 85774
* change LatticeVal to use PointerIntPair to save some space.Chris Lattner2009-11-021-49/+52
| | | | llvm-svn: 85773
* teach ipsccp and ipconstprop that a blockaddress doesn't 'take the address' ↵Chris Lattner2009-11-011-2/+4
| | | | | | | | | of a function in a way that should prevent ip constprop. This allows clang/test/CodeGen/indirect-goto.c to pass with the new indirect goto lowering. llvm-svn: 85709
* teach various passes about blockaddress. We no longerChris Lattner2009-10-291-24/+48
| | | | | | crash on any clang tests. llvm-svn: 85465
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-271-1/+1
| | | | llvm-svn: 85286
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-261-1/+1
| | | | | | to free() llvm-svn: 85181
* Remove FreeInst.Victor Hernandez2009-10-261-1/+0
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-1/+4
| | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-231-1/+1
| | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
* Fix PR4313: IPSCCP was not setting the lattice value for the invoke instructionTorok Edwin2009-10-201-2/+4
| | | | | | | | | | when the invoke had multiple return values: it set the lattice value only on the extractvalue. This caused the invoke's lattice value to remain the default (undefined), and later propagated to extractvalue's operand, which incorrectly introduces undefined behavior. llvm-svn: 84637
* Remove an unnnecessary LLVMContext argument inDan Gohman2009-10-051-2/+1
| | | | | | ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-6/+5
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* calls to external functions are already marked overdefined, special casingChris Lattner2009-09-271-5/+1
| | | | | | malloc isn't needed. llvm-svn: 82932
* Constant propagating byval pointer is safe if function is readonly.Torok Edwin2009-09-241-1/+1
| | | | llvm-svn: 82700
* Don't constant propagate byval pointers, since they are not really pointers, butTorok Edwin2009-09-241-0/+4
| | | | | | | rather structs passed by value. This fixes PR5038. llvm-svn: 82689
* Enhance transform passes so that they apply the same tranforms to malloc ↵Victor Hernandez2009-09-181-1/+7
| | | | | | | | calls as to MallocInst. Reviewed by Dan Gohman. llvm-svn: 82300
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-4/+3
| | | | llvm-svn: 80766
* add getPointerAddressSpace() to GEP instruction, use the methodChris Lattner2009-08-301-2/+1
| | | | | | in a few scalar xforms to simplify things. llvm-svn: 80506
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-2/+2
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* Fix debug output to include a newline after printing a Value, nowDan Gohman2009-08-171-7/+7
| | | | | | that Value's operator<< doesn't include one. llvm-svn: 79240
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-6/+6
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-10/+10
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
OpenPOWER on IntegriCloud