Commit Graph

48590 Commits

Author SHA1 Message Date
Daniel Sanders ab94b537d7 [mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from normal IR (i.e. not intrinsics)
Also corrected the definition of the intrinsics for these instructions (the
result register is also the first operand), and added intrinsics for bsel and
bseli to clang (they already existed in the backend).

These four operations are mostly equivalent to bsel, and bseli (the difference
is which operand is tied to the result). As a result some of the tests changed
as described below.

bitwise.ll:
- bsel.v test adapted so that the mask is unknown at compile-time. This stops
  it emitting bmnzi.b instead of the intended bsel.v.
- The bseli.b test now tests the right thing. Namely the case when one of the
  values is an uimm8, rather than when the condition is a uimm8 (which is
  covered by bmnzi.b)

compare.ll:
- bsel.v tests now (correctly) emits bmnz.v instead of bsel.v because this
  is the same operation (see MSA.txt).

i8.ll
- CHECK-DAG-ized test.
- bmzi.b test now (correctly) emits equivalent bmnzi.b with swapped operands
  because this is the same operation (see MSA.txt).
- bseli.b still emits bseli.b though because the immediate makes it
  distinguishable from bmnzi.b.

vec.ll:
- CHECK-DAG-ized test.
- bmz.v tests now (correctly) emits bmnz.v with swapped operands (see
  MSA.txt).
- bsel.v tests now (correctly) emits bmnz.v with swapped operands (see
  MSA.txt).

llvm-svn: 193693
2013-10-30 15:20:38 +00:00
Chad Rosier 4d55e6e0a4 [AArch64] Add support for NEON scalar floating-point compare instructions.
llvm-svn: 193692
2013-10-30 15:20:07 +00:00
Alp Toker b364428fca Avoid diagnosing twice on non-x86 targets
The PowerPC and ARM native builders spotted this.

llvm-svn: 193688
2013-10-30 15:07:10 +00:00
Daniel Sanders d74b130cc9 [mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. not intrinsics)
This required correcting the definition of the bins[lr]i intrinsics because
the result is also the first operand.

It also required removing the (arbitrary) check for 32-bit immediates in
MipsSEDAGToDAGISel::selectVSplat().

Currently using binsli.d with 2 bits set in the mask doesn't select binsli.d
because the constant is legalized into a ConstantPool. Similar things can
happen with binsri.d with more than 10 bits set in the mask. The resulting
code when this happens is correct but not optimal.

llvm-svn: 193687
2013-10-30 14:45:14 +00:00
Alp Toker 56cf2cb55a Fix triple / REQUIRES in test from r193685
llvm-svn: 193686
2013-10-30 14:38:32 +00:00
Alp Toker 45cf31f7d3 Recover instead of crashing on MS assembly when no target is loaded
It's possible to embed the frontend in applications that haven't initialized
backend targets so we need to handle this condition gracefully.

llvm-svn: 193685
2013-10-30 14:29:28 +00:00
Daniel Jasper 16fc754216 clang-format: Fix indenting corner case with comment and else.
Before:
  if (a) {
    f();
  }
      // or else ..
      else {
    g();
  }

After:
  if (a) {
    f();
  }
  // or else ..
  else {
    g();
  }

llvm-svn: 193684
2013-10-30 14:04:10 +00:00
Daniel Jasper 9885784d67 clang-format: Fix whitespaces in include directives.
Before (clang-format wouldn't change):
  #include  "a.h"
  #include<a>

After:
  #include "a.h"
  #include <a>

This fixes llvm.org/PR16151.

llvm-svn: 193683
2013-10-30 13:54:53 +00:00
Timur Iskhodzhanov 0201432a5e Make thunk this/return adjustment ABI-specific. Also, fix the return adjustment when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D2026

llvm-svn: 193679
2013-10-30 11:55:43 +00:00
Daniel Jasper 580da27616 clang-format: fix for \r\r\n produced in multiline block comments
Patch by Christopher Olsen. Thank you!

llvm-svn: 193678
2013-10-30 07:36:40 +00:00
Akira Hatanaka babd67e6ce [mips] Delete unused functions.
llvm-svn: 193674
2013-10-30 02:38:17 +00:00
Richard Smith 3876cc88ac PR17731: When determining whether a tag and a non-tag were declared in the same
scope, be careful about function-scope declarations (which are not declared in
their semantic context).

llvm-svn: 193671
2013-10-30 01:02:04 +00:00
Warren Hunt 7c55e7ef0e Minor efficiency refactor related to 193661. No functional change.
llvm-svn: 193665
2013-10-30 00:14:55 +00:00
Warren Hunt af41fcce0e Activating latent test case for r193661.
llvm-svn: 193664
2013-10-30 00:08:34 +00:00
Warren Hunt dbbc5dfd12 Fixing code gen to handle microsoft layouts for which size % alignment
!= 0

llvm-svn: 193661
2013-10-29 23:49:26 +00:00
Chris Wailes 9385f9f7c3 Changed tests_typestate to test_typestate for consistency.
llvm-svn: 193648
2013-10-29 20:28:41 +00:00
Evgeniy Stepanov 4ae68468cd Add -lm to sanitizer link arguments.
We'll need to intercept a few function in libm.

llvm-svn: 193644
2013-10-29 19:48:47 +00:00
Rafael Espindola 8c8711207c Add support for the separate version of /FI.
Patch by Jeff Muizelaar.

llvm-svn: 193642
2013-10-29 19:42:01 +00:00
Akira Hatanaka 618b29813a [mips] Align the stack to 16-bytes for -mfp64.
llvm-svn: 193640
2013-10-29 19:00:35 +00:00
Akira Hatanaka ddd6634340 [mips] Use the distance between the current argument's starting address and
the previous argument's ending address to compute the type of the padding
argument.

No intended functionality change.

llvm-svn: 193638
2013-10-29 18:41:15 +00:00
Akira Hatanaka 9064e36551 [mips] Move setDescriptionString to base class MipsTargetInfoBase and call it
at the end of handleTargetFeatures.

No intended functionality change.

llvm-svn: 193636
2013-10-29 18:30:33 +00:00
Tom Stellard 08ded12ffb R600: Add Sea Islands GPUs
llvm-svn: 193622
2013-10-29 16:38:29 +00:00
Daniel Jasper dd978ae0e1 clang-format: Option to control spacing in template argument lists.
Same as SpacesInParentheses, this option allows adding a space inside
the '<' and '>' of a template parameter list.

Patch by Christopher Olsen.

This fixes llvm.org/PR17301.

llvm-svn: 193614
2013-10-29 14:52:02 +00:00
Samuel Benzaquen f34ac3ed2c Resubmit "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."
Summary: This resubmits r193100, plus a fix for a breakage with MSVC.

Reviewers: klimek, rnk

CC: cfe-commits, revane

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

llvm-svn: 193613
2013-10-29 14:37:15 +00:00
Timur Iskhodzhanov 66f4381b39 Fix an assertion when handling a custom case of virtual inheritance; also reduce code duplication
llvm-svn: 193610
2013-10-29 14:13:45 +00:00
Timur Iskhodzhanov d7354bb354 Add a missing lit-test expectation (forgotten to write initially?)
llvm-svn: 193608
2013-10-29 13:29:32 +00:00
Sylvestre Ledru 9f453d27bf Use LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This allows 'make LDFLAGS=foo' to be set correctly (and matches the way it is done with libllvm and liblldb)
llvm-svn: 193607
2013-10-29 13:01:41 +00:00
Tim Northover 58d2bb12ff ARM: fix AST for __builtin_arm_strex call
The AST was constructed so that this builtin returned the default BoolTy and
since I'd opted for custom SemaChecking, I should have set it properly at that
point.

This caused an assertion failure when the types didn't match up with what we
generated. This makes it return an IntTy, which is as good as anything.

llvm-svn: 193606
2013-10-29 12:32:58 +00:00
Daniel Jasper edc5f09175 clang-format: Fix overloaded operator for global-scoped conversions.
Before:
  operator::A();

After:
  operator ::A();

llvm-svn: 193605
2013-10-29 12:24:23 +00:00
Chandler Carruth da797048d9 Teach the driver to not try to use 'lib32' multilib spellings on ARM
which doesn't use that multilib. As a consequence, fix Clang's support
for cross compiling environments that were relying on this quirk to
ensure the correct library search path ordering.

This also re-instates the new test cases from Rafael's r193528 for
cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the
existing test cases (they were no longer needed).

This solution was the result of a lot of IRC debugging and trying to
understand *exactly* what quirk was being relied upon. It took some time
for me to figure out that it was the use of 'lib32' is a multilib that
was throwing a wrench in the works.

In case you are thinking that its silly to use a multilib of 'lib' at
all, entertainingly, GCC does so as well (you can see it with the
.../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of
search paths (multilib followed by non-multilib) has observable (if
dubious) consequences. =/ Yuck.

llvm-svn: 193601
2013-10-29 10:27:30 +00:00
Bernard Ogden 18b5701a68 ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Allow users to disable or enable CRC subtarget feature.

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

llvm-svn: 193600
2013-10-29 09:47:51 +00:00
Chandler Carruth 4952448b56 Doh, got this turned around. This is in fact the consistent ordering.
llvm-svn: 193596
2013-10-29 08:57:33 +00:00
Chandler Carruth 8677d92c9c Clean up the deeply misleading name of the "MultiLibSuffix". This is
actually a MIPS-only hack to shim in random ABI directory suffixes in
numerous places throughout the toolchain's path search. It shouldn't
appear to be anything more general or useful.

llvm-svn: 193595
2013-10-29 08:53:03 +00:00
Alp Toker a23d26607e Use Rewriter::overwriteChangedFiles() directly
This replaces the custom code in RefactoringTool::saveRewrittenFiles() which
lacked atomic file saving and error diagnostics, resolving an old FIXME from
r157331.

Landing this time with the proper return code, plus a very unhelpful comment
cleared up.

Rubber-stamped by Manuel Klimek.

llvm-svn: 193594
2013-10-29 08:32:41 +00:00
Alp Toker 7c3ba222e0 Revert "Use Rewriter::overwriteChangedFiles() directly"
This wasn't ready for prime time yet, seems to break tools-extra.

This reverts commit r193590.

llvm-svn: 193592
2013-10-29 07:56:03 +00:00
Alp Toker 54d5b55b0a Remove obsolete RewriteBuffer comment
The string buffer in question was replaced with RewriteRope in r43884
back in 2007.

llvm-svn: 193591
2013-10-29 07:47:57 +00:00
Alp Toker 4a9284b36a Use Rewriter::overwriteChangedFiles() directly
The old code in RefactoringTool::saveRewrittenFiles() lacked
atomic moves and diagnostics and had FIXME to this effect.

Rubber-stamped by Manuel Klimek.

llvm-svn: 193590
2013-10-29 07:47:49 +00:00
Nick Lewycky 2c531165ff Add missing attributes [[gnu::no_sanitize_address]] and
[[gnu::no_address_safety_analysis]].

llvm-svn: 193583
2013-10-29 03:54:41 +00:00
Nick Lewycky d0604672d9 Treat [[gnu::__const]] the same as [[gnu::const]]. GCC's tokenizer can't tell
the difference.

llvm-svn: 193582
2013-10-29 03:33:57 +00:00
Alp Toker 10255c38bd Fix "existant" typos
llvm-svn: 193578
2013-10-29 02:34:44 +00:00
Chandler Carruth 9b6ce9317f Cleanup comments and braces. No functionality changed, just trying to
record what is *actually* going on here as the comments existing in the
code are confusing at best, and in places outright misleading.

The API is even more misleading. Yay.

llvm-svn: 193577
2013-10-29 02:27:56 +00:00
Alp Toker 93c33c1be6 Switch %clang -cc1 tests to %clang_cc1
llvm-svn: 193561
2013-10-28 23:47:09 +00:00
Rafael Espindola a839855b56 Revert "Support cross linking to arm on ubuntu."
This reverts commit r193528 (and fixes).

It broke Chandler's setup.

llvm-svn: 193554
2013-10-28 23:14:34 +00:00
Richard Smith a3feee2ad6 Allow a new syntax in a module requires-declaration:
requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

llvm-svn: 193549
2013-10-28 22:18:19 +00:00
Richard Smith 426a47bddb Fix a parser crash when there are #pragmas in a context which requires a single
statement (after a case label, if, etc). Patch by Olivier Goffart!

llvm-svn: 193545
2013-10-28 22:04:30 +00:00
Rafael Espindola 2b5e65d95b More windows path handling.
llvm-svn: 193533
2013-10-28 19:40:25 +00:00
Rafael Espindola c6329b283e Relax test to pass with windows paths.
llvm-svn: 193532
2013-10-28 19:19:29 +00:00
Rafael Espindola cdd2c0044d Support cross linking to arm on ubuntu.
With this patch we correctly determine that ubuntu's ARM tree is not biarch
and use "lib" istead of "lib32".

Without this patch the search inside the arm tree for the crt files was failing
and we would end up trying to use the i686 ones in lib32.

llvm-svn: 193528
2013-10-28 18:52:30 +00:00
Alexander Potapenko bcaea0ee0b [libsanitizer] configure+make: install include/sanitizer into Clang
When building Clang with compiler-rt, copy the contents of compiler-rt/include/sanitizer into lib/clang/3.4/include/sanitizer

llvm-svn: 193515
2013-10-28 08:21:35 +00:00
NAKAMURA Takumi a67c9c32aa StaticAnalyzer/Checkers/DynamicTypePropagation.cpp: Fix in comments. 80-col and an utf8 char.
llvm-svn: 193513
2013-10-28 04:14:33 +00:00