Commit Graph

281510 Commits

Author SHA1 Message Date
Geoff Berry 1d53101387 [AMDGPU] isRenamable fixes to support copy forwarding
Mark more opcodes as hasExtraSrcRegAllocReq so that their operands will
be marked as not renamable, to avoid copy forwarding violating the
constraint that only one operand may use the constant bus.

These changes fix a few mis-compiles when copy forwarding is enabled in
MachineCopyPropagation by D41835 (and were reviewed as part of that change).

llvm-svn: 323794
2018-01-30 17:37:39 +00:00
Rafael Espindola c9265e81f4 Run dos2unix in a few files. NFC.
llvm-svn: 323793
2018-01-30 17:24:28 +00:00
Sam McCall 2b780160cd [clangd] Trace code completion.
Context passing is a little messy, but will go away with TLS soon.

llvm-svn: 323792
2018-01-30 17:20:54 +00:00
Mark Searles 94ae3b2f9b [AMDGPU] Revert "[AMDGPU] Add options for waitcnt pass debugging; add instr count in debug output."
Patch caused a buildbot failure; arg; http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/17373/s\
teps/build_Lld/logs/stdio :
        /Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1563:18: error: unused variable 'InstCnt' [-Werror,-Wunused-variable]
          static int32_t InstCnt = 0;
                                              "
This reverts commit 4f4a7d61e306b67044d9f16bc2016fee806bc2cc.

llvm-svn: 323791
2018-01-30 17:17:06 +00:00
Zachary Turner 07d803777c [CodeView] Micro-optimizations to speed up type merging.
Based on a profile, a couple of hot spots were identified in the
main type merging loop.  The code was simplified, a few loops
were re-arranged, and some outlined functions were inlined.  This
speeds up type merging by a decent amount, shaving around 3-4 seconds
off of a 40 second link in my test case.

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

llvm-svn: 323790
2018-01-30 17:12:04 +00:00
Adrian Prantl 43a68f1f03 Enforce that tests building with buildDefault set NO_DEBUG_INFO_TESTCASE
and fix resulting errors. This is a prerequisite for building each
test variant in its own build directory.

llvm-svn: 323789
2018-01-30 17:02:42 +00:00
Mark Searles d6d5a2571f [AMDGPU] Add options for waitcnt pass debugging; add instr count in debug output.
-amdgpu-waitcnt-forcezero={1|0}  Force all waitcnt instrs to be emitted as s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
-amdgpu-waitcnt-forceexp=<n>  Force emit a s_waitcnt expcnt(0) before the first <n> instrs
-amdgpu-waitcnt-forcelgkm=<n> Force emit a s_waitcnt lgkmcnt(0) before the first <n> instrs
-amdgpu-waitcnt-forcevm=<n>   Force emit a s_waitcnt vmcnt(0) before the first <n> instrs

This patch was pushed ( abb190fd51cd2f9a9eef08c024e109f7f7e909fc ), which caused a buildbot failure, reverted ( 6227480d74da507cf8e1b4bcaffbdb9fb875b4b8 ), and then updated to fix buildbot failures (this patch).

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

llvm-svn: 323788
2018-01-30 16:49:38 +00:00
Jonas Hahnfeld a349d4820c [libomptarget] Check for library with CUDA Driver API
That's what we really need to link the CUDA plugin against,
not the CUDA runtime API in CUDA_LIBRARIES! While the latter
comes with the CUDA SDK, the Driver API is installed with
the kernel driver and there is at most one per system. As
fallback we can use the stubs library distributed with the
CUDA SDK for linking.

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

llvm-svn: 323787
2018-01-30 16:49:13 +00:00
Jonas Hahnfeld c189523529 [libomptarget] Only use CUDA Driver API
Use equivalents for the last calls to the Runtime API. Remove
stray assert in case of an error found during review, we should
only return OFFLOAD_FAIL.

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

llvm-svn: 323786
2018-01-30 16:49:06 +00:00
Changpeng Fang 0905870f93 AMDGPU/SI: Add decoding in the GFX80_UNPACKED decoding namespace.
Reviewer:
  Dmitry (dp).

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

llvm-svn: 323785
2018-01-30 16:42:40 +00:00
Petar Jovanovic 9208e8fbf6 [DeadArgumentElimination] Preserve llvm.dbg.values's first argument
When removing return value Dead Argument Elimination pass clobbers first
llvm.dbg.value’s argument for live arguments of that function by replacing
it with nullptr. In the next pass it will be deleted, so debug location
about those arguments are lost. This change fixes it.

Patch by Djordje Todorovic.

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

llvm-svn: 323784
2018-01-30 16:42:04 +00:00
Saleem Abdulrasool b36fbbc3ec CodeGen: support an extension to pass linker options on ELF
Introduce an extension to support passing linker options to the linker.
These would be ignored by older linkers, but newer linkers which support
this feature would be able to process the linker.

Emit a special discarded section `.linker-option`.  The content of this
section is a pair of strings (key, value).  The key is a type identifier for
the parameter.  This allows for an argument free parameter that will be
processed by the linker with the value being the parameter.  As an example,
`lib` identifies a library to be linked against, traditionally the `-l`
argument for Unix-based linkers with the parameter being the library name.

Thanks to James Henderson, Cary Coutant, Rafael Espinolda, Sean Silva
for the valuable discussion on the design of this feature.

llvm-svn: 323783
2018-01-30 16:29:29 +00:00
Evandro Menezes f1d01645a7 [AArch64] Add new target feature to fuse address generation with load or store
This feature enables the fusion of the address generation and a
corresponding load or store together.

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

llvm-svn: 323782
2018-01-30 16:28:01 +00:00
Simon Dardis daaeaba665 [mips] Fix incorrect sign extension for fpowi libcall
PR36061 showed that during the expansion of ISD::FPOWI, that there
was an incorrect zero extension of the integer argument which for
MIPS64 would then give incorrect results. Address this with the
existing mechanism for correcting sign extensions.

This resolves PR36061.

Thanks to James Cowgill for reporting the issue!

Reviewers: atanasyan, hfinkel

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

llvm-svn: 323781
2018-01-30 16:24:10 +00:00
Rafael Espindola c7945c827d Move function to the file where it is used.
llvm-svn: 323780
2018-01-30 16:24:04 +00:00
Rafael Espindola 22d533568b Sort orphan section if --symbol-ordering-file is given.
Before this patch orphan sections were not sorted.

llvm-svn: 323779
2018-01-30 16:20:08 +00:00
Zaara Syeda 1f59ae311b Re-commit : [PowerPC] Add handling for ColdCC calling convention and a pass to mark
candidates with coldcc attribute.

This recommits r322721 reverted due to sanitizer memory leak build bot failures.

Original commit message:
This patch adds support for the coldcc calling convention for Power.
This changes the set of non-volatile registers. It includes a pass to stress
test the implementation by marking all static directly called functions with
the coldcc attribute through the option -enable-coldcc-stress-test. It also
includes an option, -ppc-enable-coldcc, to add the coldcc attribute to
functions which are cold at all call sites based on BlockFrequencyInfo when
the containing function does not call any non cold functions.

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

llvm-svn: 323778
2018-01-30 16:17:22 +00:00
Daniel Sanders 8c345dcb9b Add more initializers to quiet a clang warning
Summary:
`struct crashreporter_annotations_t` gained one more `uint64_t` field in
`CRASHREPORTER_ANNOTATIONS_VERSION` 5

causing an annoying clang warning:

```
llvm/lib/Support/PrettyStackTrace.cpp:92:65: warning: missing field 'abort_cause' initializer [-Wmissing-field-initializers]
        = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0, 0, 0 };
                                                                ^
1 warning generated
```

Let's fix it.

Patch by Roman Tereshin

Reviewers: qcolombet, echristo, beanz, dexonsmith

Reviewed By: echristo

Subscribers: dsanders, dexonsmith, beanz, echristo, qcolombet, llvm-commits

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

llvm-svn: 323777
2018-01-30 16:02:32 +00:00
Simon Pilgrim 05f6014257 [X86][AVX512] Add VBMI target shuffle-trunc tests
llvm-svn: 323776
2018-01-30 16:01:41 +00:00
Evandro Menezes 16d7d81e5d [AArch64] Update test cases for Exynos M3
Update any test case relevant for Exynos M3.

llvm-svn: 323775
2018-01-30 15:40:27 +00:00
Evandro Menezes 07c78eeeef [AArch64] Add new target feature to handle cheap as move for Exynos
This feature enables special handling of cheap as move in the existing
custom handling specifically for Exynos processors.

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

llvm-svn: 323774
2018-01-30 15:40:22 +00:00
Evandro Menezes 9f9daa1f14 [AArch64] Add pipeline model for Exynos M3
Add the scheduling and cost model for Exynos M3.

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

llvm-svn: 323773
2018-01-30 15:40:16 +00:00
Alexander Kornienko 4256fd0b4b clang-tidy/rename_check.py misc-incorrect-roundings bugprone-incorrect-roundings
More specifically,
clang-tidy/rename_check.py misc-incorrect-roundings \
  bugprone-incorrect-roundings --check_class_name IncorrectRoundings

llvm-svn: 323768
2018-01-30 15:12:24 +00:00
Alexander Kornienko 5c9c0427bb clang-tidy/rename_check.py misc-string-compare readability-string-compare
llvm-svn: 323766
2018-01-30 14:55:50 +00:00
Alexander Kornienko 4170f04576 [clang-tidy] Use a more specific regex
llvm-svn: 323765
2018-01-30 14:55:39 +00:00
Daniel Neilson 594f443b06 [RS4GC] Handle call/invoke instructions as base defining values of vectors
Summary:
 There's an asymmetry in the definitions of findBaseDefiningValueOfVector() and
findBaseDefiningValue() of RS4GC. The later handles call and invoke instructions,
and the former does not. This appears to be simple oversight. This patch remedies
the oversight by adding the call and invoke cases to findBaseDefiningValueOfVector().

Reviewers: DaniilSuchkov, anna

Reviewed By: anna

Subscribers: llvm-commits

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

llvm-svn: 323764
2018-01-30 14:43:41 +00:00
Pavel Labath 26fa1f2be3 One more TestGDBRemoteClient/windows fix
We also need to be .EXE-aware when searching for the clang binary.

llvm-svn: 323763
2018-01-30 14:33:54 +00:00
Andrei Elovikov ce256fd5f7 [X86FixupBWInsts] mir-simplify fixup-bw-inst.mir test. NFC.
llvm-svn: 323762
2018-01-30 14:25:12 +00:00
Eric Liu 0b69b5ed85 Revert "[X86] Avoid using high register trick for test instruction"
This reverts commit r323690. This causes crash in llc. See the original commit thread for details.

llvm-svn: 323761
2018-01-30 14:18:33 +00:00
Simon Pilgrim cbc2d1e111 [X86] Add test case for PR32690
llvm-svn: 323760
2018-01-30 14:15:51 +00:00
Sanjay Patel 1aef27f5cd [DSE] make sure memory is not modified before partial store merging (PR36129)
We missed a critical check in D30703. We must make sure that no intermediate 
store is sitting between the stores that we want to merge.

This should fix:
https://bugs.llvm.org/show_bug.cgi?id=36129

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

llvm-svn: 323759
2018-01-30 13:53:59 +00:00
Martin Pelikan 79d729eef5 [XRay] clarify error messages when parsing broken traces
Summary:
When there's a mismatch of a function argument being right after the
wrong function, print an offset into the file where that happened, to
ease further debugging.

Reviewers: dberris, eizan, kpw

Subscribers: llvm-commits

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

llvm-svn: 323758
2018-01-30 13:41:34 +00:00
Jonas Devlieghere 1ce64dcc64 [AccelTable] Move print methods to implementation. NFC
This patch moves the implementation of the print methods from the header
to the cpp file.

llvm-svn: 323757
2018-01-30 13:36:30 +00:00
Martin Pelikan 1e0d3b43ea [XRay] [compiler-rt] stop writing garbage in naive log records
Summary:
Turns out sizeof(packed) isn't as strong as we'd hoped.  This makes sure
that when we initialize the padding, all 12 bytes will be zero.

Reviewers: dberris, kpw, eizan

Subscribers: delcypher, llvm-commits, #sanitizers

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

llvm-svn: 323755
2018-01-30 13:25:25 +00:00
Brock Wyma 31cc1ebbc6 Test commit.
As per the LLVM Developer Policy under "Obtainiing Commit Access".

llvm-svn: 323754
2018-01-30 13:16:50 +00:00
Pavel Labath c561a6a920 Add LLDB_LOG_ERROR macro
Summary:
The difference between this and regular LLDB_LOG is that this one clears
the error object unconditionally.  This was inspired by the
ObjectFileELF bug (r322664), where the error object was being cleared
only if logging was enabled.

Reviewers: davide, zturner, jingham, clayborg

Subscribers: lldb-commits, emaste

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

llvm-svn: 323753
2018-01-30 12:19:34 +00:00
Simon Pilgrim eb07016156 Spelling mistake in comment. NFCI.
llvm-svn: 323752
2018-01-30 12:18:51 +00:00
Sam McCall 41d2152e87 [clangd] Fix windows path manipulation
llvm-svn: 323751
2018-01-30 11:23:11 +00:00
Amaury Sechet 25c9ee0fec Change simple-register-allocation-read-undef.mir so that it doesn't fail if the file path contains 'dead' . NFC
llvm-svn: 323748
2018-01-30 11:07:36 +00:00
George Rimar cd141ce3e3 [ELF] - Remove dead declaration. NFC.
llvm-svn: 323747
2018-01-30 11:03:27 +00:00
Pavel Labath 06f442c384 Fix TestGDBRemoteClient on windows
The logic was incorrect because on windows, we need to look for
yaml2obj.EXE. I implement the search in terms of
distutils.spawn.find_executable, which should handle the platform
differences for us.

llvm-svn: 323744
2018-01-30 10:41:46 +00:00
Pavel Labath af379085ef Skip TestWithModuleDebugging on i386 linux (pr36146)
It fails due to an assertion (if these are enabled).

llvm-svn: 323736
2018-01-30 09:39:22 +00:00
Sam McCall ea283c7bb8 [clangd] Enable completion index by default, limit results to 100.
Summary:
This should speed up global code completion by avoiding deserializing
preamble declarations to look up names. The tradeoff is memory usage.
Currently the index is fairly naive and may not be much faster, but there's lots
of performance headroom.

These two changes go together because results from the index get copied a couple
of times, so we should avoid it for huge sets.

Also the flag should be -completion-limit, rather than -limit-completion.

Reviewers: hokein, ioeric, ilya-biryukov

Subscribers: klimek, jkorous-apple, cfe-commits

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

llvm-svn: 323734
2018-01-30 09:21:30 +00:00
Diana Picus f72e865372 [ARM GlobalISel] Add inst selector tests for G_SITOFP and G_UITOFP
These are handled by the TableGen'erated code.

llvm-svn: 323732
2018-01-30 09:15:27 +00:00
Diana Picus 2a5b962030 [ARM GlobalISel] Map G_SITOFP and G_UITOFP
Straightforward mapping (integer operand to GPR, floating point operand
to FPR).

llvm-svn: 323731
2018-01-30 09:15:23 +00:00
Diana Picus 517531e5a5 [ARM GlobalISel] Legalize G_SITOFP and G_UITOFP
Legal if we have hardware support, libcall otherwise.

Also add supporting code to the legalizer helper for libcalls.

llvm-svn: 323730
2018-01-30 09:15:17 +00:00
George Rimar c4ccfb5d93 [ELF] - Define linkerscript symbols early.
Currently symbols assigned or created by linkerscript are not processed early
enough. As a result it is not possible to version them or assign any other flags/properties.

Patch creates Defined symbols for -defsym and linkerscript symbols early,
so that issue from above can be addressed.

It is based on Rafael Espindola's version of D38239 patch.

Fixes PR34121.

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

llvm-svn: 323729
2018-01-30 09:04:27 +00:00
Diana Picus f5ad62d921 [ARM GlobalISel] Add inst selector tests for G_FPTOSI and G_FPTOUI
The work is done by the TableGen'erated code.

llvm-svn: 323728
2018-01-30 07:55:02 +00:00
Diana Picus a2da03022c [ARM GlobalISel] Map G_FPTOSI and G_FPTOUI
Straightforward mapping (integer operand goes to GPR, floating point
operand goes to FPR).

llvm-svn: 323727
2018-01-30 07:54:58 +00:00
Diana Picus 4ed0ee7b5f [ARM GlobalISel] Legalize G_FPTOSI and G_FPTOUI
Legal if we have hardware support for floating point, libcalls
otherwise.

Also add the necessary support for libcalls in the legalizer helper.

llvm-svn: 323726
2018-01-30 07:54:52 +00:00