summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix mismatched new[]/delete[].Benjamin Kramer2011-10-241-1/+1
| | | | llvm-svn: 142803
* Fix PR11073 by adding the argument type information to the decl we constructEric Christopher2011-10-211-3/+10
| | | | | | | | for the function type. Update a testcase accordingly. Patch initially by Anders Waldenborg! llvm-svn: 142700
* Recommit:Eric Christopher2011-10-131-0/+3
| | | | | | | | | | | | | | | Start handling debug line and scope information better: Migrate most of the location setting within the larger API in CGDebugInfo and update a lot of callers. Remove the existing file/scope change machinery in UpdateLineDirectiveRegion and replace it with DILexicalBlockFile usage. Finishes off the rest of rdar://10246360 after fixing a few bugs that were exposed in gdb testsuite testing. llvm-svn: 141893
* Support for C1x _Atomic specifier (see testcase). This is primarily being ↵Eli Friedman2011-10-061-0/+8
| | | | | | | | committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! llvm-svn: 141330
* CUDA: IR generation support for device stubsPeter Collingbourne2011-10-061-0/+5
| | | | llvm-svn: 141304
* de-tmpify clang.Benjamin Kramer2011-09-271-1/+1
| | | | llvm-svn: 140637
* Throw the switch to convert clang to the new exception handling model!Bill Wendling2011-09-191-1/+4
| | | | | | | | | | | | | This model uses the 'landingpad' instruction, which is pinned to the top of the landing pad. (A landing pad is defined as the destination of the unwind branch of an invoke instruction.) All of the information needed to generate the correct exception handling metadata during code generation is encoded into the landingpad instruction. The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic call. It's lowered in much the same way as the intrinsic is. llvm-svn: 140049
* Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: canJulien Lerouge2011-09-091-0/+47
| | | | | | | annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. llvm-svn: 139423
* Carry the debug information from single exit unified return blockEric Christopher2011-09-091-1/+2
| | | | | | | | along with the new insert point. Fixes PR10829 llvm-svn: 139416
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Simplify EH control flow by observing that EH scopes form a simpleJohn McCall2011-08-111-3/+3
| | | | | | | | | | | | | | | hierarchy of delegation, and that EH selector values are meaningful function-wide (good thing, too, or inlining wouldn't work). 2,3d 1a hierarchy of delegation and that EH selector values have the same meaning everywhere in the function instead of being meaningful only in the context of a specific selector. This removes the need for routing edges through EH cleanups, since a cleanup simply always branches to its enclosing scope. llvm-svn: 137293
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to useJay Foad2011-07-221-2/+1
| | | | | | ArrayRef. llvm-svn: 135761
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-4/+4
| | | | llvm-svn: 135370
* Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer2011-07-141-1/+1
| | | | | | function in LLVM does. llvm-svn: 135155
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-4/+4
| | | | llvm-svn: 134831
* A number of array-related IR-gen cleanups.John McCall2011-07-091-0/+78
| | | | | | | | | | | | - Emit default-initialization of arrays that were partially initialized with initializer lists with a loop, rather than emitting the default initializer N times; - support destroying VLAs of non-trivial type, although this is not yet exposed to users; and - support the partial destruction of arrays initialized with initializer lists when an initializer throws an exception. llvm-svn: 134784
* Change the IR-generation of VLAs so that we capture bounds,John McCall2011-06-241-47/+114
| | | | | | | not sizes; so that we use well-typed allocas; and so that we properly recurse through the full set of variably-modified types. llvm-svn: 133827
* Automatic Reference Counting.John McCall2011-06-151-1/+18
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Convert Clang over to resuming from landing pads with llvm.eh.resume.John McCall2011-05-281-3/+3
| | | | | | It's quite likely that this will explode, but I need to know how. :) llvm-svn: 132269
* Eliminate temporary argument vectors.Benjamin Kramer2011-05-281-9/+5
| | | | llvm-svn: 132260
* Fix crash on C++ code when compiling with -finstrument-functions.Ted Kremenek2011-05-161-1/+1
| | | | llvm-svn: 131435
* Make CGF.getContext() inlinable, because it's trivial, and optimizeJohn McCall2011-05-151-7/+35
| | | | | | hasAggregateLLVMType. llvm-svn: 131375
* Eliminate some literal 8s from EmitNullInitialization() by convertingKen Dyck2011-04-221-7/+9
| | | | | | variables to CharUnits. No change in functionality intended. llvm-svn: 130001
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-211-1/+1
| | | | llvm-svn: 129929
* C1X: implement generic selectionsPeter Collingbourne2011-04-151-2/+1
| | | | | | | As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-3/+3
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128538
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-15/+8
| | | | | | | | | | simplify the logic of initializing function parameters so that we don't need both a variable declaration and a type in FunctionArgList. This also means that we need to propagate the CGFunctionInfo down in a lot of places rather than recalculating it from the FAL. There's more we can do to eliminate redundancy here, and I've left FIXMEs behind to do it. llvm-svn: 127314
* DebugInfo can be enabled or disabled at function level (e.g. using an ↵Devang Patel2011-03-071-3/+3
| | | | | | attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. llvm-svn: 127165
* Initialize variable.Bill Wendling2011-03-041-2/+2
| | | | llvm-svn: 127039
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-021-4/+3
| | | | | | This reverts commit 126863. llvm-svn: 126886
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-021-3/+4
| | | | llvm-svn: 126863
* fix my containsBreak predicate.Chris Lattner2011-02-281-0/+3
| | | | llvm-svn: 126600
* Add some helper methods that will be used in my next patch.Chris Lattner2011-02-281-4/+42
| | | | llvm-svn: 126596
* Change the interface to ConstantFoldsToSimpleInteger to not encode Chris Lattner2011-02-271-13/+22
| | | | | | a bool + success into one tri-state integer, simplifying things. llvm-svn: 126592
* Add a LangOptions::areExceptionsEnabled and start using it.Anders Carlsson2011-02-201-2/+1
| | | | llvm-svn: 126062
* Change the representation of GNU ?: expressions to use a different expressionJohn McCall2011-02-171-0/+27
| | | | | | | | | | | | | | | | | | | | | | class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. llvm-svn: 125744
* Step #1/N of implementing support for __label__: split labels intoChris Lattner2011-02-171-1/+1
| | | | | | | | | | | | | | | | | | | LabelDecl and LabelStmt. There is a 1-1 correspondence between the two, but this simplifies a bunch of code by itself. This is because labels are the only place where we previously had references to random other statements, causing grief for AST serialization and other stuff. This does cause one regression (attr(unused) doesn't silence unused label warnings) which I'll address next. This does fix some minor bugs: 1. "The only valid attribute " diagnostic was capitalized. 2. Various diagnostics printed as ''labelname'' instead of 'labelname' 3. This reduces duplication of label checking between functions and blocks. Review appreciated, particularly for the cindex and template bits. llvm-svn: 125733
* Assorted cleanup:John McCall2011-02-151-10/+2
| | | | | | | | | - 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
* 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
* 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-101-0/+12
| | | | llvm-svn: 125282
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-8/+6
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Do the right thing for zero-initializing VLAs that don't have a zeroJohn McCall2011-02-011-5/+60
| | | | | | | bit-pattern. It's not clear that this is actually useful given current language restrictions. llvm-svn: 124685
* Move all the cleanups framework code into a single file.John McCall2011-01-281-886/+0
| | | | | | Pure motion. llvm-svn: 124484
* Better framework for conditional cleanups; untested as yet.John McCall2011-01-261-5/+18
| | | | | | | | I'm separately committing this because it incidentally changes some block orderings and minor IR issues, like using a phi instead of an unnecessary alloca. llvm-svn: 124277
* Support the zero-initialization of VLAs when that really means a zeroJohn McCall2011-01-141-8/+20
| | | | | | | bit-pattern. Continue punting on zero-initializing VLAs with a nonzero pattern. llvm-svn: 123439
* When simplifying a cleanup's entry by merging it into a single predecessor,John McCall2011-01-141-0/+4
| | | | | | | | replace all uses of the entry with the predecessor. There are no cleanups relying on this right now, but if we ever want a cleanup with a phi inside it, this will be important. llvm-svn: 123438
* Simplify mem{cpy, move, set} creation with IRBuilder.Benjamin Kramer2010-12-301-13/+6
| | | | llvm-svn: 122634
OpenPOWER on IntegriCloud