UnstableChanges

Summary

  1. [InstCombine] change canonicalization to fabs() to use FMF on fsub Similar to rL362909: This isn't the ideal fix (use FMF on the select), but it's still an improvement until we have better FMF propagation to selects and other FP math operators. I don't think there's much risk of regression from this change by not including the FMF on the fcmp any more. The nsz/nnan FMF should be the same on the fcmp and the fsub because they have the same operand.
  2. [ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR. Arm v8.1-M supports the VMOV instructions that move a half-precision value to and from a GPR, but not if the GPR is SP or PC. To fix this, I've changed those instructions to use the rGPR register class instead of GPR. rGPR always excludes PC, and it excludes SP except in the presence of the HasV8Ops target feature (i.e. Arm v8-A). So the effect is that VMOV.F16 to and from PC is now illegal everywhere, but VMOV.F16 to and from SP is illegal only on non-v8-A cores (which I believe is all as it should be). Reviewers: dmgreen, samparker, SjoerdMeijer, ostannard Reviewed By: ostannard Subscribers: ostannard, javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60704
  3. [ExecutionEngine] Add UnaryOperator visitor to the interpreter This is to support the unary FNeg instruction. Differential Revision: https://reviews.llvm.org/D62881
  4. [yaml2obj] - Remove TODOs from dynsymtab-implicit-sections-size-content.yaml. NFCI. Now when https://bugs.llvm.org/show_bug.cgi?id=42215 is fixed, we can remove these TODOs.
  5. [llvm-readobj/llvm-readelf] - Don't fail to dump the object if .dynsym has broken sh_link field. This is https://bugs.llvm.org/show_bug.cgi?id=42215. GNU readelf allows to dump the objects in that case, but llvm-readobj/llvm-readelf reports an error and stops. The patch fixes that. Differential revision: https://reviews.llvm.org/D63074
  6. [InstCombine] allow unordered preds when canonicalizing to fabs() PR42179: https://bugs.llvm.org/show_bug.cgi?id=42179
  7. [InstCombine] add tests for fcmp unordered pred -> fabs (PR42179); NFC
Revision 362943 by spatel:
[InstCombine] change canonicalization to fabs() to use FMF on fsub

Similar to rL362909:
This isn't the ideal fix (use FMF on the select), but it's still an
improvement until we have better FMF propagation to selects and other
FP math operators.

I don't think there's much risk of regression from this change by
not including the FMF on the fcmp any more. The nsz/nnan FMF
should be the same on the fcmp and the fsub because they have the
same operand.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpptrunk/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/fabs.lltrunk/test/Transforms/InstCombine/fabs.ll
Revision 362942 by statham:
[ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR.

Arm v8.1-M supports the VMOV instructions that move a half-precision
value to and from a GPR, but not if the GPR is SP or PC.

To fix this, I've changed those instructions to use the rGPR register
class instead of GPR. rGPR always excludes PC, and it excludes SP
except in the presence of the HasV8Ops target feature (i.e. Arm v8-A).
So the effect is that VMOV.F16 to and from PC is now illegal
everywhere, but VMOV.F16 to and from SP is illegal only on non-v8-A
cores (which I believe is all as it should be).

Reviewers: dmgreen, samparker, SjoerdMeijer, ostannard

Reviewed By: ostannard

Subscribers: ostannard, javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60704
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/ARM/ARMInstrVFP.tdtrunk/lib/Target/ARM/ARMInstrVFP.td
The file was added/llvm/trunk/test/MC/ARM/vmovhr.strunk/test/MC/ARM/vmovhr.s
Revision 362941 by mcinally:
[ExecutionEngine] Add UnaryOperator visitor to the interpreter

This is to support the unary FNeg instruction.

Differential Revision: https://reviews.llvm.org/D62881
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpptrunk/lib/ExecutionEngine/Interpreter/Execution.cpp
The file was modified/llvm/trunk/lib/ExecutionEngine/Interpreter/Interpreter.htrunk/lib/ExecutionEngine/Interpreter/Interpreter.h
The file was modified/llvm/trunk/test/ExecutionEngine/test-interp-vec-arithm_float.lltrunk/test/ExecutionEngine/test-interp-vec-arithm_float.ll
Revision 362940 by grimar:
[yaml2obj] - Remove TODOs from dynsymtab-implicit-sections-size-content.yaml. NFCI.

Now when https://bugs.llvm.org/show_bug.cgi?id=42215 is fixed,
we can remove these TODOs.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yamltrunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml
Revision 362938 by grimar:
[llvm-readobj/llvm-readelf] - Don't fail to dump the object if .dynsym has broken sh_link field.

This is https://bugs.llvm.org/show_bug.cgi?id=42215.

GNU readelf allows to dump the objects in that case,
but llvm-readobj/llvm-readelf reports an error and stops.

The patch fixes that.

Differential revision: https://reviews.llvm.org/D63074
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-readobj/Inputs/elf-broken-dynsym-link.elf-x86-64trunk/test/tools/llvm-readobj/Inputs/elf-broken-dynsym-link.elf-x86-64
The file was added/llvm/trunk/test/tools/llvm-readobj/elf-broken-dynsym-link.testtrunk/test/tools/llvm-readobj/elf-broken-dynsym-link.test
The file was modified/llvm/trunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yamltrunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yaml
The file was modified/llvm/trunk/tools/llvm-readobj/ELFDumper.cpptrunk/tools/llvm-readobj/ELFDumper.cpp
The file was modified/llvm/trunk/tools/llvm-readobj/llvm-readobj.cpptrunk/tools/llvm-readobj/llvm-readobj.cpp
The file was modified/llvm/trunk/tools/llvm-readobj/llvm-readobj.htrunk/tools/llvm-readobj/llvm-readobj.h
Revision 362937 by spatel:
[InstCombine] allow unordered preds when canonicalizing to fabs()

PR42179:
https://bugs.llvm.org/show_bug.cgi?id=42179
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpptrunk/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/fabs.lltrunk/test/Transforms/InstCombine/fabs.ll
Revision 362936 by spatel:
[InstCombine] add tests for fcmp unordered pred -> fabs (PR42179); NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/fabs.lltrunk/test/Transforms/InstCombine/fabs.ll

Summary

  1. [clangd] Revamp textDocument/onTypeFormatting. Summary: The existing implementation (which triggers on }) is fairly simple and has flaws: - doesn't trigger frequently/regularly enough (particularly in editors that type the } for you) - often reformats too much code around the edit - has jarring cases that I don't have clear ideas for fixing This implementation is designed to trigger on newline, which feels to me more intuitive than } or ;. It does have allow for reformatting after other characters - it has a basic behavior and a model for adding specialized behavior for particular characters. But at least initially I'd stick to advertising \n in the capabilities. This also handles comment splitting: when you insert a line break inside a line comment, it will make the new line into an aligned line comment. Working on tests, but want people to patch it in and try it - it's hard to see if "feel" is right purely by looking at a test. Reviewers: ilya-biryukov, hokein Subscribers: mgorny, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60605
Revision 362939 by sammccall:
[clangd] Revamp textDocument/onTypeFormatting.

Summary:
The existing implementation (which triggers on }) is fairly simple and
has flaws:
- doesn't trigger frequently/regularly enough (particularly in editors that type the }
for you)
- often reformats too much code around the edit
- has jarring cases that I don't have clear ideas for fixing

This implementation is designed to trigger on newline, which feels to me more
intuitive than } or ;.
It does have allow for reformatting after other characters - it has a
basic behavior and a model for adding specialized behavior for
particular characters. But at least initially I'd stick to advertising
\n in the capabilities.

This also handles comment splitting: when you insert a line break inside
a line comment, it will make the new line into an aligned line comment.

Working on tests, but want people to patch it in and try it - it's hard to
see if "feel" is right purely by looking at a test.

Reviewers: ilya-biryukov, hokein

Subscribers: mgorny, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60605
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/CMakeLists.txttrunk/clangd/CMakeLists.txt
The file was modified/clang-tools-extra/trunk/clangd/ClangdLSPServer.cpptrunk/clangd/ClangdLSPServer.cpp
The file was modified/clang-tools-extra/trunk/clangd/ClangdServer.cpptrunk/clangd/ClangdServer.cpp
The file was modified/clang-tools-extra/trunk/clangd/ClangdServer.htrunk/clangd/ClangdServer.h
The file was added/clang-tools-extra/trunk/clangd/Format.cpptrunk/clangd/Format.cpp
The file was added/clang-tools-extra/trunk/clangd/Format.htrunk/clangd/Format.h
The file was modified/clang-tools-extra/trunk/clangd/test/formatting.testtrunk/clangd/test/formatting.test
The file was modified/clang-tools-extra/trunk/clangd/test/initialize-params.testtrunk/clangd/test/initialize-params.test
The file was modified/clang-tools-extra/trunk/clangd/unittests/CMakeLists.txttrunk/clangd/unittests/CMakeLists.txt
The file was added/clang-tools-extra/trunk/clangd/unittests/FormatTests.cpptrunk/clangd/unittests/FormatTests.cpp