platform/upstream/llvm.git
11 years agoUse cstdio instead of stdio.h
Dmitri Gribenko [Mon, 19 Aug 2013 16:14:33 +0000 (16:14 +0000)]
Use cstdio instead of stdio.h

llvm-svn: 188678

11 years ago[analyzer] Fix inefficiency in dead symbol removal
Pavel Labath [Mon, 19 Aug 2013 15:23:34 +0000 (15:23 +0000)]
[analyzer] Fix inefficiency in dead symbol removal

Summary:
ScanReachableSymbols uses a "visited" set to avoid scanning the same object
twice. However, it did not use the optimization for LazyCompoundVal objects,
which resulted in exponential complexity for long chains of temporary objects.
Adding this resulted in a decrease of analysis time from >3h to 3 seconds for
some files.

Reviewers: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1398

llvm-svn: 188677

11 years agoThumb2 add immediate alias for SP
Mihai Popa [Mon, 19 Aug 2013 15:02:25 +0000 (15:02 +0000)]
Thumb2 add immediate alias for SP

The Thumb2 add immediate is in fact defined for SP. The manual is misleading as it points to a different section for add immediate with SP, however the encoding is the same as for add immediate with register only with the SP operand hard coded. As such add immediate with SP and add immediate with register can safely be treated as the same instruction.

All the patch does is adjust a register constraint on an instruction alias.

llvm-svn: 188676

11 years agoRe-apply r188666
Alexey Samsonov [Mon, 19 Aug 2013 13:59:22 +0000 (13:59 +0000)]
Re-apply r188666

llvm-svn: 188675

11 years agoAdd dependencies on TransformUtils library in preparation for re-applying r188666
Alexey Samsonov [Mon, 19 Aug 2013 13:58:56 +0000 (13:58 +0000)]
Add dependencies on TransformUtils library in preparation for re-applying r188666

llvm-svn: 188674

11 years agoAVX-512: added arithmetic and logical operations.
Elena Demikhovsky [Mon, 19 Aug 2013 13:26:14 +0000 (13:26 +0000)]
AVX-512: added arithmetic and logical operations.
ADD, SUB, MUL integer and FP types. OR, AND, XOR.
Added embeded broadcast form for these instructions.

llvm-svn: 188673

11 years agoFix -Wcovered-switch-default warning from r188664
Alexey Samsonov [Mon, 19 Aug 2013 13:07:12 +0000 (13:07 +0000)]
Fix -Wcovered-switch-default warning from r188664

llvm-svn: 188672

11 years ago[SystemZ] Add negative integer absolute (load negative)
Richard Sandiford [Mon, 19 Aug 2013 12:56:58 +0000 (12:56 +0000)]
[SystemZ] Add negative integer absolute (load negative)

For now this matches the equivalent of (neg (abs ...)), which did hit a few
times in projects/test-suite.  We should probably also match cases where
absolute-like selects are used with reversed arguments.

llvm-svn: 188671

11 years ago[SystemZ] Add integer absolute (load positive)
Richard Sandiford [Mon, 19 Aug 2013 12:48:54 +0000 (12:48 +0000)]
[SystemZ] Add integer absolute (load positive)

llvm-svn: 188670

11 years ago[SystemZ] Add support for sibling calls
Richard Sandiford [Mon, 19 Aug 2013 12:42:31 +0000 (12:42 +0000)]
[SystemZ] Add support for sibling calls

This first cut is pretty conservative.  The final argument register (R6)
is call-saved, so we would need to make sure that the R6 argument to a
sibling call is the same as the R6 argument to the calling function,
which seems worth keeping as a separate patch.

Saying that integer truncations are free means that we no longer
use the extending instructions LGF and LLGF for spills in int-conv-09.ll
and int-conv-10.ll.  Instead we treat the registers as 64 bits wide and
truncate them to 32-bits where necessary.  I think it's unlikely we'd
use LGF and LLGF for spills in other situations for the same reason,
so I'm removing the tests rather than replacing them.  The associated
code is generic and applies to many more instructions than just
LGF and LLGF, so there is no corresponding code removal.

llvm-svn: 188669

11 years agoclang/Driver: [PR12920] Don't forward any -W arguments to gcc-as and gcc-ld.
NAKAMURA Takumi [Mon, 19 Aug 2013 11:51:51 +0000 (11:51 +0000)]
clang/Driver: [PR12920] Don't forward any -W arguments to gcc-as and gcc-ld.

AFAIK, there are no -W options for gcc-as and gcc-ld.
It caused failure to build clang with gcc-4.7 on cygwin.

FIXME: Could we recategorize Options for gcc-as and gcc-ld?
llvm-svn: 188668

11 years agoRevert r188666: it breaks the buildbots
Alexey Samsonov [Mon, 19 Aug 2013 11:42:54 +0000 (11:42 +0000)]
Revert r188666: it breaks the buildbots

llvm-svn: 188667

11 years agoFix PR16768: properly report malformed sanitizer blacklist file contents
Alexey Samsonov [Mon, 19 Aug 2013 10:41:30 +0000 (10:41 +0000)]
Fix PR16768: properly report malformed sanitizer blacklist file contents

llvm-svn: 188666

11 years agoclang-format: Fix return type line break decision.
Daniel Jasper [Mon, 19 Aug 2013 10:16:18 +0000 (10:16 +0000)]
clang-format: Fix return type line break decision.

This accidentally introduced by r186077, as function names were not
correctly recognized in templated declarations.

Before:
  template <class TemplateIt>
  SomeReturnType
  SomeFunction(TemplateIt begin, TemplateIt end, TemplateIt* stop) {}

After:
  template <class TemplateIt>
  SomeReturnType SomeFunction(TemplateIt begin, TemplateIt end,
                              TemplateIt* stop) {}

llvm-svn: 188665

11 years agoXCore target: Add target specific EmitVAArg
Robert Lytton [Mon, 19 Aug 2013 09:46:39 +0000 (09:46 +0000)]
XCore target: Add target specific EmitVAArg

This is so aggregates can be passed as var args too.

llvm-svn: 188664

11 years agoXCore target: correct test layout
Robert Lytton [Mon, 19 Aug 2013 09:46:32 +0000 (09:46 +0000)]
XCore target: correct test layout

llvm-svn: 188663

11 years agoExplicitly specify triple in driver test from r188660
Alexey Samsonov [Mon, 19 Aug 2013 09:45:19 +0000 (09:45 +0000)]
Explicitly specify triple in driver test from r188660

llvm-svn: 188662

11 years agoclang/test/CodeGenObjC/2010-02-09-DbgSelf.m: Tweak for -Asserts in r188651.
NAKAMURA Takumi [Mon, 19 Aug 2013 09:37:23 +0000 (09:37 +0000)]
clang/test/CodeGenObjC/2010-02-09-DbgSelf.m: Tweak for -Asserts in r188651.

llvm-svn: 188661

11 years agoMove SanitizerArgs to the clang Driver
Alexey Samsonov [Mon, 19 Aug 2013 09:14:21 +0000 (09:14 +0000)]
Move SanitizerArgs to the clang Driver

Summary:
This change turns SanitizerArgs into high-level options
stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser.

Reviewers: rsmith

Reviewed By: rsmith

CC: chandlerc, eugenis, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1341

llvm-svn: 188660

11 years agoOmit llvm:: before makeArrayRef. We have using directive in this file.
Robert Wilhelm [Mon, 19 Aug 2013 07:57:02 +0000 (07:57 +0000)]
Omit llvm:: before makeArrayRef. We have using directive in this file.

llvm-svn: 188659

11 years agoComment parsing tests: move tests where they belong
Dmitri Gribenko [Mon, 19 Aug 2013 07:13:02 +0000 (07:13 +0000)]
Comment parsing tests: move tests where they belong

Move C++-specific tests that were checking if we attach a base class comment to
a derived class to an existing test comment-to-html-xml-conversion.cpp.  Note
that the original testing approach was not actually testing the class--comment
relationship.  It only checked that we attached the comment *somewhere*.

The rest of subclass-comment.mm should be also moved elsewhere.

llvm-svn: 188658

11 years agoComment parsing tests: move tests where they belong
Dmitri Gribenko [Mon, 19 Aug 2013 07:10:13 +0000 (07:10 +0000)]
Comment parsing tests: move tests where they belong

comment-misc-tags.m is mostly about miscellaneous Doxygen tags.  Move out tests
that check if the comment is attached to an ObjC decl.  Because the exitsting
test for this is in C++ (annotate-comments.cpp), create a new test --
annotate-comments-objc.m.

The rest of comment-misc-tags.m should be also moved elsewhere.

llvm-svn: 188657

11 years agoAdds missing TLI check for library simplification of
Michael Kuperstein [Mon, 19 Aug 2013 06:55:47 +0000 (06:55 +0000)]
Adds missing TLI check for library simplification of
* pow(x, 0.5) -> fabs(sqrt(x))
* pow(2.0, x) -> exp2(x)

llvm-svn: 188656

11 years agoAdd ExpandFloatOp_FCOPYSIGN to handle ppcf128-related expansions
Hal Finkel [Mon, 19 Aug 2013 06:55:37 +0000 (06:55 +0000)]
Add ExpandFloatOp_FCOPYSIGN to handle ppcf128-related expansions

We had previously been asserting when faced with a FCOPYSIGN f64, ppcf128 node
because there was no way to expand the FCOPYSIGN node. Because ppcf128 is the
sum of two doubles, and the first double must have the larger magnitude, we
can take the sign from the first double. As a result, in addition to fixing the
crash, this is also an optimization.

llvm-svn: 188655

11 years agoAVX-512: compiler intrinsics
Elena Demikhovsky [Mon, 19 Aug 2013 06:55:01 +0000 (06:55 +0000)]
AVX-512: compiler intrinsics

llvm-svn: 188654

11 years agoAdd the PPC fcpsgn instruction
Hal Finkel [Mon, 19 Aug 2013 05:01:02 +0000 (05:01 +0000)]
Add the PPC fcpsgn instruction

Modern PPC cores support a floating-point copysign instruction, and we can use
this to lower the FCOPYSIGN node (which is created from calls to the libm
copysign function). A couple of extra patterns are necessary because the
operand types of FCOPYSIGN need not agree.

llvm-svn: 188653

11 years agoFix indentation. No functional change.
Craig Topper [Mon, 19 Aug 2013 03:41:04 +0000 (03:41 +0000)]
Fix indentation. No functional change.

llvm-svn: 188652

11 years agoDebugInfo: Do not include line/file info for artificial parameters & parameters of...
David Blaikie [Mon, 19 Aug 2013 03:37:48 +0000 (03:37 +0000)]
DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions

llvm-svn: 188651

11 years agollvm-dwarfdump: Do not include address offsets for attributes, only for tags
David Blaikie [Mon, 19 Aug 2013 03:36:23 +0000 (03:36 +0000)]
llvm-dwarfdump: Do not include address offsets for attributes, only for tags

This reduces the noise in diffs making it more likely that, at least for
LLVM revision-over-revision, diffs will actually yield usable results.

This is consistent with objdump's DWARF dumping behavior.

llvm-svn: 188650

11 years agoDebugInfo: don't emit zero-length names for parameters
David Blaikie [Mon, 19 Aug 2013 03:34:03 +0000 (03:34 +0000)]
DebugInfo: don't emit zero-length names for parameters

We check this in many/all other cases, just missed this one it seems.
Perhaps it'd be worth unifying this so we never emit zero-length
DW_AT_names.

llvm-svn: 188649

11 years agoMake the version of Stmt::operator new that takes ASTContext* call the ASTContext...
Craig Topper [Mon, 19 Aug 2013 03:11:34 +0000 (03:11 +0000)]
Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.

llvm-svn: 188648

11 years agoSema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction
David Majnemer [Mon, 19 Aug 2013 02:43:08 +0000 (02:43 +0000)]
Sema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction

Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.

Reviewers: eli.friedman, doug.gregor, majnemer

Reviewed By: majnemer

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1434

llvm-svn: 188647

11 years agoRemove SpecialCaseList::findCategory.
Peter Collingbourne [Mon, 19 Aug 2013 00:24:20 +0000 (00:24 +0000)]
Remove SpecialCaseList::findCategory.

It turned out that I didn't need this for DFSan.

llvm-svn: 188646

11 years agoRevert r188644 to unbreak buildbots.
Craig Topper [Sun, 18 Aug 2013 20:38:37 +0000 (20:38 +0000)]
Revert r188644 to unbreak buildbots.

llvm-svn: 188645

11 years agoRemove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext...
Craig Topper [Sun, 18 Aug 2013 20:03:21 +0000 (20:03 +0000)]
Remove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext& version.

llvm-svn: 188644

11 years agoARM: make sure we keep inline asm operands tied.
Tim Northover [Sun, 18 Aug 2013 18:06:03 +0000 (18:06 +0000)]
ARM: make sure we keep inline asm operands tied.

When patching inlineasm nodes to use GPRPair for 64-bit values, we
were dropping the information that two operands were tied, which
effectively broke the live-interval of vregs affected.

llvm-svn: 188643

11 years agoRevert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not...
David Blaikie [Sun, 18 Aug 2013 17:59:12 +0000 (17:59 +0000)]
Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""

This reverts commit r188600.

r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.

llvm-svn: 188642

11 years agoRemove throw() from Stmt::operator new so the compiler will omit the null check on...
Craig Topper [Sun, 18 Aug 2013 17:45:38 +0000 (17:45 +0000)]
Remove throw() from Stmt::operator new so the compiler will omit the null check on the result since ASTContext allocator won't return null.

llvm-svn: 188641

11 years agoDebugInfo: Avoid duplicating types that may be created during the process of creating...
David Blaikie [Sun, 18 Aug 2013 17:36:19 +0000 (17:36 +0000)]
DebugInfo: Avoid duplicating types that may be created during the process of creating their context

A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).

There are other ways we could consider addressing this (see FIXME).

llvm-svn: 188640

11 years agoDebugInfo: Don't emit vbase 'containing types' for context chain limited types
David Blaikie [Sun, 18 Aug 2013 16:55:33 +0000 (16:55 +0000)]
DebugInfo: Don't emit vbase 'containing types' for context chain limited types

Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)

llvm-svn: 188639

11 years agoInitHeaderSearch.cpp: [Cygwin] Add 4.7.3.
NAKAMURA Takumi [Sun, 18 Aug 2013 15:03:03 +0000 (15:03 +0000)]
InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.

llvm-svn: 188638

11 years agoAVX-512: Added VMOVD, VMOVQ, VMOVSS, VMOVSD instructions.
Elena Demikhovsky [Sun, 18 Aug 2013 13:08:57 +0000 (13:08 +0000)]
AVX-512: Added VMOVD, VMOVQ, VMOVSS, VMOVSD instructions.

llvm-svn: 188637

11 years agoMake expression allocation methods use a 'const' reference to the ASTContext since...
Craig Topper [Sun, 18 Aug 2013 10:09:15 +0000 (10:09 +0000)]
Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference.

llvm-svn: 188636

11 years agoIt appears that glibc 2.13 has the same thread descriptor size as 2.11,
Chandler Carruth [Sun, 18 Aug 2013 10:04:51 +0000 (10:04 +0000)]
It appears that glibc 2.13 has the same thread descriptor size as 2.11,
bump up the inflection point to 2.14. If someone can tell me how to
actually figure out value for this, that would be awesome.

Anyways, this takes me to one ASan failure, one LSan failure, and three
TSan failures for 'check-all' on Linux.

llvm-svn: 188635

11 years agoMake more of the lowering helpers static. Also use MVT instead of EVT in a couple...
Craig Topper [Sun, 18 Aug 2013 08:53:01 +0000 (08:53 +0000)]
Make more of the lowering helpers static. Also use MVT instead of EVT in a couple places.

llvm-svn: 188629

11 years agoRevert r188369 (and r188455) which breaks the build on at least some
Chandler Carruth [Sun, 18 Aug 2013 08:47:06 +0000 (08:47 +0000)]
Revert r188369 (and r188455) which breaks the build on at least some
Linux systems. I've replied on the original commit thread with details
of the problem.

llvm-svn: 188628

11 years agodocs: command guide: cleanups, no text changes
Dmitri Gribenko [Sun, 18 Aug 2013 08:32:32 +0000 (08:32 +0000)]
docs: command guide: cleanups, no text changes

llvm-svn: 188627

11 years agoRemove unused stdio.h includes
Dmitri Gribenko [Sun, 18 Aug 2013 08:29:51 +0000 (08:29 +0000)]
Remove unused stdio.h includes

llvm-svn: 188626

11 years agolibclang: cleanup unused includes in public header
Dmitri Gribenko [Sun, 18 Aug 2013 07:57:43 +0000 (07:57 +0000)]
libclang: cleanup unused includes in public header

llvm-svn: 188625

11 years agoRename "polly-test" in the document and script.
Logan Chien [Sun, 18 Aug 2013 07:33:28 +0000 (07:33 +0000)]
Rename "polly-test" in the document and script.

The Makefile rule "polly-test" has been renamed to
"check-polly" in r182171.  This CL updates the document and
the automatic build script.

llvm-svn: 188624

11 years agoFix a use-after-free found in libclang when doing code completion. The
Chandler Carruth [Sun, 18 Aug 2013 07:20:52 +0000 (07:20 +0000)]
Fix a use-after-free found in libclang when doing code completion. The
loop processing the candidates can cause new declerations to be added to
the context, invalidating lookup_result. To avoid that, make a copy of
the list of declarations to iterate over.

I don't have a way to check in a test case for this as it involves
a giant pile of source code and a generated PCH file used to accelerate
code completion, all of this running under ASan.

llvm-svn: 188623

11 years agoDebugInfo: don't require full definitions for friend classes
David Blaikie [Sun, 18 Aug 2013 04:50:23 +0000 (04:50 +0000)]
DebugInfo: don't require full definitions for friend classes

Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).

llvm-svn: 188622

11 years ago{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
NAKAMURA Takumi [Sun, 18 Aug 2013 03:48:57 +0000 (03:48 +0000)]
{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.

llvm-svn: 188621

11 years agoMakefile.rules: Avoid -fomit-frame-pointer also on cygwin due to PR14646.
NAKAMURA Takumi [Sun, 18 Aug 2013 03:38:40 +0000 (03:38 +0000)]
Makefile.rules: Avoid -fomit-frame-pointer also on cygwin due to PR14646.

llvm-svn: 188620

11 years agoMakefile.rules: Simplify nested if(s) on OmitFramePointer.
NAKAMURA Takumi [Sun, 18 Aug 2013 02:46:21 +0000 (02:46 +0000)]
Makefile.rules: Simplify nested if(s) on OmitFramePointer.

llvm-svn: 188619

11 years agoPort the detection of zlib from the main autoconf system to the sample
Chandler Carruth [Sun, 18 Aug 2013 01:55:15 +0000 (01:55 +0000)]
Port the detection of zlib from the main autoconf system to the sample
project's autoconf. This is the last of the missing optional checks used
by libSupport that seemed to be missing from the sample project, but
I could easily have missed some as this was done by inspection when
Craig asked me to add the terminfo support.

llvm-svn: 188618

11 years agoAdd support for linking librt and using clock_gettime to the sample
Chandler Carruth [Sun, 18 Aug 2013 01:46:34 +0000 (01:46 +0000)]
Add support for linking librt and using clock_gettime to the sample
autoconf setup.

llvm-svn: 188617

11 years agoUpdate the sample project autoconf setup to include support for
Chandler Carruth [Sun, 18 Aug 2013 01:43:57 +0000 (01:43 +0000)]
Update the sample project autoconf setup to include support for
detecting terminfo. Requested by Craig Topper, and probably should be
done much more systematically.

llvm-svn: 188616

11 years agoGo through the really awkward dance required to delete the memory
Chandler Carruth [Sun, 18 Aug 2013 01:20:32 +0000 (01:20 +0000)]
Go through the really awkward dance required to delete the memory
allocated by setupterm. Without this, some folks are seeing leaked
memory whenever this routine is called more than once. Thanks to Craig
Topper for the report.

llvm-svn: 188615

11 years agoFix SCEVExpander creating distinct duplicate PHI entries
Hal Finkel [Sun, 18 Aug 2013 00:16:23 +0000 (00:16 +0000)]
Fix SCEVExpander creating distinct duplicate PHI entries

This fixes SCEVExpander so that it does not create multiple distinct induction
variables for duplicate PHI entries. Specifically, given some code like this:

do.body6:                                         ; preds = %do.body6, %do.body6, %if.then5
  %end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ]
...

Note that it is legal to have multiple entries for a basic block so long as the
associated value is the same. So the above input is okay, but expanding an
AddRec in this loop could produce code like this:

do.body6:                                         ; preds = %do.body6, %do.body6, %if.then5
  %indvar = phi i64 [ %indvar.next, %do.body6 ], [ %indvar.next1, %do.body6 ], [ 0, %if.then5 ]
  %end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ]
...
  %indvar.next = add i64 %indvar, 1
  %indvar.next1 = add i64 %indvar, 1

And this is not legal because there are two PHI entries for %do.body6 each with
a distinct value.

Unfortunately, I don't have an in-tree test case.

llvm-svn: 188614

11 years agoFix endian conditions on Solaris. From Alexander Esilevich.
Joerg Sonnenberger [Sat, 17 Aug 2013 22:32:10 +0000 (22:32 +0000)]
Fix endian conditions on Solaris. From Alexander Esilevich.

llvm-svn: 188613

11 years agoPR16927: Don't assert (or, previously, skip) static data members of enumeration type
David Blaikie [Sat, 17 Aug 2013 20:01:53 +0000 (20:01 +0000)]
PR16927: Don't assert (or, previously, skip) static data members of enumeration type

llvm-svn: 188612

11 years agoRevert "cpp11-migrate: Add a class to support include directives modifications"
Guillaume Papin [Sat, 17 Aug 2013 19:04:56 +0000 (19:04 +0000)]
Revert "cpp11-migrate: Add a class to support include directives modifications"

This reverts commit r188610.

Issue with the absolute include paths not found in the unit tests on the Windows
bots. Needs investigation.

llvm-svn: 188611

11 years agocpp11-migrate: Add a class to support include directives modifications
Guillaume Papin [Sat, 17 Aug 2013 18:48:31 +0000 (18:48 +0000)]
cpp11-migrate: Add a class to support include directives modifications

The IncludeDirectives class helps with detecting and modifying #include
directives. For now it allows the users to add angled-includes in a source file.
This is a start for this class that will evolve in the future to add more
functionality.

llvm-svn: 188610

11 years agoFix the name and the type of the argument for intrinisc
Juergen Ributzka [Sat, 17 Aug 2013 16:40:09 +0000 (16:40 +0000)]
Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.

This fixes bug PR 16581 and rdar:14747994.

llvm-svn: 188609

11 years agoThe vbroadcastsi256 intrinsic does not exactly resemble the GCC
Juergen Ributzka [Sat, 17 Aug 2013 16:38:37 +0000 (16:38 +0000)]
The vbroadcastsi256 intrinsic does not exactly resemble the GCC
builtin. The GCC builtin expects the arguments to be passed by val,
whereas the LLVM intrinsic expects a pointer instead.

This is related to PR 16581 and rdar:14747994.

llvm-svn: 188608

11 years ago+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys...
Anton Yartsev [Sat, 17 Aug 2013 15:43:19 +0000 (15:43 +0000)]
+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys perl ports.

llvm-svn: 188607

11 years agoRecognize NetBSD's terminfo implementation.
Joerg Sonnenberger [Sat, 17 Aug 2013 11:06:00 +0000 (11:06 +0000)]
Recognize NetBSD's terminfo implementation.

llvm-svn: 188606

11 years agoPR 16899: Do not modify the basic block using the iterator, but keep the
Joerg Sonnenberger [Sat, 17 Aug 2013 11:04:47 +0000 (11:04 +0000)]
PR 16899: Do not modify the basic block using the iterator, but keep the
next value. This avoids crashes due to invalidation.

Patch by Joey Gouly.

llvm-svn: 188605

11 years agoFollow-up to the checkin of r188532 -- make sure that
Jason Molenda [Sat, 17 Aug 2013 03:39:52 +0000 (03:39 +0000)]
Follow-up to the checkin of r188532 -- make sure that
we've read the ObjectFile's Symtab before we change the
File addresses in the Sections.

llvm-svn: 188604

11 years agoFix indentation.
Richard Smith [Sat, 17 Aug 2013 00:51:11 +0000 (00:51 +0000)]
Fix indentation.

llvm-svn: 188603

11 years agoRefactor all diagnosing of TypoCorrections through a common function, in
Richard Smith [Sat, 17 Aug 2013 00:46:16 +0000 (00:46 +0000)]
Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.

llvm-svn: 188602

11 years agoRename libIDE to libIndex.
Argyrios Kyrtzidis [Sat, 17 Aug 2013 00:40:41 +0000 (00:40 +0000)]
Rename libIDE to libIndex.

Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.

llvm-svn: 188601

11 years agoRevert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the...
David Blaikie [Sat, 17 Aug 2013 00:06:55 +0000 (00:06 +0000)]
Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"

This reverts commit r188576.

Reverting while I investigate a selfhosting buildbot failure on Darwin.

llvm-svn: 188600

11 years agoR600: Fix possible use of an uninitialized variable
Tom Stellard [Sat, 17 Aug 2013 00:06:51 +0000 (00:06 +0000)]
R600: Fix possible use of an uninitialized variable

Spotted by Nick Lewycky!

llvm-svn: 188599

11 years agoR600: Expand vector FRINT ops
Tom Stellard [Fri, 16 Aug 2013 23:51:33 +0000 (23:51 +0000)]
R600: Expand vector FRINT ops

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188598

11 years agoR600: Expand vector FFLOOR ops
Tom Stellard [Fri, 16 Aug 2013 23:51:29 +0000 (23:51 +0000)]
R600: Expand vector FFLOOR ops

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188597

11 years agoR600: Expand vector float operations for both SI and R600
Tom Stellard [Fri, 16 Aug 2013 23:51:24 +0000 (23:51 +0000)]
R600: Expand vector float operations for both SI and R600

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 188596

11 years agoARM: Properly constrain comparison fastisel register classes.
Jim Grosbach [Fri, 16 Aug 2013 23:37:40 +0000 (23:37 +0000)]
ARM: Properly constrain comparison fastisel register classes.

Ongoing 'make the verifier happy' improvements to ARM fast-isel.

rdar://12594152

llvm-svn: 188595

11 years agoARM: Fast-isel register class constrain for extends.
Jim Grosbach [Fri, 16 Aug 2013 23:37:36 +0000 (23:37 +0000)]
ARM: Fast-isel register class constrain for extends.

Properly constrain the operand register class for instructions used
in [sz]ext expansion. Update more tests to use the verifier now that
we're getting the register classes correct.

rdar://12594152

llvm-svn: 188594

11 years agoARM: Fix more fast-isel verifier failures.
Jim Grosbach [Fri, 16 Aug 2013 23:37:31 +0000 (23:37 +0000)]
ARM: Fix more fast-isel verifier failures.

Teach the generic instruction selection helper functions to constrain
the register classes of their input operands. For non-physical register
references, the generic code needs to be careful not to mess that up
when replacing references to result registers. As the comment indicates
for MachineRegisterInfo::replaceRegWith(), it's important to call
constrainRegClass() first.

rdar://12594152

llvm-svn: 188593

11 years agoARM: Clean up fast-isel machine verifier errors.
Jim Grosbach [Fri, 16 Aug 2013 23:37:23 +0000 (23:37 +0000)]
ARM: Clean up fast-isel machine verifier errors.

Lots of machine verifier errors result from using a plain GPR regclass
for incoming argument copies. A more restrictive rGPR class is more
appropriate since it more accurately represents what's happening, plus
it lines up better with isel later on so the verifier is happier.
Reduces the number of ARM fast-isel tests not running with the verifier
enabled by over half.

rdar://12594152

llvm-svn: 188592

11 years agoObjectiveC migrator: Add some more routines
Fariborz Jahanian [Fri, 16 Aug 2013 23:35:05 +0000 (23:35 +0000)]
ObjectiveC migrator: Add some more routines
for future work. No change otherwise.

llvm-svn: 188591

11 years ago[lit] Rewrite TODO list, and elaborate on some things.
Daniel Dunbar [Fri, 16 Aug 2013 23:30:23 +0000 (23:30 +0000)]
[lit] Rewrite TODO list, and elaborate on some things.

 - If anyone is interested in lit's feature set, I'd appreciate any comments on
   the elaborated items.

llvm-svn: 188590

11 years ago[typo] An LLVM.
Daniel Dunbar [Fri, 16 Aug 2013 23:30:19 +0000 (23:30 +0000)]
[typo] An LLVM.

llvm-svn: 188589

11 years agoDon't reject attribute used in an "extern const" variable definition.
Rafael Espindola [Fri, 16 Aug 2013 23:18:50 +0000 (23:18 +0000)]
Don't reject attribute used in an "extern const" variable definition.

Before this patch we would warn and drop the attribute in
extern const char test3[] __attribute__((used)) = "";

llvm-svn: 188588

11 years agoUse the number of parameters in the actual method or function to determine the CallEf...
Ted Kremenek [Fri, 16 Aug 2013 23:14:22 +0000 (23:14 +0000)]
Use the number of parameters in the actual method or function to determine the CallEffects size.

llvm-svn: 188587

11 years agoFix a subtle difference between running clang vs llc for mips16.
Reed Kotler [Fri, 16 Aug 2013 23:05:18 +0000 (23:05 +0000)]
Fix a subtle difference between running clang vs llc for mips16.
This regards how mips16 is viewed. It's not really a target type but
there has always been a target for it in the td files. It's more properly
-mcpu=mips32 -mattr=+mips16 . This is how clang treats it but we have
always had the -mcpu=mips16 which I probably should delete now but it will
require updating all the .ll test cases for mips16. In this case it changed
how we decide if we have a count bits instruction and whether instruction
lowering should then expand ctlz. Now that we have dual mode compilation,
-mattr=+mips16 really just indicates the inital processor mode that
we are compiling for. (It is also possible to have -mcpu=64 -mattr=+mips16
but as far as I know, nobody has even built such a processor, though there
is an architecture manual for this).

llvm-svn: 188586

11 years agoDebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the...
David Blaikie [Fri, 16 Aug 2013 22:52:07 +0000 (22:52 +0000)]
DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines

Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.

llvm-svn: 188585

11 years agoActually, use GNU inline asm for cpuid with clang
Reid Kleckner [Fri, 16 Aug 2013 22:42:42 +0000 (22:42 +0000)]
Actually, use GNU inline asm for cpuid with clang

Clang doesn't support the MSVC __cpuid intrinsic yet, and fixing that is
blocked on some fairly complicated issues.

llvm-svn: 188584

11 years agoI'm told that != is not ==
Chris Lattner [Fri, 16 Aug 2013 22:29:44 +0000 (22:29 +0000)]
I'm told that != is not ==

llvm-svn: 188583

11 years agoallow != to compare PointerUnion, we already support ==.
Chris Lattner [Fri, 16 Aug 2013 22:09:02 +0000 (22:09 +0000)]
allow != to compare PointerUnion, we already support ==.

llvm-svn: 188582

11 years agoRetainCountChecker: Replace some loops with std:: algorithms.
Benjamin Kramer [Fri, 16 Aug 2013 21:57:14 +0000 (21:57 +0000)]
RetainCountChecker: Replace some loops with std:: algorithms.

llvm-svn: 188581

11 years agoReplace some DenseMap keys with simpler structures that don't need another DenseMapIn...
Benjamin Kramer [Fri, 16 Aug 2013 21:57:06 +0000 (21:57 +0000)]
Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.

llvm-svn: 188580

11 years agoAdd difference_type to ImmutableMap/Set iterators so they have a complete set of...
Benjamin Kramer [Fri, 16 Aug 2013 21:55:56 +0000 (21:55 +0000)]
Add difference_type to ImmutableMap/Set iterators so they have a complete set of typedefs.

llvm-svn: 188579

11 years agoRevert r188574. Turns out it isn't needed.
Ted Kremenek [Fri, 16 Aug 2013 21:54:22 +0000 (21:54 +0000)]
Revert r188574.  Turns out it isn't needed.

llvm-svn: 188578

11 years agoDebugInfo: Allow the addition of other (such as static data) members to a record...
David Blaikie [Fri, 16 Aug 2013 20:42:14 +0000 (20:42 +0000)]
DebugInfo: Allow the addition of other (such as static data) members to a record type after construction

Plus a type cleanup & minor fix to enumerate members of declarations.

llvm-svn: 188577

11 years agoDebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable...
David Blaikie [Fri, 16 Aug 2013 20:40:29 +0000 (20:40 +0000)]
DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class

This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.

llvm-svn: 188576

11 years agoDebugInfo: Contrain the record type parameter for CollectRecordFields
David Blaikie [Fri, 16 Aug 2013 20:40:25 +0000 (20:40 +0000)]
DebugInfo: Contrain the record type parameter for CollectRecordFields

This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.

llvm-svn: 188575

11 years agoNeed summary info. about arguments to
Fariborz Jahanian [Fri, 16 Aug 2013 20:23:36 +0000 (20:23 +0000)]
Need summary info. about arguments to
CF functions coming from static analyzer API.

llvm-svn: 188574