Daniel Dunbar
e46506eaea
Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.
...
- Missed this file.
llvm-svn: 64238
2009-02-10 21:44:36 +00:00
Daniel Dunbar
2d0746fb97
Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.
...
llvm-svn: 64235
2009-02-10 20:44:09 +00:00
Fariborz Jahanian
4e7ae06b00
Generate ir for ivar offset. This will pass
...
type-nsobject-attribute.m in the dejagnu test suite
in the nonfragile abi mode.
llvm-svn: 64233
2009-02-10 20:21:06 +00:00
Fariborz Jahanian
21fc74c15a
Some refactoring of Ivar offset code gen.
...
in preparation for nonfragile ivar offset work.
llvm-svn: 64225
2009-02-10 19:02:04 +00:00
Daniel Dunbar
9403cd6d85
Tweak x86-64 ABI to allow reuse for vararg handling.
...
llvm-svn: 64221
2009-02-10 17:06:09 +00:00
Anders Carlsson
33c1b6528f
Remove the last remnants of the Obj-C EH stack code.
...
llvm-svn: 64205
2009-02-10 06:07:49 +00:00
Anders Carlsson
33747b6c41
Start removing the old Obj-C EH stack now that the cleanup stack is used instead.
...
llvm-svn: 64203
2009-02-10 05:52:02 +00:00
Sanjiv Gupta
e99ad00fd2
Function parameters for PIC16 are like local variables. So use the keyword ".auto." to mangle their names. The working of PIC16AsmPrinter relies on that keyword currently.
...
llvm-svn: 64198
2009-02-10 04:17:25 +00:00
Daniel Dunbar
0007961241
Support va_arg on _Complex.
...
gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1110
# of unexpected failures 74
# of unresolved testcases 168
# of unsupported tests 2
llvm-svn: 64197
2009-02-10 03:03:30 +00:00
Daniel Dunbar
9bfb4de38b
ABI: Correctly handle load/store of values which have a different LLVM
...
memory representation (e.g., bool).
- This upgrades (downgrades) MultiSource/Applications/ClamAV/clamscan
to a miscompile and fixes
SingleSource/UnitTests/2003-05-31-CastToBool.
llvm-svn: 64194
2009-02-10 01:51:39 +00:00
Daniel Dunbar
1d425460d5
Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversion
...
from LLVM memory type to/from LLVM temporary type.
- No intended functionality change.
llvm-svn: 64191
2009-02-10 00:57:50 +00:00
Daniel Dunbar
d5f1f55e28
Make sure to initialize local variables, even if they were ignored by
...
ABI.
llvm-svn: 64187
2009-02-10 00:06:49 +00:00
Anders Carlsson
15949b3a32
Use the new cleanup infrastructure for VLAs. The next iteration of patches will remove the old Obj-C EH cleanup code.
...
llvm-svn: 64161
2009-02-09 20:41:50 +00:00
Anders Carlsson
bfee7e921b
Use the new cleanup infrastructure for @try/@finally
...
llvm-svn: 64160
2009-02-09 20:38:58 +00:00
Anders Carlsson
1ac6282c5b
Replace a bunch of EmitBranch calls with EmitBranchThroughCleanup. No functionality change (yet).
...
llvm-svn: 64159
2009-02-09 20:31:03 +00:00
Anders Carlsson
ff0bb6ce62
Save and restore the DidCallStackSave variable
...
llvm-svn: 64157
2009-02-09 20:23:40 +00:00
Anders Carlsson
f4478e94b8
Add DidCallStackSave variable to CodeGenFunction.
...
llvm-svn: 64156
2009-02-09 20:20:56 +00:00
Douglas Gregor
8bf4205c70
Start processing template-ids as types when the template-name refers
...
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:
- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.
This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)
llvm-svn: 64153
2009-02-09 18:46:07 +00:00
Mike Stump
fc49682f20
Add some more documentation. Also reflowed comments to 80 col.
...
llvm-svn: 64105
2009-02-08 23:14:22 +00:00
Anders Carlsson
9c964ac272
Reuse case destinations.
...
llvm-svn: 64100
2009-02-08 22:46:50 +00:00
Anders Carlsson
f57b9eef62
Always check if we can remove branch fixups, even if the cleanup stack is empty.
...
llvm-svn: 64099
2009-02-08 22:45:15 +00:00
Anders Carlsson
dcb149cbef
Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation of making it use the cleanup stack.
...
llvm-svn: 64098
2009-02-08 22:25:30 +00:00
Anders Carlsson
76180ea456
Misc fixes to the cleanup stack code.
...
llvm-svn: 64096
2009-02-08 22:13:37 +00:00
Mike Stump
a6dbd7b25a
When we're at the stack depth we want, there isn't anything to do.
...
llvm-svn: 64095
2009-02-08 22:00:53 +00:00
Mike Stump
284d177c7f
Wire up break and continue processing to the new stack depth adjuster.
...
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.
llvm-svn: 64079
2009-02-08 09:22:19 +00:00
Anders Carlsson
66c384ac2e
More cleanup stack work, PopCleanupBlock now returns a struct with the switch block and end block.
...
llvm-svn: 64072
2009-02-08 07:46:24 +00:00
Anders Carlsson
ae91d9b140
Split some functions up
...
llvm-svn: 64069
2009-02-08 03:55:35 +00:00
Anders Carlsson
a586ad7f85
CleanupScope needs to push the cleanup block in its destructor
...
llvm-svn: 64068
2009-02-08 03:22:36 +00:00
Anders Carlsson
3c21dd5a80
Implement support for branch fixups.
...
llvm-svn: 64064
2009-02-08 01:23:05 +00:00
Anders Carlsson
7d70fd27a4
More cleanup stack work.
...
llvm-svn: 64059
2009-02-08 00:50:42 +00:00
Anders Carlsson
fbfb5e6530
When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.
...
llvm-svn: 64053
2009-02-08 00:16:35 +00:00
Anders Carlsson
cadb9a6a34
Emit a cleanup block for the cleanup attribute
...
llvm-svn: 64052
2009-02-07 23:51:38 +00:00
Anders Carlsson
be0f76a712
Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary
...
llvm-svn: 64051
2009-02-07 23:50:39 +00:00
Anders Carlsson
2cf8c44e43
Add a simple RAII object, to be used for pushing a cleanup entry and make the insertion point be the cleanup block.
...
llvm-svn: 64048
2009-02-07 23:30:41 +00:00
Mike Stump
0509d9635b
Ensure we track all the stack depths for all break and continue points
...
correctly. This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.
llvm-svn: 64046
2009-02-07 23:02:10 +00:00
Anders Carlsson
15cb75a20c
Add plumbing for the cleanup stack.
...
llvm-svn: 64043
2009-02-07 22:53:43 +00:00
Anders Carlsson
bf8a1be33c
Split the exception object out into its own stack.
...
llvm-svn: 64032
2009-02-07 21:37:21 +00:00
Anders Carlsson
da0e4560a1
Simplify the Objective-C exception handling.
...
llvm-svn: 64031
2009-02-07 21:26:04 +00:00
Mike Stump
56d2a15829
Format for 80-cols.
...
llvm-svn: 64030
2009-02-07 20:14:12 +00:00
Mike Stump
6d8a617474
Ensure that we don't miscodegen if vlas creap into the top of the for.
...
This will allow us to generate break and continue even if vlas are
involved without worry that we'll silently generate bad code.
llvm-svn: 64028
2009-02-07 20:09:00 +00:00
Mike Stump
dc0d6be7b9
Arrange to have the correct StackDepth for while statements.
...
llvm-svn: 64021
2009-02-07 18:08:12 +00:00
Mike Stump
1f8be1b9ac
Fit into 80-col.
...
llvm-svn: 64020
2009-02-07 17:18:33 +00:00
Mike Stump
1d91dd98ad
Fixup goto codegen in and around VLAs.
...
llvm-svn: 64014
2009-02-07 12:52:26 +00:00
Daniel Dunbar
ee9e4c274b
Set load/store alignment when doing ABI coercions.
...
- Currently, this is producing poor code, but we prefer correctness
to performance for now. Eventually we should be able to generally
avoid having to set the alignment when we control the alignment of
the alloca.
- This knocks out 33/1000 failures on my single argument ABI tests,
down to 22/1000 and 18 of these appear to be gcc bugs. Woot.
llvm-svn: 64001
2009-02-07 02:46:03 +00:00
Daniel Dunbar
d404862cf9
When making dummy file entries, the directory name should also be
...
non-empty.
llvm-svn: 63986
2009-02-07 00:40:41 +00:00
Fariborz Jahanian
c76e741622
Fixed an objc2 nonfragile-abi code gen bug.
...
Now we can say 'hello world' objective-c style
in the nonfragile abi.
llvm-svn: 63981
2009-02-06 23:46:26 +00:00
Fariborz Jahanian
6b7cd6e5f4
objc2's nonfragile abi API for messages sent to 'super'.
...
llvm-svn: 63959
2009-02-06 20:09:23 +00:00
Daniel Dunbar
fe2fb0af5a
Use 'compile' instead of 'codegen' when reporting error to user.
...
llvm-svn: 63952
2009-02-06 19:18:03 +00:00
Fariborz Jahanian
33f66e640a
objc2's nonfragile-abi - API selection for when receiver is a class
...
llvm-svn: 63881
2009-02-05 20:41:40 +00:00
Anders Carlsson
31f8649f83
Follow Eli's advice and store the VLA size with the native size_t type. Fixes PR3491.
...
llvm-svn: 63879
2009-02-05 19:43:10 +00:00