Sylvestre Ledru [Sat, 12 Aug 2017 15:08:11 +0000 (15:08 +0000)]
Fix some minor typos in the llvm XRay exemple
llvm-svn: 310777
Richard Smith [Sat, 12 Aug 2017 01:46:03 +0000 (01:46 +0000)]
PR34163: Don't cache an incorrect key function for a class if queried between
the class becoming complete and its inline methods being parsed.
This replaces the hack of using the "late parsed template" flag to track member
functions with bodies we've not parsed yet; instead we now use the "will have
body" flag, which carries the desired implication that the function declaration
*is* a definition, and that we've just not parsed its body yet.
llvm-svn: 310776
Bruno Cardoso Lopes [Sat, 12 Aug 2017 01:38:26 +0000 (01:38 +0000)]
Revert "[Modules] Prevent #import to reenter header if not building a module."
This reverts commit r310605. Richard pointed out a better way to achieve
this, which I'll post a patch for soon.
llvm-svn: 310775
Kostya Serebryany [Sat, 12 Aug 2017 01:27:10 +0000 (01:27 +0000)]
Add a Dockerfile for clang-proto-fuzzer
Summary: Add a Dockerfile for clang-proto-fuzzer
Reviewers: morehouse, vitalybuka
Reviewed By: morehouse
Subscribers: hintonda, cfe-commits
Differential Revision: https://reviews.llvm.org/D36635
llvm-svn: 310774
Richard Smith [Fri, 11 Aug 2017 23:52:28 +0000 (23:52 +0000)]
D36604: PR34148: Do not assume we can use a copy relocation for an `external_weak` global
An `external_weak` global may be intended to resolve as a null pointer if it's
not defined, so it doesn't make sense to use a copy relocation for it.
Differential Revision: https://reviews.llvm.org/D36604
llvm-svn: 310773
Alex Shlyapnikov [Fri, 11 Aug 2017 23:10:39 +0000 (23:10 +0000)]
Disabling openmp-offload.c on linux until it is stabilized on all local configurations.
Differential revision: https://reviews.llvm.org/D29660
llvm-svn: 310772
Kostya Serebryany [Fri, 11 Aug 2017 23:03:22 +0000 (23:03 +0000)]
[libFuzzer] experimental support for Clang's coverage (fprofile-instr-generate), Linux-only
llvm-svn: 310771
Sanjay Patel [Fri, 11 Aug 2017 22:38:40 +0000 (22:38 +0000)]
[x86] add tests for rotate left/right with masked shifter; NFC
As noted in the test comment, instcombine now produces the masked
shift value even when it's not included in the source, so we should
handle this.
Although the AMD/Intel docs don't say it explicitly, over-rotating
the narrow ops produces the same results. An existence proof that
this works as expected on all x86 comes from gcc 4.9 or later:
https://godbolt.org/g/K6rc1A
llvm-svn: 310770
Evgeniy Stepanov [Fri, 11 Aug 2017 22:28:02 +0000 (22:28 +0000)]
[compiler-rt] Add SANITIZER_CXX_ABI_LIBNAME=libc++ option.
Summary: This is to support Android where libc++abi is part of libc++.
Reviewers: srhines, EricWF
Subscribers: dberris, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D36640
llvm-svn: 310769
John Baldwin [Fri, 11 Aug 2017 22:07:56 +0000 (22:07 +0000)]
[MIPS] Use ABI to determine stack alignment.
Summary:
The stack alignment depends on the ABI (16 bytes for N32 and N64 and 8
bytes for O32), not the CPU type.
Reviewers: sdardis
Reviewed By: sdardis
Subscribers: atanasyan, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D36326
llvm-svn: 310768
Sanjay Patel [Fri, 11 Aug 2017 22:05:33 +0000 (22:05 +0000)]
[x86] regenerate test checks, add 64-bit run; NFC
llvm-svn: 310767
Eugene Zelenko [Fri, 11 Aug 2017 21:30:02 +0000 (21:30 +0000)]
[Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 310766
Gheorghe-Teodor Bercea [Fri, 11 Aug 2017 21:17:50 +0000 (21:17 +0000)]
[OpenMP] Move failing flag tests to disabled GPU
offloading test file. This should prevent further errors
with the sanitizer.
Diff: D29660
llvm-svn: 310765
Zachary Turner [Fri, 11 Aug 2017 21:14:01 +0000 (21:14 +0000)]
Fix some broken tests.
These were pending in a separate patch but I forgot to squash them
before comitting, and this one didn't go through.
llvm-svn: 310764
Eli Friedman [Fri, 11 Aug 2017 21:12:04 +0000 (21:12 +0000)]
[OptDiag] Updating Remarks in SampleProfile
Updating remark API to newer OptimizationDiagnosticInfo API. This
allows remarks to show up in diagnostic yaml file, and enables use
of opt-viewer tool.
Hotness information for remarks (L505 and L751) do not display hotness
information, most likely due to profile information not being
propagated yet. Unsure if this is the desired outcome.
Patch by Tarun Rajendran.
Differential Revision: https://reviews.llvm.org/D36127
llvm-svn: 310763
Craig Topper [Fri, 11 Aug 2017 20:55:29 +0000 (20:55 +0000)]
[X86] Don't use fsin/fcos/fsincos instructions ever
Summary:
Previously we would use these instructions if sse was disabled and fastmath was enabled.
As mentioned in D28335, this is a bad idea.
Reviewers: efriedma, scanon, DavidKreitzer
Reviewed By: DavidKreitzer
Subscribers: zvi, llvm-commits
Differential Revision: https://reviews.llvm.org/D36344
llvm-svn: 310762
Stephan T. Lavavej [Fri, 11 Aug 2017 20:54:09 +0000 (20:54 +0000)]
[libcxx] [test] Rename _Up to U, etc. NFCI.
This improves readability and (theoretically) improves portability,
as _Ugly names are reserved.
This performs additional de-uglification, so all of these tests
follow the example of iterator.traits/empty.pass.cpp.
llvm-svn: 310761
Stephan T. Lavavej [Fri, 11 Aug 2017 20:54:06 +0000 (20:54 +0000)]
[libcxx] [test] Rename __x to x. NFCI.
This improves readability and (theoretically) improves portability,
as __ugly names are reserved.
llvm-svn: 310760
Stephan T. Lavavej [Fri, 11 Aug 2017 20:54:01 +0000 (20:54 +0000)]
[libcxx] [test] Rename __c to ch. NFCI.
This improves readability and (theoretically) improves portability,
as __ugly names are reserved.
llvm-svn: 310759
Stephan T. Lavavej [Fri, 11 Aug 2017 20:53:53 +0000 (20:53 +0000)]
[libcxx] [test] Rename _Tp to T. NFCI.
This improves readability and (theoretically) improves portability,
as _Ugly names are reserved.
llvm-svn: 310758
Rui Ueyama [Fri, 11 Aug 2017 20:49:48 +0000 (20:49 +0000)]
Add `-z muldefs` option.
llvm-svn: 310757
Rafael Espindola [Fri, 11 Aug 2017 20:49:27 +0000 (20:49 +0000)]
Fix access to undefined weak symbols in pic code
When the access to a weak symbol is not a call, the access has to be
able to produce the value 0 at runtime.
We were sometimes producing code sequences where that was not possible
if the code was leaded more than 4g away from 0.
llvm-svn: 310756
Zachary Turner [Fri, 11 Aug 2017 20:46:47 +0000 (20:46 +0000)]
[pdb] Fix linker module symbols to work with dbgeng.
The linker module contains a symbol of type S_COMPILE3 which
contains various information about the compiler and linker used
to create the PDB, such as the name of the linker, the target
machine, and the linker version. Interestingly, if we set the
version string to 0.0.0.0, then when trying to view local
variables WinDbg emits an error that private symbols are not
present. By setting this to a valid MSVC linker version string,
local variables can display.
As such, even though it is not representative of LLVM's version
information, we need this for compatibility.
llvm-svn: 310755
Zachary Turner [Fri, 11 Aug 2017 20:46:28 +0000 (20:46 +0000)]
Output S_SECTION symbols to the Linker module.
PDBs need to contain 1 module for each object file/compiland,
and a special one synthesized by the linker. This one contains
a symbol record for each output section in the executable with
its address information. This patch adds such symbols to the
linker module. Note that we also are supposed to add an
S_COFFGROUP symbol for what appears to be each input section that
contributes to each output section, but it's not entirely clear
how to generate these yet, so I'm leaving that for a separate
patch.
llvm-svn: 310754
Matt Arsenault [Fri, 11 Aug 2017 20:42:08 +0000 (20:42 +0000)]
AMDGPU: Start adding tail call support
Handle the sibling call cases.
llvm-svn: 310753
Zachary Turner [Fri, 11 Aug 2017 20:37:49 +0000 (20:37 +0000)]
Remove unused lambda capture.
llvm-svn: 310752
Kostya Serebryany [Fri, 11 Aug 2017 20:32:47 +0000 (20:32 +0000)]
[libFuzzer] recommend Clang Coverage for coverage visualization
llvm-svn: 310751
George Karpenkov [Fri, 11 Aug 2017 20:30:52 +0000 (20:30 +0000)]
[libFuzzer] Re-enable coverage.test on Darwin.
llvm-svn: 310750
Daniel Sanders [Fri, 11 Aug 2017 19:19:21 +0000 (19:19 +0000)]
Revert r310716 (and r310735): [globalisel][tablegen] Support zero-instruction emission.
Two of the Windows bots are failing test\CodeGen\X86\GlobalISel\select-inc.mir
which should not have been affected by the change. Reverting while I investigate.
Also reverted r310735 because it builds on r310716.
llvm-svn: 310745
Zachary Turner [Fri, 11 Aug 2017 19:00:22 +0000 (19:00 +0000)]
Add documentation for llvm-pdbutil.
llvm-svn: 310744
Zachary Turner [Fri, 11 Aug 2017 19:00:03 +0000 (19:00 +0000)]
[LLD/PDB] Write actual records to the globals stream.
Previously we were writing an empty globals stream. Windows
tools interpret this as "private symbols are not present in
this PDB", even when they are, so we need to fix this. Regardless,
without it we don't have information about global variables, so
we need to fix it anyway. This patch does that.
With this patch, the "lm" command in WinDbg correctly reports
that we have private symbols available, but the "dv" command
still refuses to display local variables.
Differential Revision: https://reviews.llvm.org/D36535
llvm-svn: 310743
John Baldwin [Fri, 11 Aug 2017 18:35:19 +0000 (18:35 +0000)]
[mips] clang-format MipsSubtarget.cpp.
This only fixes a few things and serves as my initial test commit.
llvm-svn: 310742
Brian Gesiak [Fri, 11 Aug 2017 18:05:26 +0000 (18:05 +0000)]
[opt-viewer] Decode HTML bytes for Python 3
Summary:
When using Python 3, `pygments.highlight()` returns a `bytes` object, not
a `str`, causing the call to `str.replace` on the following line to fail
with a runtime exception:
`TypeError: 'str' does not support the buffer interface`. Decode the
bytes into a string in order to fix the exception.
Test Plan:
Run `opt-viewer.py` with Python 3.4, and confirm no runtime error occurs
when calling `str.replace`.
Reviewers: anemet
Reviewed By: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36624
llvm-svn: 310741
Brian Gesiak [Fri, 11 Aug 2017 18:02:07 +0000 (18:02 +0000)]
[opt-viewer] Use Python 3-compatible iteritems
Summary:
Replace a usage of a Python 2-specific `dict.iteritems()` with the
Python 3-compatible definition provided at the top of the same file.
Test Plan:
Run `opt-viewer.py` using Python 3 and confirm it no longer encounters a
runtime error when calling `dict.iteritems()`.
Reviewers: anemet
Reviewed By: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36623
llvm-svn: 310740
Brian Gesiak [Fri, 11 Aug 2017 17:56:57 +0000 (17:56 +0000)]
[opt-viewer] Use Python 3-compatible `intern()`
Summary:
In Python 2, `intern()` is a builtin function available to all programs.
In Python 3, it was moved into the `sys` module, available as
`sys.intern`. Import it such that, within `optrecord.py`, `intern()` is
available whether run using Python 2 or 3.
Test Plan:
Run `opt-viewer.py` using Python 3, confirm it no longer
encounters a runtime error when `intern()` is called.
Reviewers: anemet
Reviewed By: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36622
llvm-svn: 310739
Stanislav Mekhanoshin [Fri, 11 Aug 2017 17:54:43 +0000 (17:54 +0000)]
[AMDGPU] Fix santizer error after last commit
Removed useless assert.
llvm-svn: 310738
Xinliang David Li [Fri, 11 Aug 2017 17:49:20 +0000 (17:49 +0000)]
Fix typo /NFC
llvm-svn: 310737
Rafael Espindola [Fri, 11 Aug 2017 17:47:12 +0000 (17:47 +0000)]
Avoid crash with local abs symbol.
llvm-svn: 310736
Daniel Sanders [Fri, 11 Aug 2017 17:30:37 +0000 (17:30 +0000)]
[globalisel][tablegen] Generate TypeObject table. NFC
Summary:
Generate the type table from the types used by a target rather than hard-coding
the union of types used by all targets.
Depends on D36084
Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar
Reviewed By: rovka
Subscribers: kristof.beyls, igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D36085
llvm-svn: 310735
George Karpenkov [Fri, 11 Aug 2017 17:23:45 +0000 (17:23 +0000)]
Update libFuzzer documentation for -fsanitize=fuzzer-no-link flag
Differential Revision: https://reviews.llvm.org/D36602
llvm-svn: 310734
George Karpenkov [Fri, 11 Aug 2017 17:22:58 +0000 (17:22 +0000)]
Add -fsanitize=fuzzer-no-link flag to the driver.
The flag will perform instrumentation necessary to the fuzzing,
but will NOT link libLLVMFuzzer.a library.
Necessary when modifying CFLAGS for projects which may produce
executables as well as a fuzzable target.
Differential Revision: https://reviews.llvm.org/D36600
llvm-svn: 310733
Aaron Ballman [Fri, 11 Aug 2017 16:46:45 +0000 (16:46 +0000)]
Enable exceptions for this test case to speculatively fix the build bots.
Hopefully corrects: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/15666
llvm-svn: 310732
Stanislav Mekhanoshin [Fri, 11 Aug 2017 16:42:09 +0000 (16:42 +0000)]
[AMDGPU] Ported and adopted AMDLibCalls pass
The pass does simplifications of well known AMD library calls.
If given -amdgpu-prelink option it works in a pre-link mode which
allows to reference new library functions which will be linked in
later.
In addition it also used to process traditional AMD option
-fuse-native which allows to replace some of the functions with
their fast native implementations from the library.
The necessary glue to pass the prelink option and translate
-fuse-native is to be added to the driver.
Differential Revision: https://reviews.llvm.org/D36436
llvm-svn: 310731
David Blaikie [Fri, 11 Aug 2017 16:38:28 +0000 (16:38 +0000)]
Orc: PR33769: Don't rely on comparisons with default constructed iterators
llvm-svn: 310729
Aaron Ballman [Fri, 11 Aug 2017 16:31:51 +0000 (16:31 +0000)]
Add hicpp-exception-baseclass to the HIC++ module.
This enforces that throwing an exception in C++ requires that exception to inherit from std::exception.
Patch by Jonas Toth.
llvm-svn: 310727
Craig Topper [Fri, 11 Aug 2017 16:22:45 +0000 (16:22 +0000)]
[AVX512] Remove and autoupgrade many of the broadcast intrinsics
Summary:
This autoupgrades most of the broadcast intrinsics. They've been unused in clang for some time.
This leaves the 32x2 intrinsics because they are still used in clang.
Reviewers: RKSimon, zvi, igorb
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36606
llvm-svn: 310725
Craig Topper [Fri, 11 Aug 2017 16:20:05 +0000 (16:20 +0000)]
[x86] Enable some support for lowerVectorShuffleWithUndefHalf with AVX-512
Summary:
This teaches 512-bit shuffles to detect unused halfs in order to reduce shuffle size.
We may need to refine the 512-bit exit point. I couldn't remember if we had good cross lane shuffles for 8/16 bit with AVX-512 or not.
I believe this is step towards being able to handle D36454 without a special case.
From here we need to improve our ability to combine extract_subvector with insert_subvector and other extract_subvectors. And we need to support narrowing binary operations where we don't demand all elements. This may be improvements to DAGCombiner::narrowExtractedVectorBinOp(by recognizing an insert_subvector in addition to concat) or we may need a target specific combiner.
Reviewers: RKSimon, zvi, delena, jbhateja
Reviewed By: RKSimon, jbhateja
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36601
llvm-svn: 310724
Gheorghe-Teodor Bercea [Fri, 11 Aug 2017 15:46:22 +0000 (15:46 +0000)]
[OpenMP] Enable previously successful offloading tests.
Create a separate test file to contain all tests for OpenMP
offloading to GPUs.
Make libdevice checking more robust by accounting for
the case in which no libdevice is found.
This changes are in connrection with diff: D29660
llvm-svn: 310718
Sanjay Patel [Fri, 11 Aug 2017 15:44:14 +0000 (15:44 +0000)]
[x86] use more shift or LEA for select-of-constants (2nd try)
The previous rev (r310208) failed to account for overflow when subtracting the
constants to see if they're suitable for shift/lea. This version add a check
for that and more test were added in r310490.
We can convert any select-of-constants to math ops:
http://rise4fun.com/Alive/d7d
For this patch, I'm enhancing an existing x86 transform that uses fake multiplies
(they always become shl/lea) to avoid cmov or branching. The current code misses
cases where we have a negative constant and a positive constant, so this is just
trying to plug that hole.
The DAGCombiner diff prevents us from hitting a terrible inefficiency: we can start
with a select in IR, create a select DAG node, convert it into a sext, convert it
back into a select, and then lower it to sext machine code.
Some notes about the test diffs:
1. 2010-08-04-MaskedSignedCompare.ll - We were creating control flow that didn't exist in the IR.
2. memcmp.ll - Choose -1 or 1 is the case that got me looking at this again. We could avoid the
push/pop in some cases if we used 'movzbl %al' instead of an xor on a different reg? That's a
post-DAG problem though.
3. mul-constant-result.ll - The trade-off between sbb+not vs. setne+neg could be addressed if
that's a regression, but those would always be nearly equivalent.
4. pr22338.ll and sext-i1.ll - These tests have undef operands, so we don't actually care about these diffs.
5. sbb.ll - This shows a win for what is likely a common case: choose -1 or 0.
6. select.ll - There's another borderline case here: cmp+sbb+or vs. test+set+lea? Also, sbb+not vs. setae+neg shows up again.
7. select_const.ll - These are motivating cases for the enhancement; replace cmov with cheaper ops.
Assembly differences between movzbl and xor to avoid a partial reg stall are caused later by the X86 Fixup SetCC pass.
Differential Revision: https://reviews.llvm.org/D35340
llvm-svn: 310717
Daniel Sanders [Fri, 11 Aug 2017 15:40:32 +0000 (15:40 +0000)]
[globalisel][tablegen] Support zero-instruction emission.
Summary:
Support the case where an operand of a pattern is also the whole of the
result pattern. In this case the original result and all its uses must be
replaced by the operand. However, register class restrictions can require
a COPY. This patch handles both cases by always emitting the copy and
leaving it for the register allocator to optimize.
Depends on D35833
Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar
Subscribers: javed.absar, kristof.beyls, igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D36084
llvm-svn: 310716
Simon Dardis [Fri, 11 Aug 2017 15:23:23 +0000 (15:23 +0000)]
[mips] Add missing mips-registered-target to mips test.
llvm-svn: 310715
Simon Dardis [Fri, 11 Aug 2017 15:01:34 +0000 (15:01 +0000)]
[mips] Support implicit gpopt with N64 when using -fno-pic
As clang defaults to -mno-abicalls when using -fno-pic for N64, implicitly use
-mgpopt in that case.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D36315
llvm-svn: 310714
Simon Dardis [Fri, 11 Aug 2017 14:36:05 +0000 (14:36 +0000)]
[mips] Lift the assertion on the types that can be used with MipsGPRel
Post commit review of rL308619 highlighted the need for handling N64
with -fno-pic. Testing reveale a stale assert when generating a GP
relative addressing mode.
This patch removes that assert and adds the necessary patterns for
MIPS64 to perform gp relative addressing with -fno-pic
(and the implicit -mno-abicalls + -mgpopt).
Reviewers: atanasyan, nitesh.jain
Differential Revision: https://reviews.llvm.org/D36472
llvm-svn: 310713
Michal Gorny [Fri, 11 Aug 2017 13:25:20 +0000 (13:25 +0000)]
[cmake] Expose the dependencies of ExecutionEngine as PUBLIC
Expose the dependencies of LLVMExecutionEngine library as PUBLIC rather
than PRIVATE when building a shared library. This is necessary because
the library is not contained but exposes API of other LLVM libraries via
its headers.
This causes other libraries to fail to link if the linker verifies for
correctness of -l flags (i.e. fails on indirect dependencies). This e.g.
happens when building LLDB against shared LLVM:
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to `typeinfo for llvm::RuntimeDyld::MemoryManager'
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN4llvm18MCJITMemoryManagerE[_ZTVN4llvm18MCJITMemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x48): undefined reference to `llvm::RTDyldMemoryManager::deregisterEHFrames()'
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'
lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE[_ZTVN12lldb_private15IRExecutionUnit13MemoryManagerE]+0xd0): undefined reference to `llvm::JITSymbolResolver::anchor()'
collect2: error: ld returned 1 exit status
Declaring the dependencies as PUBLIC guarantees that any package using
the ExecutionEngine library will also get explicit -l flags for
the dependent libraries guaranteeing that the symbols exposed in headers
could be resolved.
Patch originally written by NAKAMURA Takumi.
Differential Revision: https://reviews.llvm.org/D36211
llvm-svn: 310712
Nirav Dave [Fri, 11 Aug 2017 13:21:41 +0000 (13:21 +0000)]
Improve handling of insert_subvector of bitcast values
Fix insert_subvector / extract_subvector merges of bitcast values.
Reviewers: efriedma, craig.topper, RKSimon
Subscribers: RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D34571
llvm-svn: 310711
Nirav Dave [Fri, 11 Aug 2017 13:21:35 +0000 (13:21 +0000)]
[X86][DAG] Switch X86 Target to post-legalized store merge
Move store merge to happen after intrinsic lowering to allow lowered
stores to be merged.
Some regressions due in MergeConsecutiveStores to missing
insert_subvector that are addressed in follow up patch.
Reviewers: craig.topper, efriedma, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34559
llvm-svn: 310710
Sam Parker [Fri, 11 Aug 2017 13:14:00 +0000 (13:14 +0000)]
[AArch64] Enable ARMv8.3-A pointer authentication
Add assembler and disassembler support for the ARMv8.3-A pointer
authentication instructions.
Differential Revision: https://reviews.llvm.org/D36517
llvm-svn: 310709
Sjoerd Meijer [Fri, 11 Aug 2017 13:12:49 +0000 (13:12 +0000)]
[AArch64] Remove dotprod from base extension list
Dot product is an optional ARMv8.2a extension; remove it from the ARMv8.2a base
extension list. This was introduced in commit r310480.
Differential Revision: https://reviews.llvm.org/D36609
llvm-svn: 310708
Aaron Ballman [Fri, 11 Aug 2017 12:12:36 +0000 (12:12 +0000)]
Implement hicpp-braces-around-statements as an alias to readability-braces-around-statements.
Patch by Jonas Toth.
llvm-svn: 310707
Alex Lorenz [Fri, 11 Aug 2017 12:06:52 +0000 (12:06 +0000)]
[modules] Set the lexical DC for dummy tag decls that refer to hidden
declarations that are made visible after the dummy is parsed and ODR verified
Prior to this commit the
"(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."),"
assertion failure was triggered during semantic analysis of the dummy
tag declaration that was declared in another tag declaration because its
lexical context did not point to the outer tag decl.
rdar://
32292196
llvm-svn: 310706
George Rimar [Fri, 11 Aug 2017 11:46:56 +0000 (11:46 +0000)]
[ELF] - Fixing buildbot.
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11517/steps/build_Lld/logs/stdio
llvm-svn: 310705
Stefan Maksimovic [Fri, 11 Aug 2017 11:39:07 +0000 (11:39 +0000)]
Revert r302670 for the upcoming 5.0.0 release
This is causing failures when compiling clang with -O3
as one of the structures used by clang is passed by
value and uses the fastcc calling convention.
Faliures manifest for stage2 mips build.
llvm-svn: 310704
George Rimar [Fri, 11 Aug 2017 11:34:04 +0000 (11:34 +0000)]
[ELF] - Do not omit common symbols when -Map is given.
This is PR33886,
previously we did not output common symbols to map,
patch fixes that.
Differential revision: https://reviews.llvm.org/D36466
llvm-svn: 310703
Stefan Maksimovic [Fri, 11 Aug 2017 11:03:54 +0000 (11:03 +0000)]
Revert r310057
Bring back changes which r304953 introduced since
they were in fact not the cause of failures described
in r310057 commit message.
llvm-svn: 310702
Sjoerd Meijer [Fri, 11 Aug 2017 09:52:30 +0000 (09:52 +0000)]
[ARM] Assembler support for the ARMv8.2a dot product instructions
Commit r310480 added the AArch64 ARMv8.2a dot product instructions;
this adds the AArch32 instructions.
Differential Revision: https://reviews.llvm.org/D36575
llvm-svn: 310701
Yuka Takahashi [Fri, 11 Aug 2017 09:44:42 +0000 (09:44 +0000)]
[Bash-autocompletion] Add --autocomplete flag to 5.0 release notes
Summary:
I thought we should add this information to release notes, because we
added a new flag to clang driver.
Reviewers: v.g.vassilev, teemperor, ruiu
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D36567
llvm-svn: 310700
Simon Pilgrim [Fri, 11 Aug 2017 08:37:00 +0000 (08:37 +0000)]
[DAGCombiner] Remove shuffle support from simplifyShuffleMask
rL310372 enabled simplifyShuffleMask to support undef shuffle mask inputs, but its causing hangs.
Removing support until I can triage the problem
llvm-svn: 310699
Josh Gao [Fri, 11 Aug 2017 07:54:35 +0000 (07:54 +0000)]
Revert "Thread Safety Analysis: warn on nonsensical attributes."
This reverts commit rL310403, which caused spurious warnings in libc++,
because it didn't properly handle templated scoped lockable types.
llvm-svn: 310698
Mikael Holmen [Fri, 11 Aug 2017 06:57:08 +0000 (06:57 +0000)]
[IfConversion] Maintain the CFG when predicating/merging blocks in IfConvert*
Summary:
This fixes PR32721 in IfConvertTriangle and possible similar problems in
IfConvertSimple, IfConvertDiamond and IfConvertForkedDiamond.
In PR32721 we had a triangle
EBB
| \
| |
| TBB
| /
FBB
where FBB didn't have any successors at all since it ended with an
unconditional return. Then TBB and FBB were be merged into EBB, but EBB
would still keep its successors, and the use of analyzeBranch and
CorrectExtraCFGEdges wouldn't help to remove them since the return
instruction is not analyzable (at least not on ARM).
The edge updating code and branch probability updating code is now pushed
into MergeBlocks() which allows us to share the same update logic between
more callsites. This lets us remove several dependencies on analyzeBranch
and completely eliminate RemoveExtraEdges.
One thing that showed up with this patch was that IfConversion sometimes
left a successor with 0% probability even if there was no branch or
fallthrough to the successor.
One such example from the test case ifcvt_bad_zero_prob_succ.mir. The
indirect branch tBRIND can only jump to bb.1, but without the patch we
got:
bb.0:
successors: %bb.1(0x80000000)
bb.1:
successors: %bb.1(0x80000000), %bb.2(0x00000000)
tBRIND %r1, 1, %cpsr
B %bb.1
bb.2:
There is no way to jump from bb.1 to bb2, but still there is a 0% edge
from bb.1 to bb.2.
With the patch applied we instead get the expected:
bb.0:
successors: %bb.1(0x80000000)
bb.1:
successors: %bb.1(0x80000000)
tBRIND %r1, 1, %cpsr
B %bb.1
Since bb.2 had no predecessor at all, it was removed.
Several testcases had to be updated due to this since the removed
successor made the "Branch Probability Basic Block Placement" pass
sometimes place blocks in a different order.
Finally added a couple of new test cases:
* PR32721_ifcvt_triangle_unanalyzable.mir:
Regression test for the original problem dexcribed in PR 32721.
* ifcvt_triangleWoCvtToNextEdge.mir:
Regression test for problem that caused a revert of my first attempt
to solve PR 32721.
* ifcvt_simple_bad_zero_prob_succ.mir:
Test case showing the problem where a wrong successor with 0% probability
was previously left.
* ifcvt_[diamond|forked_diamond|simple]_unanalyzable.mir
Very simple test cases for the simple and (forked) diamond cases
involving unanalyzable branches that can be nice to have as a base if
wanting to write more complicated tests.
Reviewers: iteratee, MatzeB, grosser, kparzysz
Reviewed By: kparzysz
Subscribers: kbarton, davide, aemerson, nemanjai, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34099
llvm-svn: 310697
Rafael Espindola [Fri, 11 Aug 2017 06:07:02 +0000 (06:07 +0000)]
Delete what looks like dead code.
The start of a segment should not have a gap that needs trap
instructions.
llvm-svn: 310696
Chandler Carruth [Fri, 11 Aug 2017 05:47:13 +0000 (05:47 +0000)]
[PM] Switch the CGSCC debug messages to use the standard LLVM debug
printing techniques with a DEBUG_TYPE controlling them.
It was a mistake to start re-purposing the pass manager `DebugLogging`
variable for generic debug printing -- those logs are intended to be
very minimal and primarily used for testing. More detailed and
comprehensive logging doesn't make sense there (it would only make for
brittle tests).
Moreover, we kept forgetting to propagate the `DebugLogging` variable to
various places making it also ineffective and/or unavailable. Switching
to `DEBUG_TYPE` makes this a non-issue.
llvm-svn: 310695
Richard Smith [Fri, 11 Aug 2017 03:39:40 +0000 (03:39 +0000)]
Implement latest feature test macro recommendations, P0096R4.
llvm-svn: 310694
Richard Smith [Fri, 11 Aug 2017 03:16:11 +0000 (03:16 +0000)]
Update cxx_status to mention the upcoming Clang 5 release.
llvm-svn: 310693
Richard Smith [Fri, 11 Aug 2017 03:14:20 +0000 (03:14 +0000)]
PR33850: Update cxx_dr_status for Clang 5 branch.
llvm-svn: 310692
Richard Smith [Fri, 11 Aug 2017 02:04:19 +0000 (02:04 +0000)]
PR33489: A function-style cast to a deduced class template specialization type is type-dependent if it can't be resolved due to a type-dependent argument.
llvm-svn: 310691
Akira Hatanaka [Fri, 11 Aug 2017 00:06:49 +0000 (00:06 +0000)]
[Sema][ObjC] Fix spurious -Wcast-qual warnings.
We do not meaningfully track object const-ness of Objective-C object
types. Silence the -Wcast-qual warning that is issued when casting to or
from Objective-C object types results in losing const qualification.
rdar://problem/
33807915
llvm-svn: 310672
Jessica Paquette [Thu, 10 Aug 2017 23:11:24 +0000 (23:11 +0000)]
[MachineOutliner] Add RegState::Define to LDRXpost in insertOutlinedCall
This fixes a MachineVerifier failure in machine-outliner.mir. Not explicitly
adding RegState::Define to the LR argument makes it unhappy because an explicit
definition is marked as a use.
Build failure:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/7496/testReport/junit/LLVM/CodeGen_AArch64/machine_outliner_mir/
llvm-svn: 310671
Paul Osmialowski [Thu, 10 Aug 2017 23:04:11 +0000 (23:04 +0000)]
OMP_PROC_BIND: better spread
This change improves the way threads are spread across cores
when OMP_PROC_BIND=spread is set and no unusual affinity masks are in use.
Differential Revision: https://reviews.llvm.org/D36510
llvm-svn: 310670
Yan Wang [Thu, 10 Aug 2017 22:09:22 +0000 (22:09 +0000)]
[clang-tidy] Fix for buildbot.
Summary:
Fix an issue for windows.
Differential Revision: https://reviews.llvm.org/D35372
llvm-svn: 310669
Reid Kleckner [Thu, 10 Aug 2017 21:46:22 +0000 (21:46 +0000)]
Fix two warnings in polly, -Wmismatched-tags and -Wreorder
llvm-svn: 310667
Ahmed Bougacha [Thu, 10 Aug 2017 21:23:00 +0000 (21:23 +0000)]
Revert "[AsmParser] Hash is not a comment on some targets"
This reverts commit r310457.
It causes clang-produced IR to fail llvm codegen.
llvm-svn: 310662
Reid Kleckner [Thu, 10 Aug 2017 21:21:15 +0000 (21:21 +0000)]
Revert "[clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module."
This reverts commit r310630.
The new code broke on Windows and was untested. On Linux, it was
selecting the "int" overload of operator<<, which definitely does not
print the right thing when fed a "Mode" char.
llvm-svn: 310661
Reid Kleckner [Thu, 10 Aug 2017 21:14:07 +0000 (21:14 +0000)]
Disable some IR death tests when SEH is available
They hang for me locally. I suspect that there is a use-after-free when
attempting to destroy an LLVMContext after asserting from the middle of
metadata tracking. It doesn't seem worth debugging it further.
llvm-svn: 310660
Nirav Dave [Thu, 10 Aug 2017 21:03:36 +0000 (21:03 +0000)]
Revert "[DAG] Cleanup unused nodes after store merge. NFCI."
This reverts commit r310648 which causes an unexpected assertion failure
llvm-svn: 310659
Craig Topper [Thu, 10 Aug 2017 20:35:34 +0000 (20:35 +0000)]
[InstCombine] Make (X|C1)^C2 -> X^(C1^C2) iff X&~C1 == 0 work for splat vectors
This also corrects the description to match what was actually implemented. The old comment said X^(C1|C2), but it implemented X^((C1|C2)&~(C1&C2)). I believe ((C1|C2)&~(C1&C2)) is equivalent to (C1^C2).
Differential Revision: https://reviews.llvm.org/D36505
llvm-svn: 310658
Craig Topper [Thu, 10 Aug 2017 20:28:30 +0000 (20:28 +0000)]
[X86] Implement __builtin_cpu_is
This patch adds support for __builtin_cpu_is. I've tried to match the strings supported to the latest version of gcc.
Differential Revision: https://reviews.llvm.org/D35449
llvm-svn: 310657
Nirav Dave [Thu, 10 Aug 2017 19:52:45 +0000 (19:52 +0000)]
[DAG] Relax type restriction for store merge
Summary: Allow stores of bitcastable types to be merged by peeking through BITCAST nodes and recasting stored values constant and vector extract nodes as necessary.
Reviewers: jyknight, hfinkel, efriedma, RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34569
llvm-svn: 310655
Simon Pilgrim [Thu, 10 Aug 2017 19:32:35 +0000 (19:32 +0000)]
[CostModel][X86] Add SSE2 two-src shuffle costs
llvm-svn: 310654
Eli Friedman [Thu, 10 Aug 2017 19:31:27 +0000 (19:31 +0000)]
[ARM] Clarify legal addressing modes for ARM and Thumb2. NFC
The existing code is very clever, but not clear, which seems
like the wrong tradeoff here.
Differential Revision: https://reviews.llvm.org/D36559
llvm-svn: 310653
Benjamin Kramer [Thu, 10 Aug 2017 19:28:00 +0000 (19:28 +0000)]
[gold-plugin] Use more StringRef. No functionality change intended.
llvm-svn: 310652
Kamil Rytarowski [Thu, 10 Aug 2017 19:08:39 +0000 (19:08 +0000)]
Enable ASAN on NetBSD
Summary:
This enables also static runtime option.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, filcab, kcc, fjricci
Reviewed By: vitalybuka
Subscribers: mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36490
llvm-svn: 310651
Simon Pilgrim [Thu, 10 Aug 2017 19:02:51 +0000 (19:02 +0000)]
[CostModel][X86] Add avx1 two-src shuffle costs
llvm-svn: 310650
Kamil Rytarowski [Thu, 10 Aug 2017 18:53:52 +0000 (18:53 +0000)]
Enable bunch of sanitizers on NetBSD/X86 and X86_64
Summary:
Enable more sanitizers:
- i386 and amd64:
* SanitizerKind::Vptr;
* SanitizerKind::Leak;
* SanitizerKind::SafeStack;
* SanitizerKind::Function;
- amd64 only:
* SanitizerKind::Thread;
These sanitizers are in the process of upstreaming to LLVM projects.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, dim, vitalybuka, kcc, filcab, fjricci
Reviewed By: vitalybuka
Subscribers: #sanitizers, cfe-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36482
llvm-svn: 310649
Nirav Dave [Thu, 10 Aug 2017 18:53:14 +0000 (18:53 +0000)]
[DAG] Cleanup unused nodes after store merge. NFCI.
llvm-svn: 310648
Kamil Rytarowski [Thu, 10 Aug 2017 18:51:51 +0000 (18:51 +0000)]
Add NetBSD support in asan_linux.cc
Summary:
Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.
Sponsored by <The NetBSD Foundation>
Reviewers: fjricci, vitalybuka, joerg, kcc, filcab
Reviewed By: vitalybuka
Subscribers: llvm-commits, kubamracek, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36488
llvm-svn: 310647
Kamil Rytarowski [Thu, 10 Aug 2017 18:40:09 +0000 (18:40 +0000)]
Enable SafeStack on NetBSD
Summary:
make check-safestack:
-- Testing: 8 tests, 8 threads --
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 0.44s
Expected Passes : 7
Unsupported Tests : 1
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, kcc, fjricci, filcab
Reviewed By: vitalybuka
Subscribers: mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36542
llvm-svn: 310646
Simon Pilgrim [Thu, 10 Aug 2017 18:29:34 +0000 (18:29 +0000)]
[CostModel][X86] Add avx2 two-src shuffle costs
llvm-svn: 310645
Ed Maste [Thu, 10 Aug 2017 18:26:52 +0000 (18:26 +0000)]
remove FreeBSD xfail decorator from TestCppNsImport
The Linux xfail decorator was removed in r272326 with the claim that the
test "runs reliably on the linux x86 buildbot." It also runs reliably on
FreeBSD for me.
llvm.org/pr25925
llvm-svn: 310644
Yan Wang [Thu, 10 Aug 2017 18:19:40 +0000 (18:19 +0000)]
[clang-tidy] Fix a buildbot.
Fix format in ReleaseNotes.rst.
llvm-svn: 310643
Taewook Oh [Thu, 10 Aug 2017 18:17:11 +0000 (18:17 +0000)]
Make .file directive to have basename only
Summary:
Currently LLVM puts directory along with the filename in .file directive, but this behavior doesn't match gcc. There's a no clear description about which one is right (https://sourceware.org/binutils/docs/as/File.html#File), but one document (https://sourceware.org/gdb/current/onlinedocs/stabs/ELF-Linker-Relocation.html) suggests that STT_FILE symbol in elf file is expected to have basename only, which should have a same sting file .file directive according to (https://docs.oracle.com/cd/E26502_01/html/E28388/eoiyg.html).
This also affects badly on the build system that uses hashing, as the directory info could be differnt from developer to developer even when they're working on same file.
Reviewers: pcc, mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36018
llvm-svn: 310642