Daniel Dunbar
a59b0a6e3c
IRgen/Darwin: Fix refacto introduced in Triple changes.
...
llvm-svn: 130233
2011-04-26 19:43:00 +00:00
Eric Christopher
6f095d613a
Temporarily revert r130176, it appears to have broken a few tests.
...
llvm-svn: 130179
2011-04-26 01:02:04 +00:00
Devang Patel
420c8de92e
Emit intrinsic at current insert point, not at the end of current block.
...
llvm-svn: 130177
2011-04-25 23:52:27 +00:00
Stuart Hastings
83da03c2ab
Turn on byval parameters in Clang for ARM APCS. rdar://problem/7662569
...
llvm-svn: 130176
2011-04-25 23:48:12 +00:00
Devang Patel
4f325d1f0f
Simplify. There is no need to have a method to just call another method.
...
llvm-svn: 130175
2011-04-25 23:43:36 +00:00
Fariborz Jahanian
24ac1599fc
Generalize case for built-in expressions having
...
side-effect to generate their ir. Not just for
__builtin_expect. // rdar://9330105
llvm-svn: 130172
2011-04-25 23:10:07 +00:00
Fariborz Jahanian
5a866c0bf2
Ir-gen the side-effect(s) when __builtin_expect is
...
constant-folded. // rdar://9330105
llvm-svn: 130163
2011-04-25 22:30:02 +00:00
John Wiegley
f9f6584e95
t/clang/expr-traits
...
Patch authored by David Abrahams.
These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.
llvm-svn: 130122
2011-04-25 06:54:41 +00:00
Ken Dyck
bb2c24008f
Convert size and alignment variables to CharUnits in EmitAggregateCopy(). No
...
change in functionality intended.
llvm-svn: 130113
2011-04-24 17:37:26 +00:00
Ken Dyck
239a3357af
Convert type size and alignment to CharUnits in CheckAggExprForMemSetUse().
...
No change in functionality intended.
llvm-svn: 130112
2011-04-24 17:25:32 +00:00
Ken Dyck
df94cb7dbe
Convert the return type of GetNumNonZeroBytesInInit() to CharUnits. No
...
change in functionality intended.
llvm-svn: 130111
2011-04-24 17:17:56 +00:00
Ken Dyck
3b4bd9a164
Eliminate some literal 8s by converting size variables in EmitGCMove() and
...
EmitFinalDestCopy() to CharUnits. No change in functionality intended.
llvm-svn: 130110
2011-04-24 17:08:00 +00:00
Ken Dyck
a8094505e2
Replace calls to ASTContext::getTypeInfo() with calls to
...
ASTContext::getTypeSize() when only the size part is used. No change in
functionality intended.
llvm-svn: 130109
2011-04-24 17:02:38 +00:00
Ken Dyck
272b6fa0f0
Simplify AppendTailPadding() by converting its parameter to CharUnits. No
...
change in functionality intended.
llvm-svn: 130108
2011-04-24 16:53:44 +00:00
Ken Dyck
7a0b19f978
Eliminate literal 8s from LayoutUnionField by converting NumBytesToAppend to
...
CharUnits. No change in functionality intended.
llvm-svn: 130107
2011-04-24 16:47:33 +00:00
Ken Dyck
345a6de9b4
Eliminate literal 8s from LayoutBitField(), converting variables to
...
CharUnits or replacing the 8s with char align. No change in functionality
intended.
llvm-svn: 130106
2011-04-24 16:40:29 +00:00
Ken Dyck
27337a8800
Convert AccessInfo::AccessAlignment to CharUnits. No change in functionality
...
intended.
llvm-svn: 130087
2011-04-24 10:13:17 +00:00
Jay Foad
dbf81d8ddf
PR9214: Convert the DIBuilder API to use ArrayRef.
...
llvm-svn: 130086
2011-04-24 10:11:03 +00:00
Ken Dyck
f76759c6fa
Convert CGBitFieldInfo::FieldByteOffset to CharUnits. No change in
...
functionality intended.
llvm-svn: 130085
2011-04-24 10:04:59 +00:00
Jay Foad
1a180156b6
Remove unused STL header includes.
...
llvm-svn: 130068
2011-04-23 19:53:52 +00:00
Devang Patel
a6cb0642b2
Tie debug information for method declaration with debug information for method definition.
...
llvm-svn: 130037
2011-04-23 00:08:01 +00:00
Francois Pichet
1c229c0472
Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.
...
Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.
llvm-svn: 130022
2011-04-22 22:18:13 +00:00
Fariborz Jahanian
c057794adb
Fixes an instance method meta-data generation bug in
...
ObjC NeXt runtime where method pointer registered in
metadata belongs to an unrelated method. Ast part of this fix,
I turned at @end missing warning (for class
implementations) into an error as we can never
be sure that meta-data being generated is correct.
// rdar://9072317
llvm-svn: 130019
2011-04-22 22:02:28 +00:00
Ken Dyck
0fed10e704
Replace a couple of literal 8s with ASTContext::getCharWidth(). No change in
...
functionality intended.
llvm-svn: 130002
2011-04-22 17:59:22 +00:00
Ken Dyck
c5c416f7db
Eliminate some literal 8s from EmitNullInitialization() by converting
...
variables to CharUnits. No change in functionality intended.
llvm-svn: 130001
2011-04-22 17:51:05 +00:00
Ken Dyck
bbe3862d95
Eliminate some literal 8s from EmitDeclare by converting to CharUnits. No
...
change in functionality intended.
llvm-svn: 129999
2011-04-22 17:41:34 +00:00
Ken Dyck
8159c1f2df
Use CharUnits to eliminate some literal 8s in
...
EmitTypeForVarWithBlocksAttr(). No change in functionality intended.
llvm-svn: 129998
2011-04-22 17:34:18 +00:00
Ken Dyck
abae3beec5
Replace some literal 8s with char width and char align. No change in
...
functionality intended.
llvm-svn: 129996
2011-04-22 17:23:43 +00:00
Justin Holewinski
bd4a3c03ff
PTX: Add default PTX calling conventions
...
llvm-svn: 129987
2011-04-22 11:10:38 +00:00
Nick Lewycky
207bce31e1
Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
...
compile time) and .gcda emission (at runtime). --coverage enables both.
This does not yet add the profile_rt library to the link step if -fprofile-arcs
is enabled when linking.
llvm-svn: 129956
2011-04-21 23:44:07 +00:00
Jay Foad
ea324f154b
PR9214: Convert Metadata API to use ArrayRef.
...
llvm-svn: 129929
2011-04-21 19:59:12 +00:00
John McCall
e0fda7377e
The 0.98 revision of the x86-64 ABI clarified a lot of things, some
...
of which break strict compatibility with previous compilers. Implement
one of them and then immediately opt out on Darwin.
llvm-svn: 129899
2011-04-21 01:20:55 +00:00
Argyrios Kyrtzidis
b2ed28ea4b
For
...
double data[20000000] = {0};
we would blow out the memory by creating 20M Exprs to fill out the initializer.
To fix this, if the initializer list initializes an array with more elements than
there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression
that specifies an expression to be used for value initialization of the rest of the elements.
Fixes rdar://9275920.
llvm-svn: 129896
2011-04-21 00:27:41 +00:00
Anders Carlsson
f03f3ec9dd
Don't add type names for enums; they're never used in LLVM IR.
...
llvm-svn: 129894
2011-04-20 23:51:43 +00:00
Chris Lattner
54fd1a1ad3
fix a crash on code that uses the result value of __builtin___memcpy_chk.
...
llvm-svn: 129892
2011-04-20 23:14:50 +00:00
Daniel Dunbar
914bc4106c
IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, we
...
were computing the conversion as (ptr != 0 && non-virtual), when it should be
(ptr != 0 || is-virtual).
- Test to follow in LLVM test-suite.
llvm-svn: 129830
2011-04-19 23:10:47 +00:00
Chris Lattner
2531eb421f
some cleanups to use IRBuilder methods instead of llvm:: foo methods.
...
llvm-svn: 129829
2011-04-19 22:55:03 +00:00
Daniel Dunbar
14ad22f09d
ADT/Triple: Switch to using .isOSDarwin() predicate.
...
llvm-svn: 129823
2011-04-19 21:43:27 +00:00
Chris Lattner
46f1614d56
use the newly introduced IRBuilder getInt() method to reduce some
...
redundancy pointed out by John.
llvm-svn: 129808
2011-04-19 20:53:45 +00:00
Devang Patel
43cfa5dce1
Fix typo in comment.
...
llvm-svn: 129703
2011-04-18 17:30:25 +00:00
Anders Carlsson
566ae67ef8
Get rid of std::vector usage when getting function types in CGException.cpp
...
llvm-svn: 129698
2011-04-18 14:24:10 +00:00
Anders Carlsson
940f02d248
Clean up code generation of typeid expressions and add C++ standard references.
...
llvm-svn: 129682
2011-04-18 00:57:03 +00:00
Chris Lattner
97bbee2fb4
Fix a miscompilation I introduced in r129652, thanks for Eli for tracking
...
it down. we effectively were compile the testcase into:
void test14(int x) {
switch (x) {
case 11: break;
case 42: test14(97); // fallthrough
default: test14(42); break;
which is not the same thing at all. This fixes a miscompilation of
MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot.
llvm-svn: 129679
2011-04-17 23:21:26 +00:00
Anders Carlsson
fcaaa697ec
When laying out bases in, always try the "base subobject" LLVM type. If it
...
turns out that a field or base needs to be laid out in the tail padding of
the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert
it to an array of i8.
I've audited the new test results to make sure that they are still valid. I've
also verified that we pass a self-host with this change.
This (finally) fixes PR5589!
llvm-svn: 129673
2011-04-17 21:56:13 +00:00
Anders Carlsson
56c4d80a4e
Add addBaseSubobjectTypeName which isn't used yet.
...
llvm-svn: 129671
2011-04-17 21:40:34 +00:00
Anders Carlsson
c58f8cb7fc
Move code to add a type name to a TagDecl type out into a helper function. No functionality change.
...
llvm-svn: 129669
2011-04-17 21:36:59 +00:00
Anders Carlsson
b6d31e7dcc
Use a SmallVector for field types in CGRecordLayoutBuilder now that llvm::StructType::get takes an ArrayRef.
...
llvm-svn: 129667
2011-04-17 21:32:41 +00:00
Eli Friedman
2e2ff8894d
Hack to turn the valgrind buildbot green, until Devang can address it
...
properly.
llvm-svn: 129657
2011-04-17 06:40:15 +00:00
Chris Lattner
bc204c8043
implement rdar://9289524 - case followed immediately by break results in empty IR block,
...
a -O0 code quality issue.
llvm-svn: 129652
2011-04-17 00:54:30 +00:00
Chris Lattner
30107ed600
fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizes
...
are trivial. This exposes opportunities earlier, and allows fastisel
to do good things with these at -O0.
This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0
llvm-svn: 129651
2011-04-17 00:40:24 +00:00