Commit Graph

338085 Commits

Author SHA1 Message Date
Craig Topper 7f071958cd [X86] Add test cases for v2i64->v2f32 strict_sint_to_fp/strict_uint_to_fp. 2019-12-26 08:58:34 -08:00
Craig Topper de60c2633b [X86] Add avx512f and avx512dq+vl command lines to the vector strictfp int<->fp tests. 2019-12-26 08:58:34 -08:00
Reid Kleckner 287307a0c6 Partially revert "Add initial tests for update_{llc_,cc_,}test_checks.py"
This reverts part of commit 240aff80e0.
It reverts cc802ea67b.

We currently run LLVM tests in environments where python3 exists on
PATH, but it is broken. I don't think PATH discovery is a strong enough
signal that a working Python 3 installation exists.

If this will be the way forward, IMO we should follow the direction of
debug-info-tests, and use CMake's PYTHON_EXECUTABLE, which in the near
future will be a known-to-work Python 3 executable. If it's not Python
3, then we don't have to run this test.
2019-12-26 08:53:06 -08:00
Sergej Jaskiewicz e308a0ca15 [libcxx] Fix a typo in config.py
Reviewers: ldionne, jroelofs, EricWF

Subscribers: christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D71890
2019-12-26 18:51:09 +03:00
Tatyana Krasnukha db1fa62bf8 [lldb][test] Don't include "test_common.h" in the debug macros test
GCC produces incorrect .debug_macro section when "-include" option is used:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93075.
2019-12-26 18:49:36 +03:00
Tatyana Krasnukha e2d3eb00cc [lldb] Specify unsigned underlying type for an enumeration explicitly
The enumeration EntryType is used as a bit field of DebugMacroEntry:
```
  EntryType m_type : 3
```

Since underlying type of enumeration is implementation-dependent, a signed integer is
converted to the 3-bit value by some compilers (MSVC).

That's why a DebugMacroEntry instance that was created with EntryType value > 3 (END_FILE or INDIRECT)
contains incorrect negative value in its m_type data-member.
2019-12-26 18:49:36 +03:00
Tatyana Krasnukha b0469eede2 [lldb][NFC] Move lock scope where it should begin 2019-12-26 18:49:35 +03:00
Tatyana Krasnukha b7c45ac352 [lldb][NFC] Add "lldb-vscode" to all_categories
Required to make the category manually disableable.
2019-12-26 18:49:35 +03:00
Tatyana Krasnukha 04359f48f0 [lldb][NFC] Simplify if-return 2019-12-26 18:49:35 +03:00
Tatyana Krasnukha a58bd0e42c [lldb][tests] Platform triple can be None
If a remote target is not connected, SBPlatform's GetTriple function returns None.
2019-12-26 18:49:35 +03:00
Tatyana Krasnukha f57b35af2f [lldb][tests] Posix function strdup requires macro _POSIX_C_SOURCE 2019-12-26 18:49:34 +03:00
Raphael Isemann 37339d1426 [lldb][NFC] Use ClangASTContext in AppleObjCRuntime interfaces
This code actually needs a ClangASTContext but instead takes a
clang::ASTContext and then retrieves the original ClangASTContext
via the global map of ClangASTContexts. Let's change it so
that it takes a ClangASTContext which is simpler and faster.
2019-12-26 16:23:40 +01:00
Florian Hahn 54c5224203 [compiler-rt] Disable QSORT interception on watchOS and tvOS.
Building the sanitizers for watchOS currently fails with
    sanitizer_common_interceptors.inc:9656:8: error: thread-local storage is not supported for the current target
    static THREADLOCAL SIZE_T qsort_size;

I've also speculatively disabled QSORT interception for tvOS to unblock
failing builds. I'll ask someone with more sanitizer knowledge to check
after the holidays.
2019-12-26 10:39:29 +01:00
Raphael Isemann b036f557ce [lldb] Remove some calls to GetASTContext
GetASTContext is really expensive to call as it makes use of the global
mapping from ASTContext to ClangASTContext. This replaces all calls where
we already have the ClangASTContext around and don't need to call
GetASTContext again.
2019-12-26 10:36:36 +01:00
Karl-Johan Karlsson 073cdb2390 [clang][test] Minor fixes in testcase absolute-paths-symlinks.c
This is a follow up commit to address post-commit comment in D70527.
2019-12-26 09:33:21 +01:00
chelxom d2a8e14177 Fix the MLIR Vim syntax file: the keyword group was missing 2019-12-26 04:50:38 +00:00
czhengsz 1b57749a53 [PowerPC] stop folding if result rlwinm mask is wrap while original rlwinm is not.
%1:g8rc = RLWINM8 %0:g8rc, 0, 16, 9
%2:g8rc = RLWINM8 killed %1:g8rc, 0, 0, 31
->
%2:g8rc = RLWINM8 %0:g8rc, 0, 16, 9

The above folding is wrong. Before transformation, %2:g8rc is 32 bit value. After
transformation, %2:g8rc becomes a 64 bit value.
This patch fixes above issue.

Reviewed by: steven.zhang

Differential Revision: https://reviews.llvm.org/D71833
2019-12-25 21:56:18 -05:00
Fangrui Song 6599d00467 [Bitstream] Delete skipAbbreviatedField which duplicates readAbbreviatedField 2019-12-25 18:55:02 -08:00
QingShan Zhang e973783916 [NFC][PowerPC] Add a function tryAndWithMask to handle all the cases
that 'and' with constant

More patches will be committed later to exploit more about 'and' with
constant.

Differential Revision: https://reviews.llvm.org/D71693
2019-12-26 02:48:30 +00:00
Whitney Tsang d1f41b2ca9 [NFC][LoopFusion] Fix printing of the guard branch.
Reviewer: kbarton, jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D71878
2019-12-26 02:45:29 +00:00
Kang Zhang 6d88b7d6e7 [PowerPC] Modify the hasSideEffects of MTLR and MFLR from 1 to 0
Summary:
If we didn't set the value for hasSideEffects bit in our td file, `llvm-tblgen`
will set it as true for those instructions which has no match pattern.
The instructions `MTLR` and `MFLR` don't set the hasSideEffects flag and don't
have match pattern, so their hasSideEffects flag will be set true by
`llvm-tblgen`.
But in fact, we can use `[LR]` to model the two instructions, so they should not
have SideEffects.

This patch is to modify the hasSideEffects of MTLR and MFLR from 1 to 0.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D71390
2019-12-26 02:12:32 +00:00
David Herzka 6cf6f7dc96 Revert "Make lazyload_metadata.ll resilient to the addition of new metadata kinds"
This reverts commit 2e6c15d1e7.

It causes the test to fail on Windows
2019-12-25 19:52:17 -05:00
Wang, Pengfei 472bded3ed [X86] Enable STRICT_SINT_TO_FP/STRICT_UINT_TO_FP on X86 backend
Summary: Enable STRICT_SINT_TO_FP/STRICT_UINT_TO_FP on X86 backend

Reviewers: craig.topper, RKSimon, LiuChen3, uweigand, andrew.w.kaylor

Subscribers: hiraditya, llvm-commits, LuoYuanke

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71871
2019-12-26 08:15:13 +08:00
David Herzka b082a2952f Revert "test commit"
This reverts commit cb6e84fe36.
2019-12-25 19:11:31 -05:00
David Herzka cb6e84fe36 test commit 2019-12-25 19:10:07 -05:00
Johannes Doerfert e4add9727b [OpenMP][IR-Builder] Introduce "pragma omp parallel" code generation
This patch combines the `emitParallel` logic prototyped in D61953 with
the OpenMPIRBuilder (D69785) and introduces `CreateParallel`.

Reviewed By: fghanim

Differential Revision: https://reviews.llvm.org/D70109
2019-12-25 18:02:23 -06:00
David Herzka 2e6c15d1e7 Make lazyload_metadata.ll resilient to the addition of new metadata kinds
Summary: The specific number of records loaded depends on the number of kinds, but the difference between the lazy and not lazy cases does not.

Reviewers: modocache

Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71730
2019-12-25 18:59:21 -05:00
Johannes Doerfert f9c3c5da19 [OpenMP][IR-Builder] Introduce the finalization stack
As a permanent and generic solution to the problem of variable
finalization (destructors, lastprivate, ...), this patch introduces the
finalization stack. The objects on the stack describe (1) the
(structured) regions the OpenMP-IR-Builder is currently constructing,
(2) if these are cancellable, and (3) the callback that will perform the
finalization (=cleanup) when necessary.

As the finalization can be necessary multiple times, at different source
locations, the callback takes the position at which code is currently
generated. This position will also encode the destination of the "region
exit" block *iff* the finalization call was issues for a region
generated by the OpenMPIRBuilder. For regions generated through the old
Clang OpenMP code geneneration, the "region exit" is determined by Clang
inside the finalization call instead (see getOMPCancelDestination).

As a first user, the parallel + cancel barrier interaction is changed.
In contrast to the temporary solution before, the barrier generation in
Clang does not need to be aware of the "CancelDestination" block.
Instead, the finalization callback is and, as described above, later
even that one does not need to be.

D70109 will be updated to use this scheme.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D70258
2019-12-25 16:57:08 -06:00
Craig Topper c5b4a2386b [X86] Use zero vector to extend to 512-bits for strict_fp_to_uint v2i1->v2f64 on targets with AVX512F, but not AVX512VL.
In the worst case, this requires a 128-bit move instruction to
implicitly zero the upper bits. In the common case, we should
recognize the producing instruction already zeroed the upper bits.
2019-12-25 10:46:00 -08:00
Craig Topper 4af5b23db3 [X86FixupSetCC] Remember the preceding eflags defining instruction while we're scanning the basic block instead of looking back for it.
Summary:
We're already scanning forward through the basic block. Might as
well just remember eflags defs instead of doing a bounded search
backwards later.

Based on a comment in D71841.

Reviewers: RKSimon, spatel, uweigand

Reviewed By: uweigand

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71865
2019-12-25 10:26:13 -08:00
Raphael Isemann caf460d979 [lldb][NFC] Use StringRef in ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize 2019-12-25 19:02:40 +01:00
Craig Topper 2498d88259 [X86] Merge together some common code in LowerFP_TO_INT now that we have STRICT_CVTTP2SI/STRICT_CVTTP2UI nodes. NFC 2019-12-25 09:57:27 -08:00
Fangrui Song ba1cdba4c4 [llvm-nm] Display STT_GNU_IFUNC as 'i'
Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D71803
2019-12-25 09:47:53 -08:00
Kamil Rytarowski aff6c9db9a [compiler-rt] [netbsd] Correct the fallback definition of PT_LWPNEXT
Fixes build on NetBSD 9.0.
2019-12-25 18:21:48 +01:00
Dmitry Preobrazhensky 80c45e49c3 [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.
Summary of changes:
- added description of GFX9 subtargets:
  - gfx900;
  - gfx902;
  - gfx904;
  - gfx906;
  - gfx908;
  - gfx909.
2019-12-25 17:51:53 +03:00
Georgii Rymar 1a2d2b492a [llvm-readobj] - Merge `gnu-symbols.test` to `symbols.test` and cleanup.
This cleans up and merges `gnu-symbols.test` to `symbols.test`.
Initially `gnu-symbols.test` tested the following things:
1) How symbols are printed in GNU style.
   It does not make sense to have a separate file for such tests.
2) It tried to test proc-specific symbol indexes. The test was incomplete and
   also we already have `symbol-shndx.test` for that, so this part was removed.
3) It tested `--dyn-symbols` and `--symbols` correlation. All following
   cases were moved to `symbols.test`:
   a) That `--dyn-symbols` does not trigger showing regular symbols..
   b) That `--symbols` triggers `--dyn-symbols` implicitly.
   c) That `--dyn-symbols` and `--symbols` works fine together.

Differential revision: https://reviews.llvm.org/D71697
2019-12-25 15:30:36 +03:00
Georgii Rymar 604d7fbfc1 [llvm-readobj/llvm-readelf][test] - Add testing for EI_OSABI and EI_ABIVERSION fields of an ELF header.
We had no separate tests for these fields.

Differential revision: https://reviews.llvm.org/D71766
2019-12-25 15:03:00 +03:00
Liu, Chen3 8304781cae Add missing strict_fp_to_int
Differential Revision: https://reviews.llvm.org/D71867
2019-12-25 16:10:10 +08:00
Hideto Ueno 1497a4350e [MLIR][NFC] Insert const_cast to avoid warning
Reviewers: rriddle

Reviewed By: rriddle

Subscribers: mehdi_amini

Differential Revision: https://reviews.llvm.org/D71853
2019-12-25 15:51:26 +09:00
Hideto Ueno 1d5d074aef [Attributor] Reach optimistic fixpoint in AAValueSimplify when the value is constant or undef
Summary:
As discussed in D71799, we have found that it is more useful to reach an optimistic fixpoint in AAValueSimpify when the value is constant or undef.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: baziotis, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71852
2019-12-25 14:18:34 +09:00
Craig Topper 27dc4c319b [X86FixupSetCC] Use MachineInstr::readRegister/definesRegister to check for EFLAGS use/def instead of our own custom operand scan. NFCI 2019-12-24 20:34:33 -08:00
Kamil Rytarowski 52b5fe5f45 [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build
The TLS base (LWP private pointer) functions are namespaced and
hidden i.e. inside the _RTLD_SOURCE namespace.
2019-12-25 04:09:50 +01:00
Johannes Doerfert 5732f56bbd [Attributor] UB Attribute now handles all instructions that access memory through a pointer
Summary:
Follow-up on: https://reviews.llvm.org/D71435
We basically use `checkForAllInstructions` to loop through all the instructions in a function that access memory through a pointer: load, store, atomicrmw, atomiccmpxchg
Note that we can now use the `getPointerOperand()` that gets us the pointer operand for an instruction that belongs to the aforementioned set.

Question: This function returns `nullptr` if the instruction is `volatile`. Why?
Guess:  Because if it is volatile, we don't want to do any transformation to it.

Another subtle point is that I had to add AtomicRMW, AtomicCmpXchg to `initializeInformationCache()`. Following `checkAllInstructions()` path, that
seemed the most reasonable place to add it and correct the fact that these instructions were ignored (they were not in `OpcodeInstMap` etc.). Is that ok?

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert, sstefan1

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71787
2019-12-24 19:25:08 -06:00
Johannes Doerfert 58f324a468 [Attributor] Function level undefined behavior attribute
_Eventually_, this attribute will be assigned to a function if it
contains undefined behavior. As a first small step, I tried to make it
loop through the load instructions in a function (eventually, the plan
is to check if a load instructions causes undefined behavior, because
e.g. dereferences a null pointer - Also eventually, this won't happen in
initialize() but in updateImpl()).

Patch By: Stefanos Baziotis (@baziotis)

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D71435
2019-12-24 19:23:08 -06:00
Fangrui Song 583ef13f0b [MCJIT] Migrate function attribute "no-frame-pointer-elim" to "frame-pointer" 2019-12-24 17:12:21 -08:00
Fangrui Song 1ac7c50ded [WinEH] Delete addFnAttr("no-frame-pointer-elim") which seems no longer needed
It was added in rL238619.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D71862
2019-12-24 17:02:19 -08:00
Fangrui Song c853c73d3d [Thumb][test] Fix CodeGen/Thumb/PR17309.ll after llvmorg-10-init-16046-ga36ddf0aa9d
All of

"no-frame-pointer-elim-non-leaf"
"no-frame-pointer-elim-non-leaf"="true"
"no-frame-pointer-elim-non-leaf"="false"

mean "frame-pointer"="non-leaf", which is quite counter-intuitive.
llvmorg-10-init-16046-ga36ddf0aa9d accidentally broke it.

This fixes the -DLLVM_ENABLE_EXPENSIVE_CHECKS=On test:

```
*** Bad machine code: Non-flag-setting Thumb1 mov is v6-only ***
- function:    pass_C
- basic block: %bb.0 entry (0x1fc9bf0)
- instruction: $r0 = tMOVr killed $r6, 14, $noreg
```
2019-12-24 16:58:12 -08:00
Johannes Doerfert 9f6b13e5cc [Support] Fix behavior of StringRef::count with overlapping occurrences, add tests
Summary:
Fix the behavior of StringRef::count(StringRef) to not count overlapping occurrences, as is stated in the documentation.
Fixes bug https://bugs.llvm.org/show_bug.cgi?id=44072

I added Krzysztof Parzyszek to review this change because a use of this function in HexagonInstrInfo::getInlineAsmLength might depend on the overlapping-behavior. I don't have enough domain knowledge to tell if this change could break anything there.

All other uses of this method in LLVM (besides the unit tests) only use single-character search strings. In those cases, search occurrences can not overlap anyway.

Patch by Benno (@Bensge)

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D70585
2019-12-24 18:30:41 -06:00
Fangrui Song a36ddf0aa9 Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
Fangrui Song eb16435b5e Migrate function attribute "no-frame-pointer-elim-non-leaf" to "frame-pointer"="non-leaf" as cleanups after D56351 2019-12-24 16:05:15 -08:00