summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Reapply r116831 and r116839, converting AliasAnalysis to useDan Gohman2010-10-195-18/+20
| | | | | | uint64_t, plus fixes for places I missed before. llvm-svn: 116875
* Revert r116831 and r116839, which are breaking selfhost builds.Dan Gohman2010-10-192-4/+4
| | | | llvm-svn: 116858
* Passes do not need to recursively initialize passes that they preserve, ifOwen Anderson2010-10-198-16/+2
| | | | | | | they do not also require them. This allows us to reduce inter-pass linkage dependencies. llvm-svn: 116854
* Oops, check in all the files for converting AliasAnalysis toDan Gohman2010-10-192-4/+4
| | | | | | use uint64_t. llvm-svn: 116839
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-1959-69/+196
| | | | | | | | | | | | | | | | | 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
* Consistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.Dan Gohman2010-10-192-5/+5
| | | | llvm-svn: 116815
* GlobalOpt: EvaluateFunction() must not evaluate stores to weak_odr globals.Mikhail Glushenkov2010-10-191-6/+7
| | | | | | Fixes PR8389. llvm-svn: 116812
* Trailing whitespace.Mikhail Glushenkov2010-10-181-151/+151
| | | | llvm-svn: 116749
* Make AliasSetTracker TBAA-aware, enabling TBAA-enabled LICM.Dan Gohman2010-10-181-3/+6
| | | | llvm-svn: 116743
* Transfer debug loc to lowered call.Devang Patel2010-10-181-0/+2
| | | | | | Patch by Alexander Herz! llvm-svn: 116733
* Eliminate some calls to Value::getNameStr.Benjamin Kramer2010-10-161-1/+1
| | | | llvm-svn: 116670
* Generalize MemCpyOpt's handling of call slot forwarding to function properly ↵Owen Anderson2010-10-151-18/+48
| | | | | | | | when the call slot forwarding is implemented with a load/store pair rather than a memcpy. llvm-svn: 116637
* CallGraphSCC passes implicity require CallGraph analysis.Owen Anderson2010-10-135-4/+17
| | | | llvm-svn: 116443
* 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-136-22/+21
| | | | llvm-svn: 116387
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-1223-25/+145
| | | | | | | | | 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 using a variant of the existing inlining heuristics to decide whether to ↵Kenneth Uildriks2010-10-091-40/+50
| | | | | | create a given specialization of a function in PartialSpecialization. If the total performance bonus across all callsites passing the same constant exceeds the specialization cost, we create the specialization. llvm-svn: 116158
* Filter out illegal formulae after updating offsets, not before, so thatDan Gohman2010-10-081-18/+18
| | | | | | | | | | formulae which become illegal as a result of the offset updating don't escape. This is for rdar://8529692. No testcase yet, because the given cases hit use-list ordering differences. llvm-svn: 116093
* Update CMake.Daniel Dunbar2010-10-081-1/+0
| | | | llvm-svn: 116034
* Delete the FormulaSorter class and inline its one method into itsDan Gohman2010-10-071-28/+10
| | | | | | | one user. This code will be restructured soon and FormulaSorter is getting in the way. llvm-svn: 116012
* Fix a spello.Dan Gohman2010-10-071-1/+1
| | | | llvm-svn: 116011
* Charge a formula for explicit multiplies on scaled registers too,Dan Gohman2010-10-071-3/+3
| | | | | | not just base registers. llvm-svn: 116010
* Use size_t for consistency.Dan Gohman2010-10-071-1/+1
| | | | llvm-svn: 116009
* When merging one use into another, transfer the offsets fromDan Gohman2010-10-071-0/+8
| | | | | | the old use to the new one. llvm-svn: 116008
* Fix LSR to keep the RegUseTracker up to date when combining users.Dan Gohman2010-10-071-8/+19
| | | | | | | | This doesn't usually matter, because the other heuristics usually succeed regardless, but it's good to keep the register use bookkeeping consistent. llvm-svn: 116005
* Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.Devang Patel2010-10-072-1275/+0
| | | | llvm-svn: 116004
* Now with fewer extraneous semicolons!Owen Anderson2010-10-0761-69/+69
| | | | llvm-svn: 115996
* Add initialization routines for Instrumentation.Owen Anderson2010-10-072-0/+32
| | | | llvm-svn: 115971
* Add initialization routines to InstCombine.Owen Anderson2010-10-071-0/+9
| | | | llvm-svn: 115965
* Add an initialization routine for libLLVMipo.aOwen Anderson2010-10-071-2/+37
| | | | llvm-svn: 115933
* Next step on the getting-rid-of-static-ctors train: begin adding per-libraryOwen Anderson2010-10-073-2/+83
| | | | | | | 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
* Since the Hello pass is built as a loadable dynamic library, don't try to ↵Owen Anderson2010-10-071-4/+3
| | | | | | convert it to new-style registration yet. llvm-svn: 115881
* Now that the profitable bits of EnableFullLoadPRE have been enabled by ↵Owen Anderson2010-10-011-8/+6
| | | | | | | | | default, rip out the remainder. Anyone interested in more general PRE would be better served by implementing it separately, to get real anticipation calculation, etc. llvm-svn: 115337
* Fix the other half of the alignment changing issue by making sure that theEric Christopher2010-10-011-3/+8
| | | | | | | | memcpy alignment is the minimum of the incoming alignments. Fixes PR 8266. llvm-svn: 115305
* fix PR8267 - Instcombine shouldn't optimizer away volatile memcpy's.Chris Lattner2010-10-011-1/+6
| | | | llvm-svn: 115296
* Massive rewrite of MMX: Dale Johannesen2010-09-302-2/+10
| | | | | | | | | | | | | | | | | | | The x86_mmx type is used for MMX intrinsics, parameters and return values where these use MMX registers, and is also supported in load, store, and bitcast. Only the above operations generate MMX instructions, and optimizations do not operate on or produce MMX intrinsics. MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into smaller pieces. Optimizations may occur on these forms and the result casted back to x86_mmx, provided the result feeds into a previous existing x86_mmx operation. The point of all this is prevent optimizations from introducing MMX operations, which is unsafe due to the EMMS problem. llvm-svn: 115243
* We do want to allow LoadPRE to perform LICM-like transformations: we already ↵Owen Anderson2010-09-301-13/+0
| | | | | | | | | consider PHI nodes to be negligible for code size (making this transform code size neutral), and it allows us to hoist values out of loops, which is always a good thing. llvm-svn: 115205
* Try again to disable critical edge splitting in CodeGenPrepare.Jakob Stoklund Olesen2010-09-301-1/+5
| | | | | | The bug that broke i386 linux has been fixed in r115191. llvm-svn: 115204
* Tighten up prototype verification of strchr and strrchr to avoid a crash in ↵Benjamin Kramer2010-09-301-2/+4
| | | | | | the very unlikely case that someone passes an integer > i64 to strchr. llvm-svn: 115144
* Add constant folding for strspn and strcspn to SimplifyLibCalls.Benjamin Kramer2010-09-301-9/+64
| | | | llvm-svn: 115116
* Add strpbrk folding to SimplifyLibCalls.Benjamin Kramer2010-09-291-7/+42
| | | | llvm-svn: 115111
* Simplify the loop in StrChrOptimizer. FileCheckize test.Benjamin Kramer2010-09-291-11/+4
| | | | llvm-svn: 115095
* Teach SimplifyLibCalls how to optimize strrchr.Benjamin Kramer2010-09-291-6/+44
| | | | llvm-svn: 115091
* Fix PR8247: JumpThreading can cause a block to become unreachable while ↵Owen Anderson2010-09-291-4/+4
| | | | | | | | | | still having predecessor, if it is part of a self-loop. Because of this, we cannot use the Simplify* APIs, as they can assert-fail on unreachable code. Since it's not easy to determine if a given threading will cause a block to become unreachable, simply defer simplifying simplification to later InstCombine and/or DCE passes. llvm-svn: 115082
* Revert r114919, which caused some serious regressions on ARM.Owen Anderson2010-09-291-6/+1
| | | | llvm-svn: 115053
* Removed a bunch of unnecessary target_link_libraries.Oscar Fuentes2010-09-284-7/+0
| | | | llvm-svn: 114999
* Weight loop unrolling counts by nesting depth. Unrolling deeply nested loops ↵Owen Anderson2010-09-271-1/+6
| | | | | | | | | | | tends to cause high register pressure and thus excess spills, which we don't currently recover from well. This should be re-evaluated in the future if our ability to generate good spills/splits improves. Partial fix for <rdar://problem/7635585>. llvm-svn: 114919
* Revert "Disable codegen prepare critical edge splitting. Machine instruction ↵Jakob Stoklund Olesen2010-09-271-5/+1
| | | | | | | | | | | | | | | passes now" This reverts revision 114633. It was breaking llvm-gcc-i386-linux-selfhost. It seems there is a downstream bug that is exposed by -cgp-critical-edge-splitting=0. When that bug is fixed, this patch can go back in. Note that the changes to tailcallfp2.ll are not reverted. They were good are required. llvm-svn: 114859
* Delete an unused function.Dan Gohman2010-09-271-2/+0
| | | | llvm-svn: 114841
OpenPOWER on IntegriCloud