Commit Graph

153079 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen db429d9483 Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.
These exception-related opcodes are not used any longer.

llvm-svn: 185625
2013-07-04 13:54:20 +00:00
Evgeniy Stepanov db615c186f [sanitizer] More interceptors.
bcopy
strtoimax, strtoumax
mbstowcs, mbsrtowcs, mbsnrtowcs
wcstombs, wcsrtombs, wcsnrtombs

llvm-svn: 185624
2013-07-04 13:19:41 +00:00
Craig Topper 9c525eec94 Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185623
2013-07-04 13:11:33 +00:00
Alexander Kornienko 5861171893 Added AlwaysBreakBeforeMultilineStrings option.
Summary:
Always breaking before multiline strings can help format complex
expressions containing multiline strings more consistently, and avoid consuming
too much horizontal space.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D1097

llvm-svn: 185622
2013-07-04 12:02:44 +00:00
Alexander Potapenko d0c91acb58 [ASan] Do not protect the malloc zone created by malloc_zone_create() on Snow Leopard and earlier systems.
Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=208

llvm-svn: 185621
2013-07-04 10:16:12 +00:00
Joey Gouly 39f7488294 Add a V8FP instruction 'vcvt{b,t}' to convert between half and double precision.
llvm-svn: 185620
2013-07-04 10:04:08 +00:00
Rui Ueyama 130a6eb7fa Try to guard a test that requires DEBUG().
This is a follow-up patch for r185524. Being assert enabled does not mean
that DEBUG() is enabled, so we need to check the existence of DEBUG() itself.

llvm-svn: 185619
2013-07-04 09:29:47 +00:00
Jakob Stoklund Olesen 6a7d68349f Typo.
llvm-svn: 185618
2013-07-04 04:53:49 +00:00
Jakob Stoklund Olesen fee2a20209 Simplify landing pad lowering.
Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be  scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

llvm-svn: 185617
2013-07-04 04:53:45 +00:00
Jakob Stoklund Olesen 3d8560c382 FastISel can only apend to basic blocks.
Compute the insertion point from the end of the basic block instead of
skipping labels from the front.

This caused failures in landing pads when live-in copies where inserted
before instruction selection.

llvm-svn: 185616
2013-07-04 04:32:39 +00:00
Jakob Stoklund Olesen bbbb53262a Live-in copies go *after* EH_LABELs.
This will soon be tested by exception handling working at all.

llvm-svn: 185615
2013-07-04 04:32:35 +00:00
Richard Smith 6d6676b9d1 Add test for PR4997. This has been fixed for a while.
llvm-svn: 185614
2013-07-04 04:10:46 +00:00
Richard Smith e65319009c Testcase for PR14130, which was probably fixed by r183859.
llvm-svn: 185613
2013-07-04 04:04:20 +00:00
Nick Lewycky a833c667e2 Tabs to spaces. No functionality change.
llvm-svn: 185612
2013-07-04 03:51:53 +00:00
Craig Topper af6bd1b87f Add a space between closing template '>' to unbreak build.
llvm-svn: 185611
2013-07-04 03:15:42 +00:00
Craig Topper 2341c0d3b2 Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
llvm-svn: 185610
2013-07-04 03:08:24 +00:00
Anna Zaks a42fb525e4 [analyzer] Suppress reports reported in std::list
The motivation is to suppresses false use-after-free reports that occur when calling
std::list::pop_front() or std::list::pop_back() twice. The analyzer does not
reason about the internal invariants of the list implementation, so just do not report
any of warnings in std::list.

Fixes radar://14317928.

llvm-svn: 185609
2013-07-04 02:38:10 +00:00
Anna Zaks 5673b6567a [analyzer] Make sure that inlined defensive checks work on div by zero.
This suppresses a false positive in std::hash_map.
Fixes  radar://14255587.

llvm-svn: 185608
2013-07-04 02:38:06 +00:00
Craig Topper 6597b8fd22 Add a space between closing template '>' to unbreak build.
llvm-svn: 185607
2013-07-04 01:43:17 +00:00
Craig Topper af0dea1347 Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185606
2013-07-04 01:31:24 +00:00
Eric Christopher a24dc7fa8c Reapply r185601 with a fix for the cmake build.
llvm-svn: 185605
2013-07-04 01:10:38 +00:00
Richard Smith c87b938e17 Part of PR15673: If a function template has a default argument in which
substitution failed, report that as a substitution failure rather than
pretending that there was no default argument.

The test cases in PR15673 have exposed some pre-existing poor diagnostics here.

llvm-svn: 185604
2013-07-04 01:01:24 +00:00
Eric Christopher 3eb07a0963 Temporarily revert 185601 as it caused cmake build regressions.
llvm-svn: 185603
2013-07-04 00:51:26 +00:00
Richard Trieu 949abc327d Improve -Wlogical-not-parentheses to catch when the not is applied to an enum.
llvm-svn: 185602
2013-07-04 00:50:18 +00:00
Eric Christopher aaf58cc3c4 Add support for futimens for platforms that don't support futimes.
Patch by pashev.igor.

llvm-svn: 185601
2013-07-04 00:47:09 +00:00
Jakob Stoklund Olesen a1f5b901a5 Revert r185595-185596 which broke buildbots.
Revert "Simplify landing pad lowering."
Revert "Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes."

llvm-svn: 185600
2013-07-04 00:26:30 +00:00
Fariborz Jahanian 43bbaaca80 [ObjectiveC migrator] relax the rules for setter/getter
types when deciding on validity of a property
inclusion. // rdar://14345082

llvm-svn: 185599
2013-07-04 00:24:32 +00:00
Richard Smith cde3fd87e0 PR16480: Reimplement token-caching for constructor initializer lists. This
previously didn't work if a mem-initializer-id had a template argument which
contained parentheses or braces.

We now implement a simple rule: just look for a ') {' or '} {' that is not
nested. The '{' is assumed to start the function-body. There are still two
cases which we misparse, where the ') {' comes from a compound literal or
from a lambda. The former case is not valid C++, and the latter will probably
not be valid C++ once DR1607 is resolved, so these seem to be of low value,
and we do not regress on them with this change. EDG and g++ also misparse
both of these cases.

llvm-svn: 185598
2013-07-04 00:13:48 +00:00
Marshall Clow 5b2ef2b1a6 Patch for N3655 (Transformation type traits) with Howard's additions
llvm-svn: 185597
2013-07-04 00:10:01 +00:00
Jakob Stoklund Olesen f33ec531fa Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.
These exception-related opcodes are not used any longer.

llvm-svn: 185596
2013-07-03 23:56:31 +00:00
Jakob Stoklund Olesen fa6a7b9b02 Simplify landing pad lowering.
Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be  scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

llvm-svn: 185595
2013-07-03 23:56:24 +00:00
Jakob Stoklund Olesen 533c3bf2d6 Add MachineBasicBlock::addLiveIn().
This function adds a live-in physical register to an MBB and ensures
that it is copied to a virtual register immediately.

llvm-svn: 185594
2013-07-03 23:56:20 +00:00
Fariborz Jahanian de66100889 Minor refactoring of my last patch.
llvm-svn: 185593
2013-07-03 23:44:11 +00:00
Stephen Lin 8dc042dcbd Have ARMBaseRegisterInfo::getCallPreservedMask return the 'correct' mask for the GHC calling convention.
This is purely academic because GHC calls are always tail calls so the register mask will never be used; however, this change makes the code clearer and brings the ARM implementation of the GHC calling convention in line with the X86 implementation. Also, it might save someone else some time trying to figuring out what is happening...

llvm-svn: 185592
2013-07-03 23:39:13 +00:00
Fariborz Jahanian a7437f0227 [ObjectiveC Migration]: Provide knobs for
migrating setter/getter methods to an eventual
property declaraiton. This is wip.
// rdar://14345082

llvm-svn: 185591
2013-07-03 23:05:00 +00:00
Sebastian Pop 8c2d75302f scop detection: early return
to reduce indentation level
No functionality changed.

llvm-svn: 185590
2013-07-03 22:50:36 +00:00
Eric Christopher 614a89f5b2 Hoist all of the Entry.getLoc() calls int a single variable.
llvm-svn: 185589
2013-07-03 22:40:21 +00:00
Eric Christopher 25f0642afd Make DotDebugLocEntry a class, reorder the members along with comments
for them and update all uses.

llvm-svn: 185588
2013-07-03 22:40:18 +00:00
Quentin Colombet 04b3a0fdb2 [ARM] Improve the instruction selection of vector loads.
In the ARM back-end, build_vector nodes are lowered to a target specific
build_vector that uses floating point type. 
This works well, unless the inserted bitcasts survive until instruction
selection. In that case, they incur moves between integer unit and floating
point unit that may result in inefficient code.

In other words, this conversion may introduce artificial dependencies when the
code leading to the build vector cannot be completed with a floating point type.

In particular, this happens when loads are not aligned.

Before this patch, in that case, the compiler generates general purpose loads
and creates the floating point vector from them, instead of directly using the
vector unit.

The patch uses a vector friendly sequence of code when the inserted bitcasts to
floating point survived DAGCombine.

This is done by a target specific DAGCombine that changes the target specific
build_vector into a sequence of insert_vector_elt that get rid of the bitcasts.

<rdar://problem/14170854>

llvm-svn: 185587
2013-07-03 21:42:57 +00:00
Eric Christopher 270a12cff3 Elaborate on comment.
llvm-svn: 185586
2013-07-03 21:37:03 +00:00
Eric Christopher dd7b4615d1 Add names to the header file since they help in documenting the API
(and for consistency).

llvm-svn: 185585
2013-07-03 21:23:59 +00:00
Roman Divacky ac6f5f4015 Check LongDoubleFormat instead of just Width as this is PowerPC specific.
llvm-svn: 185584
2013-07-03 21:08:41 +00:00
Bill Schmidt 541758daa9 [PowerPC] FreeBSD does not require f128 in its data layout string.
Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.

llvm-svn: 185583
2013-07-03 21:03:35 +00:00
Bill Schmidt 58ae47bf10 [PowerPC] FreeBSD does not require f128 in its data layout string.
Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.

llvm-svn: 185582
2013-07-03 21:03:06 +00:00
Renato Golin 98c6081536 Add platform specific tests doc
llvm-svn: 185581
2013-07-03 20:56:33 +00:00
Bill Schmidt 99a084b7ae "bool" should be a context-sensitive keyword in Altivec mode.
PR16456 reported that Clang implements a hybrid between AltiVec's
"Keyword and Predefine Method" and its "Context Sensitive Keyword
Method," where "bool" is always a keyword, but "vector" and "pixel"
are context-sensitive keywords.  This isn't permitted by the AltiVec
spec.  For consistency with gcc, this patch implements the Context
Sensitive Keyword Method for bool, and stops treating true and false
as keywords in Altivec mode.

The patch removes KEYALTIVEC as a trigger for defining these keywords
in include/clang/Basic/TokenKinds.def, and adds logic for "vector
bool" that mirrors the existing logic for "vector pixel."  The test
case is taken from the bug report.

llvm-svn: 185580
2013-07-03 20:54:09 +00:00
Daniel Malea fb7ace71cf Remove @expectedFailureGcc from TestInlineStepping as function prologue bug is not reproducible anymore.
llvm-svn: 185579
2013-07-03 20:51:44 +00:00
Roman Divacky b6debb6ab8 Add support for TF/TC modes available on eg. PowerPC64.
llvm-svn: 185578
2013-07-03 20:48:06 +00:00
Manman Ren 825e8e41ad Update testing cases to check dwarf-2 for Darwin.
llvm-svn: 185577
2013-07-03 20:45:07 +00:00
Daniel Malea cb3ded043c Skip Test-rdar-9974002 with Clang 3.4 (due to llvm.org/pr16214)
- should resolve remaining failures on clang buildbot

llvm-svn: 185576
2013-07-03 20:44:40 +00:00