summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRecordLayout.h
Commit message (Collapse)AuthorAge
* When a module completes the definition of a class template specialization ↵Richard Smith2014-04-19
| | | | | | imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206680 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct hyphenations in comments and assert messagesAlp Toker2013-12-05
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196466 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-02
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the bitfield access IR generation to address PR13619 andChandler Carruth2012-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model. The primary change this introduces is to move from a manually aligned and strided access pattern across the bits of the bitfield to a much simpler lump access of all bits in the bitfield followed by math to extract the bits relevant for the particular field. This simplifies the code significantly, but relies on LLVM to intelligently lowering these integers. I have tested LLVM's lowering both synthetically and in benchmarks. The lowering appears to be functional, and there are no really significant performance regressions. Different code patterns accessing bitfields will vary in how this impacts them. The only real regressions I'm seeing are a few patterns where the LLVM code generation for loads that feed directly into a mask operation don't take advantage of the x86 ability to do a smaller load and a cheap zero-extension. This doesn't regress any benchmark in the nightly test suite on my box past the noise threshold, but my box is quite noisy. I'll be watching the LNT numbers, and will look into further improvements to the LLVM lowering as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169489 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Dmitri Gribenko2012-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate lvalue alignment into bitfields. Per report on cfe-dev.Eli Friedman2012-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159295 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up forward declarations of raw_ostream to use the new LLVM.hChris Lattner2011-07-23
| | | | | | | patch by Jon Mulder! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135851 91177308-0d34-0410-b5e6-96231b3b80d8
* add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.Chris Lattner2011-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert AccessInfo::AccessAlignment to CharUnits. No change in functionalityKen Dyck2011-04-24
| | | | | | | intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130087 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert CGBitFieldInfo::FieldByteOffset to CharUnits. No change inKen Dyck2011-04-24
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130085 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform zero-initialization of virtual base classes when emitting John McCall2011-02-15
| | | | | | | | | | | | | | a zero constant for a complete class. rdar://problem/8424975 To make this happen, track the field indexes for virtual bases in the complete object. I'm curious whether we might be better off making CGRecordLayoutBuilder *much* more reliant on ASTRecordLayout; we're currently duplicating an awful lot of the ABI layout logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125555 91177308-0d34-0410-b5e6-96231b3b80d8
* A CGRecordLayout object persists. Since its contained types mayJohn McCall2010-11-30
| | | | | | | | | refer to opaque types, they must be held via PATypeHolders. I'm not sure why this hasn't blown up before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120491 91177308-0d34-0410-b5e6-96231b3b80d8
* CGRecordLayout types are always struct types.Anders Carlsson2010-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120106 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BaseLLVMType to NonVirtualBaseLLVMType.Anders Carlsson2010-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119956 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as ↵Anders Carlsson2010-11-09
| | | | | | a first step towards fixing PR6995. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118491 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Move CGBitFieldInfo strategy computation helpers to static memberDaniel Dunbar2010-09-02
| | | | | | functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112913 91177308-0d34-0410-b5e6-96231b3b80d8
* Go back to asking CodeGenTypes whether a type is zero-initializable.John McCall2010-08-22
| | | | | | | | | | | Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that work if we avoid lazily creating the ABI. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of the LLVM field numbers for non-virtual bases.Anders Carlsson2010-05-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104013 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments.Daniel Dunbar2010-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102429 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor ↵Daniel Dunbar2010-04-15
| | | | | | | | arguments, it is now an immutable object. Also, add some checking of various invariants that should hold on the CGBitFieldInfo access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101345 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Eliminate now unused fields from CGBitFieldInfo.Daniel Dunbar2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101344 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.Daniel Dunbar2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101221 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Enhance CGBitFieldInfo with enough information to fully describe the ↵Daniel Dunbar2010-04-13
| | | | | | | | | | "policy" with which a bit-field should be accessed. - For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts). - Design comments appreciated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101178 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of ↵Daniel Dunbar2010-04-12
| | | | | | -fdump-record-layouts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101051 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Move the bit-field access type into CGBitFieldInfo, and change ↵Daniel Dunbar2010-04-08
| | | | | | bit-field LValues to just store the base address of object containing the bit-field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100745 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100513 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar2010-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
* IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out ↵Daniel Dunbar2010-03-31
| | | | | | | | of CodeGenTypes, to per-record CGRecordLayout structures. - I did a cursory check that this was perf neutral, FWIW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99978 91177308-0d34-0410-b5e6-96231b3b80d8
* IRGen: Hide CGRecordLayoutBuilder class, because I can.Daniel Dunbar2010-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99967 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Move CGRecordLayout to its own happy little file.Daniel Dunbar2010-03-30
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99945 91177308-0d34-0410-b5e6-96231b3b80d8