Commit Graph

306223 Commits

Author SHA1 Message Date
Armando Montanez 8ed73c2058 [TextAPI][elfabi] Fix failing tests from D56020
llvm-svn: 349963
2018-12-21 21:44:09 +00:00
Craig Topper e58cd9cbc6 [X86] Add isel patterns to match BMI/TBMI instructions when lowering has turned the root nodes into one of the flag producing binops.
This fixes the patterns that have or/and as a root. 'and' is handled differently since thy usually have a CMP wrapped around them.

I had to look for uses of the CF flag because all these nodes have non-standard CF flag behavior. A real or/xor would always clear CF. In practice we shouldn't be using the CF flag from these nodes as far as I know.

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

llvm-svn: 349962
2018-12-21 21:42:43 +00:00
Dan Liew c6027e20d4 Fix comment typo.
llvm-svn: 349961
2018-12-21 21:41:43 +00:00
Dan Liew a8334ed571 Fix `static_assert()` scope in `CombinedAllocator`.
It should be at the class scope and not inside the `Init(...)` function
because we want to error out as soon as the wrong type is constructed.
At the function scope the `static_assert` is only checked if the
function might be called.

This is a follow up to r349957.

rdar://problem/45284065

llvm-svn: 349960
2018-12-21 21:41:37 +00:00
Dan Liew 09f6d77840 Fix `static_assert()` scope in `SizeClassAllocator32`.
It should be at the class scope and not inside the `Init(...)` function
because we want to error out as soon as the wrong type is constructed.
At the function scope the `static_assert` is only checked if the
function might be called.

This is a follow up to r349138.

rdar://problem/45284065

llvm-svn: 349959
2018-12-21 21:41:31 +00:00
Sanjay Patel 47a6129e26 [DAGCombiner] simplify code leading to scalarizeExtractedVectorLoad; NFC
llvm-svn: 349958
2018-12-21 21:26:30 +00:00
Dan Liew 14e0d9ed89 Introduce `AddressSpaceView` template parameter to `CombinedAllocator`.
Summary:
This is a follow up to https://reviews.llvm.org/D55764 .

For the ASan and LSan allocatorsthe type declarations have been modified
so that it's possible to create a combined allocator type that
consistently uses a different type of `AddressSpaceView`. We intend to
use this in future patches. For the other sanitizers they just use
`LocalAddressSpaceView` by default because we have no plans to use these
allocators in an out-of-process manner.

rdar://problem/45284065

Reviewers: kcc, dvyukov, vitalybuka, cryptoad, eugenis, kubamracek, george.karpenkov, yln

Subscribers: #sanitizers, llvm-commits

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

llvm-svn: 349957
2018-12-21 21:22:27 +00:00
Craig Topper 62ec024d3b [X86] Don't allow optimizeCompareInstr to replace a CMP with BEXTR if the sign flag is used.
The BEXTR instruction documents the SF bit as undefined.

The TBM BEXTR instruction has the same issue, but I'm not sure how to test it. With the control being an immediate we can determine the sign bit is 0 or the BEXTR would have been removed.

Fixes PR40060

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

llvm-svn: 349956
2018-12-21 21:16:26 +00:00
Aaron Ballman d914174d9b Switch from static_cast<> to cast<>, update identifier for coding conventions; NFC.
llvm-svn: 349955
2018-12-21 21:11:36 +00:00
Dan Liew d2c6af7358 Introduce `AddressSpaceView` template parameter to `SizeClassAllocator64`.
Summary:
This is a follow up patch to r349138.

This patch makes a `AddressSpaceView` a type declaration in the
allocator parameters used by `SizeClassAllocator64`. For ASan, LSan, and
the unit tests the AP64 declarations have been made templated so that
`AddressSpaceView` can be changed at compile time. For the other
sanitizers we just hard-code `LocalAddressSpaceView` because we have no
plans to use these allocators in an out-of-process manner.

rdar://problem/45284065

Reviewers: kcc, dvyukov, vitalybuka, cryptoad, eugenis, kubamracek, george.karpenkov

Subscribers: #sanitizers, llvm-commits

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

llvm-svn: 349954
2018-12-21 21:09:31 +00:00
Hyrum Wright 9fc3a5f438 [clang-tidy] Be more liberal about literal zeroes in abseil checks
Summary:
Previously, we'd only match on literal floating or integral zeroes, but I've now also learned that some users spell that value as int{0} or float{0}, which also need to be matched.

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

llvm-svn: 349953
2018-12-21 21:07:11 +00:00
Pete Cooper e5b64ea2b8 Convert some ObjC retain/release msgSends to runtime calls.
It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions.

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

Reviewed By: rjmccall

llvm-svn: 349952
2018-12-21 21:00:32 +00:00
Changpeng Fang 6f539294b5 AMDGPU: Don't peel of the offset if the resulting base could possibly be negative in Indirect addressing.
Summary:
  Don't peel of the offset if the resulting base could possibly be negative in Indirect addressing.
This is because the M0 field is of unsigned.

This patch achieves the similar goal as https://reviews.llvm.org/D55241, but keeps the optimization
if the base is known unsigned.

Reviewers:
  arsemn

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

llvm-svn: 349951
2018-12-21 20:57:34 +00:00
Armando Montanez 4cc2113114 [TextAPI][elfabi] Fix YAML support for weak symbols
Weak symbols are supposed to be supported in the ELF TextAPI
implementation, but the YAML handler didn't read or write the `Weak`
member of ELFSymbol. This change adds the YAML mapping and updates tests
to ensure correct behavior.

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

llvm-svn: 349950
2018-12-21 20:45:58 +00:00
Bruno Ricci d8c17673d7 [Sema][NFC] Fix a Wimplicit-fallthrough warning in CheckSpecializationInstantiationRedecl
All cases are covered so add an llvm_unreachable. NFC.

llvm-svn: 349949
2018-12-21 20:38:06 +00:00
Bruno Ricci 21636ab80c [AST][NFC] Remove stale comment in CXXRecordDecl::is(Virtually)DerivedFrom.
The "this" capture was removed in r291939.

llvm-svn: 349948
2018-12-21 20:23:07 +00:00
Louis Dionne 9f3561c292 [libcxx] Remove unused macro _LIBCPP_HAS_UNIQUE_TYPEINFO
Summary:
We already have the negation of that as _LIBCPP_HAS_NONUNIQUE_TYPEINFO.
Having both defined is confusing, since only one of them is used.

Reviewers: EricWF, mclow.lists

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

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

llvm-svn: 349947
2018-12-21 20:14:43 +00:00
Stella Stamenova 569ac69809 [lldbsuite] Skip flakey Windows tests
Skip a number of tests on Windows that are flakey and will pass/fail unexpectedly every dozen or so runs.

llvm-svn: 349946
2018-12-21 20:10:45 +00:00
Reid Kleckner 84a2d29681 [BasicAA] Fix AA bug on dynamic allocas and stackrestore
Summary:
BasicAA has special logic for unescaped allocas, which normally applies
equally well to dynamic and static allocas. However, llvm.stackrestore
has the power to end the lifetime of dynamic allocas, without referring
to them directly.

stackrestore is already marked with the most conservative memory
modification attributes, but because the alloca is not escaped, the
normal logic produces incorrect results. I think BasicAA needs a special
case here to teach it about the relationship between dynamic allocas and
stackrestore.

Fixes PR40118

Reviewers: gbiv, efriedma, george.burgess.iv

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 349945
2018-12-21 19:59:03 +00:00
Anna Thomas 18be3cb606 [RuntimeUnrolling] NFC: Add TODO and comments in connectProlog
Currently, runtime unrolling does not support loops where multiple
exiting blocks exit to the latchExit. Added TODO and other code
clarifications for ConnectProlog code.

llvm-svn: 349944
2018-12-21 19:45:05 +00:00
George Karpenkov d76cc59d9c [analyzer] Tests quickfix.
llvm-svn: 349943
2018-12-21 19:40:44 +00:00
Alex Lorenz d92b1ae1d7 Remove stat cache chaining as it's no longer needed after PTH support has been
removed

Stat cache chaining was implemented for a StatListener in the PTH writer so that
it could write out the stat information to PTH. r348266 removed support for PTH,
and it doesn't seem like there are other uses of stat cache chaining. We can
remove the chaining support.

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

llvm-svn: 349942
2018-12-21 19:33:09 +00:00
Rui Ueyama afe9673df2 Add a doc for missing key function and an error message referencing the doc.
Summary:
This is a common error, and because many people don't know what the key
function is, it is sometimes very confusing.

The doc was originally written by Brooks Moses and slightly edited by me.

Reviewers: MaskRay, espindola

Subscribers: emaste, llvm-commits, arichardson

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

llvm-svn: 349941
2018-12-21 19:28:49 +00:00
Aaron Ballman 88b36702dc Switch from cast<> to dyn_cast<>.
This avoids a potential failed assertion that is happening on someone's out-of-tree build.

llvm-svn: 349940
2018-12-21 19:16:38 +00:00
George Karpenkov 255b05820c Revert "Revert rL349876 from cfe/trunk: [analyzer] Perform escaping in RetainCountChecker on type mismatch even for inlined functions"
This reverts commit b44b33f6e020a2c369da2b0c1d53cd52975f2526.

Revert the revert with the fix.

llvm-svn: 349939
2018-12-21 19:13:40 +00:00
George Karpenkov 79f0340c53 [analyzer] Correct the summary violation diagnostics for the retain count checker
It should be in the past tense.

llvm-svn: 349938
2018-12-21 19:13:28 +00:00
Sanjay Patel 80187b8a17 [x86] add movddup specialization for build vector lowering (PR37502)
This is admittedly a narrow fix for the problem:
https://bugs.llvm.org/show_bug.cgi?id=37502
...but as the XOP restriction shows, it's a maze to get this right. 
In the motivating example, note that we have movddup before SSE4.1 and 
again with AVX2. That's because insertps isn't available pre-SSE41 and 
vbroadcast is (more generally) available with AVX2 (and the splat is 
reduced to movddup via isel pattern).

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

llvm-svn: 349937
2018-12-21 18:48:32 +00:00
Florian Hahn 8c9f865e3d [ARM] Set Defs = [CPSR] for COPY_STRUCT_BYVAL, as it clobbers CPSR.
Fixes PR35023.

Reviewers: MatzeB, t.p.northover, sunfish, qcolombet, efriedma

Reviewed By: efriedma

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

llvm-svn: 349935
2018-12-21 18:07:10 +00:00
Bruno Ricci c4ba546ab8 [AST][NFC] Fix Wsign-compare warning introduced in CXXOperatorCallExpr
llvm-svn: 349934
2018-12-21 17:54:51 +00:00
Bruno Ricci e5bcf0beb1 [Sema][NFC] Fix Wimplicit-fallthrough warning in getCursorKindForDecl
All cases are covered so add an llvm_unreachable. NFC.

llvm-svn: 349933
2018-12-21 17:52:13 +00:00
Louis Dionne 5517aa6172 [NFC] Fix typo in comment
llvm-svn: 349932
2018-12-21 17:32:23 +00:00
Simon Pilgrim 6a9ada8c02 [SelectionDAG] Remove KnownBits output paramater version.
Completes the work started by @bogner in rL340594.

llvm-svn: 349931
2018-12-21 17:29:38 +00:00
Julie Hockett e2e73b221b [clang-tidy] Add export-fixes flag to clang-tidy-diff
Differential Revision: https://reviews.llvm.org/D55848

llvm-svn: 349930
2018-12-21 17:25:27 +00:00
Sanjay Patel a87fba4e92 [x86] remove excess check lines; NFC
Forgot that the integer variants have an extra 's'.

llvm-svn: 349929
2018-12-21 17:19:43 +00:00
Sanjay Patel 252660c1ff [x86] move misplaced tests; NFC
Mixed up integer and FP in rL349923.

llvm-svn: 349928
2018-12-21 17:06:43 +00:00
Jessica Paquette 453ab1db5b [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
2018-12-21 17:05:26 +00:00
Greg Clayton 57577c0634 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
2018-12-21 17:04:18 +00:00
Bruno Ricci feb1923c7a [AST][NFC] Pack CXXOperatorCallExpr
Use the space available in the bit-fields of Stmt.
This saves 8 bytes per CXXOperatorCallExpr. NFC.

llvm-svn: 349924
2018-12-21 16:51:57 +00:00
Sanjay Patel 41eebdefa7 [x86] add tests for possible horizontal op transform; NFC
llvm-svn: 349923
2018-12-21 16:49:41 +00:00
Tom Stellard ed713c55b2 ReleaseNotes: Document removal of add_llvm_loadable_module CMake macro
This was removed in r349839.

llvm-svn: 349921
2018-12-21 16:20:37 +00:00
Sanjay Patel fef39ecd31 [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
2018-12-21 16:08:27 +00:00
Louis Dionne 5e334b516b [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
2018-12-21 15:59:04 +00:00
Evandro Menezes 96c11eceb2 [AArch64] Refactor Exynos predicate (NFC)
Change order of conditions in predicate.

llvm-svn: 349918
2018-12-21 15:51:34 +00:00
David Carlier c46751593b [Sanitizer] Move the unit test in the right place.
llvm-svn: 349917
2018-12-21 15:43:32 +00:00
David Carlier 7c21d95c9d [Sanitizer] Enable strtonum in FreeBSD
Reviewers: krytarowski, vitalybuka

Reviewed By: krytarowski

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

llvm-svn: 349916
2018-12-21 15:42:24 +00:00
Simon Pilgrim aa53fc15b7 [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
2018-12-21 15:35:32 +00:00
Simon Pilgrim 7787a02b23 [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
2018-12-21 15:32:36 +00:00
Simon Pilgrim 3c157d3fa3 [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
2018-12-21 15:29:47 +00:00
Simon Pilgrim ca8bca2ad3 [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
2018-12-21 15:25:37 +00:00
Bruno Ricci c5885cffc5 [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
2018-12-21 15:20:32 +00:00