Nico Weber [Mon, 5 Aug 2019 16:55:04 +0000 (16:55 +0000)]
gn build: run "gn format"
llvm-svn: 367890
JF Bastien [Mon, 5 Aug 2019 16:53:45 +0000 (16:53 +0000)]
[docs] document -Weveything more betterer
Reviewers: aaron.ballman
Subscribers: jkorous, dexonsmith, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65706
llvm-svn: 367889
Nico Weber [Mon, 5 Aug 2019 16:50:56 +0000 (16:50 +0000)]
Follow-up for r367863 and r367656
llvm-svn: 367888
Nico Weber [Mon, 5 Aug 2019 16:48:12 +0000 (16:48 +0000)]
compiler-rt: Rename cc files below test/asan to cpp
See r367803 and similar other changes.
llvm-svn: 367887
David Green [Mon, 5 Aug 2019 16:27:36 +0000 (16:27 +0000)]
[AST] Fix RecursiveASTVisitorTest multiline string literal. NFC
Some compiler, notably older gccs (< 8) can have trouble with multiline raw
string literals inside macros. This just moves the code outsize the macro, to
attempt to appease the bots.
llvm-svn: 367885
Jordan Rupprecht [Mon, 5 Aug 2019 16:26:48 +0000 (16:26 +0000)]
[llvm-readobj][test] Add llvm-readobj style test cases for r367878
llvm-svn: 367884
Sanjay Patel [Mon, 5 Aug 2019 16:17:07 +0000 (16:17 +0000)]
[InstCombine] add tests for shl+mul; NFC
llvm-svn: 367883
Austin Kerbow [Mon, 5 Aug 2019 16:09:49 +0000 (16:09 +0000)]
[AMDGPU] Use S_DENORM_MODE for gfx10
Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10.
Reviewers: arsenm, rampitec
Reviewed By: arsenm, rampitec
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65620
llvm-svn: 367882
Tom Stellard [Mon, 5 Aug 2019 16:08:44 +0000 (16:08 +0000)]
AMDGPU/LoadStoreOptimizer: Set the correct offset whem merging MMOs
Summary:
This is a follow up to r367237. MachineFunction::getMachineMemOperand()
adds the offset parameter to the existing offset instead of resetting it.
So we need to reset the offset to the correct value after calling this
function.
Reviewers: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65557
llvm-svn: 367881
Sanjay Patel [Mon, 5 Aug 2019 16:04:07 +0000 (16:04 +0000)]
[InstCombine] add extra use constraint for shl-zext fold
As the test shows, we can end up with more instructions than
we started with if we don't include the extra-use check.
llvm-svn: 367880
Matt Arsenault [Mon, 5 Aug 2019 15:59:07 +0000 (15:59 +0000)]
AMDGPU: Correct behavior of f16 buffer loads
Don't assume format loads for f16. Also fixes support for targets
without i16.
llvm-svn: 367879
Jordan Rupprecht [Mon, 5 Aug 2019 15:43:20 +0000 (15:43 +0000)]
[llvm-readelf] Fix core note descriptions
Summary:
Core files have different descriptions for note values. llvm-readelf currently prints the generic note type, which is wrong when using it to read a core file.
To verify the constants/strings, see:
Values: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=
75c4fb7e9d7c0f780d635ac305f579546b7b071b;hb=HEAD#l571
Strings: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/readelf.c;h=
c31a5c1266b7bb62a485895b01b49e1f832ade35;hb=HEAD#l16881
Note: this does not handle printing the note data for NT_FILE, it just fixes the descriptions.
Reviewers: MaskRay
Reviewed By: MaskRay
Subscribers: labath, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65608
llvm-svn: 367878
Fangrui Song [Mon, 5 Aug 2019 15:34:01 +0000 (15:34 +0000)]
[ELF][test] Reorganize some tls-*.s tests
Some tls-*.s tests do not test generic TLS behavior but rather are x86 specific.
Rename them to i386-*.s or x86-64-*.s
Delete tls-static.s: covered by tls-opt.s
Delete tls-opt-no-plt.s: add --implicit-check-not=.plt to x86-64-tls-gdie.s to cover it
Rename tls-dynamic-i686.s to i386-tls-dynamic.s
Rename tls-i686.s to i386-tls-le.s
Rename tls-opt-i686.s to i386-tls-opt.s
Rename tls-opt-iele-i686-nopic.s to i386-tls-opt-iele-nopic.s
Rename tls-dynamic.s to x86-64-tls-dynamic.s . IE should be split off in the future.
Rename tls-error.s to x86-64-reloc-tpoff32-error.s
Rename tls-opt-gdie.s to x86-64-tls-gdie.s
Rename tls-opt-x86_64-noplt.s to x86-64-tls-opt-noplt.s
Rename tls-opt-local.s => x86-64-tls-ie-opt-local.s . It can be merged with x86-64-tls-ie-local.s in the future.
llvm-svn: 367877
Sanjay Patel [Mon, 5 Aug 2019 15:25:07 +0000 (15:25 +0000)]
[InstCombine] add test for shl-zext with extra use; NFC
llvm-svn: 367876
Nico Weber [Mon, 5 Aug 2019 15:23:10 +0000 (15:23 +0000)]
Undo what looks like an unintentional change in r367829
The MSan bot was (rightfully) complaining that NumASTLoaded was
unitialized, so put the initialization removed in r367829 back in.
While here, remove two needless semicolons added in that change.
llvm-svn: 367875
Nico Weber [Mon, 5 Aug 2019 15:10:15 +0000 (15:10 +0000)]
Try to fix OOB tests more on Windows after r367642
See PR42868 for more details.
The affected list of tests is:
Failing Tests (8):
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.LargeOOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOB_char
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Test.exe/AddressSanitizer.OOB_int
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.LargeOOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOBRightTest
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOB_char
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Test.exe/AddressSanitizer.OOB_int
llvm-svn: 367874
Nico Weber [Mon, 5 Aug 2019 15:04:20 +0000 (15:04 +0000)]
Try to fix OOB tests on at least Windows after r367642
gtest's built-in regex engine doesn't support (). Looks like it's not
needed, just remove it.
See PR42868 for more details.
llvm-svn: 367873
Matt Arsenault [Mon, 5 Aug 2019 14:57:59 +0000 (14:57 +0000)]
AMDGPU: Correct behavior of f16/i16 non-format store intrinsics
This was switching to use a format store for a non-format store for
f16 types. Also fixes i16/f16 stores on targets without legal f16.
The corresponding loads also need to be fixed.
llvm-svn: 367872
Matt Arsenault [Mon, 5 Aug 2019 14:40:26 +0000 (14:40 +0000)]
AMDGPU/GlobalISel: Alternative mappings for constants
Without context we assume SGPR. Allowing VGPR constants theoretically
helps avoid a copy. This seems to not actually work now, and the
choice isn't based on the use bank.
llvm-svn: 367871
Matt Arsenault [Mon, 5 Aug 2019 14:40:23 +0000 (14:40 +0000)]
AMDGPU/GlobalISel: Don't reject shader types
I'm not sure what complications these present, but the current
argument lowering is pretty much directly copied from the DAG
lowering, so I assume these work as they should.
No tests because I'm lazy and things are getting pretty close to the
point where the existing calling-conventions.ll can be shared with
SelectionDAG.
llvm-svn: 367870
Fangrui Song [Mon, 5 Aug 2019 14:31:39 +0000 (14:31 +0000)]
[ELF] Consistently prioritize non-* wildcards overs "*" in version scripts
We prioritize non-* wildcards overs VER_NDX_LOCAL/VER_NDX_GLOBAL "*".
This patch generalizes the rule to "*" of other versions and thus fixes PR40176.
I don't feel strongly about this GNU linkers' behavior but the
generalization simplifies code.
Delete `config->defaultSymbolVersion` which was used to special case
VER_NDX_LOCAL/VER_NDX_GLOBAL "*".
In `SymbolTable::scanVersionScript`, custom versions are handled the same
way as VER_NDX_LOCAL/VER_NDX_GLOBAL. So merge
`config->versionScript{Locals,Globals}` into `config->versionDefinitions`.
Overall this seems to simplify the code.
In `SymbolTable::assign{Exact,Wildcard}Versions`,
`sym->verdefIndex == config->defaultSymbolVersion` is changed to
`verdefIndex == UINT32_C(-1)`.
This allows us to give duplicate assignment diagnostics for
`{ global: foo; };` `V1 { global: foo; };`
In test/linkerscript/version-script.s:
vs_index of an undefined symbol changes from 0 to 1. This doesn't matter (arguably 1 is better because the binding is STB_GLOBAL) because vs_index of an undefined symbol is ignored.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D65716
llvm-svn: 367869
Nico Weber [Mon, 5 Aug 2019 14:22:21 +0000 (14:22 +0000)]
gn build: Merge r367864
llvm-svn: 367868
Nilanjana Basu [Mon, 5 Aug 2019 14:16:58 +0000 (14:16 +0000)]
Changing representation of .cv_def_range directives in Codeview debug info assembly format for better readability
llvm-svn: 367867
Rainer Orth [Mon, 5 Aug 2019 14:06:16 +0000 (14:06 +0000)]
[Driver] Properly use values-X[ca].o, values-xpg[46].o on Solaris
Builtins-*-sunos :: compiler_rt_logbf_test.c currently FAILs on Solaris, both SPARC and
x86, 32 and 64-bit.
It turned out that this is due to different behaviour of logb depending on the C
standard compiled for, as documented on logb(3M):
RETURN VALUES
Upon successful completion, these functions return the exponent of x.
If x is subnormal:
o For SUSv3-conforming applications compiled with the c99 com-
piler driver (see standards(7)), the exponent of x as if x
were normalized is returned.
o Otherwise, if compiled with the cc compiler driver, -1022,
-126, and -16382 are returned for logb(), logbf(), and
logbl(), respectively.
Studio c99 and gcc control this by linking with the appropriate version of values-xpg[46].o, but clang uses neither of those.
The following patch fixes this by following what gcc does, as corrected some time ago in
Fix use of Solaris values-Xc.o (PR target/40411)
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02350.html and
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02384.html.
Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.
Differential Revision: https://reviews.llvm.org/D64793
llvm-svn: 367866
Rainer Orth [Mon, 5 Aug 2019 14:00:43 +0000 (14:00 +0000)]
[lldb][clang] Reflect LangStandard.h move to clang/Basic
D65562 <https://reviews.llvm.org/D65562> moves LangStandard.h from clang/Frontend to clang/Basic. This patch
adjusts the single file in lldb that uses it to match.
Tested on x86_64-pc-linux-gnu.
Differential Revision: https://reviews.llvm.org/D65717
llvm-svn: 367865
Rainer Orth [Mon, 5 Aug 2019 13:59:26 +0000 (13:59 +0000)]
Move LangStandard*, InputKind::Language to Basic
This patch is a prerequisite for using LangStandard from Driver in
https://reviews.llvm.org/D64793.
It moves LangStandard* and InputKind::Language to Basic. It is mostly
mechanical, with only a few changes of note:
- enum Language has been changed into enum class Language : uint8_t to
avoid a clash between OpenCL in enum Language and OpenCL in enum
LangFeatures and not to increase the size of class InputKind.
- Now that getLangStandardForName, which is currently unused, also checks
both canonical and alias names, I've introduced a helper getLangKind
which factors out a code pattern already used 3 times.
The patch has been tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11,
and x86_64-pc-linux-gnu.
There's a companion patch for lldb which uses LangStandard.h
(https://reviews.llvm.org/D65717).
While polly includes isl which in turn uses InputKind::C, that part of the
code isn't even built inside the llvm tree. I've posted a patch to allow
for both InputKind::C and Language::C upstream
(https://groups.google.com/forum/#!topic/isl-development/6oEvNWOSQFE).
Differential Revision: https://reviews.llvm.org/D65562
llvm-svn: 367864
Nico Weber [Mon, 5 Aug 2019 13:57:03 +0000 (13:57 +0000)]
compiler-rt: Rename cc files below test/sanitizer_common to cpp
See r367803 and similar other changes.
llvm-svn: 367863
Hubert Tong [Mon, 5 Aug 2019 13:55:41 +0000 (13:55 +0000)]
[yaml2obj][tests] Fix overly restrictive od output check
Summary:
rL364517 introduced further instances of `od` output checking of the
kind previously corrected by rL363829. This patch corrects the issue by
suppressing output of the input offset. The check remains sufficiently
sensitive to test for the intended value of the specific byte since the
relevant byte value is the only output we are expecting from `od`.
Reviewers: grimar, xingxue, daltenty, jasonliu, jhenderson, MaskRay
Reviewed By: grimar, MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65680
llvm-svn: 367862
Nilanjana Basu [Mon, 5 Aug 2019 13:55:21 +0000 (13:55 +0000)]
Revert "Changing representation of .cv_def_range directives in Codeview debug info assembly format for better readability"
This reverts commit
a885afa9fa8cab3b34f1ddf3d21535f88b662881.
llvm-svn: 367861
George Rimar [Mon, 5 Aug 2019 13:54:35 +0000 (13:54 +0000)]
[yaml2obj] - Allow overriding sh_entsize for SHT_GNU_versym sections.
This allows to write a test case for one of untested errors
in llvm/Object/ELF.h.
I did it in this patch to demonstrate.
Differential revision: https://reviews.llvm.org/D65394
llvm-svn: 367860
Cullen Rhodes [Mon, 5 Aug 2019 13:44:10 +0000 (13:44 +0000)]
[AArch64] Implement initial SVE calling convention support
Summary:
This patch adds initial support for the SVE calling convention such that
SVE types can be passed as arguments and return values to/from a
subroutine.
The SVE AAPCS states [1]:
z0-z7 are used to pass scalable vector arguments to a subroutine,
and to return scalable vector results from a function. If a
subroutine takes arguments in scalable vector or predicate
registers, or if it is a function that returns results in such
registers, it must ensure that the entire contents of z8-z23 are
preserved across the call. In other cases it need only preserve the
low 64 bits of z8-z15, as described in ยง5.1.2.
p0-p3 are used to pass scalable predicate arguments to a subroutine
and to return scalable predicate results from a function. If a
subroutine takes arguments in scalable vector or predicate
registers, or if it is a function that returns results in these
registers, it must ensure that p4-p15 are preserved across the call.
In other cases it need not preserve any scalable predicate register
contents.
SVE predicate and data registers are passed indirectly (i.e. spilled to the
stack and pass the address) if they exceed the registers used for argument
passing defined by the PCS referenced above. Until SVE stack support is merged
we can't spill SVE registers to the stack, so currently an llvm_unreachable is
used where we will eventually handle this.
[1] https://static.docs.arm.com/100986/0000/100986_0000.pdf
Reviewed By: ostannard
Differential Revision: https://reviews.llvm.org/D65448
llvm-svn: 367859
Nico Weber [Mon, 5 Aug 2019 13:42:31 +0000 (13:42 +0000)]
compiler-rt: Rename remaining cc files in test/profile to cpp
See r367803 and similar other changes.
llvm-svn: 367858
Raphael Isemann [Mon, 5 Aug 2019 13:40:39 +0000 (13:40 +0000)]
[lldb][NFC] Fix documentation for ClangPersistentVariables::m_next_persistent_variable_id
llvm-svn: 367857
Nico Weber [Mon, 5 Aug 2019 13:27:37 +0000 (13:27 +0000)]
More follow-up to r367851
llvm-svn: 367856
Nico Weber [Mon, 5 Aug 2019 13:23:38 +0000 (13:23 +0000)]
compiler-rt: Rename last few cc files below test/ubsan to cpp
See r367803 and similar other changes.
llvm-svn: 367855
Nico Weber [Mon, 5 Aug 2019 13:19:28 +0000 (13:19 +0000)]
compiler-rt: Rename .cc file in test/dfsan to cpp
See r367849 et al.
llvm-svn: 367854
Andrea Di Biagio [Mon, 5 Aug 2019 13:18:37 +0000 (13:18 +0000)]
[MCA][doc] Add a section for the 'Bottleneck Analysis'.
Also clarify the meaning of 'Block RThroughput' and 'RThroughput'.
llvm-svn: 367853
George Rimar [Mon, 5 Aug 2019 13:16:06 +0000 (13:16 +0000)]
[obj2yaml] - Teach tool to dump SHT_NULL sections.
Recently an advanced support of SHT_NULL sections
was implemented in yaml2obj.
This patch adds a corresponding support to obj2yaml.
Differential revision: https://reviews.llvm.org/D65215
llvm-svn: 367852
Nico Weber [Mon, 5 Aug 2019 13:12:23 +0000 (13:12 +0000)]
compiler-rt: Rename cc files in test/hwasan/TestCases subdirectories as well
Should've been part of r367849.
llvm-svn: 367851
Nilanjana Basu [Mon, 5 Aug 2019 13:11:51 +0000 (13:11 +0000)]
Changing representation of .cv_def_range directives in Codeview debug info assembly format for better readability
llvm-svn: 367850
Nico Weber [Mon, 5 Aug 2019 13:10:50 +0000 (13:10 +0000)]
compiler-rt: Rename .cc file in test/hwasan to .cpp
Like r367463, but for test/hwasan.
llvm-svn: 367849
Hans Wennborg [Mon, 5 Aug 2019 13:04:12 +0000 (13:04 +0000)]
test-release.sh: Perform the sed substitution on both files (PR42739)
The comparison would otherwise fail if Phase2 occurrs naturally in the
object file. It would get replaced with Phase3 in the one .o, but not
in the other.
We were already running both files through sed to have them processed in
this same way; this is a logical extension of that.
llvm-svn: 367847
Hans Wennborg [Mon, 5 Aug 2019 13:04:07 +0000 (13:04 +0000)]
Write the RequiredLibraries for 'all' in LibraryDependencies.inc in a deterministic order (PR42739)
llvm-svn: 367846
Haojian Wu [Mon, 5 Aug 2019 12:48:09 +0000 (12:48 +0000)]
[clangd] Add a callback mechanism for handling responses from client.
Summary:
The callback will be invoked in clangd when we receive a reply from the client.
This is a prerequisite of implementing a generic mechanism for chainable
refactorings (e.g. extract variable and rename), this would allow server to
trigger a new request to the LSP client after receiving a reply from the client.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65387
llvm-svn: 367845
Nico Weber [Mon, 5 Aug 2019 12:44:53 +0000 (12:44 +0000)]
gn build: Merge r367839
llvm-svn: 367844
Raphael Isemann [Mon, 5 Aug 2019 12:37:54 +0000 (12:37 +0000)]
[lldb][NFC] Clang format GetNextPersistentVariableName signature
llvm-svn: 367843
Raphael Isemann [Mon, 5 Aug 2019 12:32:59 +0000 (12:32 +0000)]
[lldb] Move redundant persistent variable counter to ClangPersistentVariables
Currently Target::m_next_persistent_variable_index is counting up
for our persistent variables ($0, $1, ...) but we also have a
unused counter that is supposed to do this in
ClangPersistentVariables but that stays always at 0 (because
we currently increase the target counter when we should increase
that unused counter).
This patch removes the counter in Target and lets the documented
counter in ClangPersistentVariables do the variable counting.
Patch *should* be NFC, but it might unexpectedly bring LLDB to
new code paths that could contain exciting new bugs to fix.
llvm-svn: 367842
Nico Weber [Mon, 5 Aug 2019 12:28:08 +0000 (12:28 +0000)]
Remove another empty directory.
llvm-svn: 367841
Raphael Isemann [Mon, 5 Aug 2019 12:23:39 +0000 (12:23 +0000)]
[clang][NFC] Remove unused private variable 'CI' in CrossTranslationUnit.h
It seems because of the recent refactorings this variable has become unused
and now we get this warning in the build logs:
In file included from llvm/clang/lib/CrossTU/CrossTranslationUnit.cpp:12:
llvm/clang/include/clang/CrossTU/CrossTranslationUnit.h:200:21: warning: private field 'CI' is not used [-Wunused-private-field]
CompilerInstance &CI;
^
I'll remove them for now to get the builds back to green.
llvm-svn: 367840
Johan Vikstrom [Mon, 5 Aug 2019 12:20:43 +0000 (12:20 +0000)]
[AST] Fix RecursiveASTVisitor visiting implicit constructor initializers.
Summary: RecursiveASTVisitor was visiting implcit constructor initializers. This caused semantic highlighting in clangd to emit error logs. Fixes this by checking if the constructor is written or if the visitor should visit implicit decls.
Reviewers: hokein, ilya-biryukov
Subscribers: kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65735
llvm-svn: 367839
Nico Weber [Mon, 5 Aug 2019 12:18:04 +0000 (12:18 +0000)]
Remove empty directory.
The directory was added in rL292747 which was reverted again in 292751 --
but the revert was apparently done via git and the empty dir stuck around in
svn.
llvm-svn: 367838
Martin Storsjo [Mon, 5 Aug 2019 11:57:06 +0000 (11:57 +0000)]
[MinGW] Add an lld specific option for requesting to delay load libraries
With GNU tools, delayload is handled completely differently. (One
creates a specific delayload import library using dlltool and then
links against it instead of the normal import library.)
Instead of requiring using -Xlink=-delayload:lib.dll, we can provide
an lld specific option for this.
Differential Revision: https://reviews.llvm.org/D65728
llvm-svn: 367837
Martin Storsjo [Mon, 5 Aug 2019 11:57:00 +0000 (11:57 +0000)]
[COFF] Omit automatically imported symbols from the symbol table
These symbols actually point to the symbol's IAT entry, which
obviously is different from the symbol itself (which is imported
from a different module and doesn't exist in the current one).
Omitting this symbol helps gdb inspect automatically imported
symbols, see https://sourceware.org/bugzilla/show_bug.cgi?id=24574
for discussion on the matter.
Surprisingly, those extra symbols don't seem to be an issue for
gdb when the sources have been built with clang, only with gcc.
The actual logic in gdb that this depends on still is unknown, but
omitting these symbols from the symbol table is the right thing to
do in any case.
Differential Revision: https://reviews.llvm.org/D65727
llvm-svn: 367836
Pavel Labath [Mon, 5 Aug 2019 11:29:01 +0000 (11:29 +0000)]
Fix PDB tests after r367820
The commit changed Module dumping code to call SymbolFile::Dump
directly, which meant that we were no longer showing the plugin name in
the output (as that was done in the SymbolVendor).
This adds the plugin name printing code to the SymbolFile dump method,
and tweak the assertions in the PDB tests to match it correctly.
llvm-svn: 367835
Sanjay Patel [Mon, 5 Aug 2019 11:27:07 +0000 (11:27 +0000)]
[DAGCombiner][x86] prevent infinite loop from truncate/extend transforms
The test case is based on the example from the post-commit thread for:
https://reviews.llvm.org/rGc9171bd0a955
This replaces the x86-specific simple-type check from:
rL367766
with a check in the DAGCombiner. Adding the check isn't
strictly necessary after the fix from:
rL367768
...but it seems likely that we're heading for trouble if
we are creating weird types in this transform.
I combined the earlier legality check into the initial
clause to simplify the code.
So we should only try the trunc/sext transform at the
earliest combine stage, but we limit the transform to
simple types anyway because the TLI hook is probably
too lax about what it considers a free truncate.
llvm-svn: 367834
George Rimar [Mon, 5 Aug 2019 11:19:28 +0000 (11:19 +0000)]
[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.
This method is dead. It was introduced in D47989,
but now the logic from D63475 is used in llvm-readobj instead.
Also it has a problem: it returns the first matching section,
even if there are multiple sections with the same name.
Differential revision: https://reviews.llvm.org/D65393
llvm-svn: 367833
Graham Hunter [Mon, 5 Aug 2019 11:18:19 +0000 (11:18 +0000)]
[MVT][SVE] Map between scalable vector IR Type and VTs
Adds a two way mapping between the scalable vector IR type and
corresponding SelectionDAG ValueTypes.
Reviewers: craig.topper, jeroen.dobbelaere, fhahn, rengolin, greened, rovka
Reviewed By: greened
Differential Revision: https://reviews.llvm.org/D47770
llvm-svn: 367832
Florian Hahn [Mon, 5 Aug 2019 11:12:23 +0000 (11:12 +0000)]
[AArch64] Skip isZIPMask check for masks with an odd number of elements.
We process 2 elements at a time and expect the number of elements to be
even. Similar to D60690.
Reviewers: dmgreen, samparker, t.p.northover
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D65400
llvm-svn: 367831
Raphael Isemann [Mon, 5 Aug 2019 11:08:47 +0000 (11:08 +0000)]
[lldb][NFC] Remove unimplemented ClangExpressionSourceCode::GetNumBodyLines
llvm-svn: 367830
Endre Fulop [Mon, 5 Aug 2019 11:06:41 +0000 (11:06 +0000)]
[CrossTU][NFCI] Refactor loadExternalAST function
Summary:
Refactor loadExternalAST method of CrossTranslationUnitContext in order to
reduce maintenance burden and so that features are easier to add in the future.
Reviewers: martong
Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64753
llvm-svn: 367829
Guillaume Chatelet [Mon, 5 Aug 2019 11:02:05 +0000 (11:02 +0000)]
[LLVM][Alignment] Introduce Alignment Type
Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet, jfb, jakehehrlich
Reviewed By: jfb
Subscribers: wuzish, jholewinski, arsenm, dschuff, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, s.egerton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65514
llvm-svn: 367828
David Bolvansky [Mon, 5 Aug 2019 10:14:09 +0000 (10:14 +0000)]
[TLI][NFC] Fixed typo
llvm-svn: 367827
Roger Ferrer Ibanez [Mon, 5 Aug 2019 10:09:06 +0000 (10:09 +0000)]
Sidestep false positive due to a matching git repository name
I have failures in this test because the grep @b gets confused by the
clang version including a repository name like this
!1 = !{!"clang version 10.0.0 (git@build-machine:llvm/llvm-monorepo.git
fe958c0e8c89ec663c8e551936778e2cbb460154)"}
I considered something like grep -w but my understanding of the manpages
was that that isn't super portable. So I think it is easier to make
clang not to output that metadata using -fno-ident.
Differential Revision: https://reviews.llvm.org/D65635
llvm-svn: 367826
David Bolvansky [Mon, 5 Aug 2019 09:58:32 +0000 (09:58 +0000)]
[InstCombine] Added mempcpy tests [NFC]
llvm-svn: 367825
Pavel Labath [Mon, 5 Aug 2019 09:55:07 +0000 (09:55 +0000)]
ObjectFile[ELF]: Refactor gnu_debuglink interface
Summary:
The contents of the gnu_debuglink section were passed through the
GetDebugSymbolFilePaths interface, which was more generic than needed.
As the only class implementing this function is ObjectFileELF, we can
modify the function to return just a single FileSpec (instead of a
list). Also, since the SymbolVendorELF already assumes ELF object files,
we don't have to make this method available on the generic ObjectFile
interface -- instead we can put it on ObjectFileELF directly.
This change also makes is so that if the Module has an explicit symbol
file spec set, we disregard the value the value of the debug link
(instead of doing a secondary lookup using that). I think it makes sense
to honor the users wishes if he had explicitly set the symbol file spec,
and this seems to be consistent with what SymbolVendorMacOSX is doing
(SymbolVendorMacOSX.cpp:125).
The main reason for making these changes is to make the treatment of
build-ids and debug links simpler in the follow-up patch.
Reviewers: clayborg, jankratochvil, mgorny, espindola
Subscribers: emaste, arichardson, MaskRay, lldb-commits
Differential Revision: https://reviews.llvm.org/D65560
llvm-svn: 367824
Anastasia Stulova [Mon, 5 Aug 2019 09:50:28 +0000 (09:50 +0000)]
[OpenCL] Fix vector literal test broken in rL367675.
Avoid checking alignment unnecessary that is not portable
among targets.
llvm-svn: 367823
Guillaume Chatelet [Mon, 5 Aug 2019 09:49:09 +0000 (09:49 +0000)]
[LLVM][Alignment] Introduce Alignment In CallingConv
Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Subscribers: hiraditya, llvm-commits, courbet, jfb
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65659
llvm-svn: 367822
Nicolai Haehnle [Mon, 5 Aug 2019 09:36:06 +0000 (09:36 +0000)]
AMDGPU: add missing llvm.amdgcn.{raw,struct}.buffer.atomic.{inc,dec}
Summary:
Wrapping increment/decrement. These aren't exposed by many APIs...
Change-Id: I1df25c7889de5a5ba76468ad8e8a2597efa9af6c
Reviewers: arsenm, tpr, dstuttard
Subscribers: kzhuravl, jvesely, wdng, yaxunl, t-tye, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65283
llvm-svn: 367821
Pavel Labath [Mon, 5 Aug 2019 09:21:47 +0000 (09:21 +0000)]
Remove SymbolVendor::GetSymtab
Summary:
This patch removes the GetSymtab method from the SymbolVendor, which is
a no-op as it's implementation just forwards to the relevant SymbolFile.
Instead it creates a Module::GetSymtab, which calls the SymbolFile
method directly.
All callers have been updated to use the Module method directly instead
of a two phase GetSymbolVendor->GetSymtab search, which leads to reduced
intentation in a lot of deeply nested code.
Reviewers: clayborg, JDevlieghere, jingham
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D65569
llvm-svn: 367820
Oliver Stannard [Mon, 5 Aug 2019 09:04:10 +0000 (09:04 +0000)]
Reland: Fix and test inter-procedural register allocation for ARM
Add an explicit construction of the ArrayRef, gcc 5 and earlier don't
seem to select the ArrayRef constructor which takes a C array when the
construction is implicit.
Original commit message:
- Avoid a crash when IPRA calls ARMFrameLowering::determineCalleeSaves
with a null RegScavenger. Simply not updating the register scavenger
is fine because IPRA only cares about the SavedRegs vector, the acutal
code of the function has already been generated at this point.
- Add a new hook to TargetRegisterInfo to get the set of registers which
can be clobbered inside a call, even if the compiler can see both
sides, by linker-generated code.
Differential revision: https://reviews.llvm.org/D64908
llvm-svn: 367819
Guillaume Chatelet [Mon, 5 Aug 2019 09:00:43 +0000 (09:00 +0000)]
[LLVM][Alignment] Introduce Alignment Type in DataLayout
Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet, jfb, jakehehrlich
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65521
Make getFunctionPtrAlign() return MaybeAlign
llvm-svn: 367817
Michael Pozulp [Mon, 5 Aug 2019 08:52:28 +0000 (08:52 +0000)]
Revert "[llvm-objdump] Re-commit r367284."
This reverts r367776 (git commit
d34099926e909390cb0254bebb4b7f5cf15467c7).
My changes to llvm-objdump tests caused them to fail on windows:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/27368
llvm-svn: 367816
Hans Wennborg [Mon, 5 Aug 2019 08:51:45 +0000 (08:51 +0000)]
build_llvm_package.bat: Set PYTHON_EXECUTABLE (PR42724)
llvm-svn: 367815
Pavel Labath [Mon, 5 Aug 2019 08:23:25 +0000 (08:23 +0000)]
Remove usage of usleep in generic code
This function is not portable, and there are only a handful of usages of
it anyway. Replacing it with std::this_thread::sleep_for enables us to
get rid of the compatibility code in PosixApi.h.
llvm-svn: 367814
Sam McCall [Mon, 5 Aug 2019 08:14:17 +0000 (08:14 +0000)]
[clangd] Expose -offset-encoding=utf-32, which has been implemented for ages
llvm-svn: 367812
Sam McCall [Mon, 5 Aug 2019 08:14:13 +0000 (08:14 +0000)]
[clangd] Fix error message with incorrect TextDocumentcontentChangeEvent.rangeLength
llvm-svn: 367811
Dmitri Gribenko [Mon, 5 Aug 2019 08:05:16 +0000 (08:05 +0000)]
Adds a warning when an inline Doxygen comment has no argument
Summary:
It warns for for comments like
/** \pre \em */
where \em has no argument
This warning is enabled with the -Wdocumentation option.
Reviewers: gribozavr, rsmith
Reviewed By: gribozavr
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64696
Patch by Mark de Wever.
llvm-svn: 367809
Fangrui Song [Mon, 5 Aug 2019 07:04:42 +0000 (07:04 +0000)]
compiler-rt: Rename .cc file in test/lsan to .cpp
Like r367463, but for test/lsan.
llvm-svn: 367803
Adam Balogh [Mon, 5 Aug 2019 06:45:41 +0000 (06:45 +0000)]
[Analyzer] Iterator Checkers - Fix for Crash on Iterator Differences
Iterators differences were mistakenly handled as random decrements which
causes an assertion. This patch fixes this.
llvm-svn: 367802
Fangrui Song [Mon, 5 Aug 2019 06:33:52 +0000 (06:33 +0000)]
[DWARF] Change DWARFDebugLoc::Entry::Loc from SmallVector<char, 4> to SmallString<4>
SmallString has a conversion to StringRef, which can be leveraged to
simplify two use sites.
llvm-svn: 367801
Fangrui Song [Mon, 5 Aug 2019 05:43:48 +0000 (05:43 +0000)]
Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
F_{None,Text,Append} are kept for compatibility since r334221.
llvm-svn: 367800
Petr Hosek [Mon, 5 Aug 2019 04:48:56 +0000 (04:48 +0000)]
[Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack
These "sanitizers" are hardened ABIs that are wholly orthogonal
to the SanitizerCoverage instrumentation.
Differential Revision: https://reviews.llvm.org/D65715
llvm-svn: 367799
Craig Topper [Mon, 5 Aug 2019 03:48:31 +0000 (03:48 +0000)]
[X86] Fix a bad early out in combineExtInVec that prevented recursive shuffle combining from running with -x86-experimental-vector-widening-legalization.
llvm-svn: 367798
Petr Hosek [Mon, 5 Aug 2019 01:36:51 +0000 (01:36 +0000)]
[Driver] Derive Fuchsia Linker directly from Tool
Fuchsia Linker tool doesn't need any of the GnuTool behavior.
llvm-svn: 367797
Petr Hosek [Mon, 5 Aug 2019 01:15:33 +0000 (01:15 +0000)]
[Driver] Always use -z separate-code with lld on Fuchsia
Previously -z separate-code was the default lld behavior, but now it
has to be explicitly requested by specifying the flag.
llvm-svn: 367796
Nico Weber [Sun, 4 Aug 2019 23:34:27 +0000 (23:34 +0000)]
gn build: Merge r367756
llvm-svn: 367795
Petr Hosek [Sun, 4 Aug 2019 22:24:14 +0000 (22:24 +0000)]
[Driver] Support for disabling sanitizer runtime linking
This change introduces a pair of -fsanitize-link-runtime and
-fno-sanitize-link-runtime flags which can be used to control linking of
sanitizer runtimes. This is useful in certain environments like kernels
where existing runtime libraries cannot be used.
Differential Revision: https://reviews.llvm.org/D65029
llvm-svn: 367794
Johannes Doerfert [Sun, 4 Aug 2019 18:40:01 +0000 (18:40 +0000)]
[Attributor][NFC] Create some attributes earlier
llvm-svn: 367793
Johannes Doerfert [Sun, 4 Aug 2019 18:39:28 +0000 (18:39 +0000)]
[Attributor][NFC] Improve debug output
llvm-svn: 367792
Johannes Doerfert [Sun, 4 Aug 2019 18:38:53 +0000 (18:38 +0000)]
[Attributor][Fix] Resolve various liveness issues
Summary:
This contains various fixes:
- Explicitly determine and return the next noreturn instruction.
- If an invoke calls a noreturn function which is not nounwind we
keep the unwind destination live. This also means we require an
invoke. Though we can still add the unreachable to the normal
destination block.
- Check if the return instructions are dead after we look for calls
to avoid triggering an optimistic fixpoint in the presence of
assumed liveness information.
- Make the interface work with "const" pointers.
- Some simplifications
While additional tests are included, full coverage is achieved only with
D59978.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65701
llvm-svn: 367791
Johannes Doerfert [Sun, 4 Aug 2019 18:37:38 +0000 (18:37 +0000)]
[Attributor][NFC] Simplify common pattern wrt. fixpoints
When a fixpoint is indicated the change status is known due to the
fixpoint kind. This simplifies a common code pattern by making the
connection explicit.
llvm-svn: 367790
Johannes Doerfert [Sun, 4 Aug 2019 17:55:15 +0000 (17:55 +0000)]
[Attributor][NFC] Invalid DerefState is at fixpoint
Summary:
If the DerefBytesState (and thereby the DerefState) is invalid, we
reached a fixpoint for the whole DerefState as we will not
manifest/provide information then.
Reviewers: uenoku, sstefan1
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65586
llvm-svn: 367789
Craig Topper [Sun, 4 Aug 2019 17:30:41 +0000 (17:30 +0000)]
[TargetLowering][X86] Teach SimplifyDemandedVectorElts to replace the base vector of INSERT_SUBVECTOR with undef if none of the elements are demanded even if the node has other users.
Summary:
The SimplifyDemandedVectorElts function can replace with undef
when no elements are demanded, but due to how it interacts with
TargetLoweringOpts, it can only do this when the node has
no other users.
Remove a now unneeded DAG combine from the X86 backend.
Reviewers: RKSimon, spatel
Reviewed By: RKSimon
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65713
llvm-svn: 367788
Simon Pilgrim [Sun, 4 Aug 2019 16:37:29 +0000 (16:37 +0000)]
Regenerate test for an upcoming patch.
I managed to use the update_llc_test_checks script for this, but had to set -asm-verbose=true and then manually tweak the result (PR42882)
llvm-svn: 367787
Simon Pilgrim [Sun, 4 Aug 2019 16:28:37 +0000 (16:28 +0000)]
[UpdateTestChecks] Add end_function directive to regex matcher for wasm32 function body
llvm-svn: 367786
Zinovy Nis [Sun, 4 Aug 2019 13:32:39 +0000 (13:32 +0000)]
[clang-tidy] Add FixItHint for performance-noexcept-move-constructor
Differential Revision: https://reviews.llvm.org/D65104
llvm-svn: 367785
Simon Pilgrim [Sun, 4 Aug 2019 13:15:23 +0000 (13:15 +0000)]
[X86] lowerShuffleAsSpecificZeroOrAnyExtend - use undef PSHUFB mask indices for ANY_EXTEND shuffles
llvm-svn: 367784
Simon Pilgrim [Sun, 4 Aug 2019 12:48:19 +0000 (12:48 +0000)]
Fix signed/unsigned comparison warning. NFC.
llvm-svn: 367783
Simon Pilgrim [Sun, 4 Aug 2019 12:24:40 +0000 (12:24 +0000)]
[X86] SimplifyMultipleUseDemandedBits - Add target shuffle support
llvm-svn: 367782
Benjamin Kramer [Sun, 4 Aug 2019 11:08:32 +0000 (11:08 +0000)]
[ORC] Remove a layer of indirection when locking the mutex. NFCI.
llvm-svn: 367781