Richard Smith
030f499d2f
Teach -ast-print how to print template template parameters.
...
llvm-svn: 129565
2011-04-15 13:38:57 +00:00
Benjamin Kramer
3462376c65
Fix mismatched delete.
...
llvm-svn: 129564
2011-04-15 11:21:57 +00:00
Richard Smith
3504faf6e4
Apply NAKAMURA Takumi's workaround to fix thses tests on -Asserts build. The labels there are numbered, not named, and numbered labels are formatted differently.
...
llvm-svn: 129562
2011-04-15 10:12:39 +00:00
Nick Lewycky
53ba5ee4ce
Create a compiler-rt directory and move the Makefile to it. Add a makefile that
...
builds the subdirs from this directory. This makes the behaviour with make match
what already happens with cmake.
llvm-svn: 129561
2011-04-15 06:57:32 +00:00
Ted Kremenek
1551d55295
Improve diagnostics on GNU attributes by warning about attributes that should have no arguments or parameters. Patch by Michael Han!
...
llvm-svn: 129560
2011-04-15 05:49:29 +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
Chris Lattner
0ab5e2cded
Fix a ton of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129558
2011-04-15 05:18:47 +00:00
NAKAMURA Takumi
b5e3e9dd27
Revert r129518, "Change ELF systems to use CFI for producing the EH tables. This reduces the"
...
It broke several builds.
llvm-svn: 129557
2011-04-15 03:35:57 +00:00
Evan Cheng
12bb05b75b
Fix another fcopysign lowering bug. If src is f64 and destination is f32, don't
...
forget to right shift the source by 32 first. rdar://9287902
llvm-svn: 129556
2011-04-15 01:31:00 +00:00
Peter Collingbourne
3d9cbdc3e6
C1X: implement static asserts
...
llvm-svn: 129555
2011-04-15 00:35:57 +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
Peter Collingbourne
a686b5f8bf
C1X: add a language standard
...
llvm-svn: 129553
2011-04-15 00:35:23 +00:00
Johnny Chen
681fef5986
For t2BFI, both Inst{26} and Inst{5} "should" be 0.
...
Ref: I.1 Instruction encoding diagrams and pseudocode
llvm-svn: 129552
2011-04-15 00:35:08 +00:00
Michael J. Spencer
30088ba110
Add 3DNow! intrinsics.
...
llvm-svn: 129551
2011-04-15 00:32:41 +00:00
Johnny Chen
421316178e
The ARM disassembler did not handle the alignment correctly for VLD*DUP* instructions
...
(single element or n-element structure to all lanes).
llvm-svn: 129550
2011-04-15 00:10:45 +00:00
Tanya Lattner
ee840b85b1
Do not expand the opencl pragma names. This is so you can also have a define named the samed as the pragma and they do not interfere (ie. cl_khr_fp64).
...
llvm-svn: 129549
2011-04-14 23:35:31 +00:00
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