aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
AgeCommit message (Collapse)Author
2009-02-10Remove the last remnants of the Obj-C EH stack code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64205 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10Start removing the old Obj-C EH stack now that the cleanup stack is used ↵Anders Carlsson
instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversionDaniel Dunbar
from LLVM memory type to/from LLVM temporary type. - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09Add DidCallStackSave variable to CodeGenFunction.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Add some more documentation. Also reflowed comments to 80 col.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation ↵Anders Carlsson
of making it use the cleanup stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Wire up break and continue processing to the new stack depth adjuster.Mike Stump
If people could beat on it and let me know if there are any new semantics required by newer language standards or DRs or any little details I goofed on, I'd be happy to fix any issues found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08More cleanup stack work, PopCleanupBlock now returns a struct with the ↵Anders Carlsson
switch block and end block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Split some functions upAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08CleanupScope needs to push the cleanup block in its destructorAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08More cleanup stack work.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08When emitting blocks, keep track of which cleanup scope they have. Minor ↵Anders Carlsson
fixes and cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Add support for emitting cleanup blocks. Make EmitCompoundStatement emit ↵Anders Carlsson
cleanup blocks if necessary git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Add a simple RAII object, to be used for pushing a cleanup entry and make ↵Anders Carlsson
the insertion point be the cleanup block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Ensure we track all the stack depths for all break and continue pointsMike Stump
correctly. This should lay the ground work to throw the big switch and start code gening break and continue in the presense of vlas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Add plumbing for the cleanup stack.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Split the exception object out into its own stack.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Simplify the Objective-C exception handling.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Arrange to have the correct StackDepth for while statements.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Fixup goto codegen in and around VLAs.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Add CodeGenFunction::ConvertTypeForMem forwarding function.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Targets that don't have stack use global address space for parameters.Sanjiv Gupta
Specify external linkage for such globals so that llvm optimizer do not assume there values initialized as zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Fixed the typo in comment.Sanjiv Gupta
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03objc2's ir-gen for nonfragile ivar access.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02More ABI API cleanup.Daniel Dunbar
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02ABI handling API changes.Daniel Dunbar
- Lift CGFunctionInfo creation up to callers of EmitCall. - Move isVariadic bit out of CGFunctionInfo, take as argument to GetFunctionType instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63550 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-26Pull EmitReturnBlock out of FinishFunction and catch unified returnDaniel Dunbar
case correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20Slight cleanup, and fix for va_arg on architectures where va_list is a Eli Friedman
struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11Forgot to commit thisAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-10This patch fixes the code gen failures which was a fallout fromFariborz Jahanian
not merging protocol properties into the classes which use those protocols. With this patch, all my exceutable test pass again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09Give "unsupported" error on calls through block pointers instead ofDaniel Dunbar
crashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61992 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-20Change EmitVLASize to take a QualType that must be a variably modified type.Anders Carlsson
Emit the size even if the declared type is a variably modified type. This lets us handle void f(int n) { int (*a)[n]; printf("size: %d\n", sizeof(*a)); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-20Split up emitting of VLA sizes and getting the size of a VLA.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61284 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15Code gen. for ivar references; including bitfieldFariborz Jahanian
ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61043 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-13Store the size of the EH stack inside each BreakContinue struct so we know ↵Anders Carlsson
when a break/continue won't cross a try block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-12Add map of VLA types and their sizesAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-12Work in preparation for VLAs. Make sure to restore the stack if necessary ↵Anders Carlsson
(Saving the stack isn't implemented right now :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09Support for implementation of property in the case whereFariborz Jahanian
the synthesis is in an implementation of s subclass of a super class where the property has been declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22Implemented ir-gen for 'implicit' properties using the new AST nodes.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22New AST node to access "implicit" setter/getter using property dor syntax.Fariborz Jahanian
Issuing diagnostics when assigning to read-only properties. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20Added a test case for __weak field decls. Change SetVarDeclObjCAttributeFariborz Jahanian
to static function. Added comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59738 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20More objc gc stuff. Read/Write barriers for local static/extern,Fariborz Jahanian
diagnostics on use of __weak attribute on fields, Early support for read/write barriers for objc fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19Fix redundant load of bit-fields on assignment (to get the updatedDaniel Dunbar
value). - Use extra argument to EmitStoreThroughLValue to provide place to write update bit-field value if caller requires it. - This fixes several FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-15Start implementing support for @synchonized with the darwin ObjC API.Chris Lattner
Patch by Fariborz! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59377 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13Add IsFinished arg to EmitBlock.Daniel Dunbar
- Indicates that caller is done with the block and it can be dropped if it has no predecessors. Useful for callers who need to make landing pads but which may not be reached. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59207 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12Comment/indentation fix.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59127 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12IRgen improvements on unreachable code:Daniel Dunbar
- Split out "simple" statements which can easily handle IR generation when there is no insert point. These are generally statements which start by emitting a new block or are only containers for other statements. - This fixes a regression in emitting dummy blocks, notably for case statements. - This also fixes spurious emission of a number of debug stoppoint intrinsic instructions. Remove unneeded sw.body block, just clear the insertion point. Lift out CodeGenFunction::EmitStopPoint which calls into the CGDebugInfo class when generating debug info. Normalize definitions of Emit{Break,Continue}Stmt and usage of ErrorUnsupported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59118 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12Move EmitBranchOnBoolExpr and ConstantFoldsToSimpleInteger toChris Lattner
CodeGenFunction.cpp. Change VisitConditionalOperator to use constant fold instead of codegen'ing a constant conditional. Change ForStmt to use EmitBranchOnBoolExpr, this shrinks expr.c very slightly to 40239 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59113 91177308-0d34-0410-b5e6-96231b3b80d8