summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Teach InstCombine not to use Add and Neg on FP. PR 8490.Dale Johannesen2010-10-271-1/+8
| | | | llvm-svn: 117510
* Fix a case where instcombine was stripping metadata (and alignment)Dan Gohman2010-10-251-1/+3
| | | | | | from stores when folding in bitcasts. llvm-svn: 117265
* Fix PR8445: a block with no predecessors may be the entry block, in which caseDuncan Sands2010-10-241-12/+10
| | | | | | | | | it isn't unreachable and should not be zapped. The check for the entry block was missing in one case: a block containing a unwind instruction. While there, do some small cleanups: "M" is not a great name for a Function* (it would be more appropriate for a Module*), change it to "Fn"; use Fn in more places. llvm-svn: 117224
* SmallVectorize.Benjamin Kramer2010-10-231-3/+1
| | | | llvm-svn: 117213
* Switch attribute macros to use 'LLVM_' as a prefix. We retain the old namesChandler Carruth2010-10-231-1/+2
| | | | | | until other LLVM projects using these are cleaned up. llvm-svn: 117200
* Teach instcombine to set the alignment arguments for NEON load/store intrinsics.Bob Wilson2010-10-221-0/+26
| | | | llvm-svn: 117154
* RetOp is not actually used for anything useful (thoughDuncan Sands2010-10-211-2/+0
| | | | | | | it looks like maybe it was supposed to be used in the test...), so zap it (gcc-4.6 warning). llvm-svn: 117023
* 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
OpenPOWER on IntegriCloud