Fariborz Jahanian
493d4e080d
Added -print-ivar-layout option. No change in functionality
...
yet.
llvm-svn: 69346
2009-04-17 03:04:15 +00:00
Anders Carlsson
6dc3575220
Add support for the __has_trivial_destructor type trait.
...
llvm-svn: 69345
2009-04-17 02:34:54 +00:00
Dan Gohman
d2d6fd806c
Don't create ConstantInts with pointer type. This fixes a
...
regression in 403.gcc in PIC_CODEGEN=1 and DISABLE_LTO=1
mode.
llvm-svn: 69344
2009-04-17 02:02:52 +00:00
Anders Carlsson
eaa28f7e18
Add support for generating (very basic) C++ destructors. These aren't called by anything yet.
...
llvm-svn: 69343
2009-04-17 01:58:57 +00:00
Daniel Dunbar
3f4a2c286e
Support QA_OVERRIDE_GCC3_OPTIONS
...
- Cover your eyes...
- This is a simple but effective way to allow developers to build a
project with clang while manipulating the command line, without
having to edit the project itself.
llvm-svn: 69342
2009-04-17 01:54:00 +00:00
Evan Cheng
b96a1082a9
Teach spiller to unfold instructions which modref spill slot when a scratch
...
register is available and when it's profitable.
e.g.
xorq %r12<kill>, %r13
addq %rax, -184(%rbp)
addq %r13, -184(%rbp)
==>
xorq %r12<kill>, %r13
movq -184(%rbp), %r12
addq %rax, %r12
addq %r13, %r12
movq %r12, -184(%rbp)
Two more instructions, but fewer memory accesses. It can also open up
opportunities for more optimizations.
llvm-svn: 69341
2009-04-17 01:29:40 +00:00
Daniel Dunbar
c3e7cff6d3
Attributes on block functions were not being set.
...
- <rdar://problem/6800351> clang not producing correct large struct
return code for Blocks
llvm-svn: 69337
2009-04-17 00:48:04 +00:00
Dan Gohman
09dbb0b5e0
MOV8rr_NOREX is a "Move" instruction. This doesn't currently
...
matter, because this instruction isn't generated until after
things that care.
llvm-svn: 69336
2009-04-17 00:45:17 +00:00
Dan Gohman
74835ce1cb
Don't use MOV8rr_NOREX on x86-32. It doesn't actually hurt anything at
...
present, but it's inconsistent.
llvm-svn: 69335
2009-04-17 00:43:09 +00:00
Douglas Gregor
71517c47e6
PCH support for do-while and for loops
...
llvm-svn: 69334
2009-04-17 00:29:51 +00:00
Chris Lattner
a8919d0a35
Fix some failures in targets on available_externally functions,
...
this fixes a crash on CodeGen/Generic/externally_available.ll
on ppc hosts. Thanks to Nicholas L for pointing this out.
llvm-svn: 69333
2009-04-17 00:26:12 +00:00
Douglas Gregor
e24cbc0f4b
PCH support for while and continue statements
...
llvm-svn: 69332
2009-04-17 00:16:09 +00:00
Mike Stump
5c3285b6fb
Fixup semantic analysis for nested blocks, and allow block literal
...
expressions that can be of static duration to be returned.
Radar 6786551
llvm-svn: 69331
2009-04-17 00:09:41 +00:00
Anders Carlsson
b7f8f594f3
Implement basic code generation of constructor calls. We can now compile:
...
struct S {
S(int, int);
};
void f() {
S s(10, 10);
}
llvm-svn: 69330
2009-04-17 00:06:03 +00:00
Douglas Gregor
a9af1d13da
PCH support for the first batch of statements, including null,
...
compound, case, default, if, switch, and break statements.
llvm-svn: 69329
2009-04-17 00:04:06 +00:00
Anders Carlsson
e8eeffdf16
Add GetAddrOfCXXConstructor and use it.
...
llvm-svn: 69328
2009-04-16 23:57:24 +00:00
Anders Carlsson
2f3278bc09
Add constructor getter to CXXTemporaryObjectExpr.
...
llvm-svn: 69327
2009-04-16 23:53:22 +00:00
Anders Carlsson
e6840d84df
If a class has a non-trivial constructor that doesn't take any arguments, we will now make an implicit CXXTemporaryObjectExpr. So
...
struct S {
S();
};
void f() {
S s;
}
's' here will implicitly be declared as.
S s = S();
llvm-svn: 69326
2009-04-16 23:50:50 +00:00
Chris Lattner
302279ed06
-Wall is -Wmost -Wparentheses
...
llvm-svn: 69324
2009-04-16 23:30:16 +00:00
Daniel Dunbar
f2df7c283f
Driver: Allow using clang as a precompiler, even if it is an
...
unsupported arch.
llvm-svn: 69322
2009-04-16 23:10:13 +00:00
Dan Gohman
fec1d086e0
Use TargetData::getTypeSizeInBits instead of getPrimitiveSizeInBits()
...
to get the correct answer for pointer types.
llvm-svn: 69321
2009-04-16 22:35:57 +00:00
Douglas Gregor
573b92468e
Clean up the declaration-decoding step in the PCH reader, using the
...
same ueber-easy visitor scheme used for expressions/statements.
llvm-svn: 69320
2009-04-16 22:29:51 +00:00
Douglas Gregor
8f45df58b3
Prepare PCH reader and writer for (de-)serialization of statements. No
...
functionality change.
llvm-svn: 69319
2009-04-16 22:23:12 +00:00
Bob Wilson
b8c370a8b5
Fix PR3994: LLVMMatchType arguments do not refer to absolute return value
...
and argument positions but only to the overloaded intrinsic parameters.
Keep a separate list of these overloaded parameters in CodeGenTarget.cpp
so they can be resolved easily. Remove assertions from IntrinsicEmitter.cpp:
they were harmless but confusing, and the assertions elsewhere in TableGen
will catch any incorrect values.
llvm-svn: 69316
2009-04-16 21:51:05 +00:00
Fariborz Jahanian
68c4c61be8
Removed a no longer needed FIXME comment.
...
llvm-svn: 69315
2009-04-16 21:49:16 +00:00
Chris Lattner
11ceb38df0
make sure to unlock keymgr if the JIT is created and destroyed, all
...
locks must be matched with unlocks. Also, use calloc to allocate the
block so that it is properly zero'd. Thanks to Nick Kledzik for
tracking this down.
llvm-svn: 69314
2009-04-16 21:47:59 +00:00
Bob Wilson
de578e8cc6
Add a comment to describe LLVMMatchType.
...
llvm-svn: 69313
2009-04-16 21:46:42 +00:00
Eli Friedman
929207fd1d
Fix for PR3944: make mem2reg O(N) instead of O(N^2) in the number of
...
incoming edges for a block with many predecessors.
llvm-svn: 69312
2009-04-16 21:40:28 +00:00
Dan Gohman
72dc8452a3
Handle a pointer type correctly in SCEVExpander::visitAddRecExpr.
...
llvm-svn: 69310
2009-04-16 21:34:54 +00:00
Dan Gohman
eefba6bbe0
In the list-burr's pseudo two-addr dependency heuristics, don't
...
add dependencies on nodes with exactly one successor which is a
COPY_TO_REGCLASS node. In the case that the copy is coalesced
away, the dependence should be on the user of the copy, rather
than the copy itself.
llvm-svn: 69309
2009-04-16 20:59:02 +00:00
Dan Gohman
3027bb6953
Handle SUBREG_TO_REG instructions with the same heuristics
...
as INSERT_SUBREG instructions in the list-burr scheduler.
llvm-svn: 69308
2009-04-16 20:57:10 +00:00
Dan Gohman
c1c2ba7a72
Fix a bug with inttoptr/ptrtoint casts where the pointer has a different
...
size from the integer, requiring zero extension or truncation. Don't
create ZExtInsts with pointer types. This fixes a regression in
consumer-jpeg.
llvm-svn: 69307
2009-04-16 19:25:55 +00:00
Steve Naroff
a0c32704e2
Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'.
...
llvm-svn: 69306
2009-04-16 19:02:57 +00:00
Fariborz Jahanian
bcf548760e
Category method synbols must be qualified by gategory name to
...
match gcc's.
llvm-svn: 69305
2009-04-16 18:34:20 +00:00
Devang Patel
dab01f3fd6
Do not treat beginning of inlined scope as beginning of normal function scope if the location info is missing.
...
Insetad of doing ...
if (inlined_subroutine && known_location)
DW_TAG_inline_subroutine
else
DW_TAG_subprogram
do
if (inlined_subroutine) {
if (known_location)
DW_TAG_inline_subroutine
} else {
DW_TAG_subprogram
}
llvm-svn: 69300
2009-04-16 17:55:30 +00:00
Sebastian Redl
1a99f441e6
Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
...
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.
llvm-svn: 69299
2009-04-16 17:51:27 +00:00
Eli Friedman
8d25b096fa
Attempt to fix a read-after-free running test/Sema/designated-initializers.c.
...
Douglas, can you check that this is doing the right thing?
llvm-svn: 69298
2009-04-16 17:49:48 +00:00
Eli Friedman
027aa3cb0e
Force target triple for test depending on __weak.
...
llvm-svn: 69297
2009-04-16 17:33:37 +00:00
Dan Gohman
8b6ebb1112
Minor code simplifications. Don't attempt LSR on theoretical
...
targets with pointers larger than 64 bits, due to the code not
yet being APInt clean.
llvm-svn: 69296
2009-04-16 16:49:48 +00:00
Dan Gohman
e2ead2c328
LSR is no longer a GEP optimizer. It is now an IV expression
...
optimizer, which just happen to frequently involve optimizing GEPs.
llvm-svn: 69295
2009-04-16 16:46:01 +00:00
Dan Gohman
e98ead45e2
Fix SCEVExpander::visitSMaxExpr and SCEVExpander::visitUMaxExpr to
...
not create ICmpInsts with operands of different types. This fixes
a regression in Applications/d/make_dparser.
llvm-svn: 69294
2009-04-16 16:15:25 +00:00
Dan Gohman
66e038a3e3
Teach SCEVExpander::InsertCastOfTo to avoid creating inttoptr-of-ptrtoint
...
and ptrtoint-of-inttoptr expressions. This fixes a regression in 300.twolf.
llvm-svn: 69293
2009-04-16 15:52:57 +00:00
Anders Carlsson
8798bd1bf9
When we create an implicit CXXTemporaryObjectExpr we don't need to check that it's a valid init. Instead, just set it as the VarDecl's initializer.
...
llvm-svn: 69292
2009-04-16 15:50:16 +00:00
Dan Gohman
a8be04b2db
Use ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
...
since the operand is always a constant.
llvm-svn: 69291
2009-04-16 15:48:38 +00:00
Dan Gohman
71bccd3e0e
Use a SCEV expression cast instead of immediately inserting a
...
new instruction with SCEVExpander::InsertCastOfTo.
llvm-svn: 69290
2009-04-16 15:47:35 +00:00
Daniel Dunbar
426b5cf16a
Ensure that the most recent declaration of a tentative definition wins
...
when generating a common definition.
llvm-svn: 69287
2009-04-16 15:34:14 +00:00
Devang Patel
9ac4390bf4
Record line number at the beginning of a func.start.
...
This line was accidently lost yesterday.
llvm-svn: 69286
2009-04-16 15:07:09 +00:00
Rafael Espindola
5e42177a0f
fix PR3995. A scale must be 1, 2, 4 or 8.
...
llvm-svn: 69284
2009-04-16 12:34:53 +00:00
Daniel Dunbar
092f0ccd9c
Pass -fdiagnostics-show-option to clang-cc by default.
...
- <rdar://problem/6796848> implement -fdiagnostics-show-option
llvm-svn: 69276
2009-04-16 06:32:38 +00:00
Chris Lattner
f9c2dbb233
other half of 69274
...
llvm-svn: 69275
2009-04-16 06:17:55 +00:00