summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetData.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120298
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-0/+2
| | | | | | | | | | | | | | | | | 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
* Fix Whitespace.Michael J. Spencer2010-10-191-25/+25
| | | | llvm-svn: 116800
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Add x86MMX a few more places.Dale Johannesen2010-09-151-0/+1
| | | | llvm-svn: 113914
* Add X86 MMX type to bitcode and Type.Dale Johannesen2010-09-101-0/+1
| | | | | | | (The Ada bindings probably need it too, but all the obvious places to change say "do not edit this file".) llvm-svn: 113618
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-281-25/+0
| | | | | | being actively maintained, improved, or extended. llvm-svn: 112356
* Don't use unsigned char for alignments in TargetData. There aren'tDan Gohman2010-08-111-15/+15
| | | | | | | | that many of these things, so the memory savings isn't significant, and there are now situations where there can be alignments greater than 128. llvm-svn: 110836
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-2/+2
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Do GEP offset calculations with unsigned math rather than signed mathDan Gohman2010-07-281-1/+1
| | | | | | to avoid undefined behavior on overflow, noticed by John Regehr. llvm-svn: 109594
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+1
| | | | llvm-svn: 109045
* Change TargetData's algorithm for computing defualt vector typeDan Gohman2010-04-231-16/+11
| | | | | | | alignment to match what's used in clang and GCC for __alignof, rather than trying to guess what Legalize is going to be doing. llvm-svn: 102206
* fix PR6332, allowing an index of zero into a zero sized array Chris Lattner2010-04-171-2/+2
| | | | | | even if the element of the array has no size. llvm-svn: 101662
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100709
* Revert the recent alignment changes. They're broken for -Os because,Dan Gohman2010-04-021-1/+1
| | | | | | | in particular, they end up aligning strings at 16-byte boundaries, and there's no way for GlobalOpt to check OptForSize. llvm-svn: 100172
* Change variables which are exactly 16 bytes to be 16-byte-aligned too.Dan Gohman2010-04-021-1/+1
| | | | | | This fixes test/Transforms/GlobalOpt/gv-align.ll. llvm-svn: 100161
* reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner2010-03-161-0/+25
| | | | | | handling constant unions. llvm-svn: 98680
* Revert r98656, its breaking all over the place.Daniel Dunbar2010-03-161-25/+0
| | | | llvm-svn: 98662
* improve support for uniontype and ConstantUnion, patch by Tim Northover!Chris Lattner2010-03-161-0/+25
| | | | llvm-svn: 98656
* Revert r97064. Duncan pointed out that bitcasts are defined inDan Gohman2010-02-251-42/+1
| | | | | | | | terms of store and load, which means bitcasting between scalar integer and vector has endian-specific results, which undermines this whole approach. llvm-svn: 97137
* Make getTypeSizeInBits work correctly for array types; it should returnDan Gohman2010-02-241-1/+42
| | | | | | | | | | | | | | | the number of value bits, not the number of bits of allocation for in-memory storage. Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and vectors. Fix several places in CodeGen which compute offsets into in-memory vectors to use TargetData information. This fixes PR1784. llvm-svn: 97064
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-1/+1
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* add a method to get the alignment of an integer type even Chris Lattner2010-01-251-0/+7
| | | | | | | when we don't have one laying around. Useful if you don't have an llvmcontext handy. llvm-svn: 94468
* finish cleaning up StructLayoutMap.Chris Lattner2009-12-171-21/+17
| | | | llvm-svn: 91612
* Calling InvalidateEntry during the refinement was breaking the bootstrap.Bill Wendling2009-12-051-2/+12
| | | | llvm-svn: 90656
* Final cleanups:Bill Wendling2009-12-051-14/+2
| | | | | | | - Privatize a typedef. - Call the InvalidateEntry when refining a type. llvm-svn: 90655
* Inline methods which are called only once.Bill Wendling2009-12-051-15/+3
| | | | llvm-svn: 90640
* Refactor some code. No functionality change.Bill Wendling2009-12-051-9/+13
| | | | llvm-svn: 90639
* Some code cleanup. No functionality change.Bill Wendling2009-12-041-15/+10
| | | | llvm-svn: 90588
* Revert r90371. It was causing build failures.Bill Wendling2009-12-031-23/+42
| | | | llvm-svn: 90383
* Further improvements: refactoring code that does the same thing into oneBill Wendling2009-12-031-42/+23
| | | | | | | function, converting "dyn_cast" to "cast", asserting the correct things, and other general cleanups. llvm-svn: 90371
* remove some dead std::ostream using code.Chris Lattner2009-12-031-9/+0
| | | | llvm-svn: 90366
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-0/+1
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* This initial code is meant to convert TargetData to use an AbstractTypesUser soBill Wendling2009-12-031-59/+38
| | | | | | | | | that it doesn't have dangling pointers when abstract types are resolved. This modifies it somewhat to address comments: making the "StructLayoutMap" an anonymous structure, calling "removeAbstractTypeUser" when appropriate, and adding asserts where helpful. llvm-svn: 90362
* The llvm-gcc front-end and the pass manager use two separate TargetData objects.Bill Wendling2009-11-181-24/+116
| | | | | | | | | | | | | | | | | | This is probably not confined to *just* these two things. Anyway, the llvm-gcc front-end may look up the structure layout information for an abstract type. That information will be stored into a table with the FE's TD. Instruction combine can come along and also ask for information on that abstract type, but for a separate TD (the one associated with the pass manager). After the type is refined, the old structure layout information in the pass manager's TD file is out of date. If a new type is allocated in the same space as the old-unrefined type, then the structure type information in the pass manager's TD file will be wrong, but won't know it. Fix this by making the TD's structure type information an abstract type user. llvm-svn: 89176
* Make TargetData::getStringRepresentation spit out native integer types,Chris Lattner2009-11-081-0/+7
| | | | | | this gives llvm-gcc generated modules the right data. llvm-svn: 86435
* add the ability for TargetData to return information about legal integerChris Lattner2009-11-071-39/+12
| | | | | | | | | | | datatypes on a given CPU. This is intended to allow instcombine and other transformations to avoid converting big sequences of operations to an inconvenient width, and will help clean up after SRoA. See also "Adding legal integer sizes to TargetData" on Feb 1, 2009 on llvmdev, and PR3451. Comments welcome. llvm-svn: 86370
* more cleanup.Chris Lattner2009-11-071-4/+14
| | | | llvm-svn: 86369
* rewrite TargetData to use StringRef/raw_ostream instead of thrashing ↵Chris Lattner2009-11-071-39/+59
| | | | | | std::strings. llvm-svn: 86366
* Try again at privatizing the layout info map, with a rewritten patch.Owen Anderson2009-08-211-47/+17
| | | | | | This preserves the existing behavior much more closely than my previous attempt. llvm-svn: 79663
* Re-revert r79555. Apparently it's not just buildbot weirdness.Owen Anderson2009-08-201-35/+52
| | | | llvm-svn: 79578
* Reapply r79555 for testing. Daniel's trying to work out some buildbot ↵Owen Anderson2009-08-201-52/+35
| | | | | | weirdnesss. llvm-svn: 79572
* --- Reverse-merging r79555 into '.':Bill Wendling2009-08-201-35/+52
| | | | | | | | | U include/llvm/Target/TargetData.h U lib/Target/TargetData.cpp Temporarily revert 79555. It was causing hangs and test failures. llvm-svn: 79568
* Make the StructType->StructLayout table private to TargetData, allowing us ↵Owen Anderson2009-08-201-52/+35
| | | | | | to avoid locking on it. llvm-svn: 79555
* Update and fix some comments.Dan Gohman2009-08-201-7/+7
| | | | llvm-svn: 79532
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-3/+4
| | | | llvm-svn: 78948
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+3
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
OpenPOWER on IntegriCloud