SuccessChanges

Summary

  1. [Debugify] Support checking Machine IR debug info (details)
  2. [NFC][SampleFDO] Preparation to support multiple sections with the same type (details)
Commit 39584ae5b5cbc817d19499b003d4eaba259c31b5 by xiang1.zhang
[Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
The file was modifiedllvm/lib/CodeGen/MachineDebugify.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/phi-mir-debugify.mir
The file was modifiedllvm/include/llvm/CodeGen/Passes.h
The file was addedllvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables.mir
The file was modifiedllvm/docs/HowToUpdateDebugInfo.rst
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/constant-mir-debugify.mir
The file was modifiedllvm/lib/CodeGen/TargetPassConfig.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetPassConfig.h
The file was addedllvm/lib/CodeGen/MachineCheckDebugify.cpp
The file was modifiedllvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
The file was addedllvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables.ll
The file was addedllvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables-x.mir
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt
The file was modifiedllvm/lib/CodeGen/CodeGen.cpp
Commit a906e3eccd1ed149ffc8bdf2540c7cff4171e3bd by wmi
[NFC][SampleFDO] Preparation to support multiple sections with the same type
in ExtBinary format.

Currently ExtBinary format doesn't support multiple sections with the same type
in the profile. We add the support in this patch. Previously we use the section
type to identify a section uniquely. Now we introduces a LayoutIndex in the
SecHdrTableEntry and use the LayoutIndex to locate the target section. The
allocations of NameTable and FuncOffsetTable are adjusted accordingly.

Currently it works as a NFC because it won't change anything for current layout.
The test for multiple sections support will be included in another patch where a
new type of profile containing multiple sections with the same type is
introduced.

Differential Revision: https://reviews.llvm.org/D93254
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
The file was modifiedllvm/include/llvm/ProfileData/SampleProfWriter.h
The file was modifiedllvm/lib/ProfileData/SampleProfReader.cpp
The file was modifiedllvm/lib/ProfileData/SampleProfWriter.cpp
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h