summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* If preprocessed token introduced empty filename then use main translation ↵Devang Patel2011-02-161-1/+1
| | | | | | unit's filename for debug info entries. llvm-svn: 125672
* Remove this FIXME; clear up an unused variable; style.John McCall2011-02-161-8/+6
| | | | llvm-svn: 125662
* Save a copy expression for non-trivial copy constructions of catch variables.John McCall2011-02-166-19/+88
| | | | llvm-svn: 125661
* Simplify test to check an aggregate argument that has non trivial ↵Devang Patel2011-02-165-23/+20
| | | | | | | | constructor or destructor. This patch rewrites r125142. llvm-svn: 125632
* Don't call objc_read_weak as part of emitting a block literal.John McCall2011-02-162-25/+1
| | | | | | | | Nobody ever gave me a clear reason for why we were doing this, and now it's apparently causing serious problems, so if *not* having this causes problems, we get to solve them the right way this time. llvm-svn: 125627
* Only c++ class arguments with non trivial constructor or destructor needs a ↵Devang Patel2011-02-151-1/+1
| | | | | | | | | reference. C struct arguments do not need this adjustment. This fixes 7 failures in callfuncs.exp from gdb testsuite. llvm-svn: 125615
* Refactor CGRecordLayoutBuilder to use CharUnits more consistently.John McCall2011-02-151-144/+162
| | | | llvm-svn: 125605
* In -fapple-kext mode, global object construction code Fariborz Jahanian2011-02-151-5/+6
| | | | | | ends up in the text segment. // rdar://8825235. llvm-svn: 125585
* Emit in-class member function definitions that are markedDouglas Gregor2011-02-151-0/+12
| | | | | | "used". Fixes <rdar://problem/8684363>. llvm-svn: 125579
* Assorted cleanup:John McCall2011-02-158-131/+168
| | | | | | | | | - Have CGM precompute a number of commonly-used types - Have CGF copy that during initialization instead of recomputing them - Use TBAA info when initializing a parameter variable - Refactor the scalar ++/-- code llvm-svn: 125562
* Perform zero-initialization of virtual base classes when emitting John McCall2011-02-153-195/+247
| | | | | | | | | | | | 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. llvm-svn: 125555
* Convert RecordLayout::Alignment to CharUnits from bit units. No change inKen Dyck2011-02-151-3/+4
| | | | | | functionality intended. llvm-svn: 125549
* update for ConstantVector API change.Chris Lattner2011-02-154-29/+26
| | | | llvm-svn: 125538
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-144-26/+29
| | | | | | builders unhappy. llvm-svn: 125505
* update for ConstantVector::get API change.Chris Lattner2011-02-144-29/+26
| | | | llvm-svn: 125488
* OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne2011-02-141-0/+13
| | | | | | FP_CONTRACT pragmas. Patch originally by ARM. llvm-svn: 125475
* Give some convenient idiomatic accessors to Stmt::child_range andJohn McCall2011-02-131-2/+1
| | | | | | | Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. llvm-svn: 125450
* Look through array types when deciding whether a field requires non-trivialJohn McCall2011-02-131-5/+4
| | | | | | destruction in the destructor-aliases logic. Fixes PR 9197. llvm-svn: 125447
* Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter.Jeffrey Yasskin2011-02-111-0/+7
| | | | | | | I also sorted the tools/driver dependencies since their order no longer matters. llvm-svn: 125417
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-116-14/+36
| | | | llvm-svn: 125360
* Convert RecordLayout::DataSize to CharUnits from bits, eliminating twoKen Dyck2011-02-111-1/+1
| | | | | | | unnecessary calls to RoundUpToAlignment. No changes to functionality intended. llvm-svn: 125356
* Add a helper function, ASTContext::toBits(), that converts sizes inKen Dyck2011-02-113-11/+6
| | | | | | | CharUnits to sizes in bits, and use it to tidy up the places where the conversion was done explicitly. llvm-svn: 125332
* Use raw_svector_ostream in more places in the mangler.Rafael Espindola2011-02-101-8/+12
| | | | llvm-svn: 125321
* Fix family-friendly-o, tsk tsk.Daniel Dunbar2011-02-101-1/+1
| | | | llvm-svn: 125293
* IRgen: Fix an immediate-exit-from-fn style nit.Daniel Dunbar2011-02-101-5/+4
| | | | llvm-svn: 125289
* Implement mcount profiling, enabled via -pg.Roman Divacky2011-02-102-0/+15
| | | | llvm-svn: 125282
* Drop the 'InBits' part from the name of RecordSizeInBits as the value is inKen Dyck2011-02-101-5/+5
| | | | | | character units. llvm-svn: 125281
* Eliminate some signed-to-unsigned comparision warnings introduced inKen Dyck2011-02-101-2/+4
| | | | | | r125156. llvm-svn: 125280
* CMake: LLVM_NO_RTTI must be obsolete now!NAKAMURA Takumi2011-02-101-2/+0
| | | | llvm-svn: 125275
* If an aggregate is returned as 'sret' argument then let debugger know about ↵Devang Patel2011-02-101-0/+6
| | | | | | this. llvm-svn: 125249
* Do not emit AT_MIPS_linkage_name for Objective-C method static variable i.Devang Patel2011-02-091-1/+2
| | | | llvm-svn: 125210
* Driver/Frontend: Wire up -mregparm=.Daniel Dunbar2011-02-091-3/+3
| | | | llvm-svn: 125201
* Remove vtables from the Stmt hierarchy; this was pretty easy asJohn McCall2011-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | there were only three virtual methods of any significance. The primary way to grab child iterators now is with Stmt::child_range children(); Stmt::const_child_range children() const; where a child_range is just a std::pair of iterators suitable for being llvm::tie'd to some locals. I've left the old child_begin() and child_end() accessors in place, but it's probably a substantial penalty to grab the iterators individually now, since the switch-based dispatch is kindof inherently slower than vtable dispatch. Grabbing them together is probably a slight win over the status quo, although of course we could've achieved that with vtables, too. I also reclassified SwitchCase (correctly) as an abstract Stmt class, which (as the first such class that wasn't an Expr subclass) required some fiddling in a few places. There are somewhat gross metaprogramming hooks in place to ensure that new statements/expressions continue to implement getSourceRange() and children(). I had to work around a recent clang bug; dgregor actually fixed it already, but I didn't want to introduce a selfhosting dependency on ToT. llvm-svn: 125183
* Emit debug info for objc_selector.Devang Patel2011-02-091-0/+6
| | | | llvm-svn: 125163
* When IRgen refers to a function declaration that is not a definition,Douglas Gregor2011-02-092-2/+8
| | | | | | | | | | and we later find the definition, make sure that we add the definition (not the declaration) to the list of deferred definitions to emit. Fixes PR8864. Thanks to Nick Lewycky for testing this patch out llvm-svn: 125157
* Convert RecordLayout::Size to CharUnits from bits. No changes toKen Dyck2011-02-094-13/+19
| | | | | | functionality intended. llvm-svn: 125156
* If an aggregate argument is passed indirectly because it has non trivialDevang Patel2011-02-095-9/+20
| | | | | | | | destructor or copy constructor than let debug info know about it. Radar 8945514. llvm-svn: 125142
* Fix an IRGen bug in property setter calls whenFariborz Jahanian2011-02-081-1/+11
| | | | | | setter and getter types mismatch. // rdar://8966864 llvm-svn: 125125
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-0821-499/+511
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Extend the const capture optimization to C++ record types with noJohn McCall2011-02-081-5/+42
| | | | | | mutable fields and with trivial destructors and copy constructors. llvm-svn: 125073
* Convert RecordLayout::NonVirtualAlign to CharUnits. No change inKen Dyck2011-02-081-5/+10
| | | | | | functionality intended. llvm-svn: 125069
* When copy-capturing values for a nested capture, use a BlockDeclRefExpr.John McCall2011-02-071-3/+11
| | | | llvm-svn: 125021
* A few more tweaks to the blocks AST representation: John McCall2011-02-0711-937/+1038
| | | | | | | | | | | | | | | | | - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. llvm-svn: 125005
* pre/post ++/-- for AltiVec vectors. (with builtins-ppc-altivec.c failure fixed)Anton Yartsev2011-02-071-23/+48
| | | | llvm-svn: 125000
* Fix self-host; if a thunk already exists and has available_externally ↵Anders Carlsson2011-02-061-2/+7
| | | | | | linkage, we should change its linkage instead of asserting. llvm-svn: 124986
* When building with optimizations, emit thunks with available_externally ↵Anders Carlsson2011-02-062-6/+43
| | | | | | linkage so devirtualized function calls can also be de-thunked. llvm-svn: 124984
* Simplify thunks code.Anders Carlsson2011-02-062-9/+7
| | | | llvm-svn: 124983
* Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to ↵Anders Carlsson2011-02-052-6/+8
| | | | | | | | GetOrCreateLLVMFunction so that we won't assert when building a thunk for an implicit virtual member function that is not marked used. llvm-svn: 124967
* Re-land r124768, with a fix for PR9130.Anders Carlsson2011-02-054-14/+24
| | | | | | We now emit everything except unused implicit virtual member functions when building the vtable. llvm-svn: 124935
* minor refactoring of -fapple-kext stuff.Fariborz Jahanian2011-02-041-8/+6
| | | | llvm-svn: 124837
OpenPOWER on IntegriCloud