David Blaikie
8ed46b9935
Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).
...
llvm-svn: 167336
2012-11-02 23:40:00 +00:00
Fariborz Jahanian
2dd7819267
objective-C mrr block. Block variable layout metadata in
...
mrr mode.
llvm-svn: 167331
2012-11-02 22:51:18 +00:00
David Blaikie
d37bbc3e00
Fix debug tag type of forward declarations of struct/class in C++.
...
llvm-svn: 167308
2012-11-02 20:49:01 +00:00
Quentin Colombet
4e172067b2
Update the front end to use minsize attribute
...
llvm-svn: 167266
2012-11-01 23:55:47 +00:00
Richard Smith
9c6890a792
Simplify: replace getContext().getLangOpts() with just getLangOpts().
...
llvm-svn: 167261
2012-11-01 22:30:59 +00:00
Richard Smith
3494df490b
Clean up misapplication of diff.
...
llvm-svn: 167260
2012-11-01 22:16:43 +00:00
Richard Smith
de67068fc1
Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
...
separate functions, since they share essentially no code.
llvm-svn: 167259
2012-11-01 22:15:34 +00:00
Richard Smith
e29c441a89
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
...
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.
llvm-svn: 167258
2012-11-01 22:13:39 +00:00
Matt Beaumont-Gay
4a2874ecc6
Silence -Wformat on platforms where uint64_t is unsigned long.
...
llvm-svn: 167249
2012-11-01 20:26:42 +00:00
Fariborz Jahanian
23290b0570
objective-C block meta-data. This patch completes meta-data
...
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://12184410.
llvm-svn: 167241
2012-11-01 18:32:55 +00:00
Richard Smith
2d8b294b3c
-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
...
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.
llvm-svn: 167219
2012-11-01 07:22:08 +00:00
Manman Ren
b505d33a5c
ARM AAPCS-VFP: fix tracking of allocated VFP registers.
...
According to the spec, we can backfill VFP registers that were skipped due
to alignment constraints.
llvm-svn: 167159
2012-10-31 19:02:26 +00:00
Manman Ren
2a523d864d
ARM AAPCS-VFP: fix handling of homogeneous aggreate.
...
If HA can only partially fit into VFP registers, we add padding to make sure
HA will be on stack and later VFP CPRCs will be on stack as well.
llvm-svn: 167058
2012-10-30 23:21:41 +00:00
Fariborz Jahanian
39319c480e
objective-C arc/mrr: Another patch for the new captured block variable
...
layout meta-data. It is currently off (so no tests). This is wip.
llvm-svn: 167047
2012-10-30 20:05:29 +00:00
Quentin Colombet
7bba3f14bf
Change ForceSizeOpt attribute into MinSize attribute
...
llvm-svn: 167021
2012-10-30 16:33:19 +00:00
Eli Friedman
fb9c49e250
Don't crash on bad atomic operations. PR14176.
...
llvm-svn: 166992
2012-10-30 01:15:28 +00:00
Quentin Colombet
ee3e0fb632
Revert commit r166946
...
llvm-svn: 166957
2012-10-29 18:28:57 +00:00
Quentin Colombet
0d6b5e5fde
Make forcesizeopt attribute available to the end user
...
llvm-svn: 166946
2012-10-29 17:56:23 +00:00
Ulrich Weigand
7bcc7ec745
Handle '*' and '#' asm constraint modifiers.
...
llvm-svn: 166924
2012-10-29 12:20:54 +00:00
Fariborz Jahanian
0c58ce9346
objective-C arc/mrr: Patch for the new block variable layout meta-data.
...
It is currently off (so no tests). This is wip.
llvm-svn: 166892
2012-10-27 21:10:38 +00:00
Rafael Espindola
9c006de3d3
Move two helper functions to AST so that sema can use them.
...
llvm-svn: 166853
2012-10-27 01:03:43 +00:00
Rafael Espindola
b9d75ca84b
Refactor some code into a new findMaterializedTemporary function.
...
llvm-svn: 166849
2012-10-27 00:43:14 +00:00
Rafael Espindola
b413676cd7
Refactor some code into a new skipRValueSubobjectAdjustments function.
...
llvm-svn: 166848
2012-10-27 00:40:06 +00:00
Rafael Espindola
e7b11f5241
Delay codegen to after collecting all SubobjectAdjustment so that the collection
...
can be refactored and used in Sema.
llvm-svn: 166847
2012-10-27 00:36:38 +00:00
Eli Friedman
fc5b2effcf
Add missing safety check to an optimization for do-while loops. PR14191.
...
llvm-svn: 166832
2012-10-26 23:23:35 +00:00
Eli Friedman
0e84602d5c
Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/12547611>.
...
llvm-svn: 166825
2012-10-26 22:38:05 +00:00
Fariborz Jahanian
9dd2e0872e
Add comment for my patch in r166809.
...
llvm-svn: 166823
2012-10-26 22:20:25 +00:00
Fariborz Jahanian
5f8d32425d
Remove BLOCK_BYREF_LAYOUT_BYREF flags from list of
...
flags for __block variable meta-data.
llvm-svn: 166811
2012-10-26 20:33:59 +00:00
Fariborz Jahanian
2d26c29e0c
objective-C IRGen: for @implementation nested in
...
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://12581683
llvm-svn: 166809
2012-10-26 20:22:11 +00:00
Bill Schmidt
4a2dcfe5ee
This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
...
varargs parameter passing.
A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs. In practice, this is not done
by GCC. The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area. Although this is messy,
it has become the de facto standard used in building existing libraries.
My initial varargs support followed the ABI language, but not the de facto
standard. Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic. Removing the additional alignment logic allows the affected
tests to now pass.
I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.
Built and tested on powerpc64-unknown-linux-gnu with no new regressions.
llvm-svn: 166805
2012-10-26 19:59:03 +00:00
Fariborz Jahanian
77599ce809
Declare type of flags to be used in a __block (byref)
...
variable descriptor captured by a block.
llvm-svn: 166746
2012-10-26 01:13:38 +00:00
Quentin Colombet
5ee5ca1dbc
Oz optimization level sets ForceSizeOpt attribute for each function
...
llvm-svn: 166744
2012-10-26 00:29:48 +00:00
Fariborz Jahanian
a3926ec195
Changing name of enum for block literal flags to represent
...
what it is meant for.
llvm-svn: 166734
2012-10-25 22:55:52 +00:00
Fariborz Jahanian
196f9384c7
Add some new types in preparation of encoding of captured block variable
...
layout meta-data work. wip.
llvm-svn: 166717
2012-10-25 21:15:04 +00:00
Fariborz Jahanian
bf7bf29166
Provide comment describing what buildBlockDescriptor does.
...
llvm-svn: 166703
2012-10-25 18:06:53 +00:00
Micah Villmow
ea2fea2a60
Cleanup some clang code to use new type functions instead of using cast<>.
...
llvm-svn: 166684
2012-10-25 15:39:14 +00:00
David Tweed
8f67653d26
Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.
...
Tested by me and Wei-Ren Chen.
llvm-svn: 166679
2012-10-25 13:33:01 +00:00
Alexey Samsonov
9b502e512c
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
...
llvm-svn: 166676
2012-10-25 10:18:50 +00:00
Richard Smith
4d3110af06
-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
...
llvm-svn: 166661
2012-10-25 02:14:12 +00:00
Eli Friedman
ade609770e
When we're devirtualizing a method call, make sure the method has the correct IR type.
...
Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.
llvm-svn: 166651
2012-10-25 00:12:49 +00:00
Douglas Gregor
47c089624f
Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.
...
llvm-svn: 166561
2012-10-24 14:11:55 +00:00
Nadav Rotem
dc06b2d39d
Clang now attempts to create a TargetMachine whenever a triple is given.
...
Many of our tests specify triples that are not built into clang.
In this commit we allow clang to fail loading the triple if we are only
using clang to emit llvm ir.
llvm-svn: 166543
2012-10-24 03:52:31 +00:00
Rafael Espindola
fad28de40c
Add padding inreg registers to cause llvm to skip ecx when needed with
...
the x86_fastcallcc calling convention.
llvm-svn: 166538
2012-10-24 01:59:00 +00:00
Rafael Espindola
077dd59371
Add inreg markers with the x86_fastcallcc calling convention.
...
llvm-svn: 166537
2012-10-24 01:58:58 +00:00
Nadav Rotem
ec57ab374b
Change EmitAssemblyHelper to create the target machine early
...
and use it to initialize the TargetTransformInfo analysis pass.
We need the TTI information for the loop vectorizer.
rdar://12464901
llvm-svn: 166532
2012-10-24 00:53:38 +00:00
Douglas Gregor
b0eea8b54b
Switch CodeGenOptions over to a .def file, like we do with LangOptions.
...
llvm-svn: 166497
2012-10-23 20:05:01 +00:00
Rafael Espindola
e2a9e90c88
Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting the
...
regression.
llvm-svn: 166461
2012-10-23 02:04:01 +00:00
Benjamin Kramer
1cdb23db13
Move private classes into anonymous namespaces.
...
llvm-svn: 166377
2012-10-20 13:02:06 +00:00
Richard Smith
5a1104bd3a
DR1472: A reference isn't odr-used if it has preceding initialization,
...
initialized by a reference constant expression.
Our odr-use modeling still needs work here: we don't yet implement the 'set of
potential results of an expression' DR.
llvm-svn: 166361
2012-10-20 01:38:33 +00:00
Daniel Dunbar
aa437df90a
IRgen: Initialize TargetLoweringInfo with a triple.
...
- We create two TargetLoweringInfo instances for different pass managers, and
they weren't consistent (the one for codegen didn't have the right info). I'm
not sure this mattered anywhere in practice.
llvm-svn: 166299
2012-10-19 20:10:10 +00:00