Evan Cheng
44887f9c7e
Follow up on r127913. Fix Thumb revsh isel. rdar://9286766
...
llvm-svn: 129548
2011-04-14 23:27:44 +00:00
Douglas Gregor
6ca6410e3a
If the declaration of a C++ member function with an inline definition
...
is so broken that Sema can't form a declaration for it, don't bother
trying to parse the definition later. Fixes <rdar://problem/9221993>.
llvm-svn: 129547
2011-04-14 23:19:27 +00:00
Eli Friedman
2395626605
Add an instcombine for constructs like a | -(b != c); a select is more
...
canonical, and generally leads to better code. Found while looking at
an article about saturating arithmetic.
llvm-svn: 129545
2011-04-14 22:41:27 +00:00
Douglas Gregor
40965fa78a
When we transform a C++ exception declaration (e.g., for template
...
instantiation), be sure to add the transformed declaration into the
current DeclContext. Also, remove the -Wuninitialized hack that works
around this bug. Fixes <rdar://problem/9200676>.
llvm-svn: 129544
2011-04-14 22:32:28 +00:00
Johnny Chen
eb0e0b19b0
Rewording of assert message.
...
llvm-svn: 129543
2011-04-14 22:24:12 +00:00
Johnny Chen
2c40561743
Add a test to check that lldb reliably catches a crashing inferior (both command and Python API).
...
llvm-svn: 129542
2011-04-14 22:20:36 +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
Richard Smith
55858499e2
Detect when the string "<::" is found in code after a cast or template name and is interpreted as "[:" because of the digraph "<:". When found, give an error with a fix-it to add whitespace between the "<" and "::".
...
Patch by Richard Trieu! Plus a small tweak from me to deal with one of the tokens coming from a macro.
llvm-svn: 129540
2011-04-14 21:45:45 +00:00
Douglas Gregor
7df2126000
Harden Clang's cursor visitation logic against NULL declaration,
...
statement, and expression pointers. While these shouldn't happen, it's
better to be safe in libclang.
llvm-svn: 129539
2011-04-14 21:41:34 +00:00
Owen Anderson
92651ec374
Fix an infinite alternation in JumpThreading where two transforms would repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it.
...
Fixes <rdar://problem/9284786>.
Discovered with CSmith.
llvm-svn: 129538
2011-04-14 21:35:50 +00:00
Fariborz Jahanian
bc2ee9382c
Match pointer of compatible vection types.
...
// rdar://9208404
llvm-svn: 129536
2011-04-14 20:33:36 +00:00
Douglas Gregor
af670a81e9
When determining the "usage" type of a declaration for the purposes of code
...
completion, look through block pointer and function pointer types to the
result type of the block/function. Fixes <rdar://problem/9282583>.
llvm-svn: 129535
2011-04-14 20:33:34 +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
Richard Smith
fdc33cbecd
Name mangling of late-specified return types doesn't work if the return type references the argument types:
...
template<typename T> auto f(T a) -> decltype(a.foo());
Since this is the primary reason for the introduction of this feature, downgrade implementation status to "Some examples work".
llvm-svn: 129533
2011-04-14 19:57:19 +00:00
Mon P Wang
1cde91674a
Cleanup r129509 based on comments by Chris
...
llvm-svn: 129532
2011-04-14 19:20:42 +00:00
Johnny Chen
4251b151b1
Add sanity checkings for Thumb2 Load/Store Register Exclusive family of operations.
...
llvm-svn: 129531
2011-04-14 19:13:28 +00:00
Chris Lattner
6f195469b1
move PR9661 out to here.
...
llvm-svn: 129527
2011-04-14 18:47:18 +00:00
Richard Smith
f7b6202e6c
Implement C++0x [lex.pptoken]p3's handling of <::.
...
llvm-svn: 129525
2011-04-14 18:36:27 +00:00
Owen Anderson
a519284fec
Fix another instance of the DAG combiner not using the correct type for the RHS of a shift.
...
llvm-svn: 129522
2011-04-14 17:30:49 +00:00
Douglas Gregor
23c8476748
Parse an '@' in an Objective-C++ class member specification,
...
diagnosing it as an error rather than looping infinitely. Also,
explicitly disallow @defs in Objective-C++. Fixes <rdar://problem/9260136>.
llvm-svn: 129521
2011-04-14 17:21:19 +00:00
Howard Hinnant
866d73c7b4
Think-o in poisson_distribution at mean == 10
...
llvm-svn: 129520
2011-04-14 15:59:22 +00:00
Daniel Dunbar
76b4ceb897
tests: Remove a FrontendC test which is no longer valid.
...
llvm-svn: 129519
2011-04-14 15:21:16 +00:00
Rafael Espindola
aa2a7cd828
Change ELF systems to use CFI for producing the EH tables. This reduces the
...
size of the clang binary in Debug builds from 690MB to 679MB.
llvm-svn: 129518
2011-04-14 15:18:53 +00:00
Michael J. Spencer
b88784c185
Fix whitespace and tabs.
...
llvm-svn: 129517
2011-04-14 14:33:36 +00:00
Sebastian Redl
9ab988fe00
Chained PCH: Remember when additional specializations are added to a function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there.
...
llvm-svn: 129516
2011-04-14 14:07:59 +00:00
Sebastian Redl
05d73a10a2
Add header guards to include/clang/Basic/ConvertUTF.h.
...
llvm-svn: 129515
2011-04-14 14:07:49 +00:00
Sebastian Redl
4e52123d06
Fix -H. It was pretty broken.
...
llvm-svn: 129514
2011-04-14 14:07:45 +00:00
Sebastian Redl
eb931c6b0e
The ASTReader created by -chain-include used the generated PCH buffers in the wrong order. The effect was that all but the first chain-include files was ignored for subsequent compilations.
...
llvm-svn: 129513
2011-04-14 14:07:41 +00:00
Mon P Wang
0f6bad7b6e
Cleanup r129472 by using a utility routine as suggested by Eli.
...
llvm-svn: 129509
2011-04-14 08:04:01 +00:00
Andrew Trick
bfbd972b1f
In the pre-RA scheduler, maintain cmp+br proximity.
...
This is done by pushing physical register definitions close to their
use, which happens to handle flag definitions if they're not glued to
the branch. This seems to be generally a good thing though, so I
didn't need to add a target hook yet.
The primary motivation is to generate code closer to what people
expect and rule out missed opportunity from enabling macro-op
fusion. As a side benefit, we get several 2-5% gains on x86
benchmarks. There is one regression:
SingleSource/Benchmarks/Shootout/lists slows down be -10%. But this is
an independent scheduler bug that will be tracked separately.
See rdar://problem/9283108.
Incidentally, pre-RA scheduling is only half the solution. Fixing the
later passes is tracked by:
<rdar://problem/8932804> [pre-RA-sched] on x86, attempt to schedule CMP/TEST adjacent with condition jump
Fixes:
<rdar://problem/9262453> Scheduler unnecessary break of cmp/jump fusion
llvm-svn: 129508
2011-04-14 05:15:06 +00:00
Andrew Trick
d175c98d41
Documented bugpoint --compile-custom --compile-command.
...
I've used it a few times to reduce unit tests and gotten one request for information on it. It's not easy to use correctly because bugpoint doesn't tell you when you're doing it wrong.
llvm-svn: 129507
2011-04-14 05:05:36 +00:00
Chris Lattner
1d313c6f6d
add a minor missed dag combine that is blocking mid-level optimization
...
improvements, that will lead to fixing PR6627.
llvm-svn: 129504
2011-04-14 04:21:42 +00:00
Chris Lattner
493b3e72f2
sink a call into its only use.
...
llvm-svn: 129503
2011-04-14 04:12:47 +00:00
Chris Lattner
fba5cdfce1
rework FoldBranchToCommonDest to exit earlier when there is a bonus
...
instruction around, reducing work.
Greatly simplify handling of debug instructions. There is no need to
build up a vector of them and then move them into the one predecessor
if we're processing a block. Instead just rescan the block and *copy*
them into the pred. If a block gets merged into multiple preds, this
will retain more debug info.
llvm-svn: 129502
2011-04-14 02:44:53 +00:00
Chris Lattner
35a65b2aa6
fix a couple -Wsign-compare warnings.
...
llvm-svn: 129501
2011-04-14 02:27:25 +00:00
Sean Callanan
1b1bf6e982
Updated LLVM to pick up fixes to the ARM instruction
...
tables.
llvm-svn: 129500
2011-04-14 02:01:31 +00:00
Ted Kremenek
9eb0b7d2f1
Return the correct lastly populated block from CFGBuilder::VisitUnaryExprOrTypeTraitExpr().
...
llvm-svn: 129499
2011-04-14 01:50:50 +00:00
Bill Wendling
410ec4aad1
As Dan pointed out, movzbl, movsbl, and friends are nicer than their alias
...
(movzx/movsx) because they give more information. Revert that part of the patch.
llvm-svn: 129498
2011-04-14 01:46:37 +00:00
Bill Wendling
7e07d6fb69
Have the X86 back-end emit the alias instead of what's being aliased. In most
...
cases, it's much nicer and more informative reading the alias.
llvm-svn: 129497
2011-04-14 01:11:51 +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
Eli Friedman
6620ddeaa4
Re-fix r129481 and r129465 properly. Nulls fixits shouldn't be dropped in
...
DiagnosticBuilder::AddFixItHint: they will be dropped along with any
other (possibly valid) fixits later.
llvm-svn: 129495
2011-04-14 00:51:41 +00:00
Argyrios Kyrtzidis
36e4ae3e57
When creating an implicit member expression through a qualified-id, check that the class
...
named by the nested-name-specifier is same or base of the class in which the member expression appears.
It seems we also had an ill-formed test case, mon dieu! Fixes rdar://8576107.
llvm-svn: 129493
2011-04-14 00:46:47 +00:00
Nick Kledzik
19b826011e
<rdar://problem/9282305> install an archive for dyld and fix missing -static
...
llvm-svn: 129492
2011-04-14 00:45:01 +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
Anders Carlsson
d162fb83f2
In C++, when initializing an array from a pascal string, it's OK if the array
...
is 1 element smaller than the string, because we can just strip off the last
null character. This matches GCC.
llvm-svn: 129490
2011-04-14 00:41:11 +00:00
Nick Kledzik
e7e288c805
don't add version info for static library
...
llvm-svn: 129489
2011-04-14 00:40:20 +00:00
Anders Carlsson
752454092c
Add a flag to StringLiteral to keep track of whether the string is a pascal string or not.
...
llvm-svn: 129488
2011-04-14 00:40:03 +00:00
Nick Kledzik
012323dee9
<rdar://problem/9173756> enable CC.Release to be used always
...
llvm-svn: 129487
2011-04-14 00:39:01 +00:00
Anders Carlsson
a5a9bafeb9
Rename test.
...
llvm-svn: 129486
2011-04-13 23:55:47 +00:00
Bill Wendling
6dd69d9241
Add an option to not print the alias of an instruction. It defaults to "print
...
the alias".
llvm-svn: 129485
2011-04-13 23:36:21 +00:00