aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm-c/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-231-0/+3
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-021-0/+12
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-291-1/+0
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-241-0/+3
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Add a loop rerolling passHal Finkel2013-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a loop rerolling pass: the opposite of (partial) loop unrolling. The transformation aims to take loops like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } and turn them into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } and loops like this: for (int i = 0; i < 500; ++i) { x[3*i] = foo(0); x[3*i+1] = foo(0); x[3*i+2] = foo(0); } and turn them into this: for (int i = 0; i < 1500; ++i) { x[i] = foo(0); } There are two motivations for this transformation: 1. Code-size reduction (especially relevant, obviously, when compiling for code size). 2. Providing greater choice to the loop vectorizer (and generic unroller) to choose the unrolling factor (and a better ability to vectorize). The loop vectorizer can take vector lengths and register pressure into account when choosing an unrolling factor, for example, and a pre-unrolled loop limits that choice. This is especially problematic if the manual unrolling was optimized for a machine different from the current target. The current implementation is limited to single basic-block loops only. The rerolling recognition should work regardless of how the loop iterations are intermixed within the loop body (subject to dependency and side-effect constraints), but the significant restriction is that the order of the instructions in each iteration must be identical. This seems sufficient to capture all current use cases. This pass is not currently enabled by default at any optimization level. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194939 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn MipsOptimizeMathLibCalls into a target-independent scalar transformRichard Sandiford2013-08-231-0/+3
| | | | | | | | | | | ...so that it can be used for z too. Most of the code is the same. The only real change is to use TargetTransformInfo to test when a sqrt instruction is available. The pass is opt-in because at the moment it only handles sqrt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189097 91177308-0d34-0410-b5e6-96231b3b80d8
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-10/+0
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180063 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the C function to create a SLPVectorizerPass to something sane and ↵Benjamin Kramer2013-04-111-0/+3
| | | | | | expose it in the header file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179272 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r178713Evan Cheng2013-04-041-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178769 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to include llvm-c without including C++ headers. Patch by ↵Evan Cheng2013-04-031-2/+7
| | | | | | Filip Pizlo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178713 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!Nick Lewycky2013-03-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176793 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix include guards so they exactly match file names.Jakub Staszak2013-01-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
* Symbol hygiene: Make sure declarations and definitions match, make helper ↵Benjamin Kramer2012-10-201-0/+3
| | | | | | functions static. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166376 91177308-0d34-0410-b5e6-96231b3b80d8
* Organize LLVM C API docs into doxygen modules; add docsGregory Szorc2012-03-214-0/+43
| | | | | | | | | | | | | | | | This gives a lot of love to the docs for the C API. Like Clang's documentation, the C API is now organized into a Doxygen "module" (LLVMC). Each C header file is a child of the main module. Some modules (like Core) have a hierarchy of there own. The produced documentation is thus better organized (before everything was in one monolithic list). This patch also includes a lot of new documentation for APIs in Core.h. It doesn't document them all, but is better than none. Function docs are missing @param and @return annotation, but the documentation body now commonly provides help details (like the expected llvm::Value sub-type to expect). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153157 91177308-0d34-0410-b5e6-96231b3b80d8
* A few of the changes suggested in code review (by Nick Lewycky)Hal Finkel2012-02-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149472 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a basic-block autovectorization pass.Hal Finkel2012-02-011-0/+37
| | | | | | | This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure. Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149468 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing file.Rafael Espindola2011-08-091-0/+90
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137162 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.Bill Wendling2011-08-031-3/+0
| | | | | | | This is some of my original LLVM code. *wipes tear* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136821 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LLVMAddAlwaysInlinerPass to the C API.Rafael Espindola2011-07-261-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136083 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVM 3.0 is here, remove old do nothing method.Rafael Espindola2011-07-261-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136082 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LLVMAddLowerExpectIntrinsicPass to the C API.Rafael Espindola2011-07-251-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135966 91177308-0d34-0410-b5e6-96231b3b80d8
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the alias analysis to the C api.Rafael Espindola2011-04-131-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129447 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose more passes to the C API.Rafael Espindola2011-04-071-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129087 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead prototype, PR8351Chris Lattner2010-10-111-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116209 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding IPSCCP and Internalize passes to the C-bindingsWesley Peck2010-04-091-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100893 91177308-0d34-0410-b5e6-96231b3b80d8
* Whoops this already existed.Nate Begeman2010-03-111-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98297 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a handful of additional useful pass manager things to the C APINate Begeman2010-03-111-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98296 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the now dead condprop pass, PR3906.Chris Lattner2009-11-111-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86810 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-1/+1
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84987 91177308-0d34-0410-b5e6-96231b3b80d8
* fix header comment and include guard.Chris Lattner2009-03-061-9/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66273 91177308-0d34-0410-b5e6-96231b3b80d8
* add a bunch more passes to the C bindings (PR3734), patch byChris Lattner2009-03-062-9/+131
| | | | | | | Lennart Augustsson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66272 91177308-0d34-0410-b5e6-96231b3b80d8
* C and Objective Caml bindings for mem2reg and reg2mem.Gordon Henriksen2008-03-201-0/+6
| | | | | | Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48602 91177308-0d34-0410-b5e6-96231b3b80d8
* C and Objective Caml bindings for several scalar transforms.Gordon Henriksen2008-03-161-0/+47
Patch originally by Erick Tryzelaar, but has been modified somewhat. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48419 91177308-0d34-0410-b5e6-96231b3b80d8