summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ScalarRepl
Commit message (Collapse)AuthorAgeFilesLines
...
* s/grep/FileCheck/ in some testsEli Bendersky2013-02-131-2/+3
| | | | llvm-svn: 175093
* FileCheck-ify some grep testsReid Kleckner2013-01-251-3/+2
| | | | | | | | These tests in particular try to use escaped square brackets as an argument to grep, which is failing for me with native win32 python. It appears the backslash is being lost near the CreateProcess*() call. llvm-svn: 173506
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2013-01-012-2/+2
| | | | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. My previous regex was not good enough to find these. llvm-svn: 171343
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-301-2/+2
| | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. llvm-svn: 171250
* Port the global copy optimization from the SROA pass to InstCombine.Chandler Carruth2012-08-211-146/+0
| | | | | | | | | | This optimization is really just replacing allocas wholesale with globals, there is no scalarization. The underlying motivation for this patch is to simplify the SROA pass and focus it on splitting and promoting allocas. llvm-svn: 162271
* Fix crash when when do lto on Bullet. Dynamic GEPs in SROA were incorrectly ↵Pete Cooper2012-08-101-0/+22
| | | | | | being applied to all accesses to an alloca, not just the ones which read from the GEP. Thanks to Evan for reducing the test. rdar://11861001 llvm-svn: 161654
* Fix the remaining TCL-style quotes found in the testsuite. This isChandler Carruth2012-07-021-1/+1
| | | | | | | | | | | | | | | | | another mechanical change accomplished though the power of terrible Perl scripts. I have manually switched some "s to 's to make escaping simpler. While I started this to fix tests that aren't run in all configurations, the massive number of tests is due to a really frustrating fragility of our testing infrastructure: things like 'grep -v', 'not grep', and 'expected failures' can mask broken tests all too easily. Essentially, I'm deeply disturbed that I can change the testsuite so radically without causing any change in results for most platforms. =/ llvm-svn: 159547
* Convert all tests using TCL-style quoting to use shell-style quoting.Chandler Carruth2012-07-0214-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | This was done through the aid of a terrible Perl creation. I will not paste any of the horrors here. Suffice to say, it require multiple staged rounds of replacements, state carried between, and a few nested-construct-parsing hacks that I'm not proud of. It happens, by luck, to be able to deal with all the TCL-quoting patterns in evidence in the LLVM test suite. If anyone is maintaining large out-of-tree test trees, feel free to poke me and I'll send you the steps I used to convert things, as well as answer any painful questions etc. IRC works best for this type of thing I find. Once converted, switch the LLVM lit config to use ShTests the same as Clang. In addition to being able to delete large amounts of Python code from 'lit', this will also simplify the entire test suite and some of lit's architecture. Finally, the test suite runs 33% faster on Linux now. ;] For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s llvm-svn: 159525
* Now that SROA can form alloca's for dynamic vector accesses, further improve ↵Pete Cooper2012-06-171-33/+62
| | | | | | it to be able to replace operations on these vector alloca's with insert/extract element insts llvm-svn: 158623
* Fix crash from r158529 on Bullet.Pete Cooper2012-06-161-0/+55
| | | | | | | | Dynamic GEPs created by SROA needed to insert extra "i32 0" operands to index through structs and arrays to get to the vector being indexed. llvm-svn: 158590
* Allow SROA to split up an array of vectors into multiple vectors, even when ↵Pete Cooper2012-06-151-0/+83
| | | | | | the vectors are dynamically indexed llvm-svn: 158529
* Recommit r158407: Allow SROA to look at a vector type and see if the offset ↵Pete Cooper2012-06-141-7/+18
| | | | | | is out of range to be replaced with a scalar access. Now with additional fix and test for indexing into a vector inside a struct llvm-svn: 158479
* Revert r158454: Allow SROA to look at a vector type... Its breaking the ↵Pete Cooper2012-06-141-18/+7
| | | | | | | | vectorise buildbot This reverts commit 12c1f86ffa731e2952c80d2cc577000c96b8962c. llvm-svn: 158462
* Recommit r158407: Allow SROA to look at a vector type and see if the offset ↵Pete Cooper2012-06-141-7/+18
| | | | | | is out of range to be replaced with a scalar access. Now with additional fix and test for indexing into a vector inside a struct llvm-svn: 158454
* Revert "Allow SROA to look at a vector type and see if the offset is out of ↵Pete Cooper2012-06-131-4/+7
| | | | | | | | range to be replaced with a scalar access" This reverts commit 51786e0aaec76b973205066bd44f7f427b21969f. llvm-svn: 158408
* Allow SROA to look at a vector type and see if the offset is out of range to ↵Pete Cooper2012-06-131-7/+4
| | | | | | be replaced with a scalar access llvm-svn: 158407
* Do not eliminate allocas whose alignment exceeds that of thePeter Collingbourne2012-05-191-0/+36
| | | | | | | copied-in constant, as a subsequent user may rely on over alignment. Fixes PR12885. llvm-svn: 157134
* line endingsMatt Beaumont-Gay2012-03-151-20/+20
| | | | llvm-svn: 152832
* Fixed a transform crash when setting a negative size value for memset. ↵Aaron Ballman2012-03-151-0/+20
| | | | | | Fixes PR12202. llvm-svn: 152756
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Fix SSAUpdaterImpl's RecordMatchingPHI to record exactly theDan Gohman2012-02-031-0/+77
| | | | | | | | | | PHI nodes which were matched, rather than climbing up the original PHI node's operands to rediscover PHI nodes for recording, since the PHI nodes found that are not necessarily part of the matched set. This fixes rdar://10589171. llvm-svn: 149654
* Upgrade syntax of tests using volatile instructions to use 'load volatile' ↵Chris Lattner2011-11-271-2/+2
| | | | | | instead of 'volatile load', which is archaic. llvm-svn: 145171
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-272-291/+0
| | | | | | | I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? llvm-svn: 145169
* Make sure scalarrepl picks the correct alloca when it rewrites a bitcast. ↵Eli Friedman2011-11-121-0/+26
| | | | | | Fixes PR11353. llvm-svn: 144442
* The element insertion code in scalar replacement doesn't handle incorrectCameron Zwarich2011-10-231-0/+19
| | | | | | | element types, even though the element extraction code does. It is surprising that this bug has been here for so long. Fixes <rdar://problem/10318778>. llvm-svn: 142740
* Fix PR11106 by correcting a typo that has been in the code for over a year. ThisCameron Zwarich2011-10-111-0/+22
| | | | | | | | would have never worked, since the element type of a vector type is never a vector type. Also fix the conditional to be more direct in checking whether EltTy is a vector type. llvm-svn: 141713
* Add a test for PR10565.Cameron Zwarich2011-10-111-0/+15
| | | | llvm-svn: 141647
* Remove a lot of the fancy scalar replacement code for dealing with llvm-gcc'sCameron Zwarich2011-10-111-167/+0
| | | | | | | lowering of NEON code. It provides little-to-no benefit now and only introduces additional complexity. llvm-svn: 141646
* Stop emitting instructions with the name "tmp" they eat up memory and have ↵Benjamin Kramer2011-09-271-5/+5
| | | | | | | | to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
* PR10987: add a missed safety check to isSafePHIToSpeculate in scalarrepl.Eli Friedman2011-09-221-0/+40
| | | | llvm-svn: 140327
* Use %% for literals in RUN lines.Andrew Trick2011-08-261-1/+1
| | | | llvm-svn: 138647
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-121-2/+2
| | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. llvm-svn: 137527
* Finish adding support for lifetime intrinsics to SROA. Fixes PR10121!Nick Lewycky2011-07-251-0/+139
| | | | llvm-svn: 136008
* Fix MergeInVectorType to check for vector types with the same allocDan Gohman2011-07-211-0/+27
| | | | | | | size but different element types, so that it filters out the cases that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827. llvm-svn: 135721
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-093-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 134829
* Teach one piece of scalarrepl to handle lifetime markers. When transforming anNick Lewycky2011-06-271-0/+14
| | | | | | | | alloca that only holds a copy of a global and we're going to replace the users of the alloca with that global, just nuke the lifetime intrinsics. Part of PR10121. llvm-svn: 133905
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-192-6/+6
| | | | | | | top level type without a specified number. This syntax isn't documented and blocks forward progress. llvm-svn: 133371
* When scalar replacement returns a vector type, only accept it if the vectorCameron Zwarich2011-06-182-2/+19
| | | | | | | | | | | | type's bitwidth matches the (allocated) size of the alloca. This severely pessimizes vector scalar replacement when the only vector type being used is something like <3 x float> on x86 or ARM whose allocated size matches a <4 x float>. I hope to fix some of the flawed assumptions about allocated size throughout scalar replacement and reenable this in most cases. llvm-svn: 133338
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-1811-125/+103
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* Fix an invalid bitcast crash that occurs when doing a partial memset of a vectorCameron Zwarich2011-06-181-0/+22
| | | | | | alloca. Fixes part of <rdar://problem/9580800>. llvm-svn: 133336
* manually upgrade a bunch of tests to modern syntax, and remove some thatChris Lattner2011-06-172-2/+4
| | | | | | are either unreduced or only test old syntax. llvm-svn: 133228
* Fix PR10104 by adding a bounds check on a vector element access check. It wasCameron Zwarich2011-06-091-3/+5
| | | | | | | | assuming that all offsets are legal vector accesses, and thus trying to access the float member of { <2 x float>, float } as the 3rd element of the first member. llvm-svn: 132766
* Fix an assymmetry between ConvertScalar_ExtractValue and ↵Cameron Zwarich2011-06-081-0/+60
| | | | | | | | | | ConvertScalar_InsertValue. The former was using the size of the entire alloca, whereas the latter was correctly using the allocated size of the immediate type being converted (which may differ from the size of the alloca). This fixes PR10082. llvm-svn: 132759
* Fix "make check" in Release by removing debug-only options from an 'opt' ↵Cameron Zwarich2011-05-241-2/+2
| | | | | | invocation. llvm-svn: 131972
* Make LoadAndStorePromoter preserve debug info and create llvm.dbg.values whenCameron Zwarich2011-05-242-0/+62
| | | | | | promoting allocas to SSA variables. Fixes <rdar://problem/9479036>. llvm-svn: 131953
* Fix PR9820: a read-only call differs from a load in that a load doesn'tDuncan Sands2011-05-061-0/+26
| | | | | | | return the pointer being dereferenced, it returns the pointee, but a call might return the pointer itself. llvm-svn: 130979
* make a couple of changes to the standard pass pipeline:Chris Lattner2011-04-261-1/+1
| | | | | | | | | | | | | | | | | | 1. Only run the early (in the module pass pipe) instcombine/simplifycfg if the "unit at a time" passes they are cleaning up after runs. 2. Move the "clean up after the unroller" pass to the very end of the function-level pass pipeline. Loop unroll uses instsimplify now, so it doesn't create a ton of trash. Moving instcombine later allows it to clean up after opportunities are exposed by GVN, DSE, etc. 3. Introduce some phase ordering tests for things that are specifically intended to be simplified by the full optimizer as a whole. This resolves PR2338, and is progress towards PR6627, which will be generating code that looks similar to test2. llvm-svn: 130241
* Fix another case of <rdar://problem/9184212> that only occurs with codeCameron Zwarich2011-04-201-0/+15
| | | | | | | generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float vector on ARM rather than an i64 array like Clang. llvm-svn: 129878
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-2/+2
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Vectors with different number of elements of the same element type can haveMon P Wang2011-04-131-0/+46
| | | | | | | | the same allocation size but different primitive sizes(e.g., <3xi32> and <4xi32>). When ScalarRepl promotes them, it can't use a bit cast but should use a shuffle vector instead. llvm-svn: 129472
OpenPOWER on IntegriCloud