SuccessChanges

Summary

  1. Fix the bug when SampleProfileWriter writes out number of callsites. Summary: As we support multiple callsites for the same location, we need to traverse all locations to get the number of callsites. Reviewers: davidxl Reviewed By: davidxl Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D36246
  2. Move two functions to a nicer spot. NFC.
  3. Rely on autobrief, remove \briefs from a header. NFC.
  4. [Coverage] Add an API to retrive all instantiations of a function (NFC) The CoverageMapping::getInstantiations() API retrieved all function records corresponding to functions with more than one instantiation (e.g template functions with multiple specializations). However, there was no simple way to determine *which* function a given record was an instantiation of. This was an oversight, since it's useful to aggregate coverage information over all instantiations of a function. llvm-cov works around this by building a mapping of source locations to instantiation sets, but this duplicates logic that libCoverage already has (see FunctionInstantiationSetCollector). This change adds a new API, CoverageMapping::getInstantiationGroups(), which returns a list of InstantiationGroups. A group contains records for each instantiation of some particular function, and also provides utilities to get the total execution count within the group, the source location of the common definition, etc. This lets removes some hacky logic in llvm-cov by reusing FunctionInstantiationSetCollector and makes the CoverageMapping API friendlier for other clients.
  5. [llvm-cov] Respect the value of the -show-instantiations option Make `-show-instantiations=false` actually skip displaying instantiation sub-views, instead of simply ignoring the option.
  6. [coverage] Make smaller regions for the first case of a switch. We never overwrite the end location of a region, so we would end up with an overly large region when we reused the switch's region. It's possible this code will be substantially rewritten in the near future to deal with fallthrough more accurately, but this seems like an improvement on its own for now. Differential Revision: https://reviews.llvm.org/D34801
  7. Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests" This reverts commit 3592d8049660dcdd07f7c2e797f2de9790f93111. Breaks the bots, reverting for now.
  8. AMDGPU/GlobalISel: Mark 32-bit G_FMUL as legal Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D36218
  9. [tsan] Check for pvalloc overlow Summary: `CheckForPvallocOverflow` was introduced with D35818 to detect when pvalloc would wrap when rounding up to the next multiple of the page size. Add this check to TSan's pvalloc implementation. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D36245
  10. [pdb/lld] Write a valid FPM. The PDB reserves certain blocks for the FPM that describe which blocks in the file are allocated and which are free. We weren't filling that out at all, and in some cases we were even stomping it with incorrect data. This patch writes a correct FPM. Differential Revision: https://reviews.llvm.org/D36235
  11. [MSF] Move MSF unit tests to their own unittest target.
  12. [pdbutil] Add a command to dump the FPM. Recently problems have been discovered in the way we write the FPM (free page map). In order to fix this, we first need to establish a baseline about what a correct FPM looks like using an MSVC generated PDB, so that we can then make our own generated PDBs match. And in order to do this, the dumper needs a mode where it can dump an FPM so that we can write tests for it. This patch adds a command to dump the FPM, as well as a test against a known-good PDB.
  13. AMDGPU/R600: Initialize more passes Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D36128
  14. Use a more standard method to mark these tests as unsupported on powerpc64.
  15. Xray docs with description of Flight Data Recorder binary format. Summary: Adding a new restructuredText file to document the trace format produced with an FDR mode handler and read by llvm-xray toolset. Fixed two problems in the documentation from differential review. One bad table and a missing link in the toc. Original commit was e97c5836a77db803fe53319c53f3bf8e8b26d2b7. Reviewers: dberris, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36041
  16. LV: Don't insert runtime ptr checks on divergent targets
  17. [libFuzzer tests] Use substring comparison in libFuzzer tests LIT launches executables with absolute, and not relative, path. strncmp would try to do exact comparison and fail. Differential Revision: https://reviews.llvm.org/D36242
  18. Remove unused diagnostic. NFC.
Revision 309907 by dehao:
Fix the bug when SampleProfileWriter writes out number of callsites.

Summary: As we support multiple callsites for the same location, we need to traverse all locations to get the number of callsites.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: sanjoy, llvm-commits

Differential Revision: https://reviews.llvm.org/D36246
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/ProfileData/SampleProfWriter.cppllvm.src/lib/ProfileData/SampleProfWriter.cpp
The file was modified/llvm/trunk/test/tools/llvm-profdata/Inputs/sample-profile.proftextllvm.src/test/tools/llvm-profdata/Inputs/sample-profile.proftext
Revision 309906 by Vedant Kumar:
Move two functions to a nicer spot. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ProfileData/Coverage/CoverageMapping.hllvm.src/include/llvm/ProfileData/Coverage/CoverageMapping.h
Revision 309905 by Vedant Kumar:
Rely on autobrief, remove \briefs from a header. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ProfileData/Coverage/CoverageMapping.hllvm.src/include/llvm/ProfileData/Coverage/CoverageMapping.h
Revision 309904 by Vedant Kumar:
[Coverage] Add an API to retrive all instantiations of a function (NFC)

The CoverageMapping::getInstantiations() API retrieved all function
records corresponding to functions with more than one instantiation (e.g
template functions with multiple specializations). However, there was no
simple way to determine *which* function a given record was an
instantiation of. This was an oversight, since it's useful to aggregate
coverage information over all instantiations of a function.

llvm-cov works around this by building a mapping of source locations to
instantiation sets, but this duplicates logic that libCoverage already
has (see FunctionInstantiationSetCollector).

This change adds a new API, CoverageMapping::getInstantiationGroups(),
which returns a list of InstantiationGroups. A group contains records
for each instantiation of some particular function, and also provides
utilities to get the total execution count within the group, the source
location of the common definition, etc.

This lets removes some hacky logic in llvm-cov by reusing
FunctionInstantiationSetCollector and makes the CoverageMapping API
friendlier for other clients.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ProfileData/Coverage/CoverageMapping.hllvm.src/include/llvm/ProfileData/Coverage/CoverageMapping.h
The file was modified/llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cppllvm.src/lib/ProfileData/Coverage/CoverageMapping.cpp
The file was modified/llvm/trunk/tools/llvm-cov/CodeCoverage.cppllvm.src/tools/llvm-cov/CodeCoverage.cpp
The file was modified/llvm/trunk/tools/llvm-cov/CoverageReport.cppllvm.src/tools/llvm-cov/CoverageReport.cpp
The file was modified/llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.cppllvm.src/tools/llvm-cov/CoverageSummaryInfo.cpp
The file was modified/llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.hllvm.src/tools/llvm-cov/CoverageSummaryInfo.h
The file was modified/llvm/trunk/unittests/ProfileData/CoverageMappingTest.cppllvm.src/unittests/ProfileData/CoverageMappingTest.cpp
Revision 309903 by Vedant Kumar:
[llvm-cov] Respect the value of the -show-instantiations option

Make `-show-instantiations=false` actually skip displaying instantiation
sub-views, instead of simply ignoring the option.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/CommandGuide/llvm-cov.rstllvm.src/docs/CommandGuide/llvm-cov.rst
The file was modified/llvm/trunk/test/tools/llvm-cov/showTemplateInstantiations.cppllvm.src/test/tools/llvm-cov/showTemplateInstantiations.cpp
The file was modified/llvm/trunk/tools/llvm-cov/CodeCoverage.cppllvm.src/tools/llvm-cov/CodeCoverage.cpp
Revision 309901 by efriedma:
[coverage] Make smaller regions for the first case of a switch.

We never overwrite the end location of a region, so we would end up with
an overly large region when we reused the switch's region.

It's possible this code will be substantially rewritten in the near
future to deal with fallthrough more accurately, but this seems like
an improvement on its own for now.

Differential Revision: https://reviews.llvm.org/D34801
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/CodeGen/CoverageMappingGen.cppclang.src/lib/CodeGen/CoverageMappingGen.cpp
The file was modified/cfe/trunk/test/CoverageMapping/switch.cppclang.src/test/CoverageMapping/switch.cpp
Revision 309899 by George Karpenkov:
Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests"

This reverts commit 3592d8049660dcdd07f7c2e797f2de9790f93111.

Breaks the bots, reverting for now.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Fuzzer/test/InitializeTest.cppllvm.src/lib/Fuzzer/test/InitializeTest.cpp
Revision 309898 by tstellar:
AMDGPU/GlobalISel: Mark 32-bit G_FMUL as legal

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D36218
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPULegalizerInfo.cppllvm.src/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was added/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/legalize-fmul.mirllvm.src/test/CodeGen/AMDGPU/GlobalISel/legalize-fmul.mir
Revision 309897 by cryptoad:
[tsan] Check for pvalloc overlow

Summary:
`CheckForPvallocOverflow` was introduced with D35818 to detect when pvalloc
would wrap when rounding up to the next multiple of the page size.

Add this check to TSan's pvalloc implementation.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits, kubamracek

Differential Revision: https://reviews.llvm.org/D36245
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/tsan/rtl/tsan_mman.cccompiler-rt.src/lib/tsan/rtl/tsan_mman.cc
The file was modified/compiler-rt/trunk/lib/tsan/tests/unit/tsan_mman_test.cccompiler-rt.src/lib/tsan/tests/unit/tsan_mman_test.cc
Revision 309896 by zturner:
[pdb/lld] Write a valid FPM.

The PDB reserves certain blocks for the FPM that describe which
blocks in the file are allocated and which are free.  We weren't
filling that out at all, and in some cases we were even stomping
it with incorrect data.  This patch writes a correct FPM.

Differential Revision: https://reviews.llvm.org/D36235
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.hllvm.src/include/llvm/DebugInfo/MSF/MSFCommon.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.hllvm.src/include/llvm/DebugInfo/MSF/MappedBlockStream.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.hllvm.src/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
The file was modified/llvm/trunk/include/llvm/Support/MathExtras.hllvm.src/include/llvm/Support/MathExtras.h
The file was modified/llvm/trunk/lib/DebugInfo/MSF/MSFBuilder.cppllvm.src/lib/DebugInfo/MSF/MSFBuilder.cpp
The file was modified/llvm/trunk/lib/DebugInfo/MSF/MSFCommon.cppllvm.src/lib/DebugInfo/MSF/MSFCommon.cpp
The file was modified/llvm/trunk/lib/DebugInfo/MSF/MappedBlockStream.cppllvm.src/lib/DebugInfo/MSF/MappedBlockStream.cpp
The file was modified/llvm/trunk/lib/DebugInfo/PDB/Native/PDBFile.cppllvm.src/lib/DebugInfo/PDB/Native/PDBFile.cpp
The file was modified/llvm/trunk/lib/DebugInfo/PDB/Native/PDBFileBuilder.cppllvm.src/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
The file was added/llvm/trunk/test/DebugInfo/PDB/write-fpm.testllvm.src/test/DebugInfo/PDB/write-fpm.test
The file was modified/llvm/trunk/unittests/DebugInfo/MSF/CMakeLists.txtllvm.src/unittests/DebugInfo/MSF/CMakeLists.txt
The file was modified/llvm/trunk/unittests/DebugInfo/MSF/MSFBuilderTest.cppllvm.src/unittests/DebugInfo/MSF/MSFBuilderTest.cpp
The file was added/llvm/trunk/unittests/DebugInfo/MSF/MSFCommonTest.cppllvm.src/unittests/DebugInfo/MSF/MSFCommonTest.cpp
The file was modified/llvm/trunk/unittests/DebugInfo/MSF/MappedBlockStreamTest.cppllvm.src/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
Revision 309895 by zturner:
[MSF] Move MSF unit tests to their own unittest target.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/unittests/DebugInfo/CMakeLists.txtllvm.src/unittests/DebugInfo/CMakeLists.txt
The file was added/llvm/trunk/unittests/DebugInfo/MSFllvm.src/unittests/DebugInfo/MSF
The file was added/llvm/trunk/unittests/DebugInfo/MSF/CMakeLists.txtllvm.src/unittests/DebugInfo/MSF/CMakeLists.txt
The file was added/llvm/trunk/unittests/DebugInfo/MSF/MSFBuilderTest.cppllvm.src/unittests/DebugInfo/MSF/MSFBuilderTest.cpp
The file was added/llvm/trunk/unittests/DebugInfo/MSF/MappedBlockStreamTest.cppllvm.src/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
The file was modified/llvm/trunk/unittests/DebugInfo/PDB/CMakeLists.txtllvm.src/unittests/DebugInfo/PDB/CMakeLists.txt
The file was removed/llvm/trunk/unittests/DebugInfo/PDB/MSFBuilderTest.cppllvm.src/unittests/DebugInfo/PDB/MSFBuilderTest.cpp
The file was removed/llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cppllvm.src/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
Revision 309894 by zturner:
[pdbutil] Add a command to dump the FPM.

Recently problems have been discovered in the way we write the FPM
(free page map).  In order to fix this, we first need to establish
a baseline about what a correct FPM looks like using an MSVC
generated PDB, so that we can then make our own generated PDBs
match.  And in order to do this, the dumper needs a mode where it
can dump an FPM so that we can write tests for it.

This patch adds a command to dump the FPM, as well as a test against
a known-good PDB.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.hllvm.src/include/llvm/DebugInfo/MSF/MSFCommon.h
The file was removed/llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.hllvm.src/include/llvm/DebugInfo/MSF/MSFStreamLayout.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.hllvm.src/include/llvm/DebugInfo/MSF/MappedBlockStream.h
The file was modified/llvm/trunk/include/llvm/DebugInfo/PDB/Native/PDBFile.hllvm.src/include/llvm/DebugInfo/PDB/Native/PDBFile.h
The file was modified/llvm/trunk/lib/DebugInfo/MSF/MSFCommon.cppllvm.src/lib/DebugInfo/MSF/MSFCommon.cpp
The file was modified/llvm/trunk/lib/DebugInfo/MSF/MappedBlockStream.cppllvm.src/lib/DebugInfo/MSF/MappedBlockStream.cpp
The file was modified/llvm/trunk/lib/DebugInfo/PDB/Native/PDBFile.cppllvm.src/lib/DebugInfo/PDB/Native/PDBFile.cpp
The file was added/llvm/trunk/test/DebugInfo/PDB/dump-fpm.testllvm.src/test/DebugInfo/PDB/dump-fpm.test
The file was modified/llvm/trunk/tools/llvm-pdbutil/BytesOutputStyle.cppllvm.src/tools/llvm-pdbutil/BytesOutputStyle.cpp
The file was modified/llvm/trunk/tools/llvm-pdbutil/BytesOutputStyle.hllvm.src/tools/llvm-pdbutil/BytesOutputStyle.h
The file was modified/llvm/trunk/tools/llvm-pdbutil/LinePrinter.cppllvm.src/tools/llvm-pdbutil/LinePrinter.cpp
The file was modified/llvm/trunk/tools/llvm-pdbutil/LinePrinter.hllvm.src/tools/llvm-pdbutil/LinePrinter.h
The file was modified/llvm/trunk/tools/llvm-pdbutil/llvm-pdbutil.cppllvm.src/tools/llvm-pdbutil/llvm-pdbutil.cpp
The file was modified/llvm/trunk/tools/llvm-pdbutil/llvm-pdbutil.hllvm.src/tools/llvm-pdbutil/llvm-pdbutil.h
The file was modified/llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cppllvm.src/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
Revision 309893 by tstellar:
AMDGPU/R600: Initialize more passes

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D36128
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPU.hllvm.src/lib/Target/AMDGPU/AMDGPU.h
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cppllvm.src/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600ClauseMergePass.cppllvm.src/lib/Target/AMDGPU/R600ClauseMergePass.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600ControlFlowFinalizer.cppllvm.src/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cppllvm.src/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cppllvm.src/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
The file was modified/llvm/trunk/lib/Target/AMDGPU/R600Packetizer.cppllvm.src/lib/Target/AMDGPU/R600Packetizer.cpp
Revision 309892 by saugustine:
Use a more standard method to mark these tests as unsupported on powerpc64.
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/builtins/Unit/divxc3_test.ccompiler-rt.src/test/builtins/Unit/divxc3_test.c
The file was modified/compiler-rt/trunk/test/builtins/Unit/mulxc3_test.ccompiler-rt.src/test/builtins/Unit/mulxc3_test.c
The file was modified/compiler-rt/trunk/test/builtins/Unit/powixf2_test.ccompiler-rt.src/test/builtins/Unit/powixf2_test.c
Revision 309891 by kpw:
Xray docs with description of Flight Data Recorder binary format.

Summary:
Adding a new restructuredText file to document the trace format produced with
an FDR mode handler and read by llvm-xray toolset.

Fixed two problems in the documentation from differential review. One bad table
and a missing link in the toc.

Original commit was e97c5836a77db803fe53319c53f3bf8e8b26d2b7.

Reviewers: dberris, pelikan

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36041
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/XRay.rstllvm.src/docs/XRay.rst
The file was added/llvm/trunk/docs/XRayFDRFormat.rstllvm.src/docs/XRayFDRFormat.rst
The file was modified/llvm/trunk/docs/index.rstllvm.src/docs/index.rst
The file was modified/llvm/trunk/lib/XRay/Trace.cppllvm.src/lib/XRay/Trace.cpp
Revision 309890 by arsenm:
LV: Don't insert runtime ptr checks on divergent targets
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cppllvm.src/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was added/llvm/trunk/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.llllvm.src/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
Revision 309889 by George Karpenkov:
[libFuzzer tests] Use substring comparison in libFuzzer tests

LIT launches executables with absolute, and not relative, path.
strncmp would try to do exact comparison and fail.

Differential Revision: https://reviews.llvm.org/D36242
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Fuzzer/test/InitializeTest.cppllvm.src/lib/Fuzzer/test/InitializeTest.cpp
Revision 309888 by d0k:
Remove unused diagnostic. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.tdclang.src/include/clang/Basic/DiagnosticParseKinds.td