SuccessChanges

Summary

  1. Enable bunch of sanitizers on NetBSD/X86 and X86_64 Summary: Enable more sanitizers: - i386 and amd64: * SanitizerKind::Vptr; * SanitizerKind::Leak; * SanitizerKind::SafeStack; * SanitizerKind::Function; - amd64 only: * SanitizerKind::Thread; These sanitizers are in the process of upstreaming to LLVM projects. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dim, vitalybuka, kcc, filcab, fjricci Reviewed By: vitalybuka Subscribers: #sanitizers, cfe-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36482
  2. [DAG] Cleanup unused nodes after store merge. NFCI.
  3. Add NetBSD support in asan_linux.cc Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: fjricci, vitalybuka, joerg, kcc, filcab Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36488
  4. Enable SafeStack on NetBSD Summary: make check-safestack: -- Testing: 8 tests, 8 threads -- Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 0.44s Expected Passes : 7 Unsupported Tests : 1 Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, fjricci, filcab Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36542
  5. [CostModel][X86] Add avx2 two-src shuffle costs
  6. [clang-tidy] Fix a buildbot. Fix format in ReleaseNotes.rst.
  7. Make .file directive to have basename only Summary: Currently LLVM puts directory along with the filename in .file directive, but this behavior doesn't match gcc. There's a no clear description about which one is right (https://sourceware.org/binutils/docs/as/File.html#File), but one document (https://sourceware.org/gdb/current/onlinedocs/stabs/ELF-Linker-Relocation.html) suggests that STT_FILE symbol in elf file is expected to have basename only, which should have a same sting file .file directive according to (https://docs.oracle.com/cd/E26502_01/html/E28388/eoiyg.html). This also affects badly on the build system that uses hashing, as the directory info could be differnt from developer to developer even when they're working on same file. Reviewers: pcc, mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36018
  8. [CostModel][X86] Extend two src shuffle cost tests Cover most 128/256/512/1024-bit cases for vXf64/vXi64, vXf32/vXi32, vXi16 + vXi8
  9. Disabling openmp-offload.c on linux until it is stabilized on all local configurations.
  10. [InstCombine] Fix a crash in getSelectCondition if we happen to have two inverse vectors of i1 constants. We used to try to truncate the constant vector to vXi1, but if it's already i1 this would fail. Instead we now use IRBuilder::getZExtOrTrunc which should check the type and only create a trunc if needed. I believe this should trigger constant folding in the IRBuilder and ultimately do the same thing just with the additional type check.
  11. [InstCombine] Add a DEBUG_COUNTER to InstCombine to limit how many instructions are visited for debug Sometimes it would be nice to stop InstCombine mid way through its combining to see the current IR. By using a debug counter we can place an upper limit on how many instructions to process. This will also allow skipping the first X combines, but that has the potential to change later combines since earlier canonicalizations might have been skipped. Differential Revision: https://reviews.llvm.org/D36553
  12. [DebugCounter] Move the semicolon out of the DEBUG_COUNTER macro and require it to be placed at the end of each use. This make it consistent with STATISTIC which it will often appears near. While there move one DEBUG_COUNTER instance out of an anonymous namespace. It's already declaring a static variable so the namespace is unnecessary.
  13. [gold-plugin] Avoid race condition when creating temporary files. This is both a potential security issue and a potential functionality issue because we create temporary files from multiple threads. Use the safe version of createTemporaryFile instead.
  14. [CostModel][X86] Add avx512vbmi broadcast/reverse/single-src shuffle cost tests
  15. [CostModel][X86] Improve single src shuffle costs Add missing SK_PermuteSingleSrc costs for AVX2 targets and earlier, also added some of the simpler SK_PermuteTwoSrc costs to support splitting of SK_PermuteSingleSrc shuffles
  16. Fix 'not all control paths return' warning on windows builds. NFCI.
  17. [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module. Summary: 1. Refactor the structure of the code by adding a base class for all close-on-exec checks, which implements most of the needed functions. 2. memfd_create() is better to set MFD_CLOEXEC flag to avoid file descriptor leakage. Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh, hokein Subscribers: Eugene.Zelenko, chh, cfe-commits, srhines, mgorny, JDevlieghere, xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D35372
  18. [Parse] Document Parser::SkipFunctionBodies Reviewers: erikjv, doug.gregor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36531
Revision 310649 by kamil:
Enable bunch of sanitizers on NetBSD/X86 and X86_64

Summary:
Enable more sanitizers:
- i386 and amd64:
* SanitizerKind::Vptr;
* SanitizerKind::Leak;
* SanitizerKind::SafeStack;
* SanitizerKind::Function;

- amd64 only:
* SanitizerKind::Thread;

These sanitizers are in the process of upstreaming to LLVM projects.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, dim, vitalybuka, kcc, filcab, fjricci

Reviewed By: vitalybuka

Subscribers: #sanitizers, cfe-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36482
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Driver/ToolChains/NetBSD.cppclang.src/lib/Driver/ToolChains/NetBSD.cpp
The file was modified/cfe/trunk/test/Driver/fsanitize.cclang.src/test/Driver/fsanitize.c
Revision 310648 by niravd:
[DAG] Cleanup unused nodes after store merge. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cppllvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 310647 by kamil:
Add NetBSD support in asan_linux.cc

Summary:
Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

Sponsored by <The NetBSD Foundation>

Reviewers: fjricci, vitalybuka, joerg, kcc, filcab

Reviewed By: vitalybuka

Subscribers: llvm-commits, kubamracek, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36488
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/asan/asan_linux.cccompiler-rt.src/lib/asan/asan_linux.cc
Revision 310646 by kamil:
Enable SafeStack on NetBSD

Summary:
make check-safestack:

-- Testing: 8 tests, 8 threads --
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 0.44s
  Expected Passes    : 7
  Unsupported Tests  : 1

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, kcc, fjricci, filcab

Reviewed By: vitalybuka

Subscribers: mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36542
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/cmake/config-ix.cmakecompiler-rt.src/cmake/config-ix.cmake
The file was modified/compiler-rt/trunk/lib/safestack/safestack.cccompiler-rt.src/lib/safestack/safestack.cc
The file was modified/compiler-rt/trunk/test/safestack/lit.cfgcompiler-rt.src/test/safestack/lit.cfg
Revision 310645 by rksimon:
[CostModel][X86] Add avx2 two-src shuffle costs
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cppllvm.src/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-single-src.llllvm.src/test/Analysis/CostModel/X86/shuffle-single-src.ll
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-two-src.llllvm.src/test/Analysis/CostModel/X86/shuffle-two-src.ll
Revision 310643 by yawanng:
[clang-tidy] Fix a buildbot.

Fix format in ReleaseNotes.rst.
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/docs/ReleaseNotes.rstclang-tools-extra.src/docs/ReleaseNotes.rst
Revision 310642 by twoh:
Make .file directive to have basename only

Summary:
Currently LLVM puts directory along with the filename in .file directive, but this behavior doesn't match gcc. There's a no clear description about which one is right (https://sourceware.org/binutils/docs/as/File.html#File), but one document (https://sourceware.org/gdb/current/onlinedocs/stabs/ELF-Linker-Relocation.html) suggests that STT_FILE symbol in elf file is expected to have basename only, which should have a same sting file .file directive according to (https://docs.oracle.com/cd/E26502_01/html/E28388/eoiyg.html).

This also affects badly on the build system that uses hashing, as the directory info could be differnt from developer to developer even when they're working on same file.

Reviewers: pcc, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36018
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cppllvm.src/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was added/llvm/trunk/test/CodeGen/X86/file-directive.llllvm.src/test/CodeGen/X86/file-directive.ll
Revision 310641 by rksimon:
[CostModel][X86] Extend two src shuffle cost tests

Cover most 128/256/512/1024-bit cases for vXf64/vXi64, vXf32/vXi32, vXi16 + vXi8
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-two-src.llllvm.src/test/Analysis/CostModel/X86/shuffle-two-src.ll
Revision 310640 by alekseyshl:
Disabling openmp-offload.c on linux until it is stabilized on all local configurations.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Driver/openmp-offload.cclang.src/test/Driver/openmp-offload.c
Revision 310639 by ctopper:
[InstCombine] Fix a crash in getSelectCondition if we happen to have two inverse vectors of i1 constants.

We used to try to truncate the constant vector to vXi1, but if it's already i1 this would fail. Instead we now use IRBuilder::getZExtOrTrunc which should check the type and only create a trunc if needed. I believe this should trigger constant folding in the IRBuilder and ultimately do the same thing just with the additional type check.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cppllvm.src/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/or.llllvm.src/test/Transforms/InstCombine/or.ll
Revision 310638 by ctopper:
[InstCombine] Add a DEBUG_COUNTER to InstCombine to limit how many instructions are visited for debug

Sometimes it would be nice to stop InstCombine mid way through its combining to see the current IR. By using a debug counter we can place an upper limit on how many instructions to process.

This will also allow skipping the first X combines, but that has the potential to change later combines since earlier canonicalizations might have been skipped.

Differential Revision: https://reviews.llvm.org/D36553
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cppllvm.src/lib/Transforms/InstCombine/InstructionCombining.cpp
Revision 310637 by ctopper:
[DebugCounter] Move the semicolon out of the DEBUG_COUNTER macro and require it to be placed at the end of each use.

This make it consistent with STATISTIC which it will often appears near.

While there move one DEBUG_COUNTER instance out of an anonymous namespace. It's already declaring a static variable so the namespace is unnecessary.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/ProgrammersManual.rstllvm.src/docs/ProgrammersManual.rst
The file was modified/llvm/trunk/include/llvm/Support/DebugCounter.hllvm.src/include/llvm/Support/DebugCounter.h
The file was modified/llvm/trunk/lib/Transforms/Scalar/NewGVN.cppllvm.src/lib/Transforms/Scalar/NewGVN.cpp
The file was modified/llvm/trunk/lib/Transforms/Utils/PredicateInfo.cppllvm.src/lib/Transforms/Utils/PredicateInfo.cpp
Revision 310636 by d0k:
[gold-plugin] Avoid race condition when creating temporary files.

This is both a potential security issue and a potential functionality
issue because we create temporary files from multiple threads. Use
the safe version of createTemporaryFile instead.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/tools/gold/gold-plugin.cppllvm.src/tools/gold/gold-plugin.cpp
Revision 310633 by rksimon:
[CostModel][X86] Add avx512vbmi broadcast/reverse/single-src shuffle cost tests
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-broadcast.llllvm.src/test/Analysis/CostModel/X86/shuffle-broadcast.ll
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-reverse.llllvm.src/test/Analysis/CostModel/X86/shuffle-reverse.ll
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-single-src.llllvm.src/test/Analysis/CostModel/X86/shuffle-single-src.ll
Revision 310632 by rksimon:
[CostModel][X86] Improve single src shuffle costs

Add missing SK_PermuteSingleSrc costs for AVX2 targets and earlier, also added some of the simpler SK_PermuteTwoSrc costs to support splitting of SK_PermuteSingleSrc shuffles
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cppllvm.src/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modified/llvm/trunk/test/Analysis/CostModel/X86/shuffle-single-src.llllvm.src/test/Analysis/CostModel/X86/shuffle-single-src.ll
Revision 310631 by rksimon:
Fix 'not all control paths return' warning on windows builds. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/tools/llvm-rc/ResourceScriptToken.cppllvm.src/tools/llvm-rc/ResourceScriptToken.cpp
Revision 310630 by yawanng:
[clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

Summary:
1. Refactor the structure of the code by adding a base class for all close-on-exec checks, which implements most of the needed functions.
2. memfd_create() is better to set MFD_CLOEXEC flag to avoid file descriptor leakage.

Reviewers: alexfh, aaron.ballman, hokein

Reviewed By: alexfh, hokein

Subscribers: Eugene.Zelenko, chh, cfe-commits, srhines, mgorny, JDevlieghere, xazax.hun

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D35372
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cppclang-tools-extra.src/clang-tidy/android/AndroidTidyModule.cpp
The file was modified/clang-tools-extra/trunk/clang-tidy/android/CMakeLists.txtclang-tools-extra.src/clang-tidy/android/CMakeLists.txt
The file was added/clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.cppclang-tools-extra.src/clang-tidy/android/CloexecCheck.cpp
The file was added/clang-tools-extra/trunk/clang-tidy/android/CloexecCheck.hclang-tools-extra.src/clang-tidy/android/CloexecCheck.h
The file was added/clang-tools-extra/trunk/clang-tidy/android/CloexecMemfdCreateCheck.cppclang-tools-extra.src/clang-tidy/android/CloexecMemfdCreateCheck.cpp
The file was added/clang-tools-extra/trunk/clang-tidy/android/CloexecMemfdCreateCheck.hclang-tools-extra.src/clang-tidy/android/CloexecMemfdCreateCheck.h
The file was modified/clang-tools-extra/trunk/docs/ReleaseNotes.rstclang-tools-extra.src/docs/ReleaseNotes.rst
The file was added/clang-tools-extra/trunk/docs/clang-tidy/checks/android-cloexec-memfd-create.rstclang-tools-extra.src/docs/clang-tidy/checks/android-cloexec-memfd-create.rst
The file was modified/clang-tools-extra/trunk/docs/clang-tidy/checks/list.rstclang-tools-extra.src/docs/clang-tidy/checks/list.rst
The file was added/clang-tools-extra/trunk/test/clang-tidy/android-cloexec-memfd-create.cppclang-tools-extra.src/test/clang-tidy/android-cloexec-memfd-create.cpp
Revision 310627 by modocache:
[Parse] Document Parser::SkipFunctionBodies

Reviewers: erikjv, doug.gregor

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D36531
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Parse/Parser.hclang.src/include/clang/Parse/Parser.h