Commit Graph

372793 Commits

Author SHA1 Message Date
Craig Topper 84b8222705 [RISCV] Use separate Lo and Hi MemOperands when expanding BuildPairF64Pseudo and SplitF64Pseudo.
We generate two 4 byte loads or two stores as part of the expansion.
Previously the MemOperand was set the same for both to cover the
full 8 bytes. Now we set a separate 4 byte mem operand for each
with a 4 byte offset for the high part.
2020-11-22 00:46:12 -08:00
Esme-Yi 1c0941e152 [PowerPC] Extend folding RLWINM + RLWINM to post-RA.
Summary: We have the patterns to fold 2 RLWINMs before RA, while some RLWINM will be generated after RA, for example rGc4690b007743. If the RLWINM generated after RA followed by another RLWINM, we expect to perform the optimization too.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D89855
2020-11-22 07:37:24 +00:00
Kazu Hirata 68403af007 [MBP] Remove unused declaration shouldPredBlockBeOutlined (NFC)
The function was introduced on Jun 12, 2016 in commit
071d0f1807.  Its definition was removed
on Mar 2, 2017 in commit 1393761e0c.
2020-11-21 23:35:02 -08:00
Yashaswini 3ee08e3819 Add Semantic check for Flang OpenMP 4.5 - 2.15.3.2 and 2.15.3.3 shared and private clause
Semantic check to restrict the appearance of a variable that is part of another variable
 (as an array or structure element) in a PRIVATE or SHARED clause.

Test Cases:

omp-parallel-private01.f90
omp-parallel-private02.f90
omp-parallel-private03.f90
omp-parallel-private04.f90
omp-parallel-shared01.f90
omp-parallel-shared02.f90
omp-parallel-shared03.f90
omp-parallel-shared04.f90

Reviewed by: Kiran Chandramohan @kiranchandramohan , Valentin Clement @clementval

Differential Revision: https://reviews.llvm.org/D89395
2020-11-22 12:50:17 +05:30
Kazu Hirata 9d985082ad [MachineLICM] Remove unused declaration HoistRegion
The function definition was removed on Dec 22, 2011 in commit
in 1eed5b51e8.
2020-11-21 22:55:37 -08:00
Kazu Hirata c2309ff3d5 [SelectionDAG] Remove unused declaration ExpandStrictFPOp (NFC)
ExpandStrictFPOp started taking two parameters instead of one on Jan
10, 2020 in commit f678fc7660, but the
declaration for the single-perameter version has remained since.
2020-11-21 22:29:44 -08:00
Mircea Trofin 2482648a79 thinlto_embed_bitcode.ll: clarify grep should treat input as text
The input to the test's use of grep should be treated as text, and
that's not the case on certain Linux distros. Added --text.
2020-11-21 21:46:53 -08:00
Ella Ma 1756d67934 [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref
All these potential null pointer dereferences are reported by my static analyzer for null smart pointer dereferences, which has a different implementation from `alpha.cplusplus.SmartPtr`.

The checked pointers in this patch are initialized by Target::createXXX functions. When the creator function pointer is not correctly set, a null pointer will be returned, or the creator function may originally return a null pointer.

Some of them may not make sense as they may be checked before entering the function, but I fixed them all in this patch. I submit this fix because 1) similar checks are found in some other places in the LLVM codebase for the same return value of the function; and, 2) some of the pointers are dereferenced before they are checked, which may definitely trigger a null pointer dereference if the return value is nullptr.

Reviewed By: tejohnson, MaskRay, jpienaar

Differential Revision: https://reviews.llvm.org/D91410
2020-11-21 21:04:12 -08:00
Haowei Wu 914f6c4ff8 [StaticAnalyzer] Support struct annotations in FuchsiaHandleChecker
Support adding handle annotations to sturucture that contains
handles. All the handles referenced by the structure (direct
value or ptr) would be treated as containing the
release/use/acquire annotations directly.

Patch by Yu Shan

Differential Revision: https://reviews.llvm.org/D91223
2020-11-21 19:59:51 -08:00
Kazu Hirata def7cfb7ff [InstCombine] Use is_contained (NFC) 2020-11-21 15:47:11 -08:00
Michael Liao dcc06597b1 Fix shared build. 2020-11-21 17:07:42 -05:00
Fangrui Song 3324fd8a7b [libunwind] Delete unused handlerNotFound in unwind_phase1 2020-11-21 12:38:00 -08:00
Nikita Popov ded5928866 [BasicAA] Remove unnecessary sextOrSelf (NFC)
We are doing a sextOrTrunc directly afterwards, so this seems
useless. There is a multiplication in between, but truncating
before or after the multiplication should not make a difference.
2020-11-21 21:32:56 +01:00
Martin Storsjö 33fb9679ec [compiler-rt] [profile] Silence a warning about an unused function on mingw targets
This function is only used within the ifdef below.

Differential Revision: https://reviews.llvm.org/D91850
2020-11-21 22:14:35 +02:00
Nikita Popov 0d114f56d7 [BasicAA] Return DecomposedGEP (NFC)
Instead of requiring the caller to initialize the DecomposedGEP
structure and then passing it in by reference, make
DecomposeGEPExpression() responsible for initializing and returning
the structure.
2020-11-21 21:05:26 +01:00
Nikita Popov f4412c5ae4 [BasicAA] Remove some intermediate variables (NFC)
Use DecompGEP1.Offset instead of GEP1BaseOffset, etc. I found the
asymmetry of modifying DecompGEP1.VarIndices, but not modifying
DecompGEP1.Offset odd here.
2020-11-21 20:36:25 +01:00
clementval 952c9d3a91 [NFC] Fix typo in atomic 2020-11-21 14:32:31 -05:00
Valentin Clement aa179d8099 [flang][openmp] Separate memory-order-clause parser creating OmpClause node
This patch introduce the separate parser for the memory-order-clause from the general
OmpClauseList. This parser still creates OmpClause node and therefore can use all the feature
from TableGen and the OmpStructureChecker.
This is applied only for the Flush construct in this patch and it should be applied for
atomic as well.

This is the approach we disscussed several time during the weekly call.

Reviewed By: kiranchandramohan, sameeranjoshi

Differential Revision: https://reviews.llvm.org/D91839
2020-11-21 14:31:33 -05:00
Nikita Popov 913a99c474 [BasicAA] Remove stale FIXME (NFC)
If aliasGEP returns MayAlias, the code does fall through to
aliasPHI etc, so this FIXME is no longer applicable.
2020-11-21 20:07:26 +01:00
Harald van Dijk 4629afa101 [X86] Include %rip for 32-bit RIP-relative relocs for x32
%rip was only included for 64-bit RIP-relative relocations, but needs to be included for 32-bit as well.

Reviewed By: MaskRay, RKSimon

Differential Revision: https://reviews.llvm.org/D91339
2020-11-21 09:20:20 -08:00
Simon Pilgrim 5318f6c427 MachineDominators.h - remove unused <vector> include 2020-11-21 17:11:26 +00:00
Simon Pilgrim 7650d65505 DominanceFrontier - remove unused <vector> includes 2020-11-21 17:11:26 +00:00
Simon Pilgrim 63626a1995 [X86] Regenerate vector-reduce-or-cmp.ll
Fix AVX512 prefixes to appease update_llc_test_checks.py
2020-11-21 17:11:25 +00:00
sameeran joshi 1df8fa78e6 [Flang][OpenMP][NFC][2/2] Reorder OmpStructureChecker and simplify it.
`OmpStructureChecker` has too much boilerplate code in source file.

This patch:
  1. Use helpers from `check-directive-structure.h` and reduces the boilerplate.
  2. Use TableGen infrastructure as much as possible.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D90834
2020-11-21 22:37:35 +05:30
Nikita Popov 072ddff3f2 [BasicAA] Add recphi test with dynamic offset (NFC)
Currently, we don't recognize that %a an %p don't alias.
2020-11-21 17:37:41 +01:00
Michał Górny 8aea95f3cb [lldb] Reland "Use translated full ftag values"
Translate between abridged and full ftag values in order to expose
the latter in the gdb-remote protocol while the former are used by
FXSAVE/XSAVE...  This matches the gdb behavior.

The Shell/Register tests now rely on the new behavior, and therefore
are run on non-Darwin systems only.  The Python (API) test relies
on the legacy behavior, and is run on Darwin only.

Differential Revision: https://reviews.llvm.org/D91504
2020-11-21 17:11:38 +01:00
Paul C. Anagnostopoulos 9b7b8de6d1 [TableGen] [ISel Matcher Emitter] Rework with two passes: one to size, one to emit
Differential Revision: https://reviews.llvm.org/D91632
2020-11-21 10:59:13 -05:00
Faisal Vali 9930d4dff3 [NFC, Refactor] Modernize enum FunctionDefinitionKind (DeclSpech.h) into a scoped enum
Reviewed by aaron.ballman, rsmith, wchilders
Highlights of review:
- avoid specifying an underlying type (unless such an enum is stored (or part of an abi?))
- avoid using enums as bit-fields, preferring unsigned bit-fields that we static_cast enumerators to. (MS's abi laysout enum bit-fields differently).
- clang-format, clang-format, clang-format.

https://reviews.llvm.org/D91035

Thank you!
2020-11-21 09:49:52 -06:00
Eugene Zhulenev f2df67e2a6 [mlir] Fix async microbench integration test
Differential Revision: https://reviews.llvm.org/D91912
2020-11-21 07:02:24 -08:00
sameeran joshi 42ecf188b5 [flang][openmp] Fix bug in `OmpClause::Hint` clause which was missing to generate inside in OMP.cpp.inc file.
Before this patch "Hint" isn't found inside the generated file.
./bin/llvm-tblgen --gen-directive-gen ../llvm-project/llvm/include/llvm/Frontend/OpenMP/OMP.td -I ../llvm-project/llvm/include/ > OMP.cpp.in

Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D91909
2020-11-21 19:02:34 +05:30
Eugene Zhulenev 13ab072b25 [mlir] AsynToLLVM: do no use op->getOperands() in conversion patterns
Differential Revision: https://reviews.llvm.org/D91910
2020-11-21 04:57:26 -08:00
Eugene Zhulenev d4f1a3c6e2 [mlir] Add microbenchmark for linalg+async-parallel-for
Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D91896
2020-11-21 03:47:14 -08:00
Kazushi (Jam) Marukawa 4a1d230fa6 [VE][NFC] Modify function order and simplify comments 2020-11-21 16:09:37 +09:00
Kazushi (Jam) Marukawa 02b2bcd940 [VE] Correct types of return/argument values for getAdjustedFrameSize()
A getAdjustedFrameSize function may need to handle larger than 32 bits
integer, so change int to uint64_t.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D91862
2020-11-21 16:08:20 +09:00
Tom Stellard da886bf471 GitHub Actions: Add job for automatically updating the main branch
Differential Revision: https://reviews.llvm.org/D91554
2020-11-20 22:26:11 -08:00
Tony 8605d3134c [NFC][AMDGPU] Document kernel descriptor
- Document that the kernel descriptor defined is for code object V3.
  Document that it also applies to earlier code object formats for CP.

- Document the deprecated bits in kernel descriptor.

Differential Revision: https://reviews.llvm.org/D91458
2020-11-21 04:54:17 +00:00
Kazushi (Jam) Marukawa a2dc4ac86b [VE][NFC] Update missing bulk update tests to use typed sret 2020-11-21 13:11:25 +09:00
Nico Weber e91b2344ad [mac/arm] Fix test/Driver/darwin-sdk-version.c on arm macs
Two invocations in this test used `-m64`, which on an arm mac means
arm64 in the triple, not x86_64.
2020-11-20 22:32:31 -05:00
Nico Weber c473184914 [mac/arm] Fix clang/test/Sema/wchar.c on mac/arm hosts
Part of PR46644.
2020-11-20 21:49:17 -05:00
Matt Arsenault 41083267a9 OpaquePtr: Make byval/sret types mandatory 2020-11-20 21:23:33 -05:00
Matt Arsenault 79f75468b4 AMDGPU: Fix counting kernel arguments towards register usage
Also use DataLayout to get type size. Relying on the IR type size is
also pretty broken here, since this won't perfectly capture how types
are legalized.
2020-11-20 21:23:33 -05:00
Kazu Hirata 226beb494c [Analysis] Use llvm::is_contained (NFC) 2020-11-20 18:08:05 -08:00
Arthur O'Dwyer 6e965df605 Revert "Revert "[libc++] ADL-proof <vector> by adding _VSTD:: qualification on calls.""
This reverts commit 620adacf87.

Fix: unsupport C++03 for the new test, define helpers before __swap_allocator

(1) Add _VSTD:: qualification to __swap_allocator.

(2) Add _VSTD:: qualification consistently to __to_address.

(3) Add some more missing _VSTD:: to <vector>, with a regression test.
This part is cleanup after d9a4f936d0.

Note that a vector whose allocator actually runs afoul of any of these ADL calls will
likely also run afoul of simple things like `v1 == v2` (which is also an ADL call).
But, still, libc++ should be consistent in qualifying function calls wherever possible.

Relevant blog post: https://quuxplusone.github.io/blog/2019/09/26/uglification-doesnt-stop-adl/

Differential Revision: https://reviews.llvm.org/D91708
2020-11-20 20:59:18 -05:00
Valentin Clement 553e364194 [flang][openacc] Add clause validity tests for the host_data directive
Add some clause validity tests for the host_data directive to avoid future regressions.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D91889
2020-11-20 20:17:37 -05:00
Matt Arsenault 650fbd569a Verifier: Fix assert when verifying non-pointer byval or preallocated
This would fail on a cast<PointerType> when verifying the attribute if
these attributes were incorrectly used with a non-pointer type.
2020-11-20 20:08:43 -05:00
Matt Arsenault 1d1234b2a4 OpaquePtr: Update more tests to use typed sret 2020-11-20 20:08:43 -05:00
Valentin Clement 755674b715 [flang][openacc] Add clause validity tests for the parallel directive
Add some clause validity tests for parallel directive.

Reviewed By: sameeranjoshi

Differential Revision: https://reviews.llvm.org/D91871
2020-11-20 20:05:10 -05:00
Aart Bik af42550523 [mlir][sparse] refine optimization, add few more test cases
Adds tests for full sum reduction (tensors summed up into scalars)
and the well-known sampled-dense-dense-matrix-product. Refines
the optimizations rules slightly to handle the summation better.

Reviewed By: penpornk

Differential Revision: https://reviews.llvm.org/D91818
2020-11-20 17:01:59 -08:00
Evgenii Stepanov 08d90f72ce [hwasan] Implement error report callback.
Similar to __asan_set_error_report_callback, pass the entire report to a
user provided callback function.

Differential Revision: https://reviews.llvm.org/D91825
2020-11-20 16:48:19 -08:00
wlei 21c91454a8 [llvm-profgen][NFC]Fix build failure on different platform
see titile
Test Plan:
ninja & ninja check-llvm

Reviewed By: hoy

Differential Revision: https://reviews.llvm.org/D91897
2020-11-20 16:36:04 -08:00