summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* Passes do not need to recursively initialize passes that they preserve, ifOwen Anderson2010-10-192-6/+0
| | | | | | | they do not also require them. This allows us to reduce inter-pass linkage dependencies. llvm-svn: 116854
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-197-12/+21
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Transfer debug loc to lowered call.Devang Patel2010-10-181-0/+2
| | | | | | Patch by Alexander Herz! llvm-svn: 116733
* Fix PR8313 by changing ValueToValueMap use a TrackingVH.Rafael Espindola2010-10-132-8/+14
| | | | llvm-svn: 116390
* Be more consistent in using ValueToValueMapTy.Rafael Espindola2010-10-133-13/+12
| | | | llvm-svn: 116387
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-123-3/+25
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-078-8/+8
| | | | llvm-svn: 115996
* Next step on the getting-rid-of-static-ctors train: begin adding per-libraryOwen Anderson2010-10-072-0/+37
| | | | | | | initialization functions that initialize the set of passes implemented in that library. Add C bindings for these functions as well. llvm-svn: 115927
* Move the pass initialization helper functions into the llvm namespace, and addOwen Anderson2010-10-071-3/+2
| | | | | | | a header declaring them all. This is also where we will declare per-library pass-set initializer functions down the road. llvm-svn: 115900
* Removed a bunch of unnecessary target_link_libraries.Oscar Fuentes2010-09-281-1/+0
| | | | llvm-svn: 114999
* Get rid of pop_macro warnings on MSVC.Michael J. Spencer2010-09-241-9/+10
| | | | llvm-svn: 114750
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-131-6/+1
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
* Added skeleton for inline asm multiple alternative constraint support.John Thompson2010-09-131-21/+5
| | | | llvm-svn: 113766
* typoesGabor Greif2010-09-102-3/+3
| | | | llvm-svn: 113647
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-101-1/+6
| | | | llvm-svn: 113632
* Fix LoopSimplify to notify ScalarEvolution when splitting a loop backedgeDan Gohman2010-09-041-1/+10
| | | | | | | into an inner loop, as the new loop iteration may differ substantially. This fixes PR8078. llvm-svn: 113057
* Reapply commit 112699, speculatively reverted by echristo, sinceDuncan Sands2010-09-022-14/+12
| | | | | | | | | I'm sure it is harmless. Original commit message: If PrototypeValue is erased in the middle of using the SSAUpdator then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway. llvm-svn: 112810
* Speculatively revert 112699 and 112702, they seem to be causingEric Christopher2010-09-012-12/+14
| | | | | | self host errors on clang-x86-64. llvm-svn: 112719
* If PrototypeValue is erased in the middle of using the SSAUpdatorDuncan Sands2010-09-012-14/+12
| | | | | | | then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway. llvm-svn: 112699
* implement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.Chris Lattner2010-08-291-0/+16
| | | | llvm-svn: 112409
* remove the ABCD and SSI passes. They don't have any clients thatChris Lattner2010-08-282-434/+0
| | | | | | | I'm aware of, aren't maintained, and LVI will be replacing their value. nlewycky approved this on irc. llvm-svn: 112355
* Reapply r112091 and r111922, support for metadata linking, with aDan Gohman2010-08-264-51/+84
| | | | | | | | | | | | | | fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. llvm-svn: 112190
* Revert r111922, "MapValue support for MDNodes. This is similar to r109117,Daniel Dunbar2010-08-261-27/+8
| | | | | | | except ...", it is causing *massive* performance regressions when building Clang with itself (-O3 -g). llvm-svn: 112158
* Revert r112091, "Remap metadata attached to instructions when remappingDaniel Dunbar2010-08-262-12/+16
| | | | | | individual ...", which depends on r111922, which I am reverting. llvm-svn: 112157
* Remap metadata attached to instructions when remapping individualDan Gohman2010-08-252-16/+12
| | | | | | instructions, not when remapping modules. llvm-svn: 112091
* Use MapValue in the Linker instead of having a private functionDan Gohman2010-08-244-32/+3
| | | | | | | | which does the same thing. This eliminates redundant code and handles MDNodes better. MDNode linking still doesn't fully work yet though. llvm-svn: 111941
* MapValue support for MDNodes. This is similar to r109117, exceptDan Gohman2010-08-241-8/+27
| | | | | | | | that it avoids a lot of unnecessary cloning by avoiding remapping MDNode cycles when none of the nodes in the cycle actually need to be remapped. Also it uses the new temporary MDNode mechanism. llvm-svn: 111922
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-237-12/+14
| | | | | | passes over to the new registration API. llvm-svn: 111815
* fit in 80 colsChris Lattner2010-08-181-2/+3
| | | | llvm-svn: 111348
* remove some dead code.Chris Lattner2010-08-182-12/+2
| | | | llvm-svn: 111344
* Use the getUniquePredecessor() utility function, instead of doingDan Gohman2010-08-171-15/+5
| | | | | | what it does manually. llvm-svn: 111248
* Avoid #include <ScalarEvolution.h> in LoopSimplify.cpp, which doesn'tDan Gohman2010-08-161-2/+1
| | | | | | actually use ScalarEvolution. llvm-svn: 111124
* Instead, teach SimplifyCFG to trim non-address-taken blocks fromDan Gohman2010-08-161-2/+3
| | | | | | indirectbr destination lists. llvm-svn: 111122
* LoopSimplify shouldn't split loop backedges that use indirectbr. PR7867.Dan Gohman2010-08-141-0/+5
| | | | llvm-svn: 111061
* Teach SimplifyCFG how to simplify indirectbr instructions.Dan Gohman2010-08-142-13/+43
| | | | | | | | | | | - Eliminate redundant successors. - Convert an indirectbr with one successor into a direct branch. Also, generalize SimplifyCFG to be able to be run on a function entry block. It knows quite a few simplifications which are applicable to the entry block, and it only needs a few checks to avoid trouble with the entry block. llvm-svn: 111060
* Eliminate PromoteMemoryToRegisterID; just use addPreserved("mem2reg")Dan Gohman2010-08-064-5/+3
| | | | | | instead, as an example of what this looks like. llvm-svn: 110478
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-068-15/+15
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-068-15/+15
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-058-15/+15
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* simplifyGabor Greif2010-07-281-2/+2
| | | | llvm-svn: 109589
* simplify: CallSite::get --> CallSite constructorGabor Greif2010-07-271-4/+4
| | | | llvm-svn: 109506
* Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogusDan Gohman2010-07-262-16/+6
| | | | | | | | | | | | | | dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier pass in StandardPasses.h to ensure that it gets scheduled at the right time. Declare that loop unrolling preserves ScalarEvolution, and shuffle some getAnalysisUsages. This eliminates one LoopSimplify and one LCCSA run in the standard compile opts sequence. llvm-svn: 109413
* Preserve ScalarEvolution in the loop unroller.Dan Gohman2010-07-261-0/+6
| | | | llvm-svn: 109412
* Revert this because we can't clone cyclic MDNodes which are creating during aNick Lewycky2010-07-241-3/+4
| | | | | | build of llvm-gcc. llvm-svn: 109355
* Whether function-local or not, a MDNode may reference a Function in which caseNick Lewycky2010-07-241-4/+3
| | | | | | | it needs to be mapped to refer to the function in the new module, not the old one. Fixes PR7700. llvm-svn: 109353
* Speculatively revert 109117Devang Patel2010-07-221-27/+6
| | | | llvm-svn: 109132
* keep in 80 colsGabor Greif2010-07-221-3/+4
| | | | llvm-svn: 109122
* Map MDNode correctly. Devang Patel2010-07-221-6/+27
| | | | | | A non function local MDNode can have an operand which is cloned by MapValue(). llvm-svn: 109117
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-222-3/+3
| | | | llvm-svn: 109103
* pass dereferenced iterator to dyn_castGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109098
OpenPOWER on IntegriCloud