summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move TargetData to DataLayout.Micah Villmow2012-10-081-10/+10
| | | | llvm-svn: 165402
* Port the global copy optimization from the SROA pass to InstCombine.Chandler Carruth2012-08-211-178/+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-3/+8
| | | | | | 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
* Clean whitespaces.Nadav Rotem2012-07-241-67/+67
| | | | llvm-svn: 160668
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-9/+9
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* The DIBuilder class is just a wrapper around debug info creationBill Wendling2012-06-291-1/+1
| | | | | | | (a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore instead. llvm-svn: 159414
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-281-1/+1
| | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
* Add a number of threshold arguments to the SRA pass.Nadav Rotem2012-06-211-18/+60
| | | | | | A patch by Tom Stellard with minor changes. llvm-svn: 158918
* Now that SROA can form alloca's for dynamic vector accesses, further improve ↵Pete Cooper2012-06-171-28/+99
| | | | | | 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-1/+10
| | | | | | | | 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-3/+29
| | | | | | 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-2/+15
| | | | | | 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-15/+2
| | | | | | | | 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-2/+15
| | | | | | 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-6/+0
| | | | | | | | 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-0/+6
| | | | | | be replaced with a scalar access llvm-svn: 158407
* Do not eliminate allocas whose alignment exceeds that of thePeter Collingbourne2012-05-191-12/+35
| | | | | | | copied-in constant, as a subsequent user may rely on over alignment. Fixes PR12885. llvm-svn: 157134
* Typo.Chad Rosier2012-04-111-1/+1
| | | | llvm-svn: 154522
* Indentation.Duncan Sands2012-03-231-1/+1
| | | | llvm-svn: 153322
* don't use "signed", just something I noticed in patches flying by.Chris Lattner2012-03-221-2/+2
| | | | llvm-svn: 153237
* Fixed a transform crash when setting a negative size value for memset. ↵Aaron Ballman2012-03-151-2/+6
| | | | | | Fixes PR12202. llvm-svn: 152756
* Reflow code, no functionality change.Benjamin Kramer2012-02-231-17/+12
| | | | llvm-svn: 151262
* use ConstantVector::getSplat in a few places.Chris Lattner2012-01-251-2/+1
| | | | llvm-svn: 148929
* Fix warning.Rafael Espindola2011-12-261-1/+2
| | | | llvm-svn: 147284
* Add support for vectors of pointers.Nadav Rotem2011-12-051-0/+2
| | | | llvm-svn: 145801
* Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.Nick Lewycky2011-11-201-3/+2
| | | | | | | | Suggested in code review by Eli. That code in InstCombine looks kinda suspicious. llvm-svn: 145013
* Make sure scalarrepl picks the correct alloca when it rewrites a bitcast. ↵Eli Friedman2011-11-121-2/+10
| | | | | | Fixes PR11353. llvm-svn: 144442
* The element insertion code in scalar replacement doesn't handle incorrectCameron Zwarich2011-10-231-2/+4
| | | | | | | 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-2/+2
| | | | | | | | 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
* Remove a lot of the fancy scalar replacement code for dealing with llvm-gcc'sCameron Zwarich2011-10-111-205/+16
| | | | | | | 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-41/+30
| | | | | | | | 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-7/+11
| | | | llvm-svn: 140327
* Change a bunch of isVolatile() checks to check for atomic load/store as well.Eli Friedman2011-09-121-11/+11
| | | | | | | | No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic. I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly. I'm going to try and come up with some additional testing, though. llvm-svn: 139533
* Finish adding support for lifetime intrinsics to SROA. Fixes PR10121!Nick Lewycky2011-07-251-1/+110
| | | | llvm-svn: 136008
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-251-3/+2
| | | | llvm-svn: 135904
* Fix MergeInVectorType to check for vector types with the same allocDan Gohman2011-07-211-0/+6
| | | | | | | size but different element types, so that it filters out the cases that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827. llvm-svn: 135721
* Convert TargetData::getIndexedOffset to use ArrayRef.Jay Foad2011-07-191-6/+4
| | | | llvm-svn: 135478
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-91/+91
| | | | llvm-svn: 135375
* Use DBG_VALUE location while inserting DBG_VALUE during alloca promotion.Devang Patel2011-07-071-2/+2
| | | | llvm-svn: 134568
* Handle cases where multiple dbg.declare and dbg.value intrinsics are tied to ↵Devang Patel2011-07-061-11/+58
| | | | | | one alloca. llvm-svn: 134549
* Simplify. Consolidate dbg.declare handling in AllocaPromoter.Devang Patel2011-07-061-13/+18
| | | | llvm-svn: 134538
* Fix likely typo, reduce number of instruction name collisions.Nick Lewycky2011-07-011-1/+1
| | | | llvm-svn: 134235
* Teach one piece of scalarrepl to handle lifetime markers. When transforming anNick Lewycky2011-06-271-13/+37
| | | | | | | | 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
* When scalar replacement returns a vector type, only accept it if the vectorCameron Zwarich2011-06-181-0/+5
| | | | | | | | | | | | 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
* Fix an invalid bitcast crash that occurs when doing a partial memset of a vectorCameron Zwarich2011-06-181-3/+15
| | | | | | alloca. Fixes part of <rdar://problem/9580800>. llvm-svn: 133336
* Remove a pointless assignment. Nothing checks the value of VectorTy anymore nowCameron Zwarich2011-06-181-1/+0
| | | | | | unless ScalarKind is Vector. llvm-svn: 133335
* Be more obvious about what is being tested.Cameron Zwarich2011-06-141-1/+2
| | | | llvm-svn: 132982
* Fix grammar.Cameron Zwarich2011-06-131-3/+3
| | | | llvm-svn: 132952
* Rename MergeInType to MergeInTypeForLoadOrStore.Cameron Zwarich2011-06-131-8/+10
| | | | llvm-svn: 132940
* Remove the HadAVector instance variable and replace it with a use of ScalarKind.Cameron Zwarich2011-06-131-15/+26
| | | | llvm-svn: 132939
OpenPOWER on IntegriCloud