Chad Rosier
175ea24e38
[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
...
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>
llvm-svn: 162602
2012-08-24 21:42:51 +00:00
Chad Rosier
0f8487c632
Fix 80-column violation.
...
llvm-svn: 162575
2012-08-24 18:31:16 +00:00
Chad Rosier
14836bab36
[ms-inline asm] Refactor code. No functional change intended.
...
llvm-svn: 162568
2012-08-24 17:05:45 +00:00
Benjamin Kramer
c215e76f78
Push ArrayRef through the Expr hierarchy.
...
No functionality change.
llvm-svn: 162552
2012-08-24 11:54:20 +00:00
Richard Smith
69d0d2626a
New -fcatch-undefined-behavior features:
...
* when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check
* check that references are bound to appropriate storage
* check that 'this' has appropriate storage in member accesses and member function calls
llvm-svn: 162523
2012-08-24 00:54:33 +00:00
Dmitri Gribenko
dd28e7930c
Fix a few -Wdocumentation warnings.
...
llvm-svn: 162506
2012-08-24 00:01:24 +00:00
Chad Rosier
59df25b659
[ms-inline asm] Remove an unused argument. This logic can now be reused by the
...
ms-style inline asms.
llvm-svn: 162463
2012-08-23 20:00:18 +00:00
Dmitri Gribenko
adba9be7c5
Fix a bunch of -Wdocumentation warnings.
...
llvm-svn: 162452
2012-08-23 17:58:28 +00:00
David Chisnall
12d8135cd5
Fix transposed optional / required in Objective-C metadata (GNUstep runtime)
...
Patch by Niels Grewe!
llvm-svn: 162441
2012-08-23 12:17:21 +00:00
Eli Friedman
5d14c48dbb
Attempt to fix clang bootstrap (broken by r162425).
...
llvm-svn: 162440
2012-08-23 11:27:56 +00:00
Eli Friedman
a5dd5684dc
Use the alignment from lvalue emission to more accurately compute the alignment
...
of a pointer for builtin emission, instead of just depending on the type of the
pointee. <rdar://problem/11314941>.
llvm-svn: 162425
2012-08-23 03:10:17 +00:00
Chad Rosier
d997bd1422
[ms-inline asm] Start sending non-simple inline asms to the AsmParser.
...
The parser still can't handle all cases, so fall back to emitting a simple
MSAsmStmt if we get into trouble.
llvm-svn: 162382
2012-08-22 19:18:30 +00:00
Benjamin Kramer
fc6eb7d383
Reduce duplicated hash map lookups.
...
llvm-svn: 162361
2012-08-22 15:37:55 +00:00
Chad Rosier
db3da83b28
[driver] Add support for the --param ssp-buffer-size= driver option.
...
PR9673
llvm-svn: 162285
2012-08-21 16:16:06 +00:00
Kostya Serebryany
28a26c8d99
[asan] If we are compiling with ASan, add metadata indicating dynamically initialized globals. Patch by Reid Watson, reviewed by Richard Smith
...
llvm-svn: 162259
2012-08-21 06:53:28 +00:00
John McCall
f1249929c8
When performing a trivial copy of a C++ type, we must be careful not
...
to overwrite objects that might have been allocated into the type's
tail padding. This patch is missing some potential optimizations where
the destination is provably a complete object, but it's necessary for
correctness.
Patch by Jonathan Sauer.
llvm-svn: 162254
2012-08-21 04:10:00 +00:00
John McCall
3deb1ad40c
Screw around with ObjCRuntime some more, changing the
...
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.
llvm-svn: 162252
2012-08-21 02:47:43 +00:00
John McCall
d8561f058d
Fix a pair of bugs relating to properties in ARC.
...
First, when synthesizing an explicitly strong/retain/copy property
of Class type, don't pretend during compatibility checking that the
property is actually assign. Instead, resolve incompatibilities
by secretly changing the type of *implicitly* __unsafe_unretained
Class ivars to be strong. This is moderately evil but better than
what we were doing.
Second, when synthesizing the setter for a strong property of
non-retainable type, be sure to use objc_setProperty. This is
possible when the property is decorated with the NSObject
attribute. This is an ugly, ugly corner of the language, and
we probably ought to deprecate it.
The first is rdar://problem/12039404; the second was noticed by
inspection while fixing the first.
llvm-svn: 162244
2012-08-20 23:36:59 +00:00
Eric Christopher
4a903df403
Reapply:
...
Author: Eric Christopher <echristo@apple.com>
Date: Thu Aug 16 23:50:46 2012 +0000
Add some caching here for the builtin types.
rdar://12117935
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8
after fixing a thinko.
llvm-svn: 162243
2012-08-20 23:32:17 +00:00
Eric Christopher
ff5760132d
Reapply:
...
Make isa part of objc_object at metadata generation time.
Noticed on inspection.
llvm-svn: 162145
2012-08-17 22:54:57 +00:00
Eric Christopher
8d9ccdc7a5
Temporarily revert r162066 and r162062 to see if it brings the gdb
...
bots back.
llvm-svn: 162080
2012-08-17 04:42:07 +00:00
Richard Smith
122a3a8e6f
Fix undefined behavior in debug info emission: operator* on WeakVH returns a
...
reference, so &* on an empty WeakVH binds a reference to a dereferenced null
pointer. So don't do that; we have a perfectly good implicit conversion to
Value*.
llvm-svn: 162079
2012-08-17 04:17:54 +00:00
Eric Christopher
476e5a3c9e
Add some caching here for the builtin types.
...
rdar://12117935
llvm-svn: 162066
2012-08-16 23:50:46 +00:00
Eric Christopher
11b4463a94
Make isa part of objc_object at metadata generation time.
...
Noticed on inspection.
llvm-svn: 162062
2012-08-16 23:50:35 +00:00
Tanya Lattner
a9dd49fe5b
Convert loads and stores of vec3 to vec4 to achieve better code generation. Add test case.
...
llvm-svn: 162002
2012-08-16 00:10:13 +00:00
Richard Smith
48c15319f7
Devirtualize calls on glvalues produced by class member access expressions.
...
Based on a patch by Yin Ma!
llvm-svn: 161998
2012-08-15 22:59:28 +00:00
John Criswell
edc84507c7
Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606
...
Changed the alignment of an LValue to be 64 bits so that we can handle
alignment values up to half of a 64-bit address space.
llvm-svn: 161971
2012-08-15 18:40:30 +00:00
Chad Rosier
73e325de55
[ms-inline asm] Add support for clobbers in CodeGen.
...
This is a reapplication of r161914 now that the scoping issue has been resolved
in r161966.
llvm-svn: 161967
2012-08-15 18:12:36 +00:00
Eric Christopher
d9401e2e58
Revert this to try to bring the i386 bots back.
...
llvm-svn: 161931
2012-08-15 06:31:06 +00:00
Chad Rosier
2d5d1327c4
[ms-inline asm] Add support for clobbers in CodeGen.
...
llvm-svn: 161914
2012-08-15 00:43:09 +00:00
Fariborz Jahanian
1ac111989d
irgen: inline code for several of complex builtin
...
calls. // rdar://8315199
llvm-svn: 161891
2012-08-14 20:09:28 +00:00
Bob Wilson
2605fef7db
Avoid using i64 types for vld1q_lane/vst1q_lane intrinsics.
...
The backend has to legalize i64 types by splitting them into two 32-bit pieces,
which leads to poor quality code. If we produce code for these intrinsics that
uses one-element vector types, which can live in Neon vector registers without
getting split up, then the generated code is much better. Radar 11998303.
llvm-svn: 161879
2012-08-14 17:27:04 +00:00
Manman Ren
6c30e137d0
ARM: enable struct byval for AAPCS-VFP.
...
rdar://9877866
llvm-svn: 161790
2012-08-13 21:23:55 +00:00
Richard Smith
ef8bf4368e
Factor out computation of whether a typeid's expression is potentially
...
evaluated into a CXXTypeid member function. No functionality change.
llvm-svn: 161779
2012-08-13 20:08:14 +00:00
Eric Christopher
921cf137b3
This is always going to be true so the cast isn't necessary.
...
llvm-svn: 161744
2012-08-13 02:07:42 +00:00
Manman Ren
804137fd75
Add comments for turning on byval
...
llvm-svn: 161702
2012-08-10 21:32:09 +00:00
Eli Friedman
dc009da2a8
Don't emit an invoke whose normal destination is a landingpad. Fixes test
...
regression on test/CodeGenObjC/2008-10-3-EhValue.m on non-Darwin targets.
llvm-svn: 161700
2012-08-10 21:26:17 +00:00
Manman Ren
d4badd7420
ARM: enable struct byval for AAPCS.
...
rdar://9877866
PR://13350
llvm-svn: 161694
2012-08-10 20:42:31 +00:00
Joerg Sonnenberger
8c02a241f4
Decrementing std::string::end is not portable, use array access instead.
...
llvm-svn: 161659
2012-08-10 10:57:52 +00:00
Chad Rosier
1426a81a74
[ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.
...
llvm-svn: 161642
2012-08-10 00:00:34 +00:00
Eli Friedman
e66abdafa6
Fix AAPCS ABI. I can't actually test this, but it restores the behavior from before r159168. PR13562.
...
llvm-svn: 161554
2012-08-09 00:31:40 +00:00
Eli Friedman
9fa2885522
clang support for Bitrig (an OpenBSD fork); patch by David Hill.
...
llvm-svn: 161546
2012-08-08 23:57:20 +00:00
Chad Rosier
360e1763d5
[ms-inline asm] Add basic codegen support for simple asm stmts. Currently,
...
only machine specific clobbers are modeled.
llvm-svn: 161524
2012-08-08 21:15:52 +00:00
Eli Friedman
f6d2184c83
Fix an assertion failure with a C++ constructor initializing a
...
member of reference type in an anonymous struct. PR13154.
llvm-svn: 161473
2012-08-08 03:51:37 +00:00
Fariborz Jahanian
af264ce12a
objc-arc: set nonlazybind attribute on objc_retain/
...
objc_release for performance for these most often
called APIs. // rdar://12040837
llvm-svn: 161448
2012-08-07 21:30:31 +00:00
Eric Christopher
06d29572e1
If we don't have a complete type for the array type yet either then
...
just let the alignment be zero.
PR13531
llvm-svn: 161379
2012-08-07 00:48:43 +00:00
Eric Christopher
5b3ec2630a
Remove some unintended changes from my last patch.
...
llvm-svn: 161369
2012-08-07 00:18:40 +00:00
Eric Christopher
33becaa77a
Make sure when we get the replacement type for a template argument
...
that we attach the lost qualifiers.
Fixes rdar://11882155
llvm-svn: 161368
2012-08-07 00:14:25 +00:00
Hal Finkel
3fadbb54fd
Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() intrinsic.
...
llvm-svn: 161310
2012-08-05 22:03:08 +00:00
Benjamin Kramer
e073177e06
Simplify code, no functionality change.
...
llvm-svn: 161303
2012-08-04 17:00:46 +00:00