summaryrefslogtreecommitdiff
path: root/lib/VMCore/DataLayout.cpp
Commit message (Collapse)AuthorAge
* Disallow the undocumented practice of starting the datalayout string with '-'.Patrik Hägglund2012-11-23
| | | | | | | Update some test cases accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168516 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not handle void types in DataLayout. Patch by Patrick Hägglund.Duncan Sands2012-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168042 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert some redundant parts of r142605.Patrik Hägglund2012-11-14
| | | | | | | | | | This seems like redundant leftovers from r142288 - exposing TargetData::parseSpecifier to LLParser - which got reverted. Removes redunant td != NULL checks in parseSpecifier, and simplifies the interface to parseSpecifier and init. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167924 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the assertion in getIntPtrType (I've audited all users of this method andDuncan Sands2012-11-02
| | | | | | | they are now all correct; hopefully the buildbots will agree!). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167289 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the series of commits starting with r166578 which introduced theChandler Carruth2012-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getIntPtrType support for multiple address spaces via a pointer type, and also introduced a crasher bug in the constant folder reported in PR14233. These commits also contained several problems that should really be addressed before they are re-committed. I have avoided reverting various cleanups to the DataLayout APIs that are reasonable to have moving forward in order to reduce the amount of churn, and minimize the number of commits that were reverted. I've also manually updated merge conflicts and manually arranged for the getIntPtrType function to stay in DataLayout and to be defined in a plausible way after this revert. Thanks to Duncan for working through this exact strategy with me, and Nick Lewycky for tracking down the really annoying crasher this triggered. (Test case to follow in its own commit.) After discussing with Duncan extensively, and based on a note from Micah, I'm going to continue to back out some more of the more problematic patches in this series in order to ensure we go into the LLVM 3.2 branch with a reasonable story here. I'll send a note to llvmdev explaining what's going on and why. Summary of reverted revisions: r166634: Fix a compiler warning with an unused variable. r166607: Add some cleanup to the DataLayout changes requested by Chandler. r166596: Revert "Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! r166591: Delete a directory that wasn't supposed to be checked in yet. r166578: Add in support for getIntPtrType to get the pointer type based on the address space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167221 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (theDuncan Sands2012-10-29
| | | | | | | | | | wrapper returns a vector of integers when passed a vector of pointers) by having getIntPtrType itself return a vector of integers in this case. Outside of this wrapper, I didn't find anywhere in the codebase that was relying on the old behaviour for vectors of pointers, so give this a whirl through the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166939 91177308-0d34-0410-b5e6-96231b3b80d8
* Factorize code: rather than duplication the logic in getPointerTypeSizeInBits,Duncan Sands2012-10-29
| | | | | | | just call getPointerTypeSizeInBits. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166926 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some cleanup to the DataLayout changes requested by Chandler.Micah Villmow2012-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
* Add in support for getIntPtrType to get the pointer type based on the ↵Micah Villmow2012-10-24
| | | | | | | | | | address space. This checkin also adds in some tests that utilize these paths and updates some of the clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166578 91177308-0d34-0410-b5e6-96231b3b80d8
* DataLayout should use itself when calculating the size of a vector.Hal Finkel2012-10-21
| | | | | | | | This is important for vectors of pointers because only DataLayout, not the underlying vector type, knows how to calculate the size of the pointers in the vector. Fixes PR14138. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166401 91177308-0d34-0410-b5e6-96231b3b80d8
* Add in the first step of the multiple pointer support. This adds in support ↵Micah Villmow2012-10-09
| | | | | | | | | to the data layout for specifying a per address space pointer size. The next step is to update the optimizers to allow them to optimize the different address spaces with this information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165505 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement TargetData with the DataLayout class, this will allow LLVM ↵Micah Villmow2012-10-05
| | | | | | projects to transition to DataLayout without loosing functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165318 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the Target specific passes in the DataLayout class to be Target agnostic.Micah Villmow2012-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165270 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit the copying of TargetData to DataLayout without any changes to the ↵Micah Villmow2012-10-04
| | | | | | files, this should fix the problems and the changes to rename to DataLayout will come next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165262 91177308-0d34-0410-b5e6-96231b3b80d8
* Backing out my changes, something screwed up from my patches, starting over.Micah Villmow2012-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165253 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetData to DataLayout in DataLayout.cpp. This should fix a build ↵Micah Villmow2012-10-04
| | | | | | failure from r165249 where the wrong version of the file was submitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165251 91177308-0d34-0410-b5e6-96231b3b80d8
* Create the DataLayout class, as a direct copy of TargetData.Micah Villmow2012-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165249 91177308-0d34-0410-b5e6-96231b3b80d8
* Accidently checked in the files, only wanted to copy them.Micah Villmow2012-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165244 91177308-0d34-0410-b5e6-96231b3b80d8
* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165243 ↵Micah Villmow2012-10-04
91177308-0d34-0410-b5e6-96231b3b80d8