SuccessChanges

Summary

  1. [AArch64][GlobalISel] Use TST for comparisons when possible Porting over the part of `emitComparison` in AArch64ISelLowering where we use TST to represent a compare. - Rename `tryOptCMN` to `tryFoldIntegerCompare`, since it now also emits TSTs when possible. - Add a utility function for emitting a TST with register operands. - Rename opt-fold-cmn.mir to opt-fold-compare.mir, since it now also tests the TST fold as well. Differential Revision: https://reviews.llvm.org/D64371
  2. [llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win from r365386.
  3. AMDGPU: Split extload/zextload local load patterns This will help removing the custom load predicates, allowing the global isel emitter to handle them.
  4. Add parentheses to silence warning.
  5. Standardize on MSVC behavior for triples with no environment Summary: This makes it so that IR files using triples without an environment work out of the box, without normalizing them. Typically, the MSVC behavior is more desirable. For example, it tends to enable things like constant merging, use of associative comdats, etc. Addresses PR42491 Reviewers: compnerd Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64109
  6. llvm-profdata] Handle the cases of overlapping input file and output file Currently llvm-profdata does not expect the same file name for the input profile and the output profile. >llvm-profdata merge A.profraw B.profraw -o B.profraw The above command runs successfully but the resulted B.profraw is not correct. This patch fixes the issue by moving the initialization of writer after loading the profile. For the show command, the following will report a confusing error of "Empty raw profile file": >llvm-profdata show B.profraw -o B.profraw It's harder to fix as we need to output something before loading the input profile. I don't think that a fix for this is worth the effort. I just make the error explicit for the show command. Differential Revision: https://reviews.llvm.org/D64360
Revision 365404 by paquette:
[AArch64][GlobalISel] Use TST for comparisons when possible

Porting over the part of `emitComparison` in AArch64ISelLowering where we use
TST to represent a compare.

- Rename `tryOptCMN` to `tryFoldIntegerCompare`, since it now also emits TSTs
  when possible.

- Add a utility function for emitting a TST with register operands.

- Rename opt-fold-cmn.mir to opt-fold-compare.mir, since it now also tests the
  TST fold as well.

Differential Revision: https://reviews.llvm.org/D64371
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpptrunk/lib/Target/AArch64/AArch64InstructionSelector.cpp
The file was removed/llvm/trunk/test/CodeGen/AArch64/GlobalISel/opt-fold-cmn.mirtrunk/test/CodeGen/AArch64/GlobalISel/opt-fold-cmn.mir
The file was added/llvm/trunk/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mirtrunk/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
Revision 365401 by xur:
[llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-win

This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win
from r365386.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/tools/llvm-profdata/same-filename.testtrunk/test/tools/llvm-profdata/same-filename.test
Revision 365398 by arsenm:
AMDGPU: Split extload/zextload local load patterns

This will help removing the custom load predicates, allowing the
global isel emitter to handle them.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructions.tdtrunk/lib/Target/AMDGPU/AMDGPUInstructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/DSInstructions.tdtrunk/lib/Target/AMDGPU/DSInstructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/EvergreenInstructions.tdtrunk/lib/Target/AMDGPU/EvergreenInstructions.td
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.tdtrunk/lib/Target/AMDGPU/SIInstrInfo.td
Revision 365394 by void:
Add parentheses to silence warning.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIFrameLowering.cpptrunk/lib/Target/AMDGPU/SIFrameLowering.cpp
Revision 365387 by rnk:
Standardize on MSVC behavior for triples with no environment

Summary:
This makes it so that IR files using triples without an environment work
out of the box, without normalizing them.

Typically, the MSVC behavior is more desirable. For example, it tends to
enable things like constant merging, use of associative comdats, etc.

Addresses PR42491

Reviewers: compnerd

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64109
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpptrunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpptrunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modified/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpptrunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modified/llvm/trunk/lib/IR/Mangler.cpptrunk/lib/IR/Mangler.cpp
The file was modified/llvm/trunk/lib/MC/MCWinCOFFStreamer.cpptrunk/lib/MC/MCWinCOFFStreamer.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpptrunk/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86Subtarget.htrunk/lib/Target/X86/X86Subtarget.h
The file was modified/llvm/trunk/test/CodeGen/X86/win_cst_pool.lltrunk/test/CodeGen/X86/win_cst_pool.ll
The file was modified/llvm/trunk/unittests/ADT/TripleTest.cpptrunk/unittests/ADT/TripleTest.cpp
Revision 365386 by xur:
llvm-profdata] Handle the cases of overlapping input file and output file

Currently llvm-profdata does not expect the same file name for the input profile
and the output profile.
>llvm-profdata merge A.profraw B.profraw -o B.profraw
The above command runs successfully but the resulted B.profraw is not correct.
This patch fixes the issue by moving the initialization of writer after loading
the profile.

For the show command, the following will report a confusing error of
"Empty raw profile file":
>llvm-profdata show B.profraw -o B.profraw
It's harder to fix as we need to output something before loading the input profile.
I don't think that a fix for this is worth the effort. I just make the error explicit for
the show command.

Differential Revision: https://reviews.llvm.org/D64360
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-1.proftexttrunk/test/tools/llvm-profdata/Inputs/same-name-1.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-2.proftexttrunk/test/tools/llvm-profdata/Inputs/same-name-2.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-3.proftexttrunk/test/tools/llvm-profdata/Inputs/same-name-3.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/Inputs/same-name-4.proftexttrunk/test/tools/llvm-profdata/Inputs/same-name-4.proftext
The file was added/llvm/trunk/test/tools/llvm-profdata/same-filename.testtrunk/test/tools/llvm-profdata/same-filename.test
The file was modified/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpptrunk/tools/llvm-profdata/llvm-profdata.cpp

Summary

  1. Fix line endings. NFC
  2. [Sanitizers] Don't use clang_rt.sancov_{begin,end} on Solaris As explained in https://reviews.llvm.org/D63601, there's no point using clang_rt.sancov_{begin,end} on Solaris any longer. This companion patch to the above removes their use from the driver. Tested on amd64-pc-solaris2.11 Differential Revision: https://reviews.llvm.org/D63602
  3. Add parentheses to silence warnings.
  4. Revert [Sema] Resolve placeholder types before type deduction to silence spurious `-Warc-repeated-use-of-weak` warnings This reverts r365382 (git commit 8b1becf2e31d9170ee356a19c7b6ea991d3a520f) Appears to regress this semi-reduced fragment of valid code from windows SDK headers: #define InterlockedIncrement64 _InterlockedIncrement64 extern "C" __int64 InterlockedIncrement64(__int64 volatile *Addend); #pragma intrinsic(_InterlockedIncrement64) unsigned __int64 InterlockedIncrement(unsigned __int64 volatile *Addend) { return (unsigned __int64)(InterlockedIncrement64)((volatile __int64 *)Addend); } Found on a buildbot here, but no mail was sent due to it already being red: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48067
Revision 365402 by probinson:
Fix line endings. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Driver/ps4-analyzer-defaults.cpptrunk/test/Driver/ps4-analyzer-defaults.cpp
Revision 365396 by ro:
[Sanitizers] Don't use clang_rt.sancov_{begin,end} on Solaris

As explained in https://reviews.llvm.org/D63601, there's no point using clang_rt.sancov_{begin,end}
on Solaris any longer.

This companion patch to the above removes their use from the driver.

Tested on amd64-pc-solaris2.11

Differential Revision: https://reviews.llvm.org/D63602
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Driver/ToolChains/Solaris.cpptrunk/lib/Driver/ToolChains/Solaris.cpp
Revision 365395 by void:
Add parentheses to silence warnings.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Tooling/Syntax/BuildTree.cpptrunk/lib/Tooling/Syntax/BuildTree.cpp
Revision 365393 by rnk:
Revert [Sema] Resolve placeholder types before type deduction to silence spurious `-Warc-repeated-use-of-weak` warnings

This reverts r365382 (git commit 8b1becf2e31d9170ee356a19c7b6ea991d3a520f)

Appears to regress this semi-reduced fragment of valid code from windows
SDK headers:

  #define InterlockedIncrement64 _InterlockedIncrement64
  extern "C" __int64 InterlockedIncrement64(__int64 volatile *Addend);
  #pragma intrinsic(_InterlockedIncrement64)
  unsigned __int64 InterlockedIncrement(unsigned __int64 volatile *Addend) {
    return (unsigned __int64)(InterlockedIncrement64)((volatile __int64 *)Addend);
  }

Found on a buildbot here, but no mail was sent due to it already being
red:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48067
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/Expr.htrunk/include/clang/AST/Expr.h
The file was modified/cfe/trunk/include/clang/Basic/Attr.tdtrunk/include/clang/Basic/Attr.td
The file was modified/cfe/trunk/lib/Sema/SemaDecl.cpptrunk/lib/Sema/SemaDecl.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cpptrunk/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExprCXX.cpptrunk/lib/Sema/SemaExprCXX.cpp
The file was modified/cfe/trunk/test/SemaObjC/arc-repeated-weak.mmtrunk/test/SemaObjC/arc-repeated-weak.mm

Summary

  1. [Sanitizers] Remove clang_rt.sancov_{begin,end} on Solaris There's no point to manually create the __start___sancov_guards and __stop___sancov_guards sections and labels on Solaris any longer. They were originally introduced in https://reviews.llvm.org/D40899 and https://reviews.llvm.org/D40903. - The Solaris 11.4 ld supports creating them out of the box. - We already unconditionally use Solaris 11.4 features like the ld -z gnu-version-script-compat option and fully working .preinit_array support in compiler-rt. - The current files don't assemble on SPARC because the assembler syntax may be different between /bin/as and GNU as. Tested on amd64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D63601
  2. Revert "[sanitizers][windows] Rtl-Heap Interception and tests" Causes build failure on clang-ppc64be-linux-lnt: compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows." #error "Missing arch or unsupported platform for Windows." ^~~~~ compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory #include <heapapi.h> ^~~~~~~~~~~ compilation terminated. [39/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_debugging.cc.o [40/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o /usr/bin/c++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -Icompiler-rt/lib/asan -Iinclude -I/home/buildbots/ppc64be-clang-lnt-test/clang-ppc64be-lnt/llvm/include -Icompiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++11 -Wno-unused-parameter -O2 -UNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -c compiler-rt/lib/asan/asan_malloc_win.cc compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows." #error "Missing arch or unsupported platform for Windows." ^~~~~ compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory #include <heapapi.h> ^~~~~~~~~~~
Revision 365399 by ro:
[Sanitizers] Remove clang_rt.sancov_{begin,end} on Solaris

There's no point to manually create the __start___sancov_guards and __stop___sancov_guards
sections and labels on Solaris any longer.  They were originally introduced in
https://reviews.llvm.org/D40899 and https://reviews.llvm.org/D40903.

- The Solaris 11.4 ld supports creating them out of the box.
- We already unconditionally use Solaris 11.4 features like the ld -z gnu-version-script-compat option and fully working .preinit_array support in compiler-rt.
- The current files don't assemble on SPARC because the assembler syntax may be different between /bin/as and GNU as.

Tested on amd64-pc-solaris2.11.

Differential Revision: https://reviews.llvm.org/D63601
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txttrunk/lib/sanitizer_common/CMakeLists.txt
The file was removed/compiler-rt/trunk/lib/sanitizer_common/sancov_begin.Strunk/lib/sanitizer_common/sancov_begin.S
The file was removed/compiler-rt/trunk/lib/sanitizer_common/sancov_end.Strunk/lib/sanitizer_common/sancov_end.S
Revision 365384 by jfb:
Revert "[sanitizers][windows] Rtl-Heap Interception and tests"

Causes build failure on clang-ppc64be-linux-lnt:

compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows."
#error "Missing arch or unsupported platform for Windows."
  ^~~~~
compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory
#include <heapapi.h>
          ^~~~~~~~~~~
compilation terminated.
[39/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_debugging.cc.o
[40/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o
FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o
/usr/bin/c++  -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -Icompiler-rt/lib/asan -Iinclude -I/home/buildbots/ppc64be-clang-lnt-test/clang-ppc64be-lnt/llvm/include -Icompiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++11 -Wno-unused-parameter -O2    -UNDEBUG  -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -c compiler-rt/lib/asan/asan_malloc_win.cc
compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows."
#error "Missing arch or unsupported platform for Windows."
  ^~~~~
compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory
#include <heapapi.h>
          ^~~~~~~~~~~
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/asan/asan_flags.inctrunk/lib/asan/asan_flags.inc
The file was modified/compiler-rt/trunk/lib/asan/asan_malloc_win.cctrunk/lib/asan/asan_malloc_win.cc
The file was modified/compiler-rt/trunk/lib/asan/asan_win.cctrunk/lib/asan/asan_win.cc
The file was modified/compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cctrunk/test/asan/TestCases/Windows/dll_host.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cctrunk/test/asan/TestCases/Windows/dll_unload.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cctrunk/test/asan/TestCases/Windows/heapalloc.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cctrunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cctrunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cctrunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cctrunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cctrunk/test/asan/TestCases/Windows/heapalloc_huge.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cctrunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cctrunk/test/asan/TestCases/Windows/heapalloc_sanity.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cctrunk/test/asan/TestCases/Windows/heapalloc_transfer.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cctrunk/test/asan/TestCases/Windows/heapalloc_uaf.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cctrunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cctrunk/test/asan/TestCases/Windows/heaprealloc.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cctrunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc
The file was modified/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cctrunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc
The file was modified/compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cctrunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cctrunk/test/asan/TestCases/Windows/rtlallocateheap.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cctrunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cctrunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cctrunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cctrunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc