Commit Graph

245501 Commits

Author SHA1 Message Date
Nico Weber b38d341106 Revert 284971.
It seems to break selfhost on some bots, see e.g.
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/21
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/20
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/22

llvm-svn: 284979
2016-10-24 14:52:04 +00:00
Nirav Dave 1a9044b782 [MC] Fix Various End Of Line Comment checkings
Fix AsmParser lines to correctly handle end-of-line pre-processor
comments parsing when '#' is not the assembly line comment prefix.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25567

llvm-svn: 284978
2016-10-24 14:35:29 +00:00
Pavel Labath 676a875b06 [Chrono] Fix !HAVE_FUTIMENS build
If we don't have futimens(), we fall back to futimes(), which only supports
microsecond timestamps. In that case, we need to explicitly cast away the extra
precision in setLastModificationAndAccessTime().

llvm-svn: 284977
2016-10-24 14:19:28 +00:00
Pavel Labath 183098ca47 Reformat RegisterInfos_arm64 into a table. NFC
llvm-svn: 284976
2016-10-24 14:01:52 +00:00
Pavel Labath 51c454c1a9 Remove unused #includes of TimeValue.h. NFC.
llvm-svn: 284975
2016-10-24 14:00:26 +00:00
Pavel Labath bff47b51b6 [Object] Replace TimeValue with std::chrono
Summary:
Most of the changes are very straight-forward. The only choice I had to make was
to use second-precision time points in the Archive classes. I did this because
the archive files use that precision in the on-disk representation anyway.

Reviewers: rafael, zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25773

llvm-svn: 284974
2016-10-24 13:38:27 +00:00
Joel Jones 504bf334b0 AArch64 ILP32 relocations for assembly and ELF
Summary:
Add relocations for AArch64 ILP32. Includes:
  - Addition of definitions for R_AARCH32_*
  - Definition of new -target-abi: ilp32
  - Definition of data layout string
  - Tests for added relocations. Not comprehensive, but matches
    existing tests for 64-bit. Renames "CHECK-OBJ" to "CHECK-OBJ-LP64".
  - Tests for llvm-readobj

Reviewers: zatrazz, peter.smith, echristo, t.p.northover

Subscribers: aemerson, rengolin, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25159

llvm-svn: 284973
2016-10-24 13:37:13 +00:00
Krzysztof Parzyszek f74683f930 [RDF] Add default move constructors/assignment operators
llvm-svn: 284972
2016-10-24 13:15:20 +00:00
Pablo Barrio f9e0d0b7d0 [JumpThreading] Unfold selects that depend on the same condition
Summary:
These are good candidates for jump threading. This enables later opts
(such as InstCombine) to combine instructions from the selects with
instructions out of the selects. SimplifyCFG will fold the select
again if unfolding wasn't worth it.

Patch by James Molloy and Pablo Barrio.

Reviewers: reames, bkramer, mcrosier, gberry, haicheng, jmolloy, sebpop

Subscribers: jojo, rengolin, llvm-commits

Differential Revision: https://reviews.llvm.org/D25477

llvm-svn: 284971
2016-10-24 13:04:45 +00:00
Pavel Labath 16706dcbd4 Add the new arm64 sub-register definitions to NativeRegisterContextLinux
It's quite sad that we have to edit so many files just to add a register. I am
going to investigate how to merge these definitions somehow, but for now this
should at least get arm64 linux working again.

llvm-svn: 284970
2016-10-24 12:59:20 +00:00
Artem Dergachev a7609fbb64 [analyzer] Fix an ARM buildbot after r284960.
I guess we should always specify triples in all analyzer tests, regardless.

llvm-svn: 284969
2016-10-24 12:54:27 +00:00
Simon Pilgrim 6d2de6aa9e Fix windows builds by swapping windows.h and wincrypt.h ordering.
We need to include windows.h first even though it breaks default include ordering rules

llvm-svn: 284968
2016-10-24 12:39:23 +00:00
Michael Zuckerman 33bd5b235b revert r284963
because new test file is failing in some OS.
test/CodeGen/avx512-reduceIntrin.c

llvm-svn: 284967
2016-10-24 11:30:23 +00:00
Pavel Labath 757ca886cd Remove TimeValue usage from llvm/Support
Summary:
This is a follow-up to D25416. It removes all usages of TimeValue from
llvm/Support library (except for the actual TimeValue declaration), and replaces
them with appropriate usages of std::chrono. To facilitate this, I have added
small utility functions for converting time points and durations into appropriate
OS-specific types (FILETIME, struct timespec, ...).

Reviewers: zturner, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25730

llvm-svn: 284966
2016-10-24 10:59:17 +00:00
Pavel Labath 407fd070b7 Adjust for TimePoint interface change in llvm: D25730. NFC
llvm-svn: 284965
2016-10-24 10:59:14 +00:00
Pavel Labath 183e3f8b78 Adjust for TimePoint interface change in llvm: D25730. NFC
llvm-svn: 284964
2016-10-24 10:59:13 +00:00
Michael Zuckerman 98cb041891 [X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: +,*,&&,||) intrinsics to Clang
Committed after LGTM and check-all

Vector-reduction arithmetic accepts vectors as inputs and produces scalars as outputs.
This class of vector operation forms the basis of many scientific computations.
In vector-reduction arithmetic, the evaluation off is independent of the order of the input elements of V.

Used bisection method. At each step, we partition the vector with previous
step in half, and the operation is performed on its two halves.
This takes log2(n) steps where n is the number of elements in the vector.

Differential Revision: https://reviews.llvm.org/D25527

llvm-svn: 284963
2016-10-24 10:53:20 +00:00
Simon Dardis 9c34854833 [mips] synci microMIPS instruction definition.
Add synci to the microMIPS instruction definitions, mark the MIPS sync & synci
as not being part of microMIPS. This does not cover the sync instruction alias,
as that will be handled with a different patch. Add sync to the valid tests for
microMIPS.

Reviewers: vkalintiris

Differential Revision: https://reviews.llvm.org/D25795

llvm-svn: 284962
2016-10-24 10:23:59 +00:00
Alex Lorenz d900714299 [Sema] Formatting warnings should see through Objective-C message sends
This commit improves the '-Wformat' warnings by ensuring that the formatting
checker can see through Objective-C message sends when we are calling an
Objective-C method with an appropriate format_arg attribute.

rdar://23622446

Differential Revision: https://reviews.llvm.org/D25820

llvm-svn: 284961
2016-10-24 09:42:34 +00:00
Artem Dergachev bba497fb65 [analyzer] Add StdLibraryFunctions checker.
This checker does not emit reports, however it influences the analysis
by providing complete summaries for, or otherwise improving modeling of,
various standard library functions.

This should reduce the number of infeasible paths explored during analysis.
The custom function summary format used in this checker is superior to
body farms by causing less unnecessary state splits,
which would result in better analysis performance.

Differential Revision: https://reviews.llvm.org/D20811

llvm-svn: 284960
2016-10-24 09:41:38 +00:00
Alex Lorenz cb642b9136 [Sema][TreeTransform] Re-create DesignatedInitExpr when a field designator
has no field declaration.

This commit fixes an invalid Winitializer-overrides warning that's shown
when analyzing a second (or any after the first) instantiation of a designated
initializer. This invalid warning is fixed by making sure that a
DesignatedInitExpr is rebuilt by the tree transformer when it has a field
designator whose FieldDecl* hasn't been yet initialized. This ensures that a
different DesignatedInitExpr is processed by Sema for every instantiation, and
thus the invalid warning is avoided.

rdar://28768441

Differential Revision: https://reviews.llvm.org/D25777

llvm-svn: 284959
2016-10-24 09:33:32 +00:00
Jonas Hahnfeld 9fe1b80164 Fix myriad test with CLANG_DEFAULT_CXX_STDLIB
llvm-svn: 284958
2016-10-24 08:04:17 +00:00
Hal Finkel fd448408e3 [llvm-opt-report] Fix unroll-count reporting
Fix the implementation of OptReportLocationInfo's operator < so that contexts
with different unroll counts are reported separately.

llvm-svn: 284957
2016-10-24 05:07:18 +00:00
Craig Topper 531ce28311 [AVX-512] Replace 64-bit element and 512-bit vector pmin/pmax builtins with native IR like we do for 128/256-bit, but with the addition of masking.
llvm-svn: 284956
2016-10-24 04:04:24 +00:00
Craig Topper 8ec5c7326d [AVX-512] Remove masked pmin/pmax intrinsics and autoupgrade to native IR.
Clang patch to replace 512-bit vector and 64-bit element versions with native IR will follow.

llvm-svn: 284955
2016-10-24 04:04:16 +00:00
Craig Topper eee7c0520c [AVX-512] Replace masked 128/256-bit byte, word, and dword min/max builtins with selects and the older unmasked builtins.
llvm-svn: 284954
2016-10-23 23:57:30 +00:00
Sanjay Patel 9ca028c2d6 [DAG] enhance computeKnownBits to handle SRL/SRA with vector splat constant
llvm-svn: 284953
2016-10-23 23:13:31 +00:00
Eric Fiselier d11fdad33e Backout enabling -Wshadow until I have time to fix the breakage
llvm-svn: 284952
2016-10-23 22:24:11 +00:00
Petr Hosek 93d28f3507 [libunwind] Add support for Fuchsia
Fuchsia is a new operating system which uses libunwind as unwinder.

Differential Revision: https://reviews.llvm.org/D25899

llvm-svn: 284951
2016-10-23 21:48:47 +00:00
Petr Hosek 642b5b27fe [libcxx] Use C++14 when building libc++ with musl
musl's pthread implementations use volatile types in their structs
which is not being constexpr in C++11 but is in C++14.

Differential Revision: https://reviews.llvm.org/D25491

llvm-svn: 284950
2016-10-23 21:48:27 +00:00
Simon Pilgrim d06641d3dc Use SDValue::getConstantOperandVal() helper. NFCI.
llvm-svn: 284949
2016-10-23 20:17:21 +00:00
Justin Lebar a45e6fde58 Remove LLVM_CONSTEXPR.
Summary: With MSVC 2013 and GCC < 4.8 gone, we can use the "constexpr" keyword.

Reviewers: bkramer, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25901

llvm-svn: 284947
2016-10-23 19:39:16 +00:00
Eric Fiselier 878e7e2ff6 Fix breakage introduced by adding -Wshadow.
llvm-svn: 284946
2016-10-23 19:26:39 +00:00
Eric Fiselier 81a09f2c9e Fix libc++ specific assertion in permissions(...) tests
llvm-svn: 284945
2016-10-23 19:14:58 +00:00
Eric Fiselier b51325cefe Turn on -Wshadow so I find occurances before STL does
llvm-svn: 284944
2016-10-23 19:01:10 +00:00
Eric Fiselier 1e96d5380e Make make_from_tuple tests more portable. Patch from STL@microsoft.com
llvm-svn: 284943
2016-10-23 18:55:51 +00:00
Eric Fiselier eca753ad92 Fix unreferenced parameters. Patch from STL@microsoft.com
llvm-svn: 284942
2016-10-23 18:52:58 +00:00
Eric Fiselier d06ee7706c Fix shadowing warning. Patch from STL@microsoft.com
llvm-svn: 284941
2016-10-23 18:47:58 +00:00
Simon Pilgrim d09c04d267 [CostModel][X86] Added tests for current integer signed/unsigned remainder costs
llvm-svn: 284940
2016-10-23 18:35:02 +00:00
Simon Pilgrim 6ac1e98b09 [X86][SSE] Add SSE41/AVX1 costs for vector shifts.
We were defaulting to SSE2 costs which weren't taking into account the availability of PBLENDW/PBLENDVB to improve merging of per-element shift results.

llvm-svn: 284939
2016-10-23 16:49:04 +00:00
Simon Pilgrim e16b1e2271 [CostModel][X86] Added tests for current integer trunc costs
llvm-svn: 284938
2016-10-23 15:17:52 +00:00
Simon Pilgrim 96ef0c1103 Use APInt::isAllOnesValue instead of popcnt. NFCI.
More obvious implementation and faster too.

llvm-svn: 284937
2016-10-23 15:09:44 +00:00
Craig Topper 0c5da26572 [AVX-512] Replace 512-bit pmovzx/sx builtins with native IR.
llvm-svn: 284936
2016-10-23 07:35:47 +00:00
Craig Topper 4ef879ac2c [AVX-512] Remove masked 128/256-bit packss/packus builtins and replace with selects and the older unmasked builtins.
llvm-svn: 284935
2016-10-23 07:35:39 +00:00
Ekaterina Romanova 06477bf035 Add more doxygen comments to emmintrin.h's intrinsics.
With this patch, all intrinsics in this file (with an exception of a handful of a recently added ones) will be documented. I will send out a patch for 4 missining intrisics later.

The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Yunzhong Gao.

llvm-svn: 284934
2016-10-23 07:30:50 +00:00
Richard Smith c7f576fc91 Fix mangling numbers for varargs lambdas; varargs and non-varargs lambdas get
different lambda-sigs, so they should have different counters.

llvm-svn: 284933
2016-10-23 04:53:03 +00:00
Mandeep Singh Grang 249237cb2e [compiler-rt] Remove redundant --check-prefix=CHECK from test
Reviewers: eugenis, rengolin

Subscribers: dberris

Differential Revision: https://reviews.llvm.org/D25892

llvm-svn: 284932
2016-10-23 00:55:12 +00:00
Mandeep Singh Grang 66215e97e3 [clang] Limit clang test to ARM and AArch64 only
Summary: Limit clang/test/Frontend/gnu-mcount.c to ARM and AArch64 only.

Reviewers: abdulras, honggyu.kim, rengolin

Subscribers: aemerson, rengolin, cfe-commits

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D25842

llvm-svn: 284931
2016-10-23 00:53:03 +00:00
Dylan McKay 479a13c0aa [AVR] Add the machine code disassembler
This adds a super basic implementation of a machine code disassembler.

It doesn't support any operands with custom encoding.

llvm-svn: 284930
2016-10-22 23:57:59 +00:00
Craig Topper 4d63dfc286 [AVX-512] Replace masked 128/256-bit pavg builtins and replace with select and older unmasked builtins.
llvm-svn: 284929
2016-10-22 21:24:56 +00:00