Commit Graph

177119 Commits

Author SHA1 Message Date
Matt Arsenault bd469d5e67 R600/SI: Move pattern to instruction definition
llvm-svn: 211614
2014-06-24 17:17:06 +00:00
Weiming Zhao abb603da1c Fix test case in r211605/r211533
The test case in
"Fix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64" should
only work with Linux.

llvm-svn: 211613
2014-06-24 17:05:43 +00:00
Johannes Doerfert 5e275bc83a [Refactor] Create nicer test cases from C/C++
Insert a header into the new testcase containing a sample RUN line a FIXME and
an XFAIL. Then insert the formated C code and finally the LLVM-IR without
attributes, the module ID or the target triple.

llvm-svn: 211612
2014-06-24 17:02:53 +00:00
Fariborz Jahanian dacffc0d8d Objective-C. When we use @selector(save:), etc. there may be more
than one method with mismatched type of same selector name. 
clang issues a warning to point this out since it may cause 
undefined behavior. There are cases though that some APIs 
don't care about user methods and such warnings are perceived as 
noise. This patch allows users to add paren delimiters around
selector name to turn off such warnings. So, @selector((save:)) will
turn off the warning. It also provides 'fixit' so user knows 
what to do. // rdar://16458579

llvm-svn: 211611
2014-06-24 17:02:19 +00:00
Diego Novillo 913690c7bc Add new debug kind LocTrackingOnly.
Summary:
This new debug emission kind supports emitting line location
information in all instructions, but stops code generation
from emitting debug info to the final output.

This mode is useful when the backend wants to track source
locations during code generation, but it does not want to
produce debug info. This is currently used by optimization
remarks (-Rpass, -Rpass-missed and -Rpass-analysis).

When one of the -Rpass flags is used, the front end will enable
location tracking, only if no other debug option is enabled.

To prevent debug information from being generated, a new debug
info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to
not emit the llvm.dbg.cu annotation. This blocks final code generation
from generating debug info in the back end.

Depends on D4234.

Reviewers: echristo, dblaikie

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4235

llvm-svn: 211610
2014-06-24 17:02:17 +00:00
Diego Novillo 56653fdada Add new debug kind LocTrackingOnly.
Summary:
This new debug emission kind supports emitting line location
information in all instructions, but stops code generation
from emitting debug info to the final output.

This mode is useful when the backend wants to track source
locations during code generation, but it does not want to
produce debug info. This is currently used by optimization
remarks (-pass-remarks, -pass-remarks-missed and
-pass-remarks-analysis).

To prevent debug info emission, DIBuilder never inserts the
annotation 'llvm.dbg.cu' when LocTrackingOnly is enabled.

Reviewers: echristo, dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4234

llvm-svn: 211609
2014-06-24 17:02:03 +00:00
Greg Fitzgerald 7c8bfd804b Remove ARM XFAIL from passing test
llvm-svn: 211608
2014-06-24 16:58:59 +00:00
Deepak Panickal 877569c2b8 Added support for new MI commands and bug fixes. More details in MIReadme.txt.
llvm-svn: 211607
2014-06-24 16:35:50 +00:00
Aaron Ballman f93ef4e450 Allow static_assert inside an anonymous union; fixes PR20021 as well as implements C++ Issue 1940.
llvm-svn: 211606
2014-06-24 16:22:41 +00:00
Weiming Zhao b1d4dbdcc7 Resubmit commit r211533
"Fix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64"
Missed files are added in this commit.

llvm-svn: 211605
2014-06-24 16:21:38 +00:00
Logan Chien 733e3c6a58 Use lowercase windows.h for mingw cross compilation.
llvm-svn: 211604
2014-06-24 16:18:10 +00:00
David Majnemer 102ff69693 CodeGen: Avoid multiple strlen calls
Use a StringRef to hold our section prefix.  This avoids multiple calls
to strlen.

llvm-svn: 211602
2014-06-24 16:01:53 +00:00
Christian Pirker c6308f59b2 ARM: Fix TPsoft for Thumb mode
Reviewed at http://reviews.llvm.org/D4230

llvm-svn: 211601
2014-06-24 15:45:59 +00:00
Alexander Kornienko 45f4752398 Remove an empty directory left after r211508.
llvm-svn: 211600
2014-06-24 15:38:38 +00:00
Alexander Kornienko bf91164f1c Fix "warning: fallthrough annotation does not directly precede switch label" in lambdas.
Summary: This patch fixes http://llvm.org/PR17864 - "warning: fallthrough annotation does not directly precede switch label" in lambdas.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: rnk, cfe-commits

Differential Revision: http://reviews.llvm.org/D4258

llvm-svn: 211599
2014-06-24 15:28:21 +00:00
Daniel Sanders 3b92c5bd41 [mips] Correct linux dynamic linker for -mnan=2008
Summary:
The dynamic linker is named ld-linux-mipsn8.so.1 when -mnan=2008 is given (or
is the default). It remains ld.so.1 for other cases.

This is necessary for MIPS32r6/MIPS64r6 since these ISA's default to -mnan=2008.

Differential Revision: http://reviews.llvm.org/D4273

llvm-svn: 211598
2014-06-24 15:04:16 +00:00
Rafael Espindola 6fa0cb858a Replace two release calls with std::move. I missed this on the previous commit.
llvm-svn: 211597
2014-06-24 14:25:17 +00:00
Rafael Espindola bce7feb6c4 Update for llvm api change.
llvm-svn: 211596
2014-06-24 13:57:13 +00:00
Rafael Espindola 2e60ca964c Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.
Once the objects are constructed, they own the buffer. Passing a unique_ptr
makes that clear.

llvm-svn: 211595
2014-06-24 13:56:32 +00:00
Daniel Sanders e8b1f91afb Revert: r211588 - [mips] Use __clear_cache builtin instead of cacheflush() in Unix Memory::InvalidateInstructionCache()
Buildbot reports a test failure on the llvm-mips-linux builder and blames r211588.
Although it doesn't appear in the blamelist, it seems it could also be r211587
(because it's committed to compiler-rt?) since they were tested together.

Reverting the most likely suspect (r211588) to confirm one way or the other.

llvm-svn: 211594
2014-06-24 13:53:56 +00:00
NAKAMURA Takumi 8068b6a2fb Revert r211121 (and r211285), "Change libclang initialization to use std::call_once instead of"
It broke mingw builder and cygwin-clang stage2, possibly lack of tls in <mutex>.

llvm-svn: 211593
2014-06-24 13:50:01 +00:00
NAKAMURA Takumi 104e5f67e2 Revert r211287, "Remove support for LLVM runtime multi-threading."
libclang still requires it on cygming, lack of incomplete <mutex>.

llvm-svn: 211592
2014-06-24 13:36:31 +00:00
Tobias Grosser f59b3c1d90 cmake: Fix reference to Pluto file
llvm-svn: 211591
2014-06-24 13:31:42 +00:00
Daniel Sanders e6198bf886 [mips] Added support for assembling sdbbp.
Summary:
This instruction is re-encoded in MIPS32r6/MIPS64r6 without changing the
restrictions. We hadn't implemented it for earlier ISA's so it has been added to those too.

Differential Revision: http://reviews.llvm.org/D4265

llvm-svn: 211590
2014-06-24 13:00:32 +00:00
Alexey Bataev e2f07d47fe [OPENMP] Additional checking for 'collapse' clause.
llvm-svn: 211589
2014-06-24 12:55:56 +00:00
Daniel Sanders cf635fad02 [mips] Use __clear_cache builtin instead of cacheflush() in Unix Memory::InvalidateInstructionCache()
MIPS64 Android bionic has removed cacheflush(). Use __clear_cache() instead for 32-bit and 64-bit MIPS

Patch by Duane Sand <Duane.Sand@imgtec.com>

llvm-svn: 211588
2014-06-24 12:26:49 +00:00
Daniel Sanders 4dc8a78b04 [asan] adding support of 32-bit address sanitizer for MIPS
Summary: The patch supports both the clang cross-compiler and native compiler

Patch by Kumar Sukhani <Kumar.Sukhani@imgtec.com>

Test Plan:
Kumar had the following asan test results when compiled on a MIPS board:

  Expected Passes    : 96
  Expected Failures  : 2
  Unsupported Tests  : 84
  Unexpected Passes  : 4
  Unexpected Failures: 19

The list of unexpected failures can be found in the review.

Reviewers: kcc, petarj, dsanders

Reviewed By: kcc

Subscribers: farazs, kcc, llvm-commits

Differential Revision: http://reviews.llvm.org/D4208

llvm-svn: 211587
2014-06-24 12:08:18 +00:00
Tim Northover 6ea28bdef5 ARM: remove dead CodeGen functions.
These two are no longer being used by NEON codegen.

llvm-svn: 211586
2014-06-24 12:07:44 +00:00
Evgeniy Stepanov 8717fec9af [msan] Fix origin copying.
Conditions for the first and the last origin value in range were wrong.

llvm-svn: 211585
2014-06-24 11:50:26 +00:00
Benjamin Kramer c96a7f88b9 InstCombine: Disable umul.with.overflow recognition for vectors.
It doesn't make a lot on most targets and the code isn't ready for it. PR20113.

llvm-svn: 211583
2014-06-24 10:47:52 +00:00
Benjamin Kramer 6de786666a InstCombine: Don't try to reorder shuffles where the mask is a ConstantExpr.
We can't analyze the individual values of a vector expression. PR20114.

llvm-svn: 211581
2014-06-24 10:38:10 +00:00
Jeroen Ketema dd1fbc0082 Add half limits
These are apparently only defined in OpenCL 1.2.

HALF_MAX, HALF_MIN and HALF_EPSILON are currently omitted. Clang does
not seem to support the ‘h’ suffix for half float constants even with
the cl_khr_fp16 extension enabled.

Reviewed-by: Tom Sellard <tom@stellard.net>
llvm-svn: 211579
2014-06-24 09:51:01 +00:00
Jeroen Ketema 046b47fbbe Introduce CLC_VERSION macros v2
Add these out-of-order in clc.h so we can use these in other headers.

v2: Take into account the lack of a definition in OpenCL 1.0

Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211578
2014-06-24 09:46:52 +00:00
Jeroen Ketema 985a1381b2 Add MAXFLOAT
Align definitions while we are here.

Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211577
2014-06-24 09:41:28 +00:00
Jeroen Ketema 526fe2d501 Move clcmacro.h to avoid cluttering user namespace v2
v2: - use quotes instead of <>
    - add include to r600/lib/math/nextafter.c changed

Reviewed-by: Tom Stellard <tom@stellard.net>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 211576
2014-06-24 09:36:32 +00:00
Daniel Jasper a2fb50f9b3 clang-format: Understand that breaking before lambdas is fine.
Before:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa([](
      const aaaaaaaaaa &a) { return a; });

After:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      [](const aaaaaaaaaa &a) { return a; });

llvm-svn: 211575
2014-06-24 09:15:49 +00:00
Evgeniy Stepanov ad8065f01a [msan] Print stats even on successful run with atexit=1.
llvm-svn: 211574
2014-06-24 09:04:06 +00:00
Yabin Hu cc91169fd7 Remove use of llvm.codegen intrinsic for GPGPU codegen
We use llvm.codegen intrinsic to generate code for embedded LLVM-IR
strings. The reason we introduce such a intrinsic is that previous
clang/opt tools was NOT linked with various LLVM targets and their
AsmParsers and AsmPrinters. Since clang/opt been linked with all the
needed libraries, we no longer need the llvm.codegen intrinsic.

llvm-svn: 211573
2014-06-24 08:11:36 +00:00
Justin Bogner ce8245b5fd Driver: Restore proper naming of crashdump files
Based on a review of r211411 by Jordan Rose.

llvm-svn: 211572
2014-06-24 08:01:01 +00:00
David Majnemer 23fc9afa4d GlobalOpt: Don't optimize dllimport for initializers
Referencing a dllimport variable requires actually instructions, not
just a relocation.  This fixes PR19955.

Differential Revision: http://reviews.llvm.org/D4249

llvm-svn: 211571
2014-06-24 06:53:45 +00:00
David Majnemer 11a54c3465 AST: Address of dllimport functions isn't constant
The address of dllimport functions can be accessed one of two ways:
- Through the IAT which is symbolically referred to with a symbol
  starting with __imp_.
- Via the wrapper-function which ends up calling through the __imp_
  symbol.

The problem with using the wrapper-function is that it's address will
not compare as equal in all translation units.  Specifically, it will
compare unequally with the translation unit which defines the function.

This fixes PR19955.

llvm-svn: 211570
2014-06-24 06:40:51 +00:00
Alexey Samsonov b17604535c Include <tuple> for std::tie
llvm-svn: 211569
2014-06-24 05:59:52 +00:00
David Majnemer c28a964cba AST: Address of dllimport variables isn't constant
The address of dllimport variables isn't something that can be
meaningfully used in a constexpr context and isn't suitable for
evaluation at load-time.  They require loads from memory to properly
evaluate.

This fixes PR19955.

Differential Revision: http://reviews.llvm.org/D4250

llvm-svn: 211568
2014-06-24 05:59:13 +00:00
Kevin Qin 93d45ecdbf [AArch64] Fix a build_vector pattern match fail
caused by defect in isBuildVectorAllZeros().

llvm-svn: 211567
2014-06-24 05:37:27 +00:00
Alexey Bataev 549210e783 [OPENMP] Added initial checking of nesting of OpenMP regions.
llvm-svn: 211566
2014-06-24 04:39:47 +00:00
Adam Nemet 8ae70506ea [Disasm][AVX512] Implement decoding of top bit for non-destructive reg fields
V' bit in the P2 byte of the EVEX prefix provides the top bit of the NDD and
NDS register fields.  This was simply not used in the decoder until now.

Fixes <rdar://problem/17402661>

llvm-svn: 211565
2014-06-24 01:42:32 +00:00
Adam Nemet ee746be91f [Emacs] Use spaces rather than tabs for indentation in tablegen-mode
llvm-svn: 211564
2014-06-24 01:42:29 +00:00
Marshall Clow f9af6140ff Some calls to get<>() were qualified. Some were not. Qualify them all. Fixes bug #20092. Thanks to Agustín Bergé for the bug report and the fix.
llvm-svn: 211563
2014-06-24 00:46:19 +00:00
Duncan P. N. Exon Smith 84553d8f1f Support: Move class ScaledNumber
ScaledNumber has been cleaned up enough to pull out of BFI now.  Still
work to do there (tests for shifting, bloated printing code, etc.), but
it seems clean enough for its new home.

llvm-svn: 211562
2014-06-24 00:38:09 +00:00
Duncan P. N. Exon Smith beaf813dd4 BFI: Un-floatify more language
llvm-svn: 211561
2014-06-24 00:26:13 +00:00