SuccessChanges

Summary

  1. [X86] Limit getTargetConstantFromNode to only work on NormalLoads not extending loads. This seems to fix a failure reported by Jordan Rupprecht, but we don't have a reduced test case yet.
  2. [Support] Move llvm::MemoryBuffer to sys::fs::file_t Summary: On Windows, Posix integer file descriptors are a compatibility layer over native file handles provided by the C runtime. There is a hard limit on the maximum number of file descriptors that a process can open, and the limit is 8192. LLD typically doesn't run into this limit because it opens input files, maps them into memory, and then immediately closes the file descriptor. This prevents it from running out of FDs. For various reasons, I'd like to open handles to every input file and keep them open during linking. That requires migrating MemoryBuffer over to taking open native file handles instead of integer FDs. Reviewers: aganea, Bigcheese Reviewed By: aganea Subscribers: smeenai, silvas, mehdi_amini, hiraditya, steven_wu, dexonsmith, dang, llvm-commits, zturner Tags: #llvm Differential Revision: https://reviews.llvm.org/D63453
  3. AMDGPU/GlobalISel: Add support for wide loads >= 256-bits Summary: This adds support for the most commonly used wide load types: <8xi32>, <16xi32>, <4xi64>, and <8xi64> Reviewers: arsenm Reviewed By: arsenm Subscribers: hiraditya, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, volkan, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57399
  4. GlobalISel: Implement lower for G_FCOPYSIGN In SelectionDAG AMDGPU treated these as legal, but this was mostly because the bitcasts required for FP types were painful. Theoretically the bitpattern should eventually match to bfi, so don't bother trying to get the patterns to import.
  5. [Bitcode] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h This fixes a modules issue.
  6. [docs][Remarks] Add documentation for remarks in LLVM This adds documentation that describes remarks in LLVM. It aims at explaining what remarks are, how to enable them, and what users can do with the different modes. It lists all the available flags in LLVM (excluding clang), and describes the expected YAML structure as well as the tools that support the YAML format today. Differential Revision: https://reviews.llvm.org/D64355
  7. [X86] Don't form extloads in combineExtInVec unless the load extension is legal. This should prevent doing this on pre-sse4.1 targets or for 256 bit vectors without avx2. I don't know of a failure from this. Op legalization will probably take care of, but seemed better to be safe.
Revision 365589 by ctopper:
[X86] Limit getTargetConstantFromNode to only work on NormalLoads not extending loads.

This seems to fix a failure reported by Jordan Rupprecht, but we
don't have a reduced test case yet.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpptrunk/lib/Target/X86/X86ISelLowering.cpp
Revision 365588 by rnk:
[Support] Move llvm::MemoryBuffer to sys::fs::file_t

Summary:
On Windows, Posix integer file descriptors are a compatibility layer
over native file handles provided by the C runtime. There is a hard
limit on the maximum number of file descriptors that a process can open,
and the limit is 8192. LLD typically doesn't run into this limit because
it opens input files, maps them into memory, and then immediately closes
the file descriptor. This prevents it from running out of FDs.

For various reasons, I'd like to open handles to every input file and
keep them open during linking. That requires migrating MemoryBuffer over
to taking open native file handles instead of integer FDs.

Reviewers: aganea, Bigcheese

Reviewed By: aganea

Subscribers: smeenai, silvas, mehdi_amini, hiraditya, steven_wu, dexonsmith, dang, llvm-commits, zturner

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63453
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Support/FileSystem.htrunk/include/llvm/Support/FileSystem.h
The file was modified/llvm/trunk/include/llvm/Support/MemoryBuffer.htrunk/include/llvm/Support/MemoryBuffer.h
The file was modified/llvm/trunk/lib/LTO/Caching.cpptrunk/lib/LTO/Caching.cpp
The file was modified/llvm/trunk/lib/LTO/LTOModule.cpptrunk/lib/LTO/LTOModule.cpp
The file was modified/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpptrunk/lib/LTO/ThinLTOCodeGenerator.cpp
The file was modified/llvm/trunk/lib/Object/ArchiveWriter.cpptrunk/lib/Object/ArchiveWriter.cpp
The file was modified/llvm/trunk/lib/Support/FileOutputBuffer.cpptrunk/lib/Support/FileOutputBuffer.cpp
The file was modified/llvm/trunk/lib/Support/MemoryBuffer.cpptrunk/lib/Support/MemoryBuffer.cpp
The file was modified/llvm/trunk/lib/Support/Unix/Path.inctrunk/lib/Support/Unix/Path.inc
The file was modified/llvm/trunk/lib/Support/VirtualFileSystem.cpptrunk/lib/Support/VirtualFileSystem.cpp
The file was modified/llvm/trunk/lib/Support/Windows/Path.inctrunk/lib/Support/Windows/Path.inc
The file was modified/llvm/trunk/lib/XRay/InstrumentationMap.cpptrunk/lib/XRay/InstrumentationMap.cpp
The file was modified/llvm/trunk/lib/XRay/Profile.cpptrunk/lib/XRay/Profile.cpp
The file was modified/llvm/trunk/lib/XRay/Trace.cpptrunk/lib/XRay/Trace.cpp
The file was modified/llvm/trunk/tools/llvm-xray/xray-fdr-dump.cpptrunk/tools/llvm-xray/xray-fdr-dump.cpp
The file was modified/llvm/trunk/unittests/Support/MemoryBufferTest.cpptrunk/unittests/Support/MemoryBufferTest.cpp
The file was modified/llvm/trunk/unittests/Support/Path.cpptrunk/unittests/Support/Path.cpp
The file was modified/llvm/trunk/unittests/Support/ReplaceFileTest.cpptrunk/unittests/Support/ReplaceFileTest.cpp
Revision 365586 by tstellar:
AMDGPU/GlobalISel: Add support for wide loads >= 256-bits

Summary:
This adds support for the most commonly used wide load types:
<8xi32>, <16xi32>, <4xi64>, and <8xi64>

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: hiraditya, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, volkan, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D57399
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.deftrunk/lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpptrunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpptrunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.htrunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-smrd.mirtrunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-smrd.mir
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-load.mirtrunk/test/CodeGen/AMDGPU/GlobalISel/legalize-load.mir
The file was added/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/regbankselect-load.mirtrunk/test/CodeGen/AMDGPU/GlobalISel/regbankselect-load.mir
Revision 365583 by arsenm:
GlobalISel: Implement lower for G_FCOPYSIGN

In SelectionDAG AMDGPU treated these as legal, but this was mostly
because the bitcasts required for FP types were painful. Theoretically
the bitpattern should eventually match to bfi, so don't bother trying
to get the patterns to import.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/GlobalISel/LegalizerHelper.htrunk/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpptrunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpptrunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-fcopysign.mirtrunk/test/CodeGen/AMDGPU/GlobalISel/legalize-fcopysign.mir
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-frint.mirtrunk/test/CodeGen/AMDGPU/GlobalISel/legalize-frint.mir
Revision 365580 by thegameg:
[Bitcode] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h

This fixes a modules issue.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Bitcode/Reader/BitcodeAnalyzer.cpptrunk/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
Revision 365578 by thegameg:
[docs][Remarks] Add documentation for remarks in LLVM

This adds documentation that describes remarks in LLVM.

It aims at explaining what remarks are, how to enable them, and what
users can do with the different modes.

It lists all the available flags in LLVM (excluding clang), and
describes the expected YAML structure as well as the tools that support
the YAML format today.

Differential Revision: https://reviews.llvm.org/D64355
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CodeGenerator.rsttrunk/docs/CodeGenerator.rst
The file was added/llvm/trunk/docs/Remarks.rsttrunk/docs/Remarks.rst
The file was modified/llvm/trunk/docs/index.rsttrunk/docs/index.rst
Revision 365577 by ctopper:
[X86] Don't form extloads in combineExtInVec unless the load extension is legal.

This should prevent doing this on pre-sse4.1 targets or for 256
bit vectors without avx2.

I don't know of a failure from this. Op legalization will probably
take care of, but seemed better to be safe.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpptrunk/lib/Target/X86/X86ISelLowering.cpp

Summary

  1. [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272 D63793 removed float-divide-by-zero from the "undefined" set but it failed to add it to getSupportedSanitizers(), thus the sanitizer is rejected by the driver: clang-9: error: unsupported option '-fsanitize=float-divide-by-zero' for target 'x86_64-unknown-linux-gnu' Also, add SanitizerMask::FloatDivideByZero to a few other masks to make -fsanitize-trap, -fsanitize-recover, -fsanitize-minimal-runtime and -fsanitize-coverage work. Reviewed By: rsmith, vitalybuka Differential Revision: https://reviews.llvm.org/D64317
  2. [analyzer] CastValueChecker: Model casts Summary: It models the LLVM casts: - `cast<>` - `dyn_cast<>` - `cast_or_null<>` - `dyn_cast_or_null<>` It has a very basic support without checking the `classof()` function. (It reapplies the reverted 'llvm-svn: 365582' patch with proper test file.) Reviewed By: NoQ Tags: #clang Differential Revision: https://reviews.llvm.org/D64374
  3. Revert "[analyzer] CastValueChecker: Model casts" This reverts commit 27cf6664437efd640bb6db5594bafcce68fa2854.
  4. [analyzer] CastValueChecker: Model casts Summary: It models the LLVM casts: - `cast<>` - `dyn_cast<>` - `cast_or_null<>` - `dyn_cast_or_null<>` It has a very basic support without checking the `classof()` function. Reviewed By: NoQ Tags: #clang Differential Revision: https://reviews.llvm.org/D64374
  5. Revert [clang] DirectoryWatcher This reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7)
  6. [MS] Treat ignored explicit calling conventions as an explicit __cdecl The CCCR_Ignore action is only used for Microsoft calling conventions, mainly because MSVC does not warn when a calling convention would be ignored by the current target. This behavior is actually somewhat important, since windows.h uses WINAPI (which expands to __stdcall) widely. This distinction didn't matter much before the introduction of __vectorcall to x64 and the ability to make that the default calling convention with /Gv. Now, we can't just ignore __stdcall for x64, we have to treat it as an explicit __cdecl annotation. Fixes PR42531
Revision 365587 by maskray:
[Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

D63793 removed float-divide-by-zero from the "undefined" set but it
failed to add it to getSupportedSanitizers(), thus the sanitizer is
rejected by the driver:

    clang-9: error: unsupported option '-fsanitize=float-divide-by-zero' for target 'x86_64-unknown-linux-gnu'

Also, add SanitizerMask::FloatDivideByZero to a few other masks to make -fsanitize-trap, -fsanitize-recover, -fsanitize-minimal-runtime and -fsanitize-coverage work.

Reviewed By: rsmith, vitalybuka

Differential Revision: https://reviews.llvm.org/D64317
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/Sanitizers.htrunk/include/clang/Basic/Sanitizers.h
The file was modified/cfe/trunk/lib/Driver/SanitizerArgs.cpptrunk/lib/Driver/SanitizerArgs.cpp
The file was modified/cfe/trunk/lib/Driver/ToolChain.cpptrunk/lib/Driver/ToolChain.cpp
The file was modified/cfe/trunk/test/Driver/fsanitize-blacklist.ctrunk/test/Driver/fsanitize-blacklist.c
The file was modified/cfe/trunk/test/Driver/fsanitize-coverage.ctrunk/test/Driver/fsanitize-coverage.c
The file was modified/cfe/trunk/test/Driver/fsanitize.ctrunk/test/Driver/fsanitize.c
The file was modified/cfe/trunk/test/Driver/sanitizer-ld.ctrunk/test/Driver/sanitizer-ld.c
The file was modified/cfe/trunk/test/Modules/check-for-sanitizer-feature.cpptrunk/test/Modules/check-for-sanitizer-feature.cpp
Revision 365585 by charusso:
[analyzer] CastValueChecker: Model casts

Summary:
It models the LLVM casts:
- `cast<>`
- `dyn_cast<>`
- `cast_or_null<>`
- `dyn_cast_or_null<>`

It has a very basic support without checking the `classof()` function.

(It reapplies the reverted 'llvm-svn: 365582' patch with proper test file.)

Reviewed By: NoQ

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64374
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.tdtrunk/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.htrunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
The file was modified/cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txttrunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt
The file was added/cfe/trunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpptrunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
The file was added/cfe/trunk/test/Analysis/cast-value.cpptrunk/test/Analysis/cast-value.cpp
The file was modified/cfe/trunk/test/Analysis/return-value-guaranteed.cpptrunk/test/Analysis/return-value-guaranteed.cpp
Revision 365584 by charusso:
Revert "[analyzer] CastValueChecker: Model casts"

This reverts commit 27cf6664437efd640bb6db5594bafcce68fa2854.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.tdtrunk/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.htrunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
The file was modified/cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txttrunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt
The file was removed/cfe/trunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpptrunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
The file was removed/cfe/trunk/test/Analysis/cast-value.cpptrunk/test/Analysis/cast-value.cpp
The file was modified/cfe/trunk/test/Analysis/return-value-guaranteed.cpptrunk/test/Analysis/return-value-guaranteed.cpp
Revision 365582 by charusso:
[analyzer] CastValueChecker: Model casts

Summary:
It models the LLVM casts:
- `cast<>`
- `dyn_cast<>`
- `cast_or_null<>`
- `dyn_cast_or_null<>`

It has a very basic support without checking the `classof()` function.

Reviewed By: NoQ

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64374
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.tdtrunk/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.htrunk/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
The file was modified/cfe/trunk/lib/StaticAnalyzer/Checkers/CMakeLists.txttrunk/lib/StaticAnalyzer/Checkers/CMakeLists.txt
The file was added/cfe/trunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpptrunk/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
The file was added/cfe/trunk/test/Analysis/cast-value.cpptrunk/test/Analysis/cast-value.cpp
The file was modified/cfe/trunk/test/Analysis/return-value-guaranteed.cpptrunk/test/Analysis/return-value-guaranteed.cpp
Revision 365581 by rnk:
Revert [clang] DirectoryWatcher

This reverts r365574 (git commit 31babea94a3ed38a140540f2252cf043dacec1f7)
Change TypePath in RepositoryPath in Workspace
The file was removed/cfe/trunk/include/clang/DirectoryWatchertrunk/include/clang/DirectoryWatcher
The file was modified/cfe/trunk/lib/CMakeLists.txttrunk/lib/CMakeLists.txt
The file was removed/cfe/trunk/lib/DirectoryWatchertrunk/lib/DirectoryWatcher
The file was modified/cfe/trunk/unittests/CMakeLists.txttrunk/unittests/CMakeLists.txt
The file was removed/cfe/trunk/unittests/DirectoryWatchertrunk/unittests/DirectoryWatcher
Revision 365579 by rnk:
[MS] Treat ignored explicit calling conventions as an explicit __cdecl

The CCCR_Ignore action is only used for Microsoft calling conventions,
mainly because MSVC does not warn when a calling convention would be
ignored by the current target. This behavior is actually somewhat
important, since windows.h uses WINAPI (which expands to __stdcall)
widely. This distinction didn't matter much before the introduction of
__vectorcall to x64 and the ability to make that the default calling
convention with /Gv. Now, we can't just ignore __stdcall for x64, we
have to treat it as an explicit __cdecl annotation.

Fixes PR42531
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaDeclAttr.cpptrunk/lib/Sema/SemaDeclAttr.cpp
The file was added/cfe/trunk/test/CodeGen/calling-conv-ignored.ctrunk/test/CodeGen/calling-conv-ignored.c

Summary

  1. [clangd] fix assert in test after r365531. Unverified because CMake/ninja seems to be broken...
Revision 365576 by sammccall:
[clangd] fix assert in test after r365531.

Unverified because CMake/ninja seems to be broken...
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/unittests/BackgroundIndexTests.cpptrunk/clangd/unittests/BackgroundIndexTests.cpp