Roman Lebedev [Tue, 19 Nov 2019 13:23:34 +0000 (16:23 +0300)]
[NFC][X86] Fixup comment in CodeGen/X86/cmov.ll
As noted in post-commit review for
https://reviews.llvm.org/D59035#inline-631659
Simon Pilgrim [Tue, 19 Nov 2019 13:18:31 +0000 (13:18 +0000)]
[ARM] Regenerate vector lane store tests
Simon Pilgrim [Tue, 19 Nov 2019 13:17:21 +0000 (13:17 +0000)]
[PowerPC] Regenerate vsx_insert_extract_le.ll tests
Nico Weber [Tue, 19 Nov 2019 13:16:55 +0000 (08:16 -0500)]
Revert "[RISCV] Support mutilib in baremetal environment"
This reverts commit
b6d7bbfa004310777cd41448ffc377aea082fc8c.
Driver/riscv64-toolchain.c fails on Windows.
evgeny [Tue, 19 Nov 2019 12:51:25 +0000 (15:51 +0300)]
[ThinLTO] Simplify code. NFC
Raphael Isemann [Tue, 19 Nov 2019 12:45:37 +0000 (13:45 +0100)]
[lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.py
I just used the mangled names as this test is anyway a Darwin-only ObjC++ test.
We probably should also test this on other platforms but that will be
another commit as we need to untangle the ObjC and C++ parts first.
Mitchell Balan [Tue, 19 Nov 2019 12:46:48 +0000 (07:46 -0500)]
[clang-tidy] modernize-use-override new option AllowOverrideAndFinal
Summary:
In addition to adding `override` wherever possible, clang-tidy's `modernize-use-override` nicely removes `virtual` when `override` or `final` is specified, and further removes override when final is specified. While this is great default behavior, when code needs to be compiled with gcc at high warning levels that include `gcc -Wsuggest-override` or `gcc -Werror=suggest-override`, clang-tidy's removal of the redundant `override` keyword causes gcc to emit a warning or error. This discrepancy / conflict has been noted by others including a comment on Stack Overflow and by Mozilla's Firefox developers.
This patch adds an AllowOverrideAndFinal option defaulting to 0 - thus preserving current behavior - that when enabled allows both `override` and `final` to co-exist, while still fixing all other issues.
The patch includes a test file verifying all combinations of virtual/override/final, and mentions the new option in the release notes.
Reviewers: alexfh, djasper, JonasToth
Patch by: poelmanc
Subscribers: JonasToth, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70165
Mitchell Balan [Tue, 19 Nov 2019 12:45:53 +0000 (07:45 -0500)]
[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a
Summary:
`readability-redundant-string-init` was one of several clang-tidy checks documented as failing for C++17. (The failure mode in C++17 is that it changes `std::string Name = ""`; to `std::string Name = Name;`, which actually compiles but crashes at run-time.)
Analyzing the AST with `clang -Xclang -ast-dump` showed that the outer `CXXConstructExprs` that previously held the correct SourceRange were being elided in C++17/2a, but the containing `VarDecl` expressions still had all the relevant information. So this patch changes the fix to get its source ranges from `VarDecl`.
It adds one test `std::string g = "u", h = "", i = "uuu", j = "", k;` to confirm proper warnings and fixit replacements in a single `DeclStmt` where some strings require replacement and others don't. The readability-redundant-string-init.cpp and readability-redundant-string-init-msvc.cpp tests now pass for C++11/14/17/2a.
Reviewers: gribozavr, etienneb, alexfh, hokein, aaron.ballman, gribozavr2
Patch by: poelmanc
Subscribers: NoQ, MyDeveloperDay, Eugene.Zelenko, dylanmckay, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D69238
Mitchell Balan [Tue, 19 Nov 2019 12:43:12 +0000 (07:43 -0500)]
Revert "[clang-tidy] modernize-use-override new option AllowOverrideAndFinal"
This reverts commit
50e99563fb0459f5160572eef3c4e6062b8ad3f2.
Mitchell Balan [Tue, 19 Nov 2019 12:38:01 +0000 (07:38 -0500)]
Revert "[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a"
This reverts commit
06f3dabe4a2e85a32ade27c0769b6084c828a206.
David Bozier [Tue, 19 Nov 2019 11:58:50 +0000 (11:58 +0000)]
[llvm-objdump] Print relocation addends in hexadecimal
Summary: Matches GNU objdump. Makes debugging easier for me as I'm working out addresses from symbol+addend, so it would be good to be calculating in a single format.
Reviewers: MaskRay, grimar, jhenderson, bd1976llvm
Reviewed By: jhenderson
Subscribers: sdardis, jrtc27, atanasyan, rupprecht, seiya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69997
Simon Pilgrim [Tue, 19 Nov 2019 11:55:14 +0000 (11:55 +0000)]
[X86][SSE] Remove XFormVExtractWithShuffleIntoLoad to prevent legalization infinite loops (PR43971)
As detailed in PR43971/D70267, the use of XFormVExtractWithShuffleIntoLoad causes issues where we end up in infinite loops of extract(targetshuffle(vecload)) -> extract(shuffle(vecload)) -> extract(vecload) -> extract(targetshuffle(vecload)), there are just too many legalization checks at every stage that we can't guarantee that extract(shuffle(vecload)) -> scalarload can occur.
At the moment we see a number of minor regressions as we don't fold extract(shuffle(vecload)) -> scalarload before legal ops, these can be addressed in future patches and extension of X86ISelLowering's combineExtractWithShuffle.
Raphael Isemann [Tue, 19 Nov 2019 10:49:55 +0000 (11:49 +0100)]
[lldb] Remove ClangExpressionDeclMap::ResolveUnknownTypes
Summary:
This is some really shady code. It's supposed to kick in after an expression already failed and then try to look
up "unknown types" that for some undocumented reason can't be resolved during/before parsing. Beside the
fact that we never mark any type as `EVUnknownType` in either swift-lldb or lldb (which means this code is unreachable),
this code doesn't even make the expression evaluation succeed if if would ever be executed but instead seems
to try to load more debug info that maybe any following expression evaluations might succeed.
This patch removes ClangExpressionDeclMap::ResolveUnknownTypes and the related data structures/checks/calls.
Reviewers: davide
Reviewed By: davide
Subscribers: aprantl, abidh, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70388
Thomas Preud'homme [Thu, 14 Nov 2019 14:42:01 +0000 (14:42 +0000)]
Fix PR44001: assert failure in getFunctionLocalOffsetAfterInsn
Summary:
Assert in getFunctionLocalOffsetAfterInsn() fails when processing a call
MachineInstr inside a bundle and compiling with debug info. This is
because labels are added by DwarfDebug::beginInstruction() which is
called for each top-level MI by EmitFunctionBody()'s for-loop iteration
but constructCallSiteEntryDIEs() which calls
getFunctionLocalOffsetAfterInsn() iterates over all MIs.
This commit modifies constructCallSiteEntryDIEs() to get the associated
bundle MI for call MIs inside a bundle and use that to when calling
getFunctionLocalOffsetAfterInsn() and getLabelAfterInsn(). It also skips
loop iterations for bundle MIs since the loop statements are concerned
with debug info for each physical instructions and bundles represent a
group of instructions. It also fix the comment about PCAddr since the
code is getting the return address and not the call address.
Reviewers: dstenb, vsk, aprantl, djtodoro, dblaikie, NikolaPrica
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70293
Simon Atanasyan [Sat, 16 Nov 2019 07:23:37 +0000 (10:23 +0300)]
[mips] Joint MipsMemSimmXXXAsmOperand into the single template class. NFC
LLVM GN Syncbot [Tue, 19 Nov 2019 10:34:24 +0000 (10:34 +0000)]
gn build: Merge
e8a4c74f115
Balázs Kéri [Mon, 18 Nov 2019 15:02:36 +0000 (16:02 +0100)]
[clang-tidy] Added DefaultOperatorNewCheck.
Summary:
Added new checker 'cert-default-operator-new' that checks for
CERT rule MEM57-CPP. Simple version.
Reviewers: aaron.ballman, alexfh, JonasToth, lebedev.ri
Reviewed By: aaron.ballman
Subscribers: hiraditya, martong, mehdi_amini, mgorny, inglorion, xazax.hun, dkrupp, steven_wu, dexonsmith, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67545
Evgeniy Brevnov [Tue, 19 Nov 2019 10:26:24 +0000 (17:26 +0700)]
[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses. Fix for https://bugs.llvm.org/show_bug.cgi?id=42151
Summary:
Dependence anlysis has a mechanism to cache results. Thus for particular memory access the cache keep track of side effects in basic blocks. The problem is that for invariant loads dependepce analysis legally ignores many dependencies due to a special semantic rules for such loads. But later results calculated for invariant load retrived from the cache for general case acceses. As a result we have wrong dependence information causing GVN to do illegal transformation. Fixes, T42151.
Proposed solution is to disable caching of invariant loads. I think such loads a pretty rare and it doesn't make sense to extend caching mechanism for them.
Reviewers: reames, chandlerc, skatkov, morisset, jdoerfert
Reviewed By: reames
Subscribers: hiraditya, test, jdoerfert, lebedev.ri, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64405
Zakk Chen [Tue, 19 Nov 2019 06:15:50 +0000 (22:15 -0800)]
[RISCV] Support mutilib in baremetal environment
Currently only support the set of multilibs same to riscv-gnu-toolchain.
Reviewers: espindola, asb, kito-cheng, lenary
Reviewed By: lenary
Differential Revision: https://reviews.llvm.org/D67508
evgeny [Tue, 19 Nov 2019 09:46:09 +0000 (12:46 +0300)]
[ThinLTO] Make ValueInfo::operator bool() explicit
Differential revision: https://reviews.llvm.org/D70383
Mikhail Maltsev [Tue, 19 Nov 2019 09:57:04 +0000 (09:57 +0000)]
[libunwind] Adjust the signal_frame test for Arm
Summary:
This patch adjusts the signal_frame.pass.cpp to pass on Arm targets:
* When Arm EHABI is used the unwinder does not use DWARF, hence the
DWARF-specific check unw_is_signal_frame() must be disabled.
* Certain C libraries don't include EH tables, so the unwinder must
not try to step out of main(). The patch moves the test code out of
main() into a separate function to avoid this.
Reviewers: saugustine, ostannard, phosek, jfb, mclow.lists
Reviewed By: saugustine
Subscribers: dexonsmith, aprantl, kristof.beyls, christof, libcxx-commits, pbarrio, labrinea
Tags: #libc
Differential Revision: https://reviews.llvm.org/D70397
LLVM GN Syncbot [Tue, 19 Nov 2019 09:55:01 +0000 (09:55 +0000)]
gn build: Merge
c0fc29c4684
LLVM GN Syncbot [Tue, 19 Nov 2019 09:55:01 +0000 (09:55 +0000)]
gn build: Merge
39285a0f02c
Sven van Haastregt [Tue, 19 Nov 2019 09:54:07 +0000 (09:54 +0000)]
[kate] Add various missing keywords
Patch by Pedro Olsen Ferreira.
Sam McCall [Fri, 15 Nov 2019 18:49:36 +0000 (19:49 +0100)]
[clangd] Fix hover 'local scope' to include class template params
Summary: Fixes the last part of https://github.com/clangd/clangd/issues/76
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70325
Diana Picus [Mon, 18 Nov 2019 09:39:33 +0000 (10:39 +0100)]
Mark PR44037 tests as XFAIL on AArch64 Linux dwo
These tests are failing with various assertion failures, but they all
throw the following error message first:
error: a.out 0x0000002d: adding range [0x14-0x24) which has a base that
is less than the function's low PC 0x40060c.
See llvm.org/pr44037.
Differential Revision: https://reviews.llvm.org/D70381
Sam McCall [Mon, 18 Nov 2019 20:29:17 +0000 (21:29 +0100)]
[clangd] More sensible output for constructors/destructors in hover.
Summary:
Previously: both had type void() and return type void.
Now: neither have a type. Constructors return T, destructors return void.
Reviewers: hokein
Subscribers: merge_guards_bot, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70317
Haojian Wu [Tue, 19 Nov 2019 09:39:19 +0000 (10:39 +0100)]
[clangd] Fix ps4 buildbot failure.
dynamic_cast on ps4 buildbot seems relying on rtti flag which is off by
default. Remove the dynamic_cast in the tests.
Nico Weber [Tue, 19 Nov 2019 09:39:26 +0000 (04:39 -0500)]
Revert "gn build: (manually) try to merge
1689ad27af"
This reverts commit
e4ec2ecf6d4768d681a89263c0a4d29a7b7761ad.
1689ad27af was reverted as well.
Pavel Labath [Tue, 19 Nov 2019 08:55:17 +0000 (09:55 +0100)]
Add streaming/equality operators to DWARFAddressRange/DWARFLocationExpression
The main motivation for this is being able to write simpler assertions
and get better error messages in unit tests.
Split off from D70394.
Pavel Labath [Tue, 19 Nov 2019 08:54:24 +0000 (09:54 +0100)]
Add operator<< for object::SectionedAddress
The main motivation for this is better failure messages in unit tests.
Split off from D70394.
Haojian Wu [Tue, 19 Nov 2019 09:10:43 +0000 (10:10 +0100)]
Reland "[clangd] Implement rename by using SelectionTree and findExplicitReferences."
this reland the commit
4f80fc2491cc35730a9a84b86975278b7daa8522 which
has been reverted at
f805c60a093325c16ce4200d2615ef48555d9cb8.
Fixed windows buildbot failure (by adding -fno-delayed-template-parsing flag).
czhengsz [Tue, 19 Nov 2019 08:46:55 +0000 (03:46 -0500)]
[APInt] add wrap support for `setBits` and `getBitsSet`
Add two new interfaces getBitsSet and getBitsSetWithWrap
Reviewed by: lebedev.ri, craig.topper
Differential Revision: https://reviews.llvm.org/D69032
Sam Parker [Tue, 19 Nov 2019 08:41:37 +0000 (08:41 +0000)]
[ARM][MVE] Enable narrow vectors for tail pred
Remove the restriction, from the mve tail predication pass, that the
all masked vectors instructions need to be 128-bits. This allows us
to supported extending loads and truncating stores.
Differential Revision: https://reviews.llvm.org/D69946
mydeveloperday [Tue, 19 Nov 2019 08:34:23 +0000 (08:34 +0000)]
[clang-format] [NFC] add recent changes to release notes
Summary: clang-tidy keeps nice release notes of what is added, have clang-format do the same.
Reviewers: klimek, mitchell-stellar, sylvestre.ledru, sammccall
Reviewed By: mitchell-stellar
Subscribers: merge_guards_bot, Eugene.Zelenko, cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D70355
Evgeniy Brevnov [Tue, 19 Nov 2019 08:06:34 +0000 (15:06 +0700)]
[NFC] Test commit. Please ignore.
As a test commit I fixed a misspelling in one of comments in SLP
vectorizer.
Hans Wennborg [Tue, 19 Nov 2019 08:37:31 +0000 (09:37 +0100)]
Revert
1689ad27af5 "[builtins] Implement rounding mode support for i386/x86_64"
It broke the build with MSVC:
fp_mode.c(20): error C2065: '__asm__': undeclared identifier
> Differential Revision: https://reviews.llvm.org/D69870
Sam Parker [Mon, 18 Nov 2019 17:07:56 +0000 (17:07 +0000)]
[ARM][MVE] Tail predication conversion
This patch modifies ARMLowOverheadLoops to convert a predicated
vector low-overhead loop into a tail-predicatd one. This is currently
a very basic conversion, with the following restrictions:
- Operates only on single block loops.
- The loop can only contain a single vctp instruction.
- No other instructions can write to the vpr.
- We only allow a subset of the mve instructions in the loop.
TODO: Pass the number of elements, not the number of iterations to
dlstp/wlstp.
Differential Revision: https://reviews.llvm.org/D69945
Paweł Bylica [Mon, 18 Nov 2019 10:59:48 +0000 (11:59 +0100)]
[X86] Add more addcarry tests
Summary: More addcarry tests for incoming https://reviews.llvm.org/D70079.
Reviewers: davezarzycki, RKSimon, spatel, craig.topper
Reviewed By: spatel
Subscribers: craig.topper, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70237
Martin Storsjö [Mon, 18 Nov 2019 10:31:33 +0000 (12:31 +0200)]
[lldb-server] Use LLDB_LOG_ERROR to consume Error<> even if logging is disabled
Differential Revision: https://reviews.llvm.org/D70386
Puyan Lotfi [Tue, 19 Nov 2019 07:08:22 +0000 (02:08 -0500)]
Revert "[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline."
This reverts commit
58ea00b51fe9b011301484957556872fced7dd08.
Test for .o + .ifs sidecar files is brittle and failing on bots.
Reverting to unblock.
Puyan Lotfi [Sat, 16 Nov 2019 16:41:01 +0000 (11:41 -0500)]
[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline.
Up until now, clang interface stubs has replaced the standard
PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in
conjunction with it. So what when you build your code you will get an
a.out or lib.so as well as an interface stub file.
Example:
clang -shared -o libfoo.so -emit-interface-stubs ...
will generate both a libfoo.so and a libfoo.ifso. The .so file will
contain the code from the standard compilation pipeline and the .ifso
file will contain the ELF stub library.
Differential Revision: https://reviews.llvm.org/D70274
Matt Arsenault [Mon, 18 Nov 2019 06:54:31 +0000 (12:24 +0530)]
AMDGPU: Split test functions to avoid dependency on subtarget
Prepare this test for moving tthe denormal setting out of the
subtarget features.
Matt Arsenault [Fri, 17 May 2019 20:42:52 +0000 (16:42 -0400)]
bugpoint: Add option to disable attribute removal
This takes a long time and never reduces anything useful for me
(e.g. I've been waiting for 3 hours on a testcase and it hasn't found
any attributes to remove yet). This should probably start by assuming
no attributes matter, and adding back.
Craig Topper [Tue, 19 Nov 2019 03:13:06 +0000 (19:13 -0800)]
[SelectionDAG] Merge the two identical ExpandChainLibCall methods from LegalizeTypes and LegalizeDAG to one version in TaretLowering.
Reviewers: RKSimon, efriedma, spatel
Reviewed By: efriedma
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70354
Leonard Chan [Tue, 19 Nov 2019 04:05:57 +0000 (20:05 -0800)]
Revert "implement printing out raw section data of xcoff objectfile for llvm-objdump"
This reverts commit
8f8a9f3437d4517f674395da30edb59d5514f7bc.
Reverting since this patch seems to break a lot of llvm buildbots.
Rui Ueyama [Tue, 19 Nov 2019 03:05:16 +0000 (12:05 +0900)]
Revert "Fix shared lib build."
This reverts commit
17e37ba57a696198c9744eeba4f8f293f155587a
because it introduced a circular dependency between Core and Common.
Because
d0371f473675ede1d79a615ec4fdf0cf5368944c fixed a build issue,
we no longer need that dependency.
Rui Ueyama [Tue, 19 Nov 2019 02:16:59 +0000 (11:16 +0900)]
Fix component build
b11386f9be9b2dc7276a758d64f66833da10bdea broke lld build
if `-DBUILD_SHARED_LIBS=ON` is passed to CMake.
Kai Luo [Tue, 19 Nov 2019 01:57:23 +0000 (09:57 +0800)]
Revert "[Bindings][Go] Fix go.test failure due to missing argument"
This reverts commit
88235812a71d99c082e7aa2ef9356d43d1f83a80 due to
d27a16eb392f39f9ee04ff5194b1eff3e189e6f8.
Kai Luo [Sun, 17 Nov 2019 01:58:42 +0000 (09:58 +0800)]
[Bindings][Go] Fix go.test failure due to missing argument
go.test failed with error
```
/tmp/gopath431502532/src/llvm.org/llvm/bindings/go/llvm/dibuilder.go:514:40: not enough arguments in call to _Cfunc_LLVMDIBuilderCreateTypedef
have (_Ctype_LLVMDIBuilderRef, _Ctype_LLVMMetadataRef, *_Ctype_char, _Ctype_ulong, _Ctype_LLVMMetadataRef, _Ctype_uint, _Ctype_LLVMMetadataRef)
want (*_Ctype_struct_LLVMOpaqueDIBuilder, *_Ctype_struct_LLVMOpaqueMetadata, *_Ctype_char, _Ctype_ulong, *_Ctype_struct_LLVMOpaqueMetadata, _Ctype_uint, *_Ctype_struct_LLVMOpaqueMetadata, _Ctype_uint)
```
This patch fixes above error.
Differential Revision: https://reviews.llvm.org/D70360
Jonas Devlieghere [Tue, 19 Nov 2019 01:00:03 +0000 (17:00 -0800)]
Revert "[CMake] Re-enable -Wno-gnu-anonymous-struct & -Wno-nested-anon-types."
Whoops, they should be enabled, not disabled.
Jonas Devlieghere [Tue, 19 Nov 2019 00:45:55 +0000 (16:45 -0800)]
[CMake] Re-enable -Wno-gnu-anonymous-struct & -Wno-nested-anon-types.
We're checking for support but we're discarding the result. My best
guess is that these warnings were disabled in the past. However, I don't
see a reason to keep it that way.
Andrew Browne [Mon, 18 Nov 2019 23:04:56 +0000 (15:04 -0800)]
Fix error message missed in commit
dde589389fcb8b5098f7a47f1b781b27d29a0cac.
Patch by Andrew Browne <browneee@google.com>
Reviewers: tejohnson, evgeny777
Reviewed By: tejohnson
Subscribers: arphaman, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70195
Jonas Devlieghere [Tue, 19 Nov 2019 00:02:12 +0000 (16:02 -0800)]
[Docs] Add reproducer documentation
This adds a page about LLDB reproducers. It describes how to use the
reproducers on the command line and lists some of the known
issues/limitations.
Differential revision: https://reviews.llvm.org/D70409
Aaron Puchert [Mon, 18 Nov 2019 23:54:02 +0000 (00:54 +0100)]
[OpenMP] Remove -Wl,-fini=__kmp_internal_end_fini
Summary:
The termination function duplicated the functionality of the
__attribute((destructor))-annotated function __kmp_internal_end_fini,
and we have no indication that this doesn't work.
The function might cause issues with link-time optimization turned on:
until very recently, none of the usual linkers was reporting functions
named in -Wl,-fini as used to the LTO plugin, so it might be dropped.
If the function is dropped, -Wl,-fini=__kmp_internal_end_fini doesn't
do what we want: with ld.bfd and lld it drops the FINI attribute from
.dynamic and with gold we get FINI = 0x0, which leads to a crash on
cleanup. This can be reproduced by building with
-DLLVM_ENABLE_PROJECTS="clang;openmp" \
-DLLVM_ENABLE_LTO=Thin \
-DLLVM_USE_LINKER=gold
The issue in lld has been fixed in
f95273f75aa, but gold remains without
fix so far.
Fixes PR43927.
Reviewers: JonChesterfield, jdoerfert, AndreyChurbanov
Reviewed By: AndreyChurbanov
Differential Revision: https://reviews.llvm.org/D69927
Wolfgang Pieb [Mon, 18 Nov 2019 20:28:04 +0000 (12:28 -0800)]
Revert "[clangd] Implement rename by using SelectionTree and findExplicitReferences."
This reverts commit
4f80fc2491cc35730a9a84b86975278b7daa8522.
Caused buildbot failure at
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/58251
LLVM GN Syncbot [Mon, 18 Nov 2019 23:33:25 +0000 (23:33 +0000)]
gn build: Merge
30e7ee3c4ba
Nico Weber [Mon, 18 Nov 2019 23:33:04 +0000 (18:33 -0500)]
gn build: (manually) try to merge
1689ad27af
Vedant Kumar [Mon, 18 Nov 2019 22:16:08 +0000 (14:16 -0800)]
[CodeGen] Assign locations to calls to special struct helpers
Assign artificial locations to calls to special struct-related helper
functions.
Such calls may not inherit a location if emitted within FinishFunction,
at which point the lexical scope stack may be empty, causing CGDebugInfo
to report the current DebugLoc as empty.
Fixes an IR verifier complaint about a call to '__destructor_8_s0' not
having a !dbg location attached.
rdar://
57293361
Steven Wu [Mon, 18 Nov 2019 22:51:41 +0000 (14:51 -0800)]
[llvm-cxxfilt] Improve strip-underscore behavior
Summary:
For platform that uses macho format, c++filt should be stripping the
leading underscore by default. Introduce the binutil compatible "-n"
option to control strip-undercore behaivor together with the existing
"-_" option and fallback to system default if none of them are set.
rdar://problem/
57173514
Reviewers: compnerd, erik.pilkington, dexonsmith, mattd
Reviewed By: compnerd, erik.pilkington
Subscribers: jkorous, ributzka, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70250
Teresa Johnson [Mon, 18 Nov 2019 21:55:52 +0000 (13:55 -0800)]
ThinLTO: Fix assembler to emit alwaysInline in the summary
Summary: The earlier commit (https://reviews.llvm.org/D70014) missed this one : If Always_Inline happens to be the only entry in FuncFlags, then the assembler will not print it in the summary.
Patch by Bharathi Seshadri <bseshadr@cisco.com>
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70323
Eric Christopher [Mon, 18 Nov 2019 22:41:37 +0000 (14:41 -0800)]
Temporarily revert "[SLP] fix miscompile on min/max reductions with extra uses (PR43948)"
as it causes an ICE on valid. A testcase was followed up on the original thread.
This reverts commit
a3e61946c5bd7bdfab15af76b292e52d6ffa27f7.
diggerlin [Mon, 18 Nov 2019 22:06:25 +0000 (17:06 -0500)]
Adding a test case for read-only data assembly writing for aix
SUMMARY:
Adding a test case for read-only data assembly writing for aix
Reviewers: daltenty,Xiangling_Liao
Subscribers: rupprecht, seiyai,hiraditya
Differential Revision: https://reviews.llvm.org/D70182
Sanjay Patel [Mon, 18 Nov 2019 21:23:55 +0000 (16:23 -0500)]
[SLP] reduce duplicated check lines in tests; NFC
Stefan Pintilie [Mon, 18 Nov 2019 21:50:44 +0000 (15:50 -0600)]
[PowerPC] Improve float vector gather codegen
This patch aims to improve the code generation for float vector gather on POWER9.
Patterns have been implemented to utilize instructions that deliver improved
performance.
Patch by: Kamau Bridgeman
Differential Revision: https://reviews.llvm.org/D62908
Erich Keane [Mon, 18 Nov 2019 21:38:56 +0000 (13:38 -0800)]
[NFC] Fix 'target' condition in checkTargetFeatures
checkTargetFeatures was incorrectly checking for cpu_specific instead of
just 'target'. While this function was never called in that situation,
it seemed correct to fix the condition. Additionally, multiversion
functions can never be always_inline, but if any function accidentially
ended up here we shouldn't diagnose.
Note that the adding of target-features to the list is unnecessary since
the getFunctionFeatureMap actually considers attribute target,
however adding it results in significantly better error messages by
putting the 'target' features first (and thus first to fail).
Otherwise, the error message would be the first feature 'implied' by the
target attribute, and not necessarily the feature listed in the
attribute itself.
Michał Górny [Mon, 18 Nov 2019 21:07:02 +0000 (22:07 +0100)]
[lldb] [test] XFAIL more lldb-server tests on NetBSD
Michał Górny [Mon, 18 Nov 2019 20:56:56 +0000 (21:56 +0100)]
[lldb] [test] Mark segv-related tests XFAIL on NetBSD
There seems to be a regression in the kernel causing those tests
to fail. Mark them XFAIL, to be addressed later.
Michał Górny [Mon, 18 Nov 2019 20:53:56 +0000 (21:53 +0100)]
[lldb] [unittest] Skip TestStopReplyContainsThreadPcs on NetBSD
Michał Górny [Mon, 18 Nov 2019 20:47:21 +0000 (21:47 +0100)]
[lldb] [unittest] Reenable MainLoopTest.DetectsEOF on NetBSD
The underlying issue is already fixed in the NetBSD kernel for some
time, so we can finally reenable the test.
Louis Dionne [Mon, 18 Nov 2019 21:27:42 +0000 (16:27 -0500)]
[libc++] Separate -include and path to the site config file
This apparently breaks weird use cases where the build directory is on
a separate drive. Someone reported that failure to me privately.
I can't remember of a reason for collating the two arguments in the
first place, so I don't think this should break anything.
Cyndy Ishida [Mon, 18 Nov 2019 21:13:40 +0000 (13:13 -0800)]
Fix iOSDarwin()'s doc comment.
Summary:
I saw the doc comment using the Option + Click in Xcode and I was
confused by the fact that tvOS wasn't listed. The method definition
also doesn't make it clear that the check for tvOS is taking place as
the tvOS check is hidden in the isiOS() check.
Reviewers: rjmccall
Reviewed By: rjmccall
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70364
This patch is from Varun Gandhi <varun_gandhi@apple.com>
Daniel Sanders [Fri, 15 Nov 2019 23:08:34 +0000 (15:08 -0800)]
[macho] Allow CPUSubtype to contribute to architecture identification
Summary:
Sometimes the CPUSubtype determines the Triple::ArchType that must be used.
Add the subtype to the API's to allow targets that need this to correctly
identify the contents of the binary.
Reviewers: pete
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70345
Daniel Sanders [Fri, 15 Nov 2019 22:58:57 +0000 (14:58 -0800)]
[macho] Allow CPUSubtype to be adjusted before writing it to a file
Summary:
It's not always possible for a target to provide a MachO CPUSubtype up
front as is required by the current implementation. Sometimes you need more
information like the particular CPU implementation you are targeting.
Give MCMachObjectTargetWriter subclasses the opportunity to modify the
CPUSubtype after the MCMachObjectTargetWriter is created but before the
object starts being written. Typically this would be done in response to
instructions from a TargetStreamer.
Reviewers: pete
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70344
Vedant Kumar [Tue, 12 Nov 2019 18:24:23 +0000 (10:24 -0800)]
[profile] Support online merging with continuous sync mode
Make it possible to use online profile merging ("%m" mode) with
continuous sync ("%c" mode).
To implement this, the merged profile is locked in the runtime
initialization step and either a) filled out for the first time or b)
checked for compatibility. Then, the profile can simply be mmap()'d with
MAP_SHARED set. With the mmap() in place, counter updates from every
process which uses an image are mapped onto the same set of physical
pages assigned by the filesystem cache. After the mmap() is set up, the
profile is unlocked.
Differential Revision: https://reviews.llvm.org/D69586
Teresa Johnson [Mon, 18 Nov 2019 20:03:58 +0000 (12:03 -0800)]
[ThinLTO] Avoid extra index lookup during promotion
Summary:
Pass down the already accessed ValueInfo to shouldPromoteLocalToGlobal,
to avoid an unnecessary extra index lookup.
Add some assertion checking to confirm we have a non-empty VI when
expected.
Also some misc cleanup, merging the two versions of
doImportAsDefinition, since one was only called by the other, and
unnecessarily passed in a member variable.
Reviewers: steven_wu, pcc, evgeny777
Reviewed By: evgeny777
Subscribers: mehdi_amini, inglorion, hiraditya, dexonsmith, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70337
Dimitry Andric [Mon, 18 Nov 2019 19:02:45 +0000 (20:02 +0100)]
Populate CUDA flags on FreeBSD too, as many other toolchains do.
Summary:
This allows `clang` to be used to compile CUDA programs. Compiled
simple helloworld.cu with this.
Reviewers: dim, emaste, tra, yaxunl, ABataev
Reviewed By: tra
Subscribers: dim, emaste, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69990
diggerlin [Mon, 18 Nov 2019 20:24:55 +0000 (15:24 -0500)]
implement printing out raw section data of xcoff objectfile for llvm-objdump
SUMMARY:
implement printing out raw section data of xcoff objectfile for llvm-objdump
and option -D --disassemble-all option for llvm-objdump
Reviewers: Sean Fertile
Subscribers: rupprecht, seiyai,hiraditya
Differential Revision: https://reviews.llvm.org/D70255
Dan Albert [Mon, 18 Nov 2019 20:16:45 +0000 (12:16 -0800)]
Fix _LIBCPP_HAS_ definitions for Android.
Summary:
Android added quick_exit()/at_quick_exit() in API level 21,
aligned_alloc() in API level 28, and timespec_get() in API level 29,
but has the other C11 features at all API levels (since they're basically
just coming from clang directly).
_LIBCPP_HAS_QUICK_EXIT and _LIBCPP_HAS_TIMESPEC_GET already existed,
so we can reuse them. (And use _LIBCPP_HAS_TIMESPEC_GET in a few more
places where _LIBCPP_HAS_C11_FEATURES has been used as a proxy. This
isn't correct for Android.)
_LIBCPP_HAS_ALIGNED_ALLOC is added, to cover aligned_alloc() (obviously).
Add a missing std:: before aligned_alloc in a cstdlib test, and remove a
couple of !defined(_WIN32)s now that we're explicitly testing
TEST_HAS_ALIGNED_ALLOC rather than TEST_HAS_C11_FEATURES.
Reviewers: danalbert, EricWF, mclow.lists
Reviewed By: danalbert
Subscribers: srhines, christof, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D69929
Craig Topper [Mon, 18 Nov 2019 20:17:49 +0000 (12:17 -0800)]
[X86] Add a 'break;' to the end of the last case in a switch to avoid surprising the next person to add a case after this one. NFC
Erik Pilkington [Mon, 18 Nov 2019 18:56:05 +0000 (10:56 -0800)]
[Sema] Fix a -Wobjc-signed-char-bool false-positive
Unsigned bit-field flags can only have boolean values, so handle that case in
Expr::isKnownToHaveBooleanValue.
rdar://
56256999
Dan Albert [Thu, 7 Nov 2019 20:40:05 +0000 (12:40 -0800)]
Update the docs for building libc++.
Summary:
Rewrite the in-tree build to be a clearer tl;dr like we have for the
out-of-tree build.
Reviewers: EricWF, mclow.lists, ldionne
Reviewed By: ldionne
Subscribers: dexonsmith, christof, ldionne, enh, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D69917
Teresa Johnson [Mon, 18 Nov 2019 15:05:05 +0000 (07:05 -0800)]
[ThinLTO] Promotion handling cleanup (NFC)
Summary:
Clean up the code that does GV promotion in the ThinLTO backends.
Specifically, we don't need to check whether we are importing since that
is already checked and handled correctly in shouldPromoteLocalToGlobal.
Simply call shouldPromoteLocalToGlobal, and if it returns true we are
guaranteed that we are promoting, whether or not we are importing (or in
the exporting module). This also makes the handling in getName()
consistent with that in getLinkage(), which checks the DoPromote parameter
regardless of whether we are importing or exporting.
Reviewers: steven_wu, pcc, evgeny777
Subscribers: mehdi_amini, inglorion, hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70327
Craig Topper [Mon, 18 Nov 2019 19:31:17 +0000 (11:31 -0800)]
[X86] Add AMD Matisse (znver2) model number to getHostCPUName and compiler-rt's getAMDProcessorTypeAndSubtype.
This is the CPUID model used on Ryzen 3000 series (Zen 2/Matisse) CPUs.
Patch by Alex James
Differential Revision: https://reviews.llvm.org/D70279
Pierre Habouzit [Fri, 8 Nov 2019 07:14:58 +0000 (23:14 -0800)]
Implement __attribute__((objc_direct)), __attribute__((objc_direct_members))
__attribute__((objc_direct)) is an attribute on methods declaration, and
__attribute__((objc_direct_members)) on implementation, categories or
extensions.
A `direct` property specifier is added (@property(direct) type name)
These attributes / specifiers cause the method to have no associated
Objective-C metadata (for the property or the method itself), and the
calling convention to be a direct C function call.
The symbol for the method has enforced hidden visibility and such direct
calls are hence unreachable cross image. An explicit C function must be
made if so desired to wrap them.
The implicit `self` and `_cmd` arguments are preserved, however to
maintain compatibility with the usual `objc_msgSend` semantics,
3 fundamental precautions are taken:
1) for instance methods, `self` is nil-checked. On arm64 backends this
typically adds a single instruction (cbz x0, <closest-ret>) to the
codegen, for the vast majority of the cases when the return type is a
scalar.
2) for class methods, because the class may not be realized/initialized
yet, a call to `[self self]` is emitted. When the proper deployment
target is used, this is optimized to `objc_opt_self(self)`.
However, long term we might want to emit something better that the
optimizer can reason about. When inlining kicks in, these calls
aren't optimized away as the optimizer has no idea that a single call
is really necessary.
3) the calling convention for the `_cmd` argument is changed: the caller
leaves the second argument to the call undefined, and the selector is
loaded inside the body when it's referenced only.
As far as error reporting goes, the compiler refuses:
- making any overloads direct,
- making an overload of a direct method,
- implementations marked as direct when the declaration in the
interface isn't (the other way around is allowed, as the direct
attribute is inherited from the declaration),
- marking methods required for protocol conformance as direct,
- messaging an unqualified `id` with a direct method,
- forming any @selector() expression with only direct selectors.
As warnings:
- any inconsistency of direct-related calling convention when
@selector() or messaging is used,
- forming any @selector() expression with a possibly direct selector.
Lastly an `objc_direct_members` attribute is added that can decorate
`@implementation` blocks and causes methods only declared there (and in
no `@interface`) to be automatically direct. When decorating an
`@interface` then all methods and properties declared in this block are
marked direct.
Radar-ID: rdar://problem/2684889
Differential Revision: https://reviews.llvm.org/D69991
Reviewed-By: John McCall
Craig Topper [Mon, 18 Nov 2019 19:14:13 +0000 (11:14 -0800)]
[LegalizeDAG] Convert strict fp nodes to libcalls without losing the chain.
Previously we mutated the node and then converted it to a libcall. But this loses the chain information.
This patch keeps the chain, but unfortunately breaks tail call optimization as the functions involved in deciding if a node is in tail call position can't handle the chain. But correct ordering seems more important to be right.
Somehow the SystemZ tests improved. I looked at one of them and it seemed that we're handling the split vector elements in a different order and that made the copies work better.
Differential Revision: https://reviews.llvm.org/D70334
Philip Reames [Mon, 18 Nov 2019 19:21:53 +0000 (11:21 -0800)]
[LoopPred/WC] Use a dominating widenable condition to remove analyze loop exits
This implements a version of the predicateLoopExits transform from IndVarSimplify extended to exploit widenable conditions - and thus be much wider in scope of legality. The code structure ends up being almost entirely different, so I chose to duplicate this into the LoopPredication pass instead of trying to reuse the code in the IndVars.
The core notions of the transform are as follows:
If we have a widenable condition which controls entry into the loop, we're allowed to widen it arbitrarily. Given that, it's simply a *profitability* question as to what conditions to fold into the widenable branch.
To avoid pass ordering issues, we want to avoid widening cases that would otherwise be dischargeable. Or... widen in a form which can still be discharged. Thus, we phrase the transform as selecting one analyzeable exit from the set of analyzeable exits to keep. This avoids creating pass ordering complexities.
Since none of the above proves that we actually exit through our analyzeable exits - we might exit through something else entirely - we limit ourselves to cases where a) the latch is analyzeable and b) the latch is predicted taken, and c) the exit being removed is statically cold.
Differential Revision: https://reviews.llvm.org/D69830
Francis Visoiu Mistrih [Mon, 18 Nov 2019 18:09:31 +0000 (10:09 -0800)]
Reland: [Remarks][Driver] Use different remark files when targeting multiple architectures
When the driver is targeting multiple architectures at once, for things
like Universal Mach-Os, we need to emit different remark files for each
cc1 invocation to avoid overwriting the files from a different
invocation.
For example:
$ clang -c -o foo.o -fsave-optimization-record -arch x86_64 -arch x86_64h
will create two remark files:
* foo-x86_64.opt.yaml
* foo-x86_64h.opt.yaml
Stefan Pintilie [Mon, 18 Nov 2019 19:08:22 +0000 (13:08 -0600)]
[PowerPC] Test case for vector float gather on ppc64le and ppc64
Test case to verify that the expected code is generated for a
vector float gather based on the patterns in tablegen for big
and little endian cases.
Patch by: Kamau Bridgeman
Differential Revision: https://reviews.llvm.org/D69443
Reid Kleckner [Mon, 18 Nov 2019 18:52:10 +0000 (10:52 -0800)]
Revert "[Remarks][Driver] Use different remark files when targeting multiple architectures"
This reverts commit
b4e2b112b58154a89171df39dae80044865ff4ff.
Test doesn't appear to pass on Windows, maybe all non-Mac.
Eric Christopher [Mon, 18 Nov 2019 18:45:23 +0000 (10:45 -0800)]
Temporarily Revert "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior="
and a follow-up NFC rearrangement as it's causing a crash on valid. Testcase is on the original review thread.
This reverts commits
af57dbf12e54f3a8ff48534bf1078f4de104c1cd and
e6584b2b7b2de06f1e59aac41971760cac1e1b79
Reid Kleckner [Mon, 18 Nov 2019 18:37:54 +0000 (10:37 -0800)]
Allocate builtins table earlier to fix bug found by ubsan
Follow up to
979da9a4c3ba
Francis Visoiu Mistrih [Mon, 18 Nov 2019 18:09:31 +0000 (10:09 -0800)]
[Remarks][Driver] Use different remark files when targeting multiple architectures
When the driver is targeting multiple architectures at once, for things
like Universal Mach-Os, we need to emit different remark files for each
cc1 invocation to avoid overwriting the files from a different
invocation.
For example:
$ clang -c -o foo.o -fsave-optimization-record -arch x86_64 -arch x86_64h
will create two remark files:
* foo-x86_64.opt.yaml
* foo-x86_64h.opt.yaml
Yi Kong [Thu, 26 Sep 2019 21:45:09 +0000 (14:45 -0700)]
[builtins] Implement rounding mode support for i386/x86_64
Differential Revision: https://reviews.llvm.org/D69870
Vedant Kumar [Thu, 14 Nov 2019 22:30:56 +0000 (14:30 -0800)]
[Signal] Allow llvm clients to opt into one-shot SIGPIPE handling
Allow clients of the llvm library to opt-in to one-shot SIGPIPE
handling, instead of forcing them to undo llvm's SIGPIPE handler
registration (which is brittle).
The current behavior is preserved for all llvm-derived tools (except
lldb) by means of a default-`true` flag in the InitLLVM constructor.
This prevents "IO error" crashes in long-lived processes (lldb is the
motivating example) which both a) load llvm as a dynamic library and b)
*really* need to ignore SIGPIPE.
As llvm signal handlers can be installed when calling into libclang
(say, via RemoveFileOnSignal), thereby overriding a previous SIG_IGN for
SIGPIPE, there is no clean way to opt-out of "exit-on-SIGPIPE" in the
current model.
Differential Revision: https://reviews.llvm.org/D70277
Jon Chesterfield [Mon, 18 Nov 2019 18:16:35 +0000 (18:16 +0000)]
[libomptarget][nfc] Move some source into common from nvptx
Summary:
[libomptarget][nfc] Move some source into common from nvptx
Moves some source that compiles cleanly under amdgcn into a common subdirectory
Includes some non-trivial files and some headers. Keeps the cuda file extension.
The build systems for different architectures seem unlikely to have much in
common. The idea is therefore to set include paths such that files under
common/src compile as if they were under arch/src as the mechanism for sharing.
In particular, files under common/src need to be able to include target_impl.h.
The corresponding -Icommon is left out in favour of explicit includes on the
basis that the it makes it clearer which files under common are used by a given
architecture.
Reviewers: jdoerfert, ABataev, grokos
Reviewed By: ABataev
Subscribers: jfb, mgorny, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D70328
Michael Liao [Mon, 18 Nov 2019 18:07:08 +0000 (13:07 -0500)]
Fix shared lib build.
Adrian Prantl [Mon, 18 Nov 2019 17:58:16 +0000 (09:58 -0800)]
Replace bitfield in lldb::Type with byte-sized members. (NFC)
Due to alginment and packing using separate members takes up the same
amount of space, but makes it far less cumbersome to deal with it in
constructors etc.
Julian Lettner [Mon, 18 Nov 2019 17:37:40 +0000 (09:37 -0800)]
[cmake] Factor out DEFAULT_SANITIZER_MIN_OSX_VERSION
Julian Lettner [Thu, 7 Nov 2019 00:41:40 +0000 (16:41 -0800)]
Bump sanitizer iOS deployment target to 9.0
Bump default value for `-miphoneos-version-min=x` to 9.0 (from 8.0).
TSan tests that use thread local storage `__thread` (e.g., tls_race.cpp)
are failing to link for the iOS simulator (arch=x86_64 and
-miphoneos-version-min=8.0) on internal/master (will be submitted to
Glacier train):
```
ld: targeted OS version does not support use of thread local variables in _main for architecture x86_64
```
iOS 9.0 was released 2015.