Valentin Clement [Tue, 14 Jul 2020 00:11:52 +0000 (20:11 -0400)]
[flang][openacc] OpenACC 3.0 parser
Summary:
This patch introduce the parser for OpenACC 3.0 in Flang. It uses the same TableGen mechanism
than OpenMP.
Reviewers: nvdatian, sscalpone, tskeith, klausler, ichoyjx, jdoerfert, DavidTruby
Reviewed By: klausler
Subscribers: SouraVX, mgorny, hiraditya, jfb, sstefan1, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D83649
Gui Andrade [Tue, 30 Jun 2020 22:34:43 +0000 (22:34 +0000)]
[MSAN] Implement experimental vector reduction intrinsics
Implement llvm.experimental.vector.{add,mul,or,and,...}.
An IR test is included but no C test for lack of good way to
get the compiler to emit these.
Differential Revision: https://reviews.llvm.org/D82920
Mircea Trofin [Mon, 13 Jul 2020 23:58:16 +0000 (16:58 -0700)]
[llvm][NFC] Removed unused CHECKs in a ml test
The CHECKs are now in Inputs/test-module.ll
Richard Smith [Mon, 13 Jul 2020 23:54:39 +0000 (16:54 -0700)]
Basic support for flexible array members in constant evaluation.
We don't allow runtime-sized flexible array members, nor initialization
of flexible array members, but it seems reasonable to support the most
basic case where the flexible array member is empty.
Fangrui Song [Mon, 13 Jul 2020 23:57:06 +0000 (16:57 -0700)]
[PowerPC] Fix combineVectorShuffle regression after D77448
Commit
1fed131660b2 assumed that NewShuffle (shuffle vector
canonicalization result) will always be ShuffleVectorSDNode, which may
be false (it may be a BITCAST node):
```
...
t12: v4i32 = scalar_to_vector t2
t15: v16i8 = bitcast t12 # LHS
t17: v16i8 = vector_shuffle<u,u,u,u,u,u,u,u,0,1,2,3,u,u,u,u> t15, undef:v16i8 # SVN
```
Reviewed By: #powerpc, nemanjai
Differential Revision: https://reviews.llvm.org/D83617
Ryan Prichard [Fri, 19 Jun 2020 06:47:18 +0000 (23:47 -0700)]
[builtins][ARM] Replace call_apsr.S with inline asm
The %arm_call_apsr expansion doesn't work when config.clang is a clang
driver defaulting to a non-ARM arch. Rather than fix it, replace
call_apsr.S with inline asm in call_apsr.h, which also resolves the
FIXME added in D31259.
Maybe the `__attribute__((noinline,pcs("aapcs")))` attributes are
unnecessary on the static functions, but I was unsure what liberty the
compiler had to insert instructions that modified the condition codes,
so it seemed helpful.
Differential Revision: https://reviews.llvm.org/D82147
Ryan Prichard [Fri, 19 Jun 2020 06:53:49 +0000 (23:53 -0700)]
[compiler-rt][Android] Stop using detect_target_arch
For Android only, compiler-rt used detect_target_arch to select the
architecture to target. detect_target_arch was added in Sept 2014
(SVN r218605). At that time, compiler-rt selected the default arch
using ${LLVM_NATIVE_ARCH}, which seems to have been the host
architecture and therefore not suitable for cross-compilation.
The compiler-rt build system was refactored in Sept 2015 (SVN r247094
and SVN r247099) to use COMPILER_RT_DEFAULT_TARGET_TRIPLE to control
the target arch rather than LLVM_NATIVE_ARCH. This approach is simpler
and also works for Android cross-compilation, so remove the
detect_target_arch function.
Android targets i686, but compiler-rt seems to identify 32-bit x86 as
"i386". For Android, we were previously calling add_default_target_arch
with i386, and calling add_default_target_arch with i686 does not build
anything. i686 is not listed in builtin-config-ix.cmake,
ALL_BUILTIN_SUPPORTED_ARCH.
Differential Revision: https://reviews.llvm.org/D82148
Ryan Prichard [Fri, 19 Jun 2020 06:59:36 +0000 (23:59 -0700)]
[builtins] Cleanup generic-file filtering
Split filter_builtin_sources into two functions:
- filter_builtin_sources that removes generic files when an
arch-specific file is selected.
- darwin_filter_builtin_sources that implements the EXCLUDE/INCLUDE
lists (using the files in lib/builtins/Darwin-excludes).
darwin_filter_builtin_sources delegates to filter_builtin_sources.
Previously, lib/builtins/CMakeLists.txt had a number of calls to
filter_builtin_sources (with a confusing/broken use of the
`excluded_list` parameter), as well as a redundant arch-vs-generic
filtering for the non-Apple code path at the end of the file. Replace
all of this with a single call to filter_builtin_sources.
Remove i686_SOURCES. Previously, this list contained only the
arch-specific files common to 32-bit and 64-bit x86, which is a strange
set. Normally the ${ARCH}_SOURCES list contains everything needed for
the arch. "i686" isn't in ALL_BUILTIN_SUPPORTED_ARCH.
NFCI, but i686_SOURCES won't be defined, and the order of files in
${arch}_SOURCES lists will change.
Differential Revision: https://reviews.llvm.org/D82151
Ryan Prichard [Fri, 19 Jun 2020 07:00:24 +0000 (00:00 -0700)]
[builtins][Android] Define HAS_80_BIT_LONG_DOUBLE to 0
Android 32-bit x86 uses a 64-bit long double.
Android 64-bit x86 uses a 128-bit quad-precision long double.
Differential Revision: https://reviews.llvm.org/D82152
LLVM GN Syncbot [Mon, 13 Jul 2020 23:39:28 +0000 (23:39 +0000)]
[gn build] Port
caf395ee8c2
Stephen Hines [Mon, 13 Jul 2020 23:35:54 +0000 (16:35 -0700)]
Fix a missing update that C compiles default to gnu17.
https://reviews.llvm.org/D75383 switched the C default to gnu17, but
missed this instance.
Differential Revision: https://reviews.llvm.org/D83726
Gui Andrade [Tue, 9 Jun 2020 16:54:02 +0000 (16:54 +0000)]
MemorySanitizer: If a field is marked noundef, check init at call site
Adds LLVM option to control eager checking under -msan-eager-checks.
This change depends on the noundef keyword to determining cases where it
it sound to check these shadows, and falls back to passing shadows
values by TLS.
Checking at call boundaries enforces undefined behavior rules with
passing uninitialized arguments by value.
Differential Revision: https://reviews.llvm.org/D81699
Mircea Trofin [Mon, 13 Jul 2020 23:29:19 +0000 (16:29 -0700)]
[llvm][NFC] ML InlineAdvisor: Factored CHECKs in common test
The CHECKs are going to be shared with the development mode test
Mircea Trofin [Mon, 13 Jul 2020 21:12:32 +0000 (14:12 -0700)]
Reapply "[llvm] Native size estimator for training -Oz inliner"
This reverts commit
9908a3b9f521c954cbf6adcec35b14b2f6c8da49.
The fix was to exclude the content of TFUtils.h (automatically
included in the LLVM_Analysis module, when LLVM_ENABLE_MODULES is enabled).
Differential Revision: https://reviews.llvm.org/D82817
Lang Hames [Mon, 13 Jul 2020 23:10:45 +0000 (16:10 -0700)]
[ORC] Fix typo in parameter name.
Gui Andrade [Mon, 13 Jul 2020 23:17:58 +0000 (23:17 +0000)]
[Sanitizers] Ensure clock_getcpuclockid interceptor <= 80 chars
Tyker [Mon, 13 Jul 2020 22:52:37 +0000 (00:52 +0200)]
[AssumeBundles] Use operand bundles to encode alignment assumptions
Summary:
NOTE: There is a mailing list discussion on this: http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html
Complemantary to the assumption outliner prototype in D71692, this patch
shows how we could simplify the code emitted for an alignemnt
assumption. The generated code is smaller, less fragile, and it makes it
easier to recognize the additional use as a "assumption use".
As mentioned in D71692 and on the mailing list, we could adopt this
scheme, and similar schemes for other patterns, without adopting the
assumption outlining.
Reviewers: hfinkel, xbolva00, lebedev.ri, nikic, rjmccall, spatel, jdoerfert, sstefan1
Reviewed By: jdoerfert
Subscribers: thopre, yamauchi, kuter, fhahn, merge_guards_bot, hiraditya, bollu, rkruppe, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D71739
Eric Christopher [Mon, 13 Jul 2020 23:03:10 +0000 (16:03 -0700)]
Fold the opt size check into the assert to silence an unused variable warning.
Kiran Chandramohan [Mon, 13 Jul 2020 22:13:04 +0000 (23:13 +0100)]
Lowering of OpenMP Parallel operation to LLVM IR 1/n
This patch introduces lowering of the OpenMP parallel operation to LLVM
IR using the OpenMPIRBuilder.
Functions topologicalSort and connectPhiNodes are generalised so that
they work with operations also. connectPhiNodes is also made static.
Lowering works for a parallel region with multiple blocks. Clauses and
arguments of the OpenMP operation are not handled.
Reviewed By: rriddle, anchu-rajendran
Differential Revision: https://reviews.llvm.org/D81660
Vedant Kumar [Mon, 13 Jul 2020 22:40:05 +0000 (15:40 -0700)]
Update ubsan_interface.inc for D71491
This should address the bot failure here:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/66309/
Dokyung Song [Mon, 13 Jul 2020 21:56:02 +0000 (21:56 +0000)]
[compiler-rt] Fix compiler warnings and runtime errors in sanitizer RT strxfrm(_l) test cases.
Summary: Fixed an implicit definition warning by including <string.h>. Also fixed run-time assertions that the return value of strxfrm_l calls is less than the buffer size by increasing the size of the referenced buffer.
Reviewers: morehouse
Reviewed By: morehouse
Subscribers: dberris, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D83593
Gui Andrade [Tue, 7 Jul 2020 21:21:13 +0000 (21:21 +0000)]
[InstCombine] Erase attribute lists for simplified libcalls
Currently, a transformation like pow(2.0, x) -> exp2(x) copies the pow
attribute list verbatim and applies it to exp2. This works out fine
when the attribute list is empty, but when it isn't clang may error due
due to the mismatch.
The source function and destination don't necessarily have anything
to do with one another, attribute-wise. So it makes sense to remove
the attribute lists (this is similar to what IPO does in this
situation).
This was discovered after implementing the `noundef` param attribute.
Differential Revision: https://reviews.llvm.org/D82820
Vedant Kumar [Mon, 13 Jul 2020 22:17:03 +0000 (15:17 -0700)]
Revert "[InstCombine] Drop debug loc in TryToSinkInstruction (reland)"
This reverts commit
9649c2095f07a392bc2b2a93b5bd6c4c9bf5ba34. See
discussion on the llvm-commits thread: if it's OK to preserve the
location when sinking a call, it's probably OK to always preserve the
location.
Vedant Kumar [Mon, 13 Jul 2020 22:15:34 +0000 (15:15 -0700)]
Check output in test/CodeGen/Generic/MIRStripDebug/no-metadata-present.mir, NFC
Jinsong Ji [Mon, 13 Jul 2020 21:19:18 +0000 (21:19 +0000)]
[compiler-rt][MSAN][test] Update buffersize for UTF-8 to C convert
This is exposed by https://reviews.llvm.org/D83486.
When the host is UTF8, we may get n >10, causing assert failure.
Increase the buffersize to support UTF-8 to C conversion.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D83719
Gui Andrade [Mon, 29 Jun 2020 23:56:01 +0000 (23:56 +0000)]
[Sanitizers] Implement getcpuclockid interceptor
Differential Revision: https://reviews.llvm.org/D83000
Vedant Kumar [Fri, 13 Dec 2019 20:59:40 +0000 (12:59 -0800)]
[ubsan] Check implicit casts in ObjC for-in statements
Check that the implicit cast from `id` used to construct the element
variable in an ObjC for-in statement is valid.
This check is included as part of a new `objc-cast` sanitizer, outside
of the main 'undefined' group, as (IIUC) the behavior it's checking for
is not technically UB.
The check can be extended to cover other kinds of invalid casts in ObjC.
Partially addresses: rdar://
12903059, rdar://9542496
Differential Revision: https://reviews.llvm.org/D71491
Benjamin Kramer [Mon, 13 Jul 2020 21:50:00 +0000 (23:50 +0200)]
[analyzer] Inline StringSet that's defined in a header
That's just asking for ODR violations. Also drop a call to lower()
that's not needed.
Vedant Kumar [Mon, 13 Jul 2020 21:38:31 +0000 (14:38 -0700)]
[debugify] Add targeted test for 2fa656c, NFC
https://reviews.llvm.org/D78411 introduced test changes which relied on
the ability to strip debugify metadata even if module-level metadata is
missing. This introduces a more targeted test for that ability.
Quentin Colombet [Mon, 13 Jul 2020 21:37:21 +0000 (14:37 -0700)]
[MC/AsmParser] layout-interdependency.s depends on having a proper triple
Fix the requirements for that test.
NFC
Nicolas Vasilache [Mon, 13 Jul 2020 15:04:09 +0000 (11:04 -0400)]
[mlir] Add alignment attribute to LLVM memory ops and use in vector.transfer
Summary: The native alignment may generally not be used when lowering a vector.transfer to the underlying load/store operation. This revision fixes the unmasked load/store alignment to match that of the masked path.
Differential Revision: https://reviews.llvm.org/D83684
Nikita Popov [Fri, 19 Jun 2020 18:25:33 +0000 (20:25 +0200)]
[ADT] Specialize std::swap() for SetVector
This is intended to address a compile-time regression from
1eddce4177cfddc86d4696b758904443b0b4f193. A SmallPtrSet was
replaced with a SetVector there, which had an unexpected large
compile-time impact. It turns out that this structure is getting
swapped a lot, and previously this used an optimized std::swap()
specialization for SmallPtrSet. Now it ends up using the default,
triple-move based implementation, which is much more expensive.
This patch (partly) addresses the issue by specializing std::swap()
for SetVector.
Differential Revision: https://reviews.llvm.org/D82230
Walter Erquinigo [Mon, 13 Jul 2020 19:10:49 +0000 (12:10 -0700)]
Retry ""[lldb-vscode] Fix TestVSCode_module""
Original commit
c60216db15132401ff60c08ccef899321f63b6b6.
The test can only run on Darwin because of how it was setup, so I'm
enforcing that.
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Jonas Devlieghere [Mon, 13 Jul 2020 20:44:01 +0000 (13:44 -0700)]
[lldb] Remove unused argument (NFC)
Nobody is writing to the stream so there's no point in passing it
around.
Rahul Joshi [Mon, 13 Jul 2020 18:20:27 +0000 (11:20 -0700)]
[MLIR] Change ODS collective params build method to provide an empty default value for named attributes
- Provide default value for `ArrayRef<NamedAttribute> attributes` parameter of
the collective params build method.
- Change the `genSeparateArgParamBuilder` function to not generate build methods
that may be ambiguous with the new collective params build method.
- This change should help eliminate passing empty NamedAttribue ArrayRef when the
collective params build method is used
- Extend op-decl.td unit test to make sure the ambiguous build methods are not
generated.
Differential Revision: https://reviews.llvm.org/D83517
AlexisPerry [Mon, 13 Jul 2020 16:32:12 +0000 (10:32 -0600)]
[flang] Extended the flang driver options to include gfortran equivalents to pgf90 specific options.
Summary: Added gfortran equivalents of pgf90's -Mfixed, -Mfree, -Mextend, -Mstandard, -Munlimited and also added -fdefault-double-8
Reviewers: sscalpone, richard.barton.arm, DavidTruby, clementval, jdoerfert
Reviewed By: sscalpone, richard.barton.arm
Subscribers: sstefan1, llvm-commits, flang-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D83687
Thomas Raoux [Mon, 13 Jul 2020 20:24:27 +0000 (13:24 -0700)]
[mlir] Support operations with multiple results in slicing
Right now slicing would assert if an operation with multiple results is in the
slice.
Differential Revision: https://reviews.llvm.org/D83627
LLVM GN Syncbot [Mon, 13 Jul 2020 20:18:59 +0000 (20:18 +0000)]
[gn build] Port
9908a3b9f52
Lei Zhang [Sun, 12 Jul 2020 17:03:23 +0000 (13:03 -0400)]
[mlir][StandardToSPIRV] Fix conversion for signed remainder
Per the Vulkan's SPIR-V environment spec, "for the OpSRem and OpSMod
instructions, if either operand is negative the result is undefined."
So we cannot directly use spv.SRem/spv.SMod if either operand can be
negative. Emulate it via spv.UMod.
Because the emulation uses spv.SNegate, this commit also defines
spv.SNegate.
Differential Revision: https://reviews.llvm.org/D83679
Davide Italiano [Mon, 13 Jul 2020 19:59:16 +0000 (12:59 -0700)]
Revert "[llvm] Native size estimator for training -Oz inliner"
This reverts commit
83080a294ad7d145d758821bcf4354ad0cb7d299 as
it breaks the macOS modules build.
Adrian Prantl [Mon, 13 Jul 2020 20:09:53 +0000 (13:09 -0700)]
Add a decorator to skip tests when running under Rosetta
This allows skipping a test when running the testsuite on macOS under
the Rosetta translation layer.
Differential Revision: https://reviews.llvm.org/D83600
Martin Storsjö [Mon, 13 Jul 2020 19:47:31 +0000 (22:47 +0300)]
[lldb] Fix a CMake warning typo. NFC.
Lang Hames [Mon, 13 Jul 2020 19:37:18 +0000 (12:37 -0700)]
[ORC] Remove a spurious reinterpret_cast.
Mircea Trofin [Mon, 13 Jul 2020 19:14:21 +0000 (12:14 -0700)]
[llvm][NFC] Factored the default inlining advice
This is in preparation for the 'development' mode advisor. We currently
want to track what the default policy's decision would have been, this
refactoring makes it easier to do that.
Tim Keith [Mon, 13 Jul 2020 19:19:17 +0000 (12:19 -0700)]
[flang] Use octal escapes for character literals in modfiles
Character literals can be formatted using octal or hex escapes for
non-ascii characters. This is so that the program can be unparsed for
either pgf90 or gfortran to compile. But modfiles should not be affected
by that -- they should be consistent.
This changes causes modfiles to always have character literals formatted
with octal escapes.
Differential Revision: https://reviews.llvm.org/D83703
Nikita Popov [Sat, 11 Jul 2020 20:48:26 +0000 (22:48 +0200)]
[PredicateInfo] Place predicate info after assume
Place the ssa.copy instructions for assumes after the assume,
instead of before it. Both options are valid, but placing them
afterwards prevents assumes from being replaced with assume(true).
This fixes https://bugs.llvm.org/show_bug.cgi?id=37541 in NewGVN
and will avoid a similar issue in SCCP when we handle more
predicate infos.
Differential Revision: https://reviews.llvm.org/D83631
Nikita Popov [Mon, 13 Jul 2020 19:05:47 +0000 (21:05 +0200)]
[NewGVN] Separate passing assume tests (NFC)
Result might not be exactly the same as under GVN, but all the
desired transforms are made.
Nikita Popov [Mon, 13 Jul 2020 18:48:12 +0000 (20:48 +0200)]
[NewGVN] Rename xfail tests (NFC)
Add an -xfail.ll suffix to tests marked XFAIL, so these files can
be split into passing and failing parts.
Lang Hames [Mon, 13 Jul 2020 18:21:40 +0000 (11:21 -0700)]
[JITLink] Apply MSVCPError workaround to
a1fc26030a42.
Hopefully this will get the Windows bots building again.
Matt Arsenault [Sun, 12 Jul 2020 18:03:23 +0000 (14:03 -0400)]
GlobalISel: Define equivalent nodes for saturating add/sub
Matt Arsenault [Sun, 12 Jul 2020 20:11:53 +0000 (16:11 -0400)]
GlobalISel: Implement fewerElementsVector for saturating add/sub
Matt Arsenault [Sun, 12 Jul 2020 17:58:53 +0000 (13:58 -0400)]
GlobalISel: Implement widenScalar for saturating add/sub
Add a placeholder legality rule for AMDGPU until the rest of the
actions are handled.
Matt Arsenault [Sun, 12 Jul 2020 16:49:04 +0000 (12:49 -0400)]
AMDGPU/GlobalISel: Add baseline add/sub sat legalization tests
Sam McCall [Mon, 13 Jul 2020 18:44:03 +0000 (20:44 +0200)]
[clangd] Remove const_cast. NFC
Lei Zhang [Mon, 13 Jul 2020 18:40:04 +0000 (14:40 -0400)]
[NFC] Remove unused header include
Differential Revision: https://reviews.llvm.org/D83706
serge-sans-paille [Thu, 9 Jul 2020 07:56:26 +0000 (09:56 +0200)]
Fix HexagonGenExtract return status
Differential Revision: https://reviews.llvm.org/D83460
Arthur Eubanks [Mon, 13 Jul 2020 18:10:56 +0000 (11:10 -0700)]
[NewPM][opt] Translate -foo-analysis to require<foo-analysis>
Fixes 53 check-llvm tests under NPM.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D83633
LLVM GN Syncbot [Mon, 13 Jul 2020 18:10:37 +0000 (18:10 +0000)]
[gn build] Port
fdb69539bcd
Jan Korous [Wed, 8 Jul 2020 22:16:21 +0000 (15:16 -0700)]
[AST] Fix potential nullptr dereference in Expr::HasSideEffects
Array returned by LambdaExpr::capture_inits() can contain nullptrs.
Differential Revision: https://reviews.llvm.org/D83438
Matt Arsenault [Sun, 12 Jul 2020 21:22:15 +0000 (17:22 -0400)]
AMDGPU/GlobalISel: Add tests for 96-bit add/sub/mul
I almost regressed these, so add tests for them.
Mircea Trofin [Mon, 13 Jul 2020 17:59:55 +0000 (10:59 -0700)]
[llvm][NFC] ML Policies: changed the saved_model protobuf to text
Also compacted the checkpoints (variables) to one file (plus the index).
This reduces the binary model files to just the variables and their
index. The index is very small. The variables are serialized float
arrays. When updated through training, the changes are very likely
unlocalized, so there's very little value in them being anything else
than binary.
Matt Arsenault [Mon, 13 Jul 2020 17:14:29 +0000 (13:14 -0400)]
TableGen/GlobalISel: Emit enum names for reg class ID instead of value
This was emitting the raw value for the reg class ID with a comment
for the actual class name. Switch to emitting the qualified enum name
instead, which obviates the need for the comment and also helps keep
the lit tests on the emitter output more stable.
Matt Arsenault [Mon, 13 Jul 2020 14:39:13 +0000 (10:39 -0400)]
RISCV: Avoid GlobalISel build break in a future patch
The GlobalISelEmitter is stricter about matching timm instruction
outputs to timm inputs (although in an accidental sort of way that
doesn't hit a proper import failure error). Also, apparently no
intrinsic patterns were importing since the ID enum declaration was
missing.
Louis Dionne [Mon, 13 Jul 2020 15:53:48 +0000 (11:53 -0400)]
[libc++] Implement P0551
Make sure we satisfy the requirements added by P0551, and add tests to
enforce that.
Hiroshi Yamauchi [Tue, 7 Jul 2020 18:01:35 +0000 (11:01 -0700)]
[PGO][PGSO] Add profile guided size optimization to X86ISelDAGToDAG.
Differential Revision: https://reviews.llvm.org/D83331
LLVM GN Syncbot [Mon, 13 Jul 2020 17:19:05 +0000 (17:19 +0000)]
[gn build] Port
83080a294ad
Lang Hames [Mon, 13 Jul 2020 04:56:45 +0000 (21:56 -0700)]
[ORC] Generalize emit re-entry, stub, etc. APIs for working addr != link addr.
This patch generalizes the APIs for writing re-entry blocks, trampolines and
stubs to allow their final linked address to differ from the address of
their initial working memory. This will allow these routines to be used with
JITLinkMemoryManagers, which will in turn allow for unification of code paths
for in-process and cross-process lazy JITing.
Lang Hames [Mon, 13 Jul 2020 04:49:17 +0000 (21:49 -0700)]
[JITLink] Add a synchronous version of finalize for convenience.
This will be used by upcoming patches that implement indirection utils
(reentry, reentry trampolines, and stubs) on top of
JITLinkMemoryManager to unify in-process and cross-process lazy
compilation support.
Mircea Trofin [Mon, 29 Jun 2020 18:37:06 +0000 (11:37 -0700)]
[llvm] Native size estimator for training -Oz inliner
Summary:
This is an experimental ML-based native size estimator, necessary for
computing partial rewards during -Oz inliner policy training. Data
extraction for model training will be provided in a separate patch.
RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140763.html
Reviewers: davidxl, jdoerfert
Subscribers: mgorny, hiraditya, mgrang, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82817
Hiroshi Yamauchi [Tue, 7 Jul 2020 17:19:54 +0000 (10:19 -0700)]
[PGO][PGSO] Add profile guided size optimization to the X86 LEA fixup.
Differential Revision: https://reviews.llvm.org/D83330
Sanjay Patel [Mon, 13 Jul 2020 15:35:38 +0000 (11:35 -0400)]
[DAGCombiner] rot i16 X, 8 --> bswap X
We have this generic transform in IR (instcombine),
but as shown in PR41098:
http://bugs.llvm.org/PR41098
...the pattern may emerge in codegen too.
x86 has a potential refinement/reversal opportunity here,
but that should come later or needs a target hook to
avoid the transform. Converting to bswap is the more
specific form, so we should use it if it is available.
Sanjay Patel [Mon, 13 Jul 2020 15:23:45 +0000 (11:23 -0400)]
[x86] add tests for bswap/rotate; NFC
Pavel Iliin [Mon, 13 Jul 2020 11:37:59 +0000 (12:37 +0100)]
[ARM][NFC] More detailed vbsl checks in ARM & Thumb2 tests.
stevewan [Mon, 13 Jul 2020 15:58:22 +0000 (11:58 -0400)]
[llvm-ar][test][AIX] Unsupport error-opening-directory.test on AIX
Summary:
The test fails on AIX as it allows open() and read() on a directory. This patch adds `# UNSUPPORTED:
system-aix` to the test to prevent it from running on AIX.
Reviewers: sameerarora101, daltenty, ShuhongL, hubert.reinterpretcast, MaskRay, smeenai, alexshap
Reviewed By: sameerarora101, hubert.reinterpretcast, MaskRay, smeenai
Subscribers: MaskRay, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83579
Pavel Labath [Mon, 13 Jul 2020 15:15:25 +0000 (17:15 +0200)]
[ADT] Make Load(AP)IntFromMemory pointer argument const
The function does not modify this memory.
Sanne Wouda [Mon, 13 Jul 2020 15:09:41 +0000 (16:09 +0100)]
Fix llvm-test-suite failure introduced by D82550/D83122
Apparently, isIndirectCall does not imply that getCalledFunction will be non-null
David Truby [Mon, 13 Jul 2020 15:07:22 +0000 (16:07 +0100)]
[flang][openmp] libc++ unordered_map build fix in flang openmp static analysis
Simply move the include of unordered_map from the .cpp file to the .h file
Alexey Bataev [Thu, 9 Jul 2020 12:34:06 +0000 (08:34 -0400)]
[OPENMP]Fix compiler crash for target data directive without actual target codegen.
Summary:
Need to privatize addresses of the captured variables when trying to
emit the body of the target data directive in no target codegen mode.
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, cfe-commits, sstefan1, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83478
Eric Astor [Mon, 13 Jul 2020 14:47:30 +0000 (10:47 -0400)]
[ms] [llvm-ml] Restore omitted changes requested by reviewer
Pavel Labath [Wed, 8 Jul 2020 13:43:07 +0000 (15:43 +0200)]
[lldb/Utility] Rewrite Scalar::SetValueFromCString
The function's reliance on host types meant that it was needlessly
complicated, and did not handle the newer (wider) types. Rewrite it in
terms of APInt/APFloat functions to save code and improve functionality.
Eric Astor [Mon, 13 Jul 2020 14:38:39 +0000 (10:38 -0400)]
[ms] [llvm-ml] Add support for MASM STRUCT casting field accessors: (<TYPE> PTR <value>).<field>
Summary:
Add support for MASM STRUCT casting field accessors: (<TYPE> PTR <value>).<field>
Since these are operands, we add them to X86AsmParser. If/when we extend MASM support to other architectures (e.g., ARM), we will need similar changes there as well.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D83346
Jinsong Ji [Mon, 13 Jul 2020 02:54:20 +0000 (02:54 +0000)]
[compiler-rt][CMake] Pass down LLVM_LIT_ARGS in runtime build
We should also pass down the LLVM_LIT_ARGS in runtime build mode,
so that the runtime tests can be well controlled as well.
We actually passed this down in clang/runtime/CMakeLists.txt
But not for calls from llvm/runtime/CMakeLists.txt.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D83565
Eric Astor [Mon, 13 Jul 2020 14:36:30 +0000 (10:36 -0400)]
[ms] [llvm-ml] Fix MASM support for nested unnamed STRUCTs and UNIONs
Summary: Fix MASM support for nested unnamed STRUCTs and UNIONs
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D83345
Eric Astor [Mon, 13 Jul 2020 14:33:15 +0000 (10:33 -0400)]
[ms] [llvm-ml] Improve MASM STRUCT field accessor support
Summary:
Adds support for several accessors:
- `[<identifier>.<struct name>].<field>`
- `[<identifier>.<struct name>.<field>].<subfield>` (where `field` has already-defined STRUCT type)
- `[<variable>.<field>].<subfield>` (where `field` has already-defined STRUCT type)
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D83344
Pavel Labath [Fri, 10 Jul 2020 11:18:00 +0000 (13:18 +0200)]
[lldb/dotest] Remove the "xunit" result formatter
Summary:
My understanding is that this was added to make dotest interact well
with the GreenDragon bots, back when dotest was the main test driver.
Now that everything goes through lit (which has its own xunit
formatter), it seems largely irrelevant.
There are more cleanups that can be done after removing this be done
here, but this should be enough to test the waters.
Reviewers: JDevlieghere
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D83545
Sanne Wouda [Fri, 3 Jul 2020 11:37:21 +0000 (12:37 +0100)]
[NFC] rename to reflect F is not necessarily an Intrinsic
Sanne Wouda [Fri, 10 Jul 2020 11:37:26 +0000 (12:37 +0100)]
[SLPVectorizer] handle vectorizeable library functions
Teaches the SLPVectorizer to use vectorized library functions for
non-intrinsic calls.
This already worked for intrinsics that have vectorized library
functions, thanks to D75878, but schedules with library functions with a
vector variant were being rejected early.
- assume that there are no load/store dependencies between lib
functions with a vector variant; this would otherwise prevent the
bundle from becoming "ready"
- check during legalization that the vector variant can be used
- fix-up where we previously assumed that a call would be an intrinsic
Differential Revision: https://reviews.llvm.org/D82550
Sanne Wouda [Thu, 25 Jun 2020 15:02:52 +0000 (16:02 +0100)]
Pre-commit tests
Prepare to land D82550
Sanne Wouda [Thu, 25 Jun 2020 15:08:13 +0000 (16:08 +0100)]
Fix crash when getVFABIMappings is called with an indirect call instruction
Differential Revision: https://reviews.llvm.org/D83122
Georgii Rymar [Thu, 9 Jul 2020 13:03:40 +0000 (16:03 +0300)]
[yaml2obj] - Refactor header-sh-fields.yaml test.
This refines the test to use macros. It is needed for
a follow-up change that adds a functionality to
override more fields.
Also, it is just cleaner to test each key separately.
Differential revision: https://reviews.llvm.org/D83481
Raphael Isemann [Mon, 13 Jul 2020 11:36:25 +0000 (13:36 +0200)]
[lldb][NFC] Refactor instruction dumping out of DumpDataExtractor
Kirill Bobyrev [Mon, 13 Jul 2020 13:02:47 +0000 (15:02 +0200)]
[clangd] Fix DocumentSymbol ranges
Summary:
DocumentSymbol ranges were not previously tested and, as a result, had invalid
end location. This patch addresses the issue.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83668
Sanjay Patel [Mon, 13 Jul 2020 12:57:00 +0000 (08:57 -0400)]
[DAGCombiner] allow load/store merging if pairs can be rotated into place
This carves out an exception for a pair of consecutive loads that are
reversed from the consecutive order of a pair of stores. All of the
existing profitability/legality checks for the memops remain between
the 2 altered hunks of code.
This should give us the same x86 base-case asm that gcc gets in
PR41098 and PR44895:
http://bugs.llvm.org/PR41098
http://bugs.llvm.org/PR44895
I think we are missing a potential subsequent conversion to use "movbe"
if the target supports that. That might be similar to what AArch64
would use to get "rev16".
Differential Revision: https://reviews.llvm.org/D83567
Sanjay Patel [Mon, 13 Jul 2020 12:55:29 +0000 (08:55 -0400)]
Revert "[DAGCombiner] allow load/store merging if pairs can be rotated into place"
This reverts commit
591a3af5c7acc05617c0eacf6ae4f76bd8a9a6ce.
The commit message was cut off and failed to include the review citation.
Sanjay Patel [Mon, 13 Jul 2020 12:51:09 +0000 (08:51 -0400)]
[DAGCombiner] allow load/store merging if pairs can be rotated into place
This carves out an exception for a pair of consecutive loads that are
reversed from the consecutive order of a pair of stores. All of the
existing profitability/legality checks for the memops remain between
the 2 altered hunks of code.
This should give us the same x86 base-case asm that gcc gets in
PR41098 and PR44895:i
http://bugs.llvm.org/PR41098
http://bugs.llvm.org/PR44895
I think we are missing a potential subsequent conversion to use "movbe"
if the target supports that. That might be similar to what AArch64
would use to get "rev16".
Differential Revision:
Sjoerd Meijer [Mon, 13 Jul 2020 10:53:09 +0000 (11:53 +0100)]
[ARM][MVE] Refactor option -disable-mve-tail-predication
This refactors option -disable-mve-tail-predication to take different arguments
so that we have 1 option to control tail-predication rather than several
different ones.
This is also a prep step for D82953, in which we want to reject reductions
unless that is requested with this option.
Differential Revision: https://reviews.llvm.org/D83133
Balazs Benics [Mon, 13 Jul 2020 12:29:47 +0000 (14:29 +0200)]
[analyzer] ctu-on-demand-parsing tests: replace linux -> system-linux
Differential Revision: https://reviews.llvm.org/D83555
Georgii Rymar [Mon, 13 Jul 2020 12:14:06 +0000 (15:14 +0300)]
[LLD][ELF] - Fix the test after llvm-readelf output change.
An issue for llvm-readelf was fixed in
https://reviews.llvm.org/rG84a170178c4431b7536c83ff0e5ce80774d08df6
Now it produce no output for this test.
Hans Wennborg [Thu, 9 Jul 2020 12:54:53 +0000 (14:54 +0200)]
[COFF] Error on unexpected .pdata size
Previously, lld would crash if the .pdata size was not an even multiple
of the expected .pdata entry size. This makes it error gracefully instead.
(We hit this in Chromium due to an assembler problem: https://crbug.com/1101577)
Differential revision: https://reviews.llvm.org/D83479
Mirko Brkusanin [Mon, 13 Jul 2020 11:35:34 +0000 (13:35 +0200)]
[AMDGPU][GlobalISel] Fix subregister index for EXEC register in selectBallot.
Temporarily remove subregister for EXEC in selectBallot added in
https://reviews.llvm.org/D83214 to fix failures on expensive checks buildbot.