Jessica Paquette [Fri, 21 Dec 2018 17:05:26 +0000 (17:05 +0000)]
[GlobalISel][AArch64] Add support for widening G_FCEIL
This adds support for widening G_FCEIL in LegalizerHelper and
AArch64LegalizerInfo. More specifically, it teaches the AArch64 legalizer to
widen G_FCEIL from a 16-bit float to a 32-bit float when the subtarget doesn't
support full FP 16.
This also updates AArch64/f16-instructions.ll to show that we perform the
correct transformation.
llvm-svn: 349927
Greg Clayton [Fri, 21 Dec 2018 17:04:18 +0000 (17:04 +0000)]
Don't duplicate the logic that detects if a section can/should be loaded (NFC)
Prior to this there were 3 places that were duplicating the logic to detect if a section can/should be loaded and some were doing things a bit differently. Now it is all centralized in one place and it is done correctly.
llvm-svn: 349926
Bruno Ricci [Fri, 21 Dec 2018 16:51:57 +0000 (16:51 +0000)]
[AST][NFC] Pack CXXOperatorCallExpr
Use the space available in the bit-fields of Stmt.
This saves 8 bytes per CXXOperatorCallExpr. NFC.
llvm-svn: 349924
Sanjay Patel [Fri, 21 Dec 2018 16:49:41 +0000 (16:49 +0000)]
[x86] add tests for possible horizontal op transform; NFC
llvm-svn: 349923
Tom Stellard [Fri, 21 Dec 2018 16:20:37 +0000 (16:20 +0000)]
ReleaseNotes: Document removal of add_llvm_loadable_module CMake macro
This was removed in r349839.
llvm-svn: 349921
Sanjay Patel [Fri, 21 Dec 2018 16:08:27 +0000 (16:08 +0000)]
[x86] move test for movddup; NFC
This adds an AVX512 run as suggested in D55936.
The test didn't really belong with other build vector tests
because that's not the pattern here. I don't see much value
in adding 64-bit RUNs because they wouldn't exercise the
isel patterns that we're aiming to expose.
llvm-svn: 349920
Louis Dionne [Fri, 21 Dec 2018 15:59:04 +0000 (15:59 +0000)]
[pstl] Initial integration with LLVM's CMake
Summary:
This commit adds a check-pstl CMake target that will run the tests
we currently have for pstl. Those tests are not using LLVM lit yet,
but switching them over should be a transparent change. With this
change, we can start relying on the `check-pstl` target for workflows
and CI.
Note that this commit purposefully does not support the pre-monorepo
layout (with subprojects in projects/), since LLVM is moving towards
the monorepo layout anyway.
Reviewers: jfb
Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits, mclow.lists, rodgert
Differential Revision: https://reviews.llvm.org/D55963
llvm-svn: 349919
Evandro Menezes [Fri, 21 Dec 2018 15:51:34 +0000 (15:51 +0000)]
[AArch64] Refactor Exynos predicate (NFC)
Change order of conditions in predicate.
llvm-svn: 349918
David Carlier [Fri, 21 Dec 2018 15:43:32 +0000 (15:43 +0000)]
[Sanitizer] Move the unit test in the right place.
llvm-svn: 349917
David Carlier [Fri, 21 Dec 2018 15:42:24 +0000 (15:42 +0000)]
[Sanitizer] Enable strtonum in FreeBSD
Reviewers: krytarowski, vitalybuka
Reviewed By: krytarowski
Differential Revision: https://reviews.llvm.org/D55993
llvm-svn: 349916
Simon Pilgrim [Fri, 21 Dec 2018 15:35:32 +0000 (15:35 +0000)]
[XCore] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349915
Simon Pilgrim [Fri, 21 Dec 2018 15:32:36 +0000 (15:32 +0000)]
[Sparc] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349914
Simon Pilgrim [Fri, 21 Dec 2018 15:29:47 +0000 (15:29 +0000)]
[AMDGPU] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349912
Simon Pilgrim [Fri, 21 Dec 2018 15:25:37 +0000 (15:25 +0000)]
[WebAssembly] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349911
Bruno Ricci [Fri, 21 Dec 2018 15:20:32 +0000 (15:20 +0000)]
[AST] Store the callee and argument expressions of CallExpr in a trailing array.
Since CallExpr::setNumArgs has been removed, it is now possible to store the
callee expression and the argument expressions of CallExpr in a trailing array.
This saves one pointer per CallExpr, CXXOperatorCallExpr, CXXMemberCallExpr,
CUDAKernelCallExpr and UserDefinedLiteral.
Given that CallExpr is used as a base of the above classes we cannot use
llvm::TrailingObjects. Instead we store the offset in bytes from the this pointer
to the start of the trailing objects and manually do the casts + arithmetic.
Some notes:
1.) I did not try to fit the number of arguments in the bit-fields of Stmt.
This leaves some space for future additions and avoid the discussion about
whether x bits are sufficient to hold the number of arguments.
2.) It would be perfectly possible to recompute the offset to the trailing
objects before accessing the trailing objects. However the trailing objects
are frequently accessed and benchmarks show that it is slightly faster to
just load the offset from the bit-fields. Additionally, because of 1),
we have plenty of space in the bit-fields of Stmt.
Differential Revision: https://reviews.llvm.org/D55771
Reviewed By: rjmccall
llvm-svn: 349910
Simon Pilgrim [Fri, 21 Dec 2018 15:15:38 +0000 (15:15 +0000)]
[ARM] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349909
Simon Pilgrim [Fri, 21 Dec 2018 15:05:10 +0000 (15:05 +0000)]
[AArch64] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349908
Simon Pilgrim [Fri, 21 Dec 2018 14:56:18 +0000 (14:56 +0000)]
[SelectionDAG] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349907
Simon Pilgrim [Fri, 21 Dec 2018 14:50:54 +0000 (14:50 +0000)]
[SystemZ] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349906
Simon Pilgrim [Fri, 21 Dec 2018 14:48:35 +0000 (14:48 +0000)]
[Lanai] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349905
Bruno Ricci [Fri, 21 Dec 2018 14:35:24 +0000 (14:35 +0000)]
[Sema][NFC] Remove some unnecessary calls to getASTContext.
The AST context is already easily available. NFC.
llvm-svn: 349904
Simon Pilgrim [Fri, 21 Dec 2018 14:32:39 +0000 (14:32 +0000)]
[PPC] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
llvm-svn: 349903
Simon Pilgrim [Fri, 21 Dec 2018 14:25:14 +0000 (14:25 +0000)]
[X86] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the old KnownBits output paramater version.
llvm-svn: 349902
Bruno Ricci [Fri, 21 Dec 2018 14:10:18 +0000 (14:10 +0000)]
[AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr.
All of the other constructors already take a reference to the AST context.
This avoids calling Decl::getASTContext in most cases. Additionally move
the definition of the constructor from Expr.h to Expr.cpp since it is calling
DeclRefExpr::computeDependence. NFC.
llvm-svn: 349901
Luke Cheeseman [Fri, 21 Dec 2018 13:39:13 +0000 (13:39 +0000)]
[AArch64] Adding missing REQUIRES in aarch64 dwarf test
llvm-svn: 349900
Michal Gorny [Fri, 21 Dec 2018 13:37:30 +0000 (13:37 +0000)]
[xray] [tests] Detect and handle missing LLVMTestingSupport gracefully
Add a code to properly test for presence of LLVMTestingSupport library
when performing a stand-alone build, and skip tests requiring it when
it is not present. Since the library is not installed, llvm-config
reported empty --libs for it and the tests failed to link with undefined
references. Skipping the two fdr_* test files is better than failing to
build, and should be good enough until we find a better solution.
NB: both installing LLVMTestingSupport and building it automatically
from within compiler-rt sources are non-trivial. The former due to
dependency on gtest, the latter due to tight integration with LLVM
source tree.
Differential Revision: https://reviews.llvm.org/D55891
llvm-svn: 349899
Pavel Labath [Fri, 21 Dec 2018 13:04:34 +0000 (13:04 +0000)]
[ADT] IntervalMap: add overlaps(a, b) method
Summary:
This function checks whether the mappings in the interval map overlap
with the given range [a;b]. The motivation is to enable checking for
overlap before inserting a new interval into the map.
Reviewers: vsk, dblaikie
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D55760
llvm-svn: 349898
Dan Liew [Fri, 21 Dec 2018 11:57:31 +0000 (11:57 +0000)]
[CMake] Print out the list of sanitizers that the sanitizer_common tests will run against.
Summary:
This is a change requested by Vitaly Buka as prerequisite to landing
https://reviews.llvm.org/D55740.
Reviewers: vitalybuka, kubamracek
Subscribers: mgorny, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D55939
llvm-svn: 349897
Fedor Sergeev [Fri, 21 Dec 2018 11:49:05 +0000 (11:49 +0000)]
[NewPM] -print-module-scope -print-after now prints module even after invalidated Loop/SCC
-print-after IR printing generally can not print the IR unit (Loop or SCC)
which has just been invalidated by the pass. However, when working in -print-module-scope
mode even if Loop was invalidated there is still a valid module that we can print.
Since we can not access invalidated IR unit from AfterPassInvalidated instrumentation
point we can remember the module to be printed *before* pass. This change introduces
BeforePass instrumentation that stores all the information required for module printing
into the stack and then after pass (in AfterPassInvalidated) just print whatever
has been placed on stack.
Reviewed By: philip.pfaffe
Differential Revision: https://reviews.llvm.org/D55278
llvm-svn: 349896
Luke Cheeseman [Fri, 21 Dec 2018 10:45:08 +0000 (10:45 +0000)]
[Dwarf/AArch64] Return address signing B key dwarf support
- When signing return addresses with -msign-return-address=<scope>{+<key>},
either the A key instructions or the B key instructions can be used. To
correctly authenticate the return address, the unwinder/debugger must know
which key was used to sign the return address.
- When and exception is thrown or a break point reached, it may be necessary to
unwind the stack. To accomplish this, the unwinder/debugger must be able to
first authenticate an the return address if it has been signed.
- To enable this, the augmentation string of CIEs has been extended to allow
inclusion of a 'B' character. Functions that are signed using the B key
variant of the instructions should have and FDE whose associated CIE has a 'B'
in the augmentation string.
- One must also be able to preserve these semantics when first stepping from a
high level language into assembly and then, as a second step, into an object
file. To achieve this, I have introduced a new assembly directive
'.cfi_b_key_frame ', that tells the assembler the current frame uses return
address signing with the B key.
- This ensures that the FDE is associated with a CIE that has 'B' in the
augmentation string.
Differential Revision: https://reviews.llvm.org/D51798
llvm-svn: 349895
Simon Pilgrim [Fri, 21 Dec 2018 10:11:23 +0000 (10:11 +0000)]
Revert rL349876 from cfe/trunk: [analyzer] Perform escaping in RetainCountChecker on type mismatch even for inlined functions
The fix done in D55465 did not previously apply when the function was inlined.
rdar://
46889541
Differential Revision: https://reviews.llvm.org/D55976
........
Fixes broken buildbot: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/14764
llvm-svn: 349894
Haojian Wu [Fri, 21 Dec 2018 09:32:49 +0000 (09:32 +0000)]
[clangd] Cleanup syntax errors in the test, NFC.
llvm-svn: 349893
Simon Pilgrim [Fri, 21 Dec 2018 09:04:14 +0000 (09:04 +0000)]
[X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (llvm)
This auto upgrades the signed SSE saturated math intrinsics to SADD_SAT/SSUB_SAT generic intrinsics.
Clang counterpart: https://reviews.llvm.org/D55890
Differential Revision: https://reviews.llvm.org/D55894
llvm-svn: 349892
Bjorn Pettersson [Fri, 21 Dec 2018 08:51:04 +0000 (08:51 +0000)]
Fix warning about unused variable [NFC]
llvm-svn: 349891
Akira Hatanaka [Fri, 21 Dec 2018 07:05:36 +0000 (07:05 +0000)]
[Sema] Produce diagnostics when C++17 aligned allocation/deallocation
functions that are unavailable on Darwin are explicitly called or called
from deleting destructors.
rdar://problem/
40736230
Differential Revision: https://reviews.llvm.org/D47757
llvm-svn: 349890
Thomas Lively [Fri, 21 Dec 2018 06:58:15 +0000 (06:58 +0000)]
[WebAssembly] Fix invalid machine instrs in -O0, verify in tests
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55956
llvm-svn: 349889
Eric Fiselier [Fri, 21 Dec 2018 04:38:22 +0000 (04:38 +0000)]
Fix test case breakages caused by lexically_relative change
llvm-svn: 349888
Eric Fiselier [Fri, 21 Dec 2018 04:30:04 +0000 (04:30 +0000)]
Don't forward declare _FilesystemClock in C++03
llvm-svn: 349887
Eric Fiselier [Fri, 21 Dec 2018 04:27:45 +0000 (04:27 +0000)]
Fix copy paste error in file_clock tests
llvm-svn: 349886
Eric Fiselier [Fri, 21 Dec 2018 04:25:40 +0000 (04:25 +0000)]
Implement LWG 3096: path::lexically_relative is confused by trailing slashes
path("/dir/").lexically_relative("/dir"); now returns "." instead of ""
llvm-svn: 349885
Eric Fiselier [Fri, 21 Dec 2018 04:09:01 +0000 (04:09 +0000)]
Implement LWG 3065: Make path operators friends.
This prevents things like:
using namespace std::filesystem;
auto x = L"a/b" == std::string("a/b");
llvm-svn: 349884
Eric Fiselier [Fri, 21 Dec 2018 03:54:57 +0000 (03:54 +0000)]
Implement LWG 3145: file_clock breaks ABI for C++17 implementations.
This patch adds std::chrono::file_clock, but without breaking the
existing ABI for std::filesystem.
llvm-svn: 349883
Matt Arsenault [Fri, 21 Dec 2018 03:20:54 +0000 (03:20 +0000)]
AMDGPU/GlobalISel: RegBankSelect for amdgcn.wqm.vote
llvm-svn: 349882
Eric Fiselier [Fri, 21 Dec 2018 03:16:30 +0000 (03:16 +0000)]
Implement LWG 2936: Path comparison is defined in terms of the generic format
This patch implements path::compare according to the current spec. The
only observable change is the ordering of "/foo" and "foo", which orders
the two paths based on having or not having a root directory (instead
of lexically comparing "/" to "foo").
llvm-svn: 349881
Matt Arsenault [Fri, 21 Dec 2018 03:14:45 +0000 (03:14 +0000)]
AMDGPU/GlobalISel: RegBankSelect for some fp ops
llvm-svn: 349880
Matt Arsenault [Fri, 21 Dec 2018 03:03:12 +0000 (03:03 +0000)]
GlobalISel: Correct example PartialMapping table
When I try to use this, it seems like the second half needs
to start where the previous part left off.
llvm-svn: 349879
Matt Arsenault [Fri, 21 Dec 2018 03:03:11 +0000 (03:03 +0000)]
AMDGPU/GlobalISel: Redo legality for build_vector
It seems better to avoid using the callback if possible since
there are coverage assertions which are disabled if this is used.
Also fix missing tests. Only test the legal cases since it seems
legalization for build_vector is quite lacking.
llvm-svn: 349878
Eric Fiselier [Fri, 21 Dec 2018 02:17:00 +0000 (02:17 +0000)]
Mark two filesystem LWG issues as complete - nothing to do
llvm-svn: 349877
George Karpenkov [Fri, 21 Dec 2018 02:16:36 +0000 (02:16 +0000)]
[analyzer] Perform escaping in RetainCountChecker on type mismatch even for inlined functions
The fix done in D55465 did not previously apply when the function was inlined.
rdar://
46889541
Differential Revision: https://reviews.llvm.org/D55976
llvm-svn: 349876
George Karpenkov [Fri, 21 Dec 2018 02:16:23 +0000 (02:16 +0000)]
[analyzer] Fix a bug in RetainCountDiagnostics while printing a note on mismatched summary in inlined functions
Previously, we were not printing a note at all if at least one of the parameters was not annotated.
rdar://
46888422
Differential Revision: https://reviews.llvm.org/D55972
llvm-svn: 349875
Jim Ingham [Fri, 21 Dec 2018 01:45:28 +0000 (01:45 +0000)]
"help finish" tells you it is an alias. "help fin" doesn't.
They both run the same command, and people get used to typing the shortest
string they can, so we should support alias info on shortened strings as well.
<rdar://problem/
46859207>
llvm-svn: 349874
Reid Kleckner [Fri, 21 Dec 2018 01:41:20 +0000 (01:41 +0000)]
[memcpyopt] Add debug logs when forwarding memcpy src to dst
llvm-svn: 349873
Reid Kleckner [Fri, 21 Dec 2018 01:40:29 +0000 (01:40 +0000)]
[mingw] Don't mangle thiscall like fastcall etc
GCC does not mangle it when it is not explicit in the source. The
mangler as currently written cannot differentiate between explicit and
implicit calling conventions, so we can't match GCC. Explicit thiscall
conventions are rare, so mangle as if the convention was implicit to be
as ABI compatible as possible.
Also fixes some tests using %itanium_abi_triple in some configurations
as a side effect.
Fixes PR40107.
llvm-svn: 349872
Eli Friedman [Fri, 21 Dec 2018 01:28:49 +0000 (01:28 +0000)]
[LoopUnroll] Don't verify domtree by default with +Asserts.
This verification is linear in the size of the function, so it can cause
a quadratic compile-time explosion in a function with many loops to
unroll.
Differential Revision: https://reviews.llvm.org/D54732
llvm-svn: 349871
Craig Topper [Fri, 21 Dec 2018 01:27:33 +0000 (01:27 +0000)]
[X86] Autogenerate complete checks. NFC
llvm-svn: 349870
Jonas Devlieghere [Fri, 21 Dec 2018 01:22:58 +0000 (01:22 +0000)]
Fix stack-buffer-overflow in lldb_private::Host::FindProcesses (2/2)
This fixes the second call at line 640 that I missed in r349858.
llvm-svn: 349869
Craig Topper [Fri, 21 Dec 2018 01:14:25 +0000 (01:14 +0000)]
[X86] Refactor hasNoCarryFlagUses and hasNoSignFlagUses in X86ISelDAGToDAG.cpp to tranlate opcode to condition code using the helpers in X86InstrInfo.cpp.
This shortens the switches in X86ISelDAGToDAG.cpp to only need to check condition code instead of a list of opcodes.
This also fixes a bug where the memory forms of SETcc were missing from hasNoCarryFlagUses.
llvm-svn: 349868
Craig Topper [Fri, 21 Dec 2018 01:14:23 +0000 (01:14 +0000)]
[X86] Add memory forms of some SETCC instructions to hasNoCarryFlagUses.
Found while working on another patch
llvm-svn: 349867
Artem Dergachev [Fri, 21 Dec 2018 01:11:21 +0000 (01:11 +0000)]
[driver] [analyzer] Fix --analyze -Xanalyzer after r349863.
If an -analyzer-config is passed through -Xanalyzer, it is not found while
looking for -Xclang.
Additionally, don't emit -analyzer-config-compatibility-mode for *every*
-analyzer-config flag we encounter; one is enough.
https://reviews.llvm.org/D55823
rdar://problem/
46504165
llvm-svn: 349866
Adrian Prantl [Fri, 21 Dec 2018 01:09:15 +0000 (01:09 +0000)]
Add an assertion to aid in tracking down a bug
llvm-svn: 349865
Adrian Prantl [Fri, 21 Dec 2018 01:09:14 +0000 (01:09 +0000)]
Remove ineffective (misspelled) sanitizer option
llvm-svn: 349864
George Karpenkov [Fri, 21 Dec 2018 00:26:19 +0000 (00:26 +0000)]
Revert "Revert "[driver] [analyzer] Fix a backward compatibility issue after r348038.""
This reverts commit
144927939587b790c0536f4ff08245043fc8d733.
Fixes the bug in the original commit.
llvm-svn: 349863
Artem Dergachev [Fri, 21 Dec 2018 00:18:58 +0000 (00:18 +0000)]
[analyzer] RetainCount: Suppress retain detection heuristic on some CM methods.
If it ends with "Retain" like CFRetain and returns a CFTypeRef like CFRetain,
then it is not necessarily a CFRetain. But it is indeed true that these two
return something retained.
Differential Revision: https://reviews.llvm.org/D55907
rdar://problem/
39390714
llvm-svn: 349862
Adrian Prantl [Thu, 20 Dec 2018 23:50:32 +0000 (23:50 +0000)]
Fix typo
llvm-svn: 349861
Rui Ueyama [Thu, 20 Dec 2018 23:47:39 +0000 (23:47 +0000)]
Remove dead code.
This code is no-op because of r349849.
Differential Revision: https://reviews.llvm.org/D55962
llvm-svn: 349859
Jonas Devlieghere [Thu, 20 Dec 2018 23:45:26 +0000 (23:45 +0000)]
Fix stack-buffer-overflow in lldb_private::Host::FindProcesses
Found by the address sanitizer on GreenDragon:
http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/1628/console
llvm-svn: 349858
Eli Friedman [Thu, 20 Dec 2018 23:39:54 +0000 (23:39 +0000)]
[ARM] Complete the Thumb1 shift+and->shift+shift transforms.
This saves materializing the immediate. The additional forms are less
common (they don't usually show up for bitfield insert/extract), but
they're still relevant.
I had to add a new target hook to prevent DAGCombine from reversing the
transform. That isn't the only possible way to solve the conflict, but
it seems straightforward enough.
Differential Revision: https://reviews.llvm.org/D55630
llvm-svn: 349857
Kuba Mracek [Thu, 20 Dec 2018 23:38:19 +0000 (23:38 +0000)]
[lldb] Add a "display-recognized-arguments" target setting to show recognized arguments by default
Differential Revision: https://reviews.llvm.org/D55954
llvm-svn: 349856
Zachary Turner [Thu, 20 Dec 2018 23:32:37 +0000 (23:32 +0000)]
[NativePDB] Create VarDecls for global variables.
Previously we would create these for local variables but not for
global variables.
Also updated existing tests which created global variables to check
for them in the resulting AST.
llvm-svn: 349854
Volodymyr Sapsai [Thu, 20 Dec 2018 23:26:29 +0000 (23:26 +0000)]
[CodeGen] Fix a test from r349848 by replacing `objc_` with `llvm.objc.`
llvm-svn: 349853
Vitaly Buka [Thu, 20 Dec 2018 23:25:26 +0000 (23:25 +0000)]
Revert "[asan] Disable test on powerpc64be"
Now the test is passing on that bot. Some incremental build issues?
This reverts commit
e00b5a5229ae02088d9f32a4e328eaa08abaf354.
llvm-svn: 349852
Adrian Prantl [Thu, 20 Dec 2018 23:16:47 +0000 (23:16 +0000)]
Disable a few tests on the green dragon sanitzier bot.
These are tests that found actual, but hard to fix, bugs that are
tracked elsewhere. Leaving them red only distracts from new failures
this bot finds.
llvm-svn: 349851
Rui Ueyama [Thu, 20 Dec 2018 22:54:41 +0000 (22:54 +0000)]
Simplify. NFC.
llvm-svn: 349850
Fangrui Song [Thu, 20 Dec 2018 22:46:01 +0000 (22:46 +0000)]
[ELF] Move IsNeeded logic from SymbolTable::addShared to MarkLive, and check IsUsedInRegularObj
Summary:
In glibc, libc.so is a linker script with an as-needed dependency on ld-linux-x86-64.so.2
GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc_nonshared.a AS_NEEDED ( /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ) )
ld-linux-x86-64.so.2 (as-needed) defines some symbols which resolve undefined references in libc.so.6, it will therefore be added as a DT_NEEDED entry, which isn't necessary.
The test case as-needed-not-in-regular.s emulates the libc.so scenario, where ld.bfd and gold don't add DT_NEEDED for a.so
The relevant code in gold/resolve.cc:
// If we have a non-WEAK reference from a regular object to a
// dynamic object, mark the dynamic object as needed.
if (to->is_from_dynobj() && to->in_reg() && !to->is_undef_binding_weak())
to->object()->set_is_needed();
in_reg() appears to do something similar to IsUsedInRegularObj.
This patch makes lld do the similar thing, but moves the check from
addShared to a later stage MarkLive where all symbols are scanned.
Reviewers: ruiu, pcc, espindola
Reviewed By: ruiu
Subscribers: emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D55902
llvm-svn: 349849
Volodymyr Sapsai [Thu, 20 Dec 2018 22:43:26 +0000 (22:43 +0000)]
[CodeGen] Fix assertion on emitting cleanup for object with inlined inherited constructor and non-trivial destructor.
Fixes assertion
> Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/Support/Casting.h, line 255.
It was triggered by trying to cast `FunctionDecl` to `CXXMethodDecl` as
`CGF.CurCodeDecl` in `CallBaseDtor::Emit`. It was happening because
cleanups were emitted in `ScalarExprEmitter::VisitExprWithCleanups`
after destroying `InlinedInheritingConstructorScope`, so
`CodeGenFunction.CurCodeDecl` didn't correspond to expected cleanup decl.
Fix the assertion by emitting cleanups before leaving
`InlinedInheritingConstructorScope` and changing `CurCodeDecl`.
Test cases based on a patch by Shoaib Meenai.
Fixes PR36748.
rdar://problem/
45805151
Reviewers: rsmith, rjmccall
Reviewed By: rjmccall
Subscribers: jkorous, dexonsmith, cfe-commits, smeenai, compnerd
Differential Revision: https://reviews.llvm.org/D55543
llvm-svn: 349848
Chen Zheng [Thu, 20 Dec 2018 22:37:05 +0000 (22:37 +0000)]
[InstCombine] [NFC] testcases for canonicalize MUL with NEG operand
llvm-svn: 349847
Tom Stellard [Thu, 20 Dec 2018 22:36:02 +0000 (22:36 +0000)]
Fix Windows build failures caused by r349839
llvm-svn: 349846
Erik Pilkington [Thu, 20 Dec 2018 22:32:04 +0000 (22:32 +0000)]
Add support for namespaces on #pragma clang attribute
Namespaces are introduced by adding an "identifier." before a
push/pop directive. Pop directives with namespaces can only pop a
attribute group that was pushed with the same namespace. Push and pop
directives that don't opt into namespaces have the same semantics.
This is necessary to prevent a pitfall of using multiple #pragma
clang attribute directives spread out in a large file, particularly
when macros are involved. It isn't easy to see which pop corripsonds
to which push, so its easy to inadvertently pop the wrong group.
Differential revision: https://reviews.llvm.org/D55628
llvm-svn: 349845
Vitaly Buka [Thu, 20 Dec 2018 22:29:54 +0000 (22:29 +0000)]
[asan] Disable test on powerpc64be
llvm-svn: 349844
Artem Dergachev [Thu, 20 Dec 2018 22:29:49 +0000 (22:29 +0000)]
Revert "[driver] [analyzer] Fix a backward compatibility issue after r348038."
This reverts commits r349824, r349828, r349835.
More buildbot failures were noticed.
Differential Revision: https://reviews.llvm.org/D55823
rdar://problem/
46504165
llvm-svn: 349843
Alex Lorenz [Thu, 20 Dec 2018 22:11:11 +0000 (22:11 +0000)]
[ObjC] Messages to 'self' in class methods that return 'instancetype' should
use the pointer to the class as the result type of the message
Prior to this commit, messages to self in class methods were treated as instance
methods to a Class value. When these methods returned instancetype the compiler
only saw id through the instancetype, and not the Interface *. This caused
problems when that return value was a receiver in a message send, as the
compiler couldn't select the right method declaration and had to rely on a
selection from the global method pool.
This commit modifies the semantics of such message sends and uses class messages
that are dispatched to the interface that corresponds to the class that contains
the class method. This ensures that instancetypes are correctly interpreted by
the compiler. This change is safe under ARC (as self can't be reassigned),
however, it also applies to MRR code as we are assuming that the user isn't
doing anything unreasonable.
rdar://
20940997
Differential Revision: https://reviews.llvm.org/D36790
llvm-svn: 349841
Tom Stellard [Thu, 20 Dec 2018 22:04:36 +0000 (22:04 +0000)]
cmake: Remove uses of add_llvm_loadable_module macro
This was removed from llvm in r349839.
llvm-svn: 349840
Tom Stellard [Thu, 20 Dec 2018 22:04:08 +0000 (22:04 +0000)]
cmake: Remove add_llvm_loadable_module()
Summary:
This function is very similar to add_llvm_library(), so this patch merges it
into add_llvm_library() and replaces all calls to add_llvm_loadable_module(lib ...)
with add_llvm_library(lib MODULE ...)
Reviewers: philip.pfaffe, beanz, chandlerc
Reviewed By: philip.pfaffe
Subscribers: chapuni, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D51748
llvm-svn: 349839
Nico Weber [Thu, 20 Dec 2018 21:57:12 +0000 (21:57 +0000)]
[gn check] Unbreak check-lld if llvm_install_binutils_symlinks is false
The check-lld target was missing the dependency on llvm-nm and llvm-objdump in that case.
Differential Revision: https://reviews.llvm.org/D55941
llvm-svn: 349836
Artem Dergachev [Thu, 20 Dec 2018 21:56:49 +0000 (21:56 +0000)]
[driver] [analyzer] Fix redundant test output.
The -c flag causes a .o file to appear every time we run a test.
Remove it.
Differential Revision: https://reviews.llvm.org/D55823
rdar://problem/
46504165
llvm-svn: 349835
Nico Weber [Thu, 20 Dec 2018 21:56:16 +0000 (21:56 +0000)]
[gn build] Add build file for clang/lib/CodeGen and llvm/lib/ProfileData/Coverage
Differential Revision: https://reviews.llvm.org/D55931
llvm-svn: 349834
Nico Weber [Thu, 20 Dec 2018 21:55:28 +0000 (21:55 +0000)]
[gn build] Add build files for clang/lib/{Frontend,Frontend/Rewrite,Serialization}
Differential Revision: https://reviews.llvm.org/D55930
llvm-svn: 349833
Nico Weber [Thu, 20 Dec 2018 21:54:13 +0000 (21:54 +0000)]
[gn build] Add build file for clang/lib/Driver
Mostly boring, except for the spurious dependency on StaticAnalyzer/Checkers --
see comments in the code.
Differential Revision: https://reviews.llvm.org/D55927
llvm-svn: 349832
Nico Weber [Thu, 20 Dec 2018 21:53:05 +0000 (21:53 +0000)]
[gn build] Add build file for clang/lib/Parse
Nothing really interesting. One thing to consider is where the clang_tablegen()
invocations that generate files that are private to a library should be. The
CMake build puts them in clang/include/clang/Parse (in this case), but maybe
putting them right in clang/lib/Parse/BUILD.gn makes mor sense. (For
clang_tablegen() calls that generate .inc files used by the public headers,
putting the call in the public BUILD file makes sense.)
For now, I've put the build file in the public header folder, since that
matches CMake and what I did in the last 2 clang patches, but I'm not sure I
like this.
Differential Revision: https://reviews.llvm.org/D55925
llvm-svn: 349831
Nico Weber [Thu, 20 Dec 2018 21:51:46 +0000 (21:51 +0000)]
[gn build] Add build files for clang-format and lib/{Format,Rewrite,Tooling/Core,Tooling/Inclusions}
Differential Revision: https://reviews.llvm.org/D55924
llvm-svn: 349830
Artem Dergachev [Thu, 20 Dec 2018 21:45:33 +0000 (21:45 +0000)]
[driver] [analyzer] Fix buildbots after r349824.
Buildbots can't find the linker, which we don't really need in our tests.
Differential Revision: https://reviews.llvm.org/D55823
rdar://problem/
46504165
llvm-svn: 349828
Martin Storsjo [Thu, 20 Dec 2018 21:35:59 +0000 (21:35 +0000)]
[llvm-objcopy] [COFF] Avoid memcpy() with null parameters in more places. NFC.
This fixes all cases of errors in asan+ubsan builds.
Also use std::copy instead of if+memcpy in the previously updated spot,
for consistency.
llvm-svn: 349826
Haibo Huang [Thu, 20 Dec 2018 21:33:59 +0000 (21:33 +0000)]
Declares __cpu_model as dso local
__builtin_cpu_supports and __builtin_cpu_is use information in __cpu_model to decide cpu features. Before this change, __cpu_model was not declared as dso local. The generated code looks up the address in GOT when reading __cpu_model. This makes it impossible to use these functions in ifunc, because at that time GOT entries have not been relocated. This change makes it dso local.
Differential Revision: https://reviews.llvm.org/D53850
llvm-svn: 349825
Artem Dergachev [Thu, 20 Dec 2018 21:26:40 +0000 (21:26 +0000)]
[driver] [analyzer] Fix a backward compatibility issue after r348038.
Since r348038 we emit an error every time an -analyzer-config option is not
found. The driver, however, suppresses this error with another flag,
-analyzer-config-compatibility-mode, so backwards compatibility is maintained,
while analyzer developers still enjoy the new typo-free experience.
The backwards compatibility turns out to be still broken when the -analyze
action is not specified; it is still possible to specify -analyzer-config
in that case. This should be fixed now.
Patch by Kristóf Umann!
Differential Revision: https://reviews.llvm.org/D55823
rdar://problem/
46504165
llvm-svn: 349824
Michael Kruse [Thu, 20 Dec 2018 21:24:54 +0000 (21:24 +0000)]
[CodeGen] Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.
Instead of generating llvm.mem.parallel_loop_access metadata, generate
llvm.access.group on instructions and llvm.loop.parallel_accesses on
loops. There is one access group per generated loop.
This is clang part of D52116/r349725.
Differential Revision: https://reviews.llvm.org/D52117
llvm-svn: 349823
Jessica Paquette [Thu, 20 Dec 2018 21:14:15 +0000 (21:14 +0000)]
[GlobalISel][AArch64] Add G_FCEIL to isPreISelGenericFloatingPointOpcode
If you don't do this, then if you hit a G_LOAD in getInstrMapping, you'll end
up with GPRs on the G_FCEIL instead of FPRs. This causes a fallback.
Add it to the switch, and add a test verifying that this happens.
llvm-svn: 349822
Jonas Devlieghere [Thu, 20 Dec 2018 21:02:55 +0000 (21:02 +0000)]
[API] Remove redundants get() from smart pointers. NFC
Removes redundant calls to ::get() from smart pointers in the source/API
directory..
llvm-svn: 349821
Richard Smith [Thu, 20 Dec 2018 20:58:53 +0000 (20:58 +0000)]
Make the "too many braces in scalar initialization" extension cause
SFINAE failures.
llvm-svn: 349820
David Blaikie [Thu, 20 Dec 2018 20:46:55 +0000 (20:46 +0000)]
DebugInfo: Fix for missing comp_dir handling with r349207
When deciding lazily whether a CU would be split or non-split I
accidentally dropped some handling for the line tables comp_dir (by
doing it lazily it was too late to be handled properly by the MC line
table code).
Move that bit of the code back to the non-lazy place.
llvm-svn: 349819
Jonas Devlieghere [Thu, 20 Dec 2018 20:44:23 +0000 (20:44 +0000)]
[dotest] Consider unexpected passes as failures.
Unexpected successes should be considered failures because they can hide
regressions when not addressed. When a test is fixed and not re-enabled,
it can easily regress without us noticing.
I couldn't find a good way to make this change other than changing it in
the unittest2 framework. I know this is less than optimal but since we
have the dependency checked in and the change is pretty fundamental to
the framework I think it's not unreasonable.
Differential revision: https://reviews.llvm.org/D55835
llvm-svn: 349818