Commit Graph

155867 Commits

Author SHA1 Message Date
Mihai Popa 4a9df8a768 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
2013-08-19 15:02:25 +00:00
Alexey Samsonov 0c127d7c71 Re-apply r188666
llvm-svn: 188675
2013-08-19 13:59:22 +00:00
Alexey Samsonov f656e1783b Add dependencies on TransformUtils library in preparation for re-applying r188666
llvm-svn: 188674
2013-08-19 13:58:56 +00:00
Elena Demikhovsky 1490c5eb5b 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
2013-08-19 13:26:14 +00:00
Alexey Samsonov eb4690c76c Fix -Wcovered-switch-default warning from r188664
llvm-svn: 188672
2013-08-19 13:07:12 +00:00
Richard Sandiford 784a580312 [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
2013-08-19 12:56:58 +00:00
Richard Sandiford 4b89705490 [SystemZ] Add integer absolute (load positive)
llvm-svn: 188670
2013-08-19 12:48:54 +00:00
Richard Sandiford 709bda66b9 [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
2013-08-19 12:42:31 +00:00
NAKAMURA Takumi 053704f959 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
2013-08-19 11:51:51 +00:00
Alexey Samsonov bca169c185 Revert r188666: it breaks the buildbots
llvm-svn: 188667
2013-08-19 11:42:54 +00:00
Alexey Samsonov 828e5e141d Fix PR16768: properly report malformed sanitizer blacklist file contents
llvm-svn: 188666
2013-08-19 10:41:30 +00:00
Daniel Jasper 5364306e12 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
2013-08-19 10:16:18 +00:00
Robert Lytton 7d1db15ae1 XCore target: Add target specific EmitVAArg
This is so aggregates can be passed as var args too.

llvm-svn: 188664
2013-08-19 09:46:39 +00:00
Robert Lytton a7d1d865e5 XCore target: correct test layout
llvm-svn: 188663
2013-08-19 09:46:32 +00:00
Alexey Samsonov 22735c8a57 Explicitly specify triple in driver test from r188660
llvm-svn: 188662
2013-08-19 09:45:19 +00:00
NAKAMURA Takumi 7127300e41 clang/test/CodeGenObjC/2010-02-09-DbgSelf.m: Tweak for -Asserts in r188651.
llvm-svn: 188661
2013-08-19 09:37:23 +00:00
Alexey Samsonov 609213f9eb 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
2013-08-19 09:14:21 +00:00
Robert Wilhelm 88e024969b Omit llvm:: before makeArrayRef. We have using directive in this file.
llvm-svn: 188659
2013-08-19 07:57:02 +00:00
Dmitri Gribenko b3e8172e9e 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
2013-08-19 07:13:02 +00:00
Dmitri Gribenko 46dd39ed3c 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
2013-08-19 07:10:13 +00:00
Michael Kuperstein 4bb3f8f2e4 Adds missing TLI check for library simplification of
* pow(x, 0.5) -> fabs(sqrt(x)) 
* pow(2.0, x) -> exp2(x)

llvm-svn: 188656
2013-08-19 06:55:47 +00:00
Hal Finkel e4eb78188c 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
2013-08-19 06:55:37 +00:00
Elena Demikhovsky 2b3ba7480e AVX-512: compiler intrinsics
llvm-svn: 188654
2013-08-19 06:55:01 +00:00
Hal Finkel dbc78e1f73 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
2013-08-19 05:01:02 +00:00
Craig Topper 964157146d Fix indentation. No functional change.
llvm-svn: 188652
2013-08-19 03:41:04 +00:00
David Blaikie 7fceebf5aa DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions
llvm-svn: 188651
2013-08-19 03:37:48 +00:00
David Blaikie 175b0b9a3b 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
2013-08-19 03:36:23 +00:00
David Blaikie 715528be0b 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
2013-08-19 03:34:03 +00:00
Craig Topper e691fce6e4 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
2013-08-19 03:11:34 +00:00
David Majnemer af71402e7b 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
2013-08-19 02:43:08 +00:00
Peter Collingbourne 03c3324ccd Remove SpecialCaseList::findCategory.
It turned out that I didn't need this for DFSan.

llvm-svn: 188646
2013-08-19 00:24:20 +00:00
Craig Topper 048b883416 Revert r188644 to unbreak buildbots.
llvm-svn: 188645
2013-08-18 20:38:37 +00:00
Craig Topper 260f7e6893 Remove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext& version.
llvm-svn: 188644
2013-08-18 20:03:21 +00:00
Tim Northover 55349a29c6 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
2013-08-18 18:06:03 +00:00
David Blaikie 25b2085490 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
2013-08-18 17:59:12 +00:00
Craig Topper 5a050016bb 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
2013-08-18 17:45:38 +00:00
David Blaikie d278589329 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
2013-08-18 17:36:19 +00:00
David Blaikie adfbf993d6 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
2013-08-18 16:55:33 +00:00
NAKAMURA Takumi c96c699a16 InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.
llvm-svn: 188638
2013-08-18 15:03:03 +00:00
Elena Demikhovsky 3ce8dbbac2 AVX-512: Added VMOVD, VMOVQ, VMOVSS, VMOVSD instructions.
llvm-svn: 188637
2013-08-18 13:08:57 +00:00
Craig Topper 3793291d50 Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference.
llvm-svn: 188636
2013-08-18 10:09:15 +00:00
Chandler Carruth 6b8d17bf35 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
2013-08-18 10:04:51 +00:00
Craig Topper e6861c9ce5 Make more of the lowering helpers static. Also use MVT instead of EVT in a couple places.
llvm-svn: 188629
2013-08-18 08:53:01 +00:00
Chandler Carruth 022a3d4e88 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
2013-08-18 08:47:06 +00:00
Dmitri Gribenko 8cac835723 docs: command guide: cleanups, no text changes
llvm-svn: 188627
2013-08-18 08:32:32 +00:00
Dmitri Gribenko 8b2a3d1fea Remove unused stdio.h includes
llvm-svn: 188626
2013-08-18 08:29:51 +00:00
Dmitri Gribenko 96933de7f5 libclang: cleanup unused includes in public header
llvm-svn: 188625
2013-08-18 07:57:43 +00:00
Logan Chien f166ea6715 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
2013-08-18 07:33:28 +00:00
Chandler Carruth 7deaae76ec 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
2013-08-18 07:20:52 +00:00
David Blaikie 5043815a60 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
2013-08-18 04:50:23 +00:00