SuccessChanges

Summary

  1. gn build: Merge r362857
  2. [llvm-objcopy][MachO] Recompute and update offset/size fields in the writer Summary: Recompute and update offset/size fields so that we can implement llvm-objcopy options like --only-section. This patch is the first step and focuses on supporting load commands that covered by existing tests: executable files and dynamic libraries are not supported. Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht Subscribers: compnerd, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62652
  3. Visualizer for APInt and remove obsolete visualizer Visualizer for the simple case of APInt (uints < 2^64) as will be required for Clang ConstantArrayType visualizer. Also, removed obsolete VS2013 SmallVectorVisualizer as VS2013 is no longer supported.
  4. Factor out SelectionDAG's switch analysis and lowering into a separate component. In order for GlobalISel to re-use the significant amount of analysis and optimization code in SDAG's switch lowering, we first have to extract it and create an interface to be used by both frameworks. No test changes as it's NFC. Differential Revision: https://reviews.llvm.org/D62745
  5. LoopDistribute: Add testcase where SCEV wants to insert a runtime check. Only the memory based checks were being tested. Prepare for fix in convergent handling.
  6. [GVN] non-functional code movement Summary: Move some code around, in preparation for later fixes to the non-integral addrspace handling (D59661) Patch By Jameson Nash <jameson@juliacomputing.com> Reviewed By: reames, loladiro Differential Revision: https://reviews.llvm.org/D59729
  7. AMDGPU: Force skips around traps
  8. [COFF] Fix /export:foo=bar when bar is a weak alias Summary: When handling exports from the command line or from .def files, the linker does a "fuzzy" string lookup to allow finding mangled symbols. However, when the symbol is re-exported under a new name, the linker has to transfer the decorations from the exported symbol over to the new name. This is implemented by taking the mangled symbol that was found in the object and replacing the original symbol name with the export name. Before this patch, LLD implemented the fuzzy search by adding an undefined symbol with the unmangled name, and then during symbol resolution, checking if similar mangled symbols had been added after the last round of symbol resolution. If so, LLD makes the original symbol a weak alias of the mangled symbol. Later, to get the original symbol name, LLD would look through the weak alias and forward it on to the import library writer, which copies the symbol decorations. This approach doesn't work when bar is itself a weak alias, as is the case in asan. It's especially bad when the aliasee of bar contains the string "bar", consider "bar_default". In this case, we would end up exporting the symbol "foo_default" when we should've exported just "foo". To fix this, don't look through weak aliases to find the mangled name. Save the mangled name earlier during fuzzy symbol lookup. Fixes PR42074 Reviewers: mstorsjo, ruiu Subscribers: thakis, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62984
Revision 362864 by nico:
gn build: Merge r362857
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gntrunk/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
Revision 362863 by seiya:
[llvm-objcopy][MachO] Recompute and update offset/size fields in the writer

Summary:
Recompute and update offset/size fields so that we can implement llvm-objcopy options like --only-section.

This patch is the first step and focuses on supporting load commands that covered by existing tests: executable files and
dynamic libraries are not supported.

Reviewers: alexshap, rupprecht, jhenderson

Reviewed By: alexshap, rupprecht

Subscribers: compnerd, jakehehrlich, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62652
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/llvm-objcopy/MachO/Inputs/various-symbols.strunk/test/tools/llvm-objcopy/MachO/Inputs/various-symbols.s
The file was modified/llvm/trunk/test/tools/llvm-objcopy/MachO/real-world-input-copy.testtrunk/test/tools/llvm-objcopy/MachO/real-world-input-copy.test
The file was modified/llvm/trunk/tools/llvm-objcopy/MachO/MachOObjcopy.cpptrunk/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/MachO/MachOReader.cpptrunk/tools/llvm-objcopy/MachO/MachOReader.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/MachO/MachOWriter.cpptrunk/tools/llvm-objcopy/MachO/MachOWriter.cpp
The file was modified/llvm/trunk/tools/llvm-objcopy/MachO/MachOWriter.htrunk/tools/llvm-objcopy/MachO/MachOWriter.h
The file was modified/llvm/trunk/tools/llvm-objcopy/MachO/Object.htrunk/tools/llvm-objcopy/MachO/Object.h
Revision 362860 by mps:
Visualizer for APInt and remove obsolete visualizer

Visualizer for the simple case of APInt (uints < 2^64)
as will be required  for Clang ConstantArrayType visualizer.
Also, removed obsolete VS2013 SmallVectorVisualizer as VS2013
is no longer supported.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/LLVMVisualizers/llvm.natvistrunk/utils/LLVMVisualizers/llvm.natvis
Revision 362857 by aemerson:
Factor out SelectionDAG's switch analysis and lowering into a separate component.

In order for GlobalISel to re-use the significant amount of analysis and
optimization code in SDAG's switch lowering, we first have to extract it and
create an interface to be used by both frameworks.

No test changes as it's NFC.

Differential Revision: https://reviews.llvm.org/D62745
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/include/llvm/CodeGen/SwitchLoweringUtils.htrunk/include/llvm/CodeGen/SwitchLoweringUtils.h
The file was modified/llvm/trunk/lib/CodeGen/CMakeLists.txttrunk/lib/CodeGen/CMakeLists.txt
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpptrunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.htrunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpptrunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was added/llvm/trunk/lib/CodeGen/SwitchLoweringUtils.cpptrunk/lib/CodeGen/SwitchLoweringUtils.cpp
Revision 362854 by arsenm:
LoopDistribute: Add testcase where SCEV wants to insert a runtime
check.

Only the memory based checks were being tested. Prepare for fix in
convergent handling.
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/Transforms/LoopDistribute/scev-inserted-runtime-check.lltrunk/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
Revision 362853 by kfischer:
[GVN] non-functional code movement

Summary: Move some code around, in preparation for later fixes
to the non-integral addrspace handling (D59661)

Patch By Jameson Nash <jameson@juliacomputing.com>

Reviewed By: reames, loladiro
Differential Revision: https://reviews.llvm.org/D59729
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/GVN.cpptrunk/lib/Transforms/Scalar/GVN.cpp
The file was modified/llvm/trunk/lib/Transforms/Utils/VNCoercion.cpptrunk/lib/Transforms/Utils/VNCoercion.cpp
Revision 362852 by arsenm:
AMDGPU: Force skips around traps
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpptrunk/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was added/llvm/trunk/test/CodeGen/AMDGPU/skip-branch-trap.lltrunk/test/CodeGen/AMDGPU/skip-branch-trap.ll
Revision 362849 by rnk:
[COFF] Fix /export:foo=bar when bar is a weak alias

Summary:
When handling exports from the command line or from .def files, the
linker does a "fuzzy" string lookup to allow finding mangled symbols.
However, when the symbol is re-exported under a new name, the linker has
to transfer the decorations from the exported symbol over to the new
name. This is implemented by taking the mangled symbol that was found in
the object and replacing the original symbol name with the export name.

Before this patch, LLD implemented the fuzzy search by adding an
undefined symbol with the unmangled name, and then during symbol
resolution, checking if similar mangled symbols had been added after the
last round of symbol resolution. If so, LLD makes the original symbol a
weak alias of the mangled symbol. Later, to get the original symbol
name, LLD would look through the weak alias and forward it on to the
import library writer, which copies the symbol decorations. This
approach doesn't work when bar is itself a weak alias, as is the case in
asan. It's especially bad when the aliasee of bar contains the string
"bar", consider "bar_default". In this case, we would end up exporting
the symbol "foo_default" when we should've exported just "foo".

To fix this, don't look through weak aliases to find the mangled name.
Save the mangled name earlier during fuzzy symbol lookup.

Fixes PR42074

Reviewers: mstorsjo, ruiu

Subscribers: thakis, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62984
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/COFF/Driver.cppN/A
The file was modified/lld/trunk/COFF/Driver.hN/A
The file was modified/lld/trunk/COFF/DriverUtils.cppN/A
The file was modified/lld/trunk/COFF/SymbolTable.cppN/A
The file was modified/lld/trunk/COFF/SymbolTable.hN/A
The file was added/lld/trunk/test/COFF/export-stdcall.sN/A
The file was added/lld/trunk/test/COFF/export-weak-alias.sN/A
The file was modified/llvm/trunk/include/llvm/Object/COFFImportFile.htrunk/include/llvm/Object/COFFImportFile.h

Summary

  1. DebugInfo: Add support for 'nodebug' attribute on typedefs and alias templates Seems like a logical extension to me - and of interest because it might help reduce the debug info size of libc++ by applying this attribute to type traits that have a disproportionate debug info cost compared to the benefit (& possibly harm/confusion) they cause users.
  2. [analyzer] Add werror flag for analyzer warnings Summary: We're using the clang static analyzer together with a number of custom analyses in our CI system to ensure that certain invariants are statiesfied for by the code every commit. Unfortunately, there currently doesn't seem to be a good way to determine whether any analyzer warnings were emitted, other than parsing clang's output (or using scan-build, which then in turn parses clang's output). As a simpler mechanism, simply add a `-analyzer-werror` flag to CC1 that causes the analyzer to emit its warnings as errors instead. I briefly tried to have this be `Werror=analyzer` and make it go through that machinery instead, but that seemed more trouble than it was worth in terms of conflicting with options to the actual build and special cases that would be required to circumvent the analyzers usual attempts to quiet non-analyzer warnings. This is simple and it works well. Reviewed-By: NoQ, Szelethusw Differential Revision: https://reviews.llvm.org/D62885
Revision 362856 by dblaikie:
DebugInfo: Add support for 'nodebug' attribute on typedefs and alias templates

Seems like a logical extension to me - and of interest because it might
help reduce the debug info size of libc++ by applying this attribute to
type traits that have a disproportionate debug info cost compared to the
benefit (& possibly harm/confusion) they cause users.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/Attr.tdtrunk/include/clang/Basic/Attr.td
The file was modified/cfe/trunk/lib/CodeGen/CGDebugInfo.cpptrunk/lib/CodeGen/CGDebugInfo.cpp
The file was modified/cfe/trunk/test/CodeGenCXX/debug-info-nodebug.cpptrunk/test/CodeGenCXX/debug-info-nodebug.cpp
The file was modified/cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.testtrunk/test/Misc/pragma-attribute-supported-attributes-list.test
The file was modified/cfe/trunk/test/Sema/attr-nodebug.ctrunk/test/Sema/attr-nodebug.c
Revision 362855 by kfischer:
[analyzer] Add werror flag for analyzer warnings

Summary:
We're using the clang static analyzer together with a number of
custom analyses in our CI system to ensure that certain invariants
are statiesfied for by the code every commit. Unfortunately, there
currently doesn't seem to be a good way to determine whether any
analyzer warnings were emitted, other than parsing clang's output
(or using scan-build, which then in turn parses clang's output).
As a simpler mechanism, simply add a `-analyzer-werror` flag to CC1
that causes the analyzer to emit its warnings as errors instead.
I briefly tried to have this be `Werror=analyzer` and make it go
through that machinery instead, but that seemed more trouble than
it was worth in terms of conflicting with options to the actual build
and special cases that would be required to circumvent the analyzers
usual attempts to quiet non-analyzer warnings. This is simple and it
works well.

Reviewed-By: NoQ, Szelethusw
Differential Revision: https://reviews.llvm.org/D62885
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Driver/CC1Options.tdtrunk/include/clang/Driver/CC1Options.td
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.htrunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
The file was modified/cfe/trunk/lib/Frontend/CompilerInvocation.cpptrunk/lib/Frontend/CompilerInvocation.cpp
The file was modified/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpptrunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
The file was modified/cfe/trunk/test/Analysis/override-werror.ctrunk/test/Analysis/override-werror.c

Summary

  1. Experimantal dfsan mode "fast16labels=1" Summary: dfsan mode "fast16labels=1". In this mode the labels are treated as 16-bit bit masks. Reviewers: pcc Reviewed By: pcc Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D62870
Revision 362859 by kcc:
Experimantal dfsan mode "fast16labels=1"

Summary:
dfsan mode "fast16labels=1".
In this mode the labels are treated as 16-bit bit masks.

Reviewers: pcc

Reviewed By: pcc

Subscribers: delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D62870
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/dfsan/dfsan.cctrunk/lib/dfsan/dfsan.cc
The file was modified/compiler-rt/trunk/lib/dfsan/dfsan_flags.inctrunk/lib/dfsan/dfsan_flags.inc
The file was added/compiler-rt/trunk/test/dfsan/fast16labels.ctrunk/test/dfsan/fast16labels.c

Summary

  1. Fix some incorrect std::function tests
Revision 362861 by ericwf:
Fix some incorrect std::function tests
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpptrunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp