Commit Graph

317126 Commits

Author SHA1 Message Date
Lang Hames a2ee80b084 [ORC] Guarantee unique JITDylib names in lli, add usage notes to createJITDylib.
JITDylibs should have unique names. This patch adds code to lli to respect this
invariant (by refering to the exist JITDylib if a -jd <name> option is specified
more than once). It also adds usage notes to the doxygen comment for
createJITDylib method in ExecutionSession and LLJIT.

http://llvm.org/PR41937

llvm-svn: 361322
2019-05-21 22:07:53 +00:00
Jonas Devlieghere feb9953081 [FileSystem] Fix regression in FileSystem::Resolve
When I moved the resolve code from FileSpec to the FileSystem class, I
introduced a regression. If you compare the two implementations, you'll
notice that if the path doesn't exist, we should only reverse the
effects of makeAbsolute, not the effects of tilde expansion.

As a result, the logic to create the ~/.lldb directory broke, because we
would resolve the path before creating it. Because the directory didn't
exist yet, we'd call create_directories on the unresolved path, which
failed.

Differential revision: https://reviews.llvm.org/D62219

llvm-svn: 361321
2019-05-21 21:56:37 +00:00
Roman Lebedev 675307b1f1 [NFC][AMDGPU] Autogenerate llvm.amdgcn.s.barrier.ll test
llvm-svn: 361320
2019-05-21 21:49:14 +00:00
Roman Lebedev 21e8ec8d4f [NFC][X86] Autogenerate ragreedy-hoist-spill.ll test
llvm-svn: 361319
2019-05-21 21:49:10 +00:00
Roman Lebedev 079d8b425f [NFC][Thumb2] Autogenerate thumb2-ldr_pre.ll test
llvm-svn: 361318
2019-05-21 21:49:05 +00:00
Sanjay Patel 3590bae8d6 [InstCombine] add more tests for shuffle folding; NFC
As discussed in D62024, we want to limit any potential IR
transforms of shuffles to cases where we know the SDAG
conversion would result in equivalent patterns for these
IR variants.

llvm-svn: 361317
2019-05-21 21:45:24 +00:00
Jonas Devlieghere d008183ea4 [CommandInterpreter] Fix SkipAppInitFiles setter
The SkipAppInitFiles setter was ignoring its import argument.

llvm-svn: 361316
2019-05-21 21:33:06 +00:00
Nikita Popov d34d96770e [X86] Add large integer comparison tests for PR41971; NFC
In these cases we would prefer a direct comparison over going through
a vector type.

llvm-svn: 361315
2019-05-21 21:27:08 +00:00
Nick Desaulniers 17694af980 [Driver] Verify GCCInstallation is valid
Summary:
Values returned by GCCInstallation.getParentLibPath() and
GCCInstallation.getTriple() are not valid unless
GCCInstallation.isValid() returns true. This has previously been
ignored, and the former two values were used without checking whether
GCCInstallation is valid. This led to the bad path "/../bin" being added
to the list of program paths.

author: danielmentz "Daniel Mentz <danielmentz@google.com>"

Reviewers: #clang, tstellar, srhines

Reviewed By: srhines

Subscribers: danielmentz, ormris, nickdesaulniers, srhines, cfe-commits

Tags: #clang

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

llvm-svn: 361314
2019-05-21 21:21:35 +00:00
Matt Morehouse df17ddf9fc [libFuzzer] Reduce flakiness of merge-sigusr.test.
Double the number of files to merge, and use wait instead of sleep.

llvm-svn: 361313
2019-05-21 21:15:51 +00:00
Siva Chandra 8692af253c Let -static-pie win if it is specified along with -pie or -static.
Also, disallow specifying -no-pie/-nopie along with -static-pie.

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

llvm-svn: 361312
2019-05-21 21:09:05 +00:00
Cameron McInally 17fdf1d383 [NFC][InstCombine] Add unary fneg tests to operand-complexity.ll.
llvm-svn: 361311
2019-05-21 21:07:46 +00:00
Jonas Devlieghere 4eb8610da2 [Test] Fix conflicting test names.
Two tests having the same name creates a race condition when moving the
trace files.

llvm-svn: 361310
2019-05-21 20:55:00 +00:00
Jonathan Peyton 3057c3a092 [OpenMP] Add implementation to two OMPT API routines
This change adds implementation to ompt_finalize_tool() and
ompt_get_task_memory().

Patch by Hansang Bae

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

llvm-svn: 361309
2019-05-21 20:51:05 +00:00
Cameron McInally 872dc79f20 [NFC][InstCombine] Add unary FNeg tests to X86/x86-avx512.ll
llvm-svn: 361308
2019-05-21 20:31:09 +00:00
Saleem Abdulrasool ca5ed496b1 build: enable CMake policy 0077
Enable CMake policy 77. This alters the behavior of option. The old behavior
would remove the value of the option from the cache and create a new one. The
new behavior does not create the variable if it is defined already. This ensures
that subsequent reconfigures will behave identically. This seems better than the
setting of OLD - the desire is to ensure that it is set to OLD or NEW.

llvm-svn: 361307
2019-05-21 20:28:32 +00:00
Yi-Hong Lyu 00e85f7535 Move csr-save-restore-order.ll to the right place
llvm-svn: 361306
2019-05-21 20:28:31 +00:00
Vitaly Buka 9bd4fe80f0 [asan] clang-format parent patch
llvm-svn: 361305
2019-05-21 20:24:42 +00:00
Vitaly Buka e756730c23 [asan] Replace assignments with internal_memcpy ErrorDescription
For consistency with nearby code and to avoid interceptors during reports.

llvm-svn: 361304
2019-05-21 20:23:10 +00:00
Roman Lebedev a7e88f8570 [NFC][X86][AArch64] Add tests for sinking of add/sub by constant through add/sub
Looks we can transform all 8 variants of the pattern:
https://rise4fun.com/Alive/auH

This comes up as an issue on the path towards
https://bugs.llvm.org/show_bug.cgi?id=41952

llvm-svn: 361303
2019-05-21 20:14:54 +00:00
Leonard Chan 3af7cf58bb Remove unicode character from test
llvm-svn: 361302
2019-05-21 20:12:00 +00:00
Richard Smith 1f4548b507 Fix test failures after r361278 on non-Darwin platforms and when
CLANG_DEFAULT_STDLIB is defined to libstdc++.

llvm-svn: 361301
2019-05-21 20:10:52 +00:00
Richard Smith b2997f579a [c++20] P0780R2: Support pack-expansion of init-captures.
This permits an init-capture to introduce a new pack:

  template<typename ...T> auto x = [...a = T()] { /* a is a pack */ };

To support this, the mechanism for allowing ParmVarDecls to be packs has
been extended to support arbitrary local VarDecls.

llvm-svn: 361300
2019-05-21 20:10:50 +00:00
Yi-Hong Lyu 6e19543a2a [PowerPC][NFC] Add a tests for Reordering CSR reloads in epilogue to follow the same order as CSR saves in the prologue
llvm-svn: 361299
2019-05-21 19:42:57 +00:00
Gheorghe-Teodor Bercea 66cdbb47d2 [OpenMP] Add support for registering requires directives with the runtime
Summary:
This patch adds support for the registration of the requires directives with the runtime.

Each requires directive clause will enable a particular flag to be set.

The set of flags is passed to the runtime to be checked for compatibility with other such flags coming from other object files.

The registration function is called whenever OpenMP is present even if a requires directive is not present. This helps detect cases in which requires directives are used inconsistently.

Reviewers: ABataev, AlexEichenberger, caomhin

Reviewed By: ABataev, AlexEichenberger

Subscribers: jholewinski, guansong, jfb, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 361298
2019-05-21 19:42:01 +00:00
Richard Smith 32591ca4e2 Fix test to put its outputs into the temp directory.
llvm-svn: 361297
2019-05-21 19:41:19 +00:00
Alexandre Ganea 047e65db77 [DebugInfo] Don't emit checksums when compiling a preprocessed CPP
Fixes PR41215

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

llvm-svn: 361296
2019-05-21 19:40:28 +00:00
Alexandre Ganea b07176666b Fix LLDB warnings when compiling with Clang 8.0
Differential Revision: https://reviews.llvm.org/D62021

llvm-svn: 361295
2019-05-21 19:35:06 +00:00
Gheorghe-Teodor Bercea 9e9c918259 [OpenMP][libomptarget] Enable requires flags for target libraries.
Summary:
Target link variables are currently implemented by creating a copy of the variables on the device side and unified memory never gets exploited.

When the prgram uses the:

```
#pragma omp requires unified_shared_memory
```

directive in conjunction with a declare target link, the linked variable is no longer allocated on the device and the host version is used instead.

This behavior is overridden by performing an explicit mapping.

A Clang side patch is required.

Reviewers: ABataev, AlexEichenberger, grokos, Hahnfeld

Reviewed By: AlexEichenberger, grokos, Hahnfeld

Subscribers: Hahnfeld, jfb, guansong, jdoerfert, openmp-commits

Tags: #openmp

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

llvm-svn: 361294
2019-05-21 19:35:02 +00:00
Stanislav Mekhanoshin 44d17ca02e Fix register coalescer failure to prune value
Register coalescer fails for the test in the patch with the assertion in
JoinVals::ConflictResolution `DefMI != nullptr'. It attempts to join
live intervals for two adjacent instructions and erase the copy:

    %2:vreg_256 = COPY %1
    %3:vreg_256 = COPY killed %1

The LI needs to be adjusted to kill subrange for the erased instruction
and extend the subrange of the original def. That was done for the main
interval only but not for the subrange. As a result subrange had a VNI
pointing to the erased slot resulting in the above failure.

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

llvm-svn: 361293
2019-05-21 19:32:41 +00:00
Leonard Chan 9bb96980aa Fix for sphinx bot warning
llvm-svn: 361292
2019-05-21 19:30:25 +00:00
Don Hinton b61f2b6c87 [cmake] Don't use VERSION_GREATER_EQUAL in cmake versions prior to 3.72.
llvm-svn: 361291
2019-05-21 19:25:54 +00:00
Michael Kruse 467069688d [DeLICM] Use polly::singleton to allow empty result.
isl_map_from_union_map cannot determine the map's space if the union_map
is empty. polly::singleton was designed for this case. We pass the
expected map space to avoid crashing in isl_map_from_union_map.

This fixes an issue found by the aosp buildbot. Thanks to Eli Friedman
for the reproducer.

llvm-svn: 361290
2019-05-21 19:18:26 +00:00
Leonard Chan 0bada7ce6c [Intrinsic] Signed Fixed Point Saturation Multiplication Intrinsic
Add an intrinsic that takes 2 signed integers with the scale of them provided
as the third argument and performs fixed point multiplication on them. The
result is saturated and clamped between the largest and smallest representable
values of the first 2 operands.

This is a part of implementing fixed point arithmetic in clang where some of
the more complex operations will be implemented as intrinsics.

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

llvm-svn: 361289
2019-05-21 19:17:19 +00:00
Craig Topper ed6df47bae [X86] Remove an unneeded ZERO_EXTEND creation from LowerINTRINSIC_W_CHAIN. NFC
We were trying to ZERO_EXTEND from an i8 X86ISD::SETCC to i8 again.

llvm-svn: 361288
2019-05-21 19:03:45 +00:00
Sanjay Patel 10f6b39899 [SelectionDAG] fold insert subvector of undef into undef
DAGCombiner simplifies this more liberally as:
  // If inserting an UNDEF, just return the original vector.
  if (N1.isUndef())
    return N0;

So there's no way to make this visible in output AFAIK, but
doing this at node creation time should be slightly more efficient.

llvm-svn: 361287
2019-05-21 18:53:53 +00:00
Don Hinton 76e5a1d3c3 [cmake] Try to make cmake happy and fix bots.
llvm-svn: 361286
2019-05-21 18:51:21 +00:00
Yitzhak Mandelbaum f0d9cfa591 [LibTooling] Address post-commit feedback for r361152
Fixes a redundant dependency and moves another to its proper place.

Reviewers: thakis

Subscribers: mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 361285
2019-05-21 18:48:58 +00:00
Sanjay Patel 51dc59d090 [SelectionDAG] remove redundant code; NFCI
getNode() squashes concatenation of undefs via FoldCONCAT_VECTORS():
  // Concat of UNDEFs is UNDEF.
  if (llvm::all_of(Ops, [](SDValue Op) { return Op.isUndef(); }))
    return DAG.getUNDEF(VT);

llvm-svn: 361284
2019-05-21 18:28:22 +00:00
Alexey Bataev 6b21c4a4ee [OPENMP]Use the attributes for dso locality when building for device.
Currently, we ignore all dso locality attributes/info when building for
the device and thus all symblos are externally visible and can be
preemted at the runtime. It may lead to incorrect results. We need to
follow the same logic, compiler uses for static/pie builds.

llvm-svn: 361283
2019-05-21 18:20:08 +00:00
Don Hinton c1b6b9a177 [cmake] Bug in r361281: make include optional and fix typo which might make a difference on some systems.
llvm-svn: 361282
2019-05-21 18:15:01 +00:00
Clement Courbet 122c6e6f36 [MergeICmps] Make sorting strongly stable on the rhs.
Summary:
Because the sort order was not strongly stable on the RHS, whether the
chain could merge would depend on the order of the blocks in the Phi.

EXPENSIVE_CHECKS would shuffle the blocks before sorting, resulting in
non-deterministic merging.

Reviewers: gchatelet

Subscribers: hiraditya, llvm-commits, RKSimon

Tags: #llvm

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

llvm-svn: 361281
2019-05-21 17:58:42 +00:00
Don Hinton bd467cfe4b [cmake] Add custom command to touch archives on Darwin so ninja won't rebuild them.
Summary:
clang and newer versions of ninja use high-resolutions timestamps, but
older versions of libtool on Darwin don't, so the archive will often
get an older timestamp than the last object that was added or updated.
To fix this, we add a custom command to touch the archive after it's
been built so that ninja won't rebuild it unnecessarily the next time
it's run.

Reviewed By: beanz

Tags: #llvm

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

llvm-svn: 361280
2019-05-21 17:56:45 +00:00
Nick Desaulniers 92febc6498 [Bugpoint] fix use-after-move. NFC
Summary:
This was flagged in https://www.viva64.com/en/b/0629/ under "Snippet No.
6".

Note that author also states:
"Note that the loop doesn't actually execute at all."

This is not true, but the author can be forgiven; there's two distinct
variables with very similar identifiers:

MiscompiledFunctions
MisCompFunctions

Reviewers: echristo, srhines, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 361279
2019-05-21 17:55:26 +00:00
Louis Dionne e97b5f5cf3 [clang][Darwin] Refactor header search path logic into the driver
Summary:
This commit moves the logic for determining system, resource and C++
header search paths from CC1 to the driver. This refactor has already
been made for several platforms, but Darwin had been left behind.

This refactor tries to implement the previous search path logic with
perfect accuracy. In particular, the order of all include paths inside
CC1 and all paths that were skipped because nonexistent are conserved
after the refactor. This change was also tested against a code base
of significant size and revealed no problems.

Reviewers: jfb, arphaman

Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits

Tags: #clang

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

llvm-svn: 361278
2019-05-21 17:48:04 +00:00
Jan Kratochvil b7a1932144 Remove `SymbolFileDWARF *` when there is already `DWARFUnit *`
In D61502#1503247 @clayborg suggested that SymbolFileDWARF *dwarf2Data is
really redundant in all the calls with also having DWARFUnit *cu. So remove it.

One `SymbolFileDWARF *` nullptr check
(DWARFDebugInfoEntry::GetDIENamesAndRanges) could be removed, other two nullptr
checks (DWARFDebugInfoEntry::GetName and DWARFDebugInfoEntry::AppendTypeName)
need to stay in place (now for `DWARFUnit *`).

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

llvm-svn: 361277
2019-05-21 17:38:56 +00:00
Jonas Devlieghere b43dfaa6c0 [Dsymutil] Remove redundant argument (NFC)
The dwarf streamer already holds a copy of the link options, so there's
no need to pass them as an argument.

llvm-svn: 361276
2019-05-21 17:31:51 +00:00
Chris Bieneman fb2a076511 [CMake] One more stab at fixing BUILD_SHARED_LIBS
If clang's libraries are build SHARED, we need to grab their `PRIVATE_LINK_LIBRARIES` properties and add those to clang_shared's interface.

llvm-svn: 361275
2019-05-21 17:30:59 +00:00
Aaron Ballman 31ca49be47 Do not use the incorrect attribute spelling list index when translating a no_sanitize_foo attribute into a no_sanitize("foo") attribute.
This fixes a crash when AST pretty printing declarations marked with no_sanitize_memory.

llvm-svn: 361274
2019-05-21 17:24:49 +00:00
Sam Clegg c0a4f45bcb Revert "[WebAssembly] Add __start_/_stop_ symbols for data sections"
This reverts commit 7804dbddcc.

This change broke a bunch of tests of the WebAssembly waterfall.
Will hopefully reland with increased test coverage.

llvm-svn: 361273
2019-05-21 17:16:33 +00:00