Commit Graph

254499 Commits

Author SHA1 Message Date
Dan Gohman dfe6ce7abd [WebAssembly] Remove old experimental disassemler code.
Remove support for disassembling an old experimental wasm binary format, which
is no longer in use anywhere.

llvm-svn: 294809
2017-02-11 00:02:23 +00:00
Saleem Abdulrasool 769b98d327 vim: add `returned` keyword
The `returned` keyword was added in SVN r179925.  Update the vim syntax
rules.

llvm-svn: 294808
2017-02-10 23:57:11 +00:00
Davide Italiano 690ed9dec7 [LTO] Share the optimization remarks setup between Thin/Full LTO.
llvm-svn: 294807
2017-02-10 23:49:38 +00:00
Dimitry Andric c18de74165 Remove struct_rtentry_sz on FreeBSD
Summary:
Since struct rtentry is an internal kernel-only structure on FreeBSD,
and SIOCADDRT and SIOCDELRT are not supported anyway, stop including
socketvar.h and attempting to get at the definition of struct rtentry,
and move the line with struct_rtentry_sz to the SANIZER_LINUX block.

Reviewers: kcc, kutuzov.viktor.84, emaste

Reviewed By: kcc, emaste

Subscribers: emaste, llvm-commits, kubamracek

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

llvm-svn: 294806
2017-02-10 23:48:40 +00:00
Krzysztof Parzyszek f9015e62fd [Hexagon] Introduce Hexagon V62
llvm-svn: 294805
2017-02-10 23:46:45 +00:00
Greg Clayton b663010f4d Fix the lldb_private::Function::GetDescription to print out the name and mangled name correctly. Previously this was getting the function type's name which was not correct.
This info appears in the output of "image lookup --verbose --address ADDRESS".

llvm-svn: 294804
2017-02-10 23:32:06 +00:00
Richard Smith 541cf97fe0 [c++1z] Tests for class template argument deduction in dependent contexts.
llvm-svn: 294802
2017-02-10 23:10:17 +00:00
Davide Italiano 95a8707de8 [tests] Be explicit about the files we want to remove.
Hopefully Windows will stop whining after this change.

llvm-svn: 294801
2017-02-10 22:55:37 +00:00
George Burgess IV f9013bf8f0 Don't let EvaluationModes dictate whether an invalid base is OK
What we want to actually control this behavior is something more local
than an EvalutationMode. Please see the linked revision for more
discussion on why/etc.

This fixes PR31843.

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

llvm-svn: 294800
2017-02-10 22:52:29 +00:00
Kostya Serebryany 4b3ea2d776 s390 CVE-2016-2143 whitelist for RHEL kernels
Summary: This patch adds whitelist for RHEL6 and RHEL7 kernels that are known to have the CVE fixed.

Reviewers: koriakin, kcc

Reviewed By: kcc

Subscribers: kubamracek

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

llvm-svn: 294799
2017-02-10 22:50:44 +00:00
Marshall Clow 3bc2e08429 Fix a bug I introduced in the tests for experimental::lcm and experimental::gcd.
llvm-svn: 294798
2017-02-10 22:44:14 +00:00
Richard Smith bfbff07e73 [c++1z] Diagnose attempts to use variables with deduced class template
specialization types from within their own initializers.

llvm-svn: 294796
2017-02-10 22:35:37 +00:00
Peter Collingbourne be9ffaacfa IR: Function summary extensions for whole-program devirtualization pass.
The summary information includes all uses of llvm.type.test and
llvm.type.checked.load intrinsics that can be used to devirtualize calls,
including any constant arguments for virtual constant propagation.

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

llvm-svn: 294795
2017-02-10 22:29:38 +00:00
Benjamin Kramer 03ab8a366e [InstCombine] Move class into anonymous namespace. NFC.
This is necessary to avoid warnings from GCC.
InstCombineLoadStoreAlloca.cpp:238:7: error: 'PointerReplacer' declared
with greater visibility than the type of its field 'PointerReplacer::IC'

llvm-svn: 294794
2017-02-10 22:26:35 +00:00
Kostya Serebryany 5b53a2f292 Fix AddressSanitizer on s390 (31-bit)
Summary:
GET_CALLER_PC doesn't work properly on 31-bit s390, as pointers are 31-bit, the MSB bit can be set when the return address is copied into integer.
This causes e.g. errors like:
    #0 0xfdadb129  (<unknown module>)
    #1 0x7da5e1d1 in __asan::GetStackTraceWithPcBpAndContext(__sanitizer::BufferedStackTrace*, unsigned long, unsigned long, unsigned long, void*, bool) ../../../../../libsanitizer/asan/asan_stack.h:50
    #2 0x7da5e1d1 in __asan::ErrorGeneric::Print() ../../../../../libsanitizer/asan/asan_errors.cc:482
    #3 0x7db178d5 in __asan::ErrorDescription::Print() ../../../../../libsanitizer/asan/asan_errors.h:360
    #4 0x7db178d5 in __asan::ScopedInErrorReport::~ScopedInErrorReport() ../../../../../libsanitizer/asan/asan_report.cc:167
    #5 0x7db178d5 in __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) ../../../../../libsanitizer/asan/asan_report.cc:397
    #6 0x7dadb14f in __interceptor_memcmp ../../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:626
    #7 0x400cf5 in main /home/jakub/gcc/gcc/testsuite/c-c++-common/asan/memcmp-1.c:14
    #8 0x7d807215 in __libc_start_main (/lib/libc.so.6+0x1a215)
    #9 0x4007ed  (/home/jakub/gcc/obj/gcc/testsuite/memcmp-1.exe+0x4007ed)

The actual return PC inside __interceptor_memcmp was 0x7dadb129 rather than 0xfdadb129.

Reviewers: koriakin, kcc

Reviewed By: kcc

Subscribers: kubamracek

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

llvm-svn: 294793
2017-02-10 22:26:19 +00:00
Davide Italiano 46d72b1b7f [lib/LTO] Rework optimization remarkers setup.
This makes this code much more similar to what ThinLTO is
using (also API wise), so now we can probably use a single
code path instead of copying stuff around.

llvm-svn: 294792
2017-02-10 22:16:17 +00:00
Benjamin Kramer aa5adfa360 [PPC] Silence warning in Release builds.
llvm-svn: 294791
2017-02-10 22:13:34 +00:00
Kostya Serebryany d94ba361e3 s390x __tls_get_addr_internal vs. __tls_get_offset
Summary:
Symbol __tls_get_addr_internal is a GLIBC_PRIVATE private symbol on s390{,x}, the glibc folks aren't very happy about asan using it.
Additionally, only recent glibc versions have it, older versions just have __tls_get_offset and nothing else.
The patch doesn't drop the __tls_get_addr_internal interception altogether, but changes it so that it calls real __tls_get_offset function instead (and much more importantly,
that __tls_get_offset interception calls the real __tls_get_offset function).
This way it should work also on glibc 2.18 and earlier.  See http://gcc.gnu.org/PR79341 for further details.

Reviewers: kcc, koriakin

Reviewed By: kcc, koriakin

Subscribers: kubamracek, mehdi_amini

Tags: #sanitizers

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

llvm-svn: 294790
2017-02-10 22:11:07 +00:00
Davide Italiano 62092aeb42 [LTO] Make these tests robust across multiple iterations.
Same as r294784, but for regular LTO.

llvm-svn: 294789
2017-02-10 22:11:06 +00:00
Benjamin Kramer 684c87be4f [InstCombine] Silence unused variable warning in Release builds.
llvm-svn: 294788
2017-02-10 22:04:17 +00:00
Nico Weber ee0b0ec935 Revert r294532, it caused PR31935
llvm-svn: 294787
2017-02-10 21:57:30 +00:00
Yaxun Liu ba01ed00fe Fix invalid addrspacecast due to combining alloca with global var
For function-scope variables with large initialisation list, FE usually 
generates a global variable to hold the initializer, then generates 
memcpy intrinsic to initialize the alloca. InstCombiner::visitAllocaInst 
identifies such allocas which are accessed only by reading and replaces 
them with the global variable. This is done by casting the global variable 
to the type of the alloca and replacing all references.

However, when the global variable is in a different address space which 
is disjoint with addr space 0 (e.g. for IR generated from OpenCL, 
global variable cannot be in private addr space i.e. addr space 0), casting 
the global variable to addr space 0 results in invalid IR for certain 
targets (e.g. amdgpu).

To fix this issue, when the global variable is not in addr space 0, 
instead of casting it to addr space 0, this patch chases down the uses 
of alloca until reaching the load instructions, then replaces load from 
alloca with load from the global variable. If during the chasing 
bitcast and GEP are encountered, new bitcast and GEP based on the global 
variable are generated and used in the load instructions.

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

llvm-svn: 294786
2017-02-10 21:46:07 +00:00
Richard Smith d69f4f5b05 [c++1z] Require an initializer for deduced class template specialization types.
It's actually meaningful and useful to allow such variables to have no
initializer, but we are strictly following the standard here until the C++
committee reaches consensus on allowing this.

llvm-svn: 294785
2017-02-10 21:40:29 +00:00
Davide Italiano d6979b8c38 [ThinLTO] Make this test more robust across multiple runs.
The yaml emitter files are left around otherwise.

llvm-svn: 294784
2017-02-10 21:35:31 +00:00
Tim Shen 21a960b6a6 Fix a silly syntax error.
llvm-svn: 294783
2017-02-10 21:17:35 +00:00
Dehao Chen fb02f7140a Encode duplication factor from loop vectorization and loop unrolling to discriminator.
Summary:
This patch starts the implementation as discuss in the following RFC: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106532.html

When optimization duplicates code that will scale down the execution count of a basic block, we will record the duplication factor as part of discriminator so that the offline process tool can find the duplication factor and collect the accurate execution frequency of the corresponding source code. Two important optimization that fall into this category is loop vectorization and loop unroll. This patch records the duplication factor for these 2 optimizations.

The recording will be guarded by a flag encode-duplication-in-discriminators, which is off by default.

Reviewers: probinson, aprantl, davidxl, hfinkel, echristo

Reviewed By: hfinkel

Subscribers: mehdi_amini, anemet, mzolotukhin, llvm-commits

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

llvm-svn: 294782
2017-02-10 21:09:07 +00:00
Tim Shen 918ed871df [XRay] Implement powerpc64le xray.
Summary:
powerpc64 big-endian is not supported, but I believe that most logic can
be shared, except for xray_powerpc64.cc.

Also add a function InvalidateInstructionCache to xray_util.h, which is
copied from llvm/Support/Memory.cpp. I'm not sure if I need to add a unittest,
and I don't know how.

Reviewers: dberris, echristo, iteratee, kbarton, hfinkel

Subscribers: mehdi_amini, nemanjai, mgorny, llvm-commits

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

llvm-svn: 294781
2017-02-10 21:03:24 +00:00
Marshall Clow 58fc1b50d8 Make lcm/gcd work better in edge cases. Fixes a UBSAN failure.
llvm-svn: 294779
2017-02-10 20:49:08 +00:00
Richard Smith 278890f85b [c++1z] Enforce restriction that deduction guide is declared in the same scope as its template.
llvm-svn: 294778
2017-02-10 20:39:58 +00:00
Tim Shen 7d0bffb537 [XRay] Refactor TSC related functions into a single header. NFC.
Summary:
The implementation, however, is in different arch-specific files, unless it's emulated.

Reviewers: dberris, pelikan, javed.absar

Subscribers: aemerson, llvm-commits

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

llvm-svn: 294777
2017-02-10 20:30:43 +00:00
Rafael Espindola 7f0e63488f Relax tests a bit.
The values being tested were not relevant to the test.

llvm-svn: 294776
2017-02-10 20:10:16 +00:00
Krzysztof Parzyszek fe58ca3218 [Hexagon] Remove unused .td files
llvm-svn: 294775
2017-02-10 19:54:00 +00:00
Ahmed Bougacha 2e275e272f [X86] Bitcast subvector before broadcasting it.
Since r274013, we've been looking through bitcasts on broadcast inputs.
In the scalar-folding case (from a load, build_vector, or sc2vec),
the input type didn't matter, as we'd simply bitcast the resulting
scalar back.

However, when broadcasting a 128-bit-lane-aligned element, we create an
EXTRACT_SUBVECTOR.  Use proper types, by creating an extract_subvector
of the original input type.

llvm-svn: 294774
2017-02-10 19:51:47 +00:00
Richard Smith 3817e4a40c [c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced.
llvm-svn: 294773
2017-02-10 19:49:50 +00:00
Nico Weber 2108880660 clang-format: don't break code using __has_include, PR31908
llvm-svn: 294772
2017-02-10 19:36:52 +00:00
Kevin Enderby dc412ccc41 Yet another fix llvm-objdump so it picks a good CPU based for Mach-O files,
in this case for CPU_SUBTYPE_ARM64_ALL.

For this cpusubtype it should default to a cyclone CPU
to give proper disassembly without a -mcpu= flag.

rdar://27767188

llvm-svn: 294771
2017-02-10 19:27:10 +00:00
Tim Northover 0e01170c79 GlobalISel: drop lifetime intrinsics during translation.
We don't use them yet and they just cause problems.

llvm-svn: 294770
2017-02-10 19:10:38 +00:00
Marcos Pividori e81f9cc63d [libFuzzer] Use stoull instead of stol to ensure 64 bits.
Differential revision: https://reviews.llvm.org/D29831

llvm-svn: 294769
2017-02-10 18:44:14 +00:00
Chris Bieneman 8c31ea917a Fix another build issue with shared libraries on Linux
In r294767, I added these dependencies in the wrong place.

llvm-svn: 294768
2017-02-10 18:39:26 +00:00
Chris Bieneman ba170c2ad8 Fix another build issue with shared libraries on Linux
llvm-svn: 294767
2017-02-10 18:37:02 +00:00
Simon Pilgrim 39f8da3823 [X86][AVX512] Add vector rotate tests for AVX512 targets
AVX512 does have vector rotate instructions, but we don't lower to them yet

llvm-svn: 294766
2017-02-10 18:06:11 +00:00
Amaury Sechet 280ad2cebb Autogenerate results for test/CodeGen/X86/peep-test-4.ll . NFC
llvm-svn: 294765
2017-02-10 17:57:48 +00:00
Amaury Sechet f6308cfe87 Autogenerate results for test/CodeGen/X86/pr14314.ll . NFC
llvm-svn: 294764
2017-02-10 17:57:46 +00:00
Chris Bieneman 8909b6804c Fix build issue with shared libraries reported via email
llvm-svn: 294763
2017-02-10 17:47:55 +00:00
John Brawn e60f4e4b8d [ARM] Fix incorrect mask bits in MSR encoding for write_register intrinsic
In the encoding of system registers in the M-class MSR instruction the mask bits
should be 2 for registers that don't take a _<bits> qualifier (the instruction
is unpredictable otherwise), and should also be 2 if the register takes a
_<bits> qualifier but it's not present as no _<bits> is an alias for _nzcvq.

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

llvm-svn: 294762
2017-02-10 17:41:08 +00:00
Amaury Sechet c8587e4257 Use autogenerate check in CodeGen/X86/pr16031.ll . NFC
llvm-svn: 294761
2017-02-10 17:26:21 +00:00
Benjamin Kramer e15fe37506 [clangd] Move isDone from the JSONOutput to ShutdownHandler.
This is just as easy to check from main but prevents random code from
shutting down the server.

llvm-svn: 294760
2017-02-10 17:25:38 +00:00
Mehdi Amini f1423e893d Fix doc for `-opt-bisect-limit`: the LTO option prefix for lld is -mllvm
Thanks Davide to catch it in my previous patch.

llvm-svn: 294759
2017-02-10 17:16:00 +00:00
Hans Wennborg 1155ad1bc8 libomptarget: Disable on Win32
It's not supported, and currently breaks the weekly LLVM snapshot
builds.

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

llvm-svn: 294758
2017-02-10 17:13:28 +00:00
Alexander Kornienko beda0f1923 Add a virtual destructor for LegalizerInfo.
lib/Target/X86/X86TargetMachine.cpp has a code that deletes an instance of a
LegalizerInfo descendant via a pointer to base.

llvm-svn: 294757
2017-02-10 17:00:27 +00:00