Devang Patel
7294d74627
Emit proper selector name in debug info.
...
llvm-svn: 129626
2011-04-16 00:37:51 +00:00
Devang Patel
9d6c857862
Emit debug info for Objective-C properties.
...
llvm-svn: 129625
2011-04-16 00:12:55 +00:00
Michael J. Spencer
6826eb816a
Add 3DNow! Intrinsics.
...
llvm-svn: 129570
2011-04-15 15:07:13 +00:00
Richard Smith
dda56e4b4a
Support for C++11 (non-template) alias declarations.
...
llvm-svn: 129567
2011-04-15 14:24:37 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Peter Collingbourne
9114759641
C1X: implement generic selections
...
As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.
llvm-svn: 129554
2011-04-15 00:35:48 +00:00
Richard Smith
02e85f3bc5
Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).
...
llvm-svn: 129541
2011-04-14 22:09:26 +00:00
Anton Korobeynikov
231e875b5c
Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or
...
AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86.
In particular, all library functions should always be AAPCS regardless of floating point ABI used.
llvm-svn: 129534
2011-04-14 20:06:49 +00:00
Ken Dyck
3563aa6520
Replace a couple of divide-by-8s with divide-by-charwidths. No change in
...
functionality intended.
llvm-svn: 129496
2011-04-14 01:00:39 +00:00
Ken Dyck
c5ca87675e
Replace a couple of divisions-by-'8' with divisions-by-charwidth. No change
...
in functionality intended.
llvm-svn: 129491
2011-04-14 00:43:09 +00:00
Bill Wendling
a865185ad6
Removing the unaligned load tests from builtins-x86.c since they're generated by a regular 'load' now.
...
llvm-svn: 129464
2011-04-13 20:17:22 +00:00
Bill Wendling
88ae43772a
It looks like the FreeBSD buildbot needs this for the builtins-x86.c test.
...
llvm-svn: 129433
2011-04-13 10:02:54 +00:00
Bill Wendling
b9c9e34cb3
Just use a native "load" instead of translating the builtin later. Clang can
...
take it!
I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned
load...I'll have to look into it further.
llvm-svn: 129427
2011-04-13 05:58:17 +00:00
Anders Carlsson
bbe277c4a9
Use EmitCallOrInvoke in EmitBadTypeidCall and EmitBadCastCall.
...
llvm-svn: 129424
2011-04-13 02:35:36 +00:00
Bill Wendling
3137d3cb49
Convert the unaligned load builtins to the first-class versions.
...
llvm-svn: 129420
2011-04-13 00:36:37 +00:00
Daniel Dunbar
9c8cd4c097
IRgen/Obj-C: Emit CFStrings and NSStrings with the alignment of the char type,
...
there is no reason to align them higher.
- This roughly matches llvm-gcc's r126913.
- It is an open question whether or not we should do this for cstring's in
general (code size vs optimization potential), for now we just match llvm-gcc
until someone wants to run some experiments.
llvm-svn: 129410
2011-04-12 23:30:52 +00:00
John McCall
58989b7125
We can't emit an aggregate cast as its sub-expression in general just
...
because the result is ignored. The particular example here is with
property l-values, but there could be all sorts of lovely casts that this
isn't safe for. Sink the check into the one case that seems to actually
be capable of honoring this.
llvm-svn: 129397
2011-04-12 22:02:02 +00:00
John McCall
a97f329869
Template static data members can have weak_odr linkage, not just
...
weak linkage. Also, fix a problem where global weak variables
with non-trivial initializers were getting guard variables, or at
least were checking for them and then crashing.
llvm-svn: 129342
2011-04-12 01:46:54 +00:00
John McCall
32f44bd0fc
Ignore indirect field declarations. Fixes PR9570.
...
llvm-svn: 129337
2011-04-12 01:01:22 +00:00
John McCall
2979fe01da
After some discussion with Doug, we decided that it made a lot more sense
...
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.
llvm-svn: 129331
2011-04-12 00:42:48 +00:00
Anders Carlsson
0c63350b0b
If there's an invoke destination, we should use invoke instead of call when calling the __cxa_bad_typeid function. Fixes PR7400.
...
llvm-svn: 129273
2011-04-11 14:13:40 +00:00
John McCall
2d2e870745
More __unknown_anytype work.
...
llvm-svn: 129269
2011-04-11 07:02:50 +00:00
Anders Carlsson
8a01a751c9
Remove CK_DynamicToNull.
...
llvm-svn: 129265
2011-04-11 02:03:26 +00:00
Anders Carlsson
c1c9971cab
When we know that a dynamic_cast always returns null, we can make
...
CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast
exception.
llvm-svn: 129264
2011-04-11 01:45:29 +00:00
Anders Carlsson
882d790f72
Clean up CodeGenFunction::EmitDynamicCast. No functionality change.
...
llvm-svn: 129262
2011-04-11 00:46:40 +00:00
Anders Carlsson
98981b10c8
Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No functionality change.
...
llvm-svn: 129261
2011-04-11 00:30:07 +00:00
Anders Carlsson
c602006638
As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
...
represents a dynamic cast where we know that the result is always null.
For example:
struct A {
virtual ~A();
};
struct B final : A { };
struct C { };
bool f(B* b) {
return dynamic_cast<C*>(b);
}
llvm-svn: 129256
2011-04-10 20:33:22 +00:00
Anders Carlsson
c53d9e8350
Strip off parens and no-op casts when deciding if an expr can be devirtualized. Fixes the second half of PR9660.
...
llvm-svn: 129253
2011-04-10 18:20:53 +00:00
Anders Carlsson
e5ec21c977
Change CollectPrimaryBases to collect the bases in the right order. Fixes one half of PR9660.
...
llvm-svn: 129252
2011-04-10 18:00:32 +00:00
Anders Carlsson
68aad14dd3
Make -fdump-vtable-layouts also dump vtable indices for all virtual member functions in the class.
...
llvm-svn: 129250
2011-04-10 17:42:45 +00:00
Eli Friedman
493c34a86c
PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.
...
While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.
llvm-svn: 129241
2011-04-10 04:44:11 +00:00
Eli Friedman
db42a3e876
Make sure we or together the overflow flags of the multiply and add, so the
...
check is triggered appropriately. Reported on cfe-dev.
llvm-svn: 129231
2011-04-09 19:54:33 +00:00
Eli Friedman
c5b20b5283
PR8369: make __attribute((regparm(0))) work correctly. Original patch by
...
pageexec@freemail.hu , tweaks by me.
llvm-svn: 129206
2011-04-09 08:18:08 +00:00
Chris Lattner
e4ec5abf1b
fix indentation
...
llvm-svn: 129202
2011-04-09 07:11:53 +00:00
Chris Lattner
9cb59fa834
add a __sync_swap builtin to fill out the rest of the __sync builtins.
...
Patch by Dave Zarzycki!
llvm-svn: 129189
2011-04-09 03:57:26 +00:00
Ken Dyck
df01628e08
Convert the PointerWidthInBytes variable in EmitMemberPointer() to CharUnits
...
to eliminate a divide-by-8. No change in functionality intended.
llvm-svn: 129180
2011-04-09 01:30:02 +00:00
Ken Dyck
499e93d7ee
Eliminate a divide-by-8 in BuildVMIClassTypeInfo() by using CharUnits for
...
the base offset. No change in functionality intended.
llvm-svn: 129179
2011-04-09 01:09:56 +00:00
Nick Lewycky
d85ae78c48
Apply explicit braces to avoid ambiguous 'else' [-Wparentheses]
...
llvm-svn: 129176
2011-04-09 00:25:15 +00:00
Devang Patel
0b37e79891
Do not use zero as an upper bound for unbounded array because upper bound zero also indicates one element array.
...
llvm-svn: 129157
2011-04-08 21:56:52 +00:00
Ken Dyck
bb4e977218
[Reapply r128776, modified so that it does not break debug info.]
...
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.
llvm-svn: 129072
2011-04-07 12:37:09 +00:00
John McCall
319963434c
Basic, untested implementation for an "unknown any" type requested by LLDB.
...
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.
llvm-svn: 129065
2011-04-07 08:22:57 +00:00
Ken Dyck
3a09bc5ab0
[Reapply r128773. This is not the source of the issues Devang was seeing
...
with debug info.]
Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
change in functionality intended.
llvm-svn: 129048
2011-04-07 01:22:42 +00:00
Ken Dyck
25c82240e9
[Reapply r128771. It wasn't the source of the issues Devang saw with debug
...
info.]
Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.
llvm-svn: 129046
2011-04-07 00:59:42 +00:00
Ken Dyck
42a9d29c2c
Reapply r128770. It's not the cause of the issues Devang saw with debug info.
...
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.
llvm-svn: 129043
2011-04-07 00:55:01 +00:00
Fariborz Jahanian
5de5313abe
Refine rules for atomic property api to
...
pass a previously failing clang test.
// rdar://8808439
llvm-svn: 129004
2011-04-06 16:05:26 +00:00
Peter Collingbourne
eafa4e4b5b
If this is an intrinsic function, set the function's attributes to the intrinsic's attributes.
...
llvm-svn: 129000
2011-04-06 12:29:04 +00:00
Devang Patel
78019ec14d
Simplify.
...
llvm-svn: 128957
2011-04-05 23:26:36 +00:00
Fariborz Jahanian
10a95ca876
Fixes a regression caused by my last patch.
...
As a result, I had to remove a c++ version of a clang
test which requires more scrutiny on my part.
llvm-svn: 128950
2011-04-05 23:01:27 +00:00
Devang Patel
b87c428055
Emit debug info for function template parameters.
...
llvm-svn: 128948
2011-04-05 22:54:11 +00:00
Fariborz Jahanian
0f4c711895
Generate atomic api for atomic properties (x86 and x86_64
...
targets) when load/store results in multiple instructions.
// rdar://8808439
llvm-svn: 128937
2011-04-05 21:41:23 +00:00
Devang Patel
e1dd424380
Remove unintentional check-in.
...
llvm-svn: 128928
2011-04-05 21:05:56 +00:00
Devang Patel
095421b4a8
Fix typo.
...
llvm-svn: 128921
2011-04-05 20:28:21 +00:00
Devang Patel
98d26c91da
Use TemplateParameterList to extract template parameter name.
...
llvm-svn: 128915
2011-04-05 20:15:06 +00:00
Andrew Trick
15e36e8edd
Added *hidden* flags -print-options and -print-all-options so
...
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.
Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.
llvm-svn: 128911
2011-04-05 18:56:55 +00:00
Andrew Trick
b2a84726f6
whitespace
...
llvm-svn: 128908
2011-04-05 18:49:32 +00:00
Devang Patel
7522abd3ce
Refactor.
...
llvm-svn: 128893
2011-04-05 17:30:54 +00:00
David Chisnall
ec343e8544
Fix copy-and-paste bug that I introduced while tidying up the code.
...
Does anyone want to buy me a new brain?
llvm-svn: 128890
2011-04-05 17:15:18 +00:00
Sandeep Patel
45df3dd3fe
Set AAPCS-VFP calling convention accordingly and hard float ABI command handling.
...
llvm-svn: 128866
2011-04-05 00:23:47 +00:00
Devang Patel
44927690c3
Eliminate conservative check that is covered by isIncompleteType() check.
...
llvm-svn: 128857
2011-04-04 23:23:39 +00:00
Devang Patel
a540f1462c
Incomplete type does not have any size.
...
llvm-svn: 128855
2011-04-04 23:18:38 +00:00
Devang Patel
84852bbb42
Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.
...
llvm-svn: 128842
2011-04-04 20:36:06 +00:00
Ken Dyck
1473c9a7c4
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
...
CharUnits. No change in functionality intended.
llvm-svn: 128776
2011-04-02 17:52:22 +00:00
Ken Dyck
1b23db93df
Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
...
change in functionality intended.
llvm-svn: 128773
2011-04-02 17:13:02 +00:00
Ken Dyck
cf4ef5314f
Use CharUnits for the offset type in the ClassNamesAndOffsets map in
...
dumpLayout(). No change in functionality intended.
llvm-svn: 128771
2011-04-02 17:03:24 +00:00
Ken Dyck
1eac9f1546
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
...
change in functionality intended.
llvm-svn: 128770
2011-04-02 16:57:20 +00:00
Ken Dyck
6b20919317
Convert BaseOffset::NonVirtualOffset to CharUnits. No change in
...
functionality intended.
llvm-svn: 128756
2011-04-02 01:32:03 +00:00
Ken Dyck
872d74a591
Convert offset parameters and return values of VTableComponent methods to
...
CharUnits. No change in functionality intended.
llvm-svn: 128754
2011-04-02 01:14:48 +00:00
Ken Dyck
496906629b
Convert the offsets in VCallOffsetMap to CharUnits. No change in
...
functionality intended.
llvm-svn: 128753
2011-04-02 00:51:15 +00:00
Ken Dyck
eff7fe645b
Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
...
No change in functionality intended.
llvm-svn: 128752
2011-04-02 00:44:58 +00:00
Devang Patel
1ffe23464a
Do not try calculate the size of forward-declared template type array.
...
llvm-svn: 128725
2011-04-01 19:02:33 +00:00
Daniel Dunbar
826342774e
IRgen: Reapply r128691 with a fix to ensure we don't increase alignment past
...
that of the array element type.
llvm-svn: 128698
2011-04-01 00:49:43 +00:00
Daniel Dunbar
ea6b81a2ad
Revert r128691, "IRgen: Improve GCC compatibility when dealing with packed
...
arrays by propagating", it's breaking test in ways I don't understand yet.
llvm-svn: 128693
2011-04-01 00:13:33 +00:00
Daniel Dunbar
417bf0f147
IRgen: Improve GCC compatibility when dealing with packed arrays by propagating
...
the array alignment to the array access.
- This is more or less the best we can do without having alignment present in
the type system, but is a long way from truly matching how GCC handles this.
llvm-svn: 128691
2011-03-31 23:32:15 +00:00
John McCall
7c623641a6
Whoops.
...
llvm-svn: 128621
2011-03-31 09:19:20 +00:00
John McCall
f9b056b002
After much contemplation, I've decided that we probably shouldn't "unique"
...
__block object copy/dispose helpers for C++ objects with those for
different variables with completely different semantics simply because
they happen to both be no more aligned than a pointer.
Found by inspection.
Also, internalize most of the helper generation logic within CGBlocks.cpp,
and refactor it to fit my peculiar aesthetic sense.
llvm-svn: 128618
2011-03-31 08:03:29 +00:00
John McCall
7306487077
Move all the significant __block code into CGBlocks.cpp. No functionality
...
change.
llvm-svn: 128608
2011-03-31 01:59:53 +00:00
Matt Beaumont-Gay
873c6dd875
Oops, prefer C-style cast here
...
llvm-svn: 128607
2011-03-31 01:56:27 +00:00
Matt Beaumont-Gay
a25fce8e9e
Silence GCC warning about differing types on the branches of a conditional expression
...
llvm-svn: 128605
2011-03-31 01:43:22 +00:00
Ken Dyck
4680e9219a
Convert the return value of
...
VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() to CharUnits. No change
in functionality intended.
llvm-svn: 128603
2011-03-31 01:08:46 +00:00
Ken Dyck
47e1e54343
Convert the OffsetInLayoutClass parameter of
...
VCallAndVBaseOffsetBuilder::AddVBaseOffsets() to CharUnits. No change in
functionality intended.
llvm-svn: 128600
2011-03-31 00:56:47 +00:00
Ken Dyck
1a93b3b080
Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilder
...
constructor to CharUnits. No change in functionality intended.
llvm-svn: 128598
2011-03-31 00:48:04 +00:00
Ken Dyck
9b32ee1611
Convert the RealBaseOffset parameter of
...
VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets() to
CharUnits. No change in functionality intended.
llvm-svn: 128596
2011-03-31 00:37:24 +00:00
Bob Wilson
7201af3914
Use intrinsics for Neon vmull operations. Radar 9208957.
...
llvm-svn: 128590
2011-03-31 00:09:00 +00:00
Fariborz Jahanian
7a26ba4d0d
Fix IRGen issues related to using property-dot syntax
...
for prperty reference types. // rdar://9208606.
llvm-svn: 128551
2011-03-30 16:11:20 +00:00
Jay Foad
20c0f02cc5
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
...
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128538
2011-03-30 11:28:58 +00:00
Jay Foad
27e20c3c58
(Almost) always call reserveOperandSpace() on newly created PHINodes.
...
llvm-svn: 128534
2011-03-30 11:19:06 +00:00
Ken Dyck
b3ba775523
Convert the offset parameter of
...
VCallAndVBaseOffsetBuilder::AddVCallOffsets() to CharUnits. No change in
functionality intended.
llvm-svn: 128531
2011-03-30 10:11:40 +00:00
Ken Dyck
075de167f8
Convert local offset variable to CharUnits in AddVCallOffsets. No change in
...
functionality intended.
llvm-svn: 128522
2011-03-30 01:21:33 +00:00
Ken Dyck
078f3e6905
Convert a local offset variable to CharUnits. No change in functionality
...
intended.
llvm-svn: 128521
2011-03-30 01:14:22 +00:00
Ken Dyck
032a903982
Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
...
to CharUnits. No change in functionality intended.
llvm-svn: 128520
2011-03-30 01:10:23 +00:00
Ken Dyck
45956a467e
Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables to
...
CharUnits. No change in functionality intended.
llvm-svn: 128516
2011-03-30 00:50:28 +00:00
Devang Patel
4d7612744f
Fix in r128471 is very broad. Some of the unconditional branches need line number information for better user experience.
...
Restrict the fix. This fixes break.exp failures from gdb testsuite.
llvm-svn: 128513
2011-03-30 00:08:31 +00:00
Devang Patel
6f2e41e0d4
Do not line number entry for unconditional branches. Usually, users do not want to stop at closing '}'.
...
llvm-svn: 128471
2011-03-29 18:35:54 +00:00
Fariborz Jahanian
b24b568725
Implements property of reference types. Adding
...
an executable test to llvm test suite.
// rdar://9070460.
llvm-svn: 128435
2011-03-28 23:47:18 +00:00
Daniel Dunbar
67919b2a5b
Integrated-As: Support -Wa,-L when using the integrated assembler.
...
llvm-svn: 128433
2011-03-28 22:49:28 +00:00
Anton Yartsev
93900c7d1e
refactoring
...
llvm-svn: 128427
2011-03-28 21:00:05 +00:00
Ken Dyck
f9742cca31
Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.
...
No change in functionality intended.
llvm-svn: 128393
2011-03-27 20:33:38 +00:00
Ken Dyck
9a7e532dd8
Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change in
...
functionality intended.
llvm-svn: 128392
2011-03-27 20:20:28 +00:00
Ken Dyck
0d5804a622
Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change in
...
functionality intended.
llvm-svn: 128391
2011-03-27 20:10:29 +00:00
Ken Dyck
5f3601d35a
Remove a fixed FIXME comment (the base offset has already been converted to
...
CharUnits).
llvm-svn: 128386
2011-03-27 19:19:52 +00:00