SuccessChanges

Summary

  1. [VE] Migrate to the getMachineMemOperand overload using llvm::Align (details)
  2. Add MIR-level debugify with only locations support for now (details)
  3. [ManualDWARFIndex] Remove dead code, in preparation for moving this function. (details)
  4. [NFC] Clean up uses of LoadInst constructor. (details)
  5. [gn build] Port 1adeeabb79a (details)
  6. Reset more globalMemCounters. (details)
Commit 624654fd647057dd6c1cdf8799a7605b69716a02 by maskray
[VE] Migrate to the getMachineMemOperand overload using llvm::Align

Just delete the deprecated overload because nothing uses it.
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h (diff)
The file was modifiedllvm/lib/Target/VE/VEInstrInfo.cpp (diff)
Commit 1adeeabb79afbe966a45050f07e0bd6f446f8aa6 by daniel_l_sanders
Add MIR-level debugify with only locations support for now

Summary:
Re-used the IR-level debugify for the most part. The MIR-level code then
adds locations to the MachineInstrs afterwards based on the LLVM-IR debug
info.

It's worth mentioning that the resulting locations make little sense as
the range of line numbers used in a Function at the MIR level exceeds that
of the equivelent IR level function. As such, MachineInstrs can appear to
originate from outside the subprogram scope (and from other subprogram
scopes). However, it doesn't seem worth worrying about as the source is
imaginary anyway.

There's a few high level goals this pass works towards:
* We should be able to debugify our .ll/.mir in the lit tests without
  changing the checks and still pass them. I.e. Debug info should not change
  codegen. Combining this with a strip-debug pass should enable this. The
  main issue I ran into without the strip-debug pass was instructions with MMO's and
  checks on both the instruction and the MMO as the debug-location is
  between them. I currently have a simple hack in the MIRPrinter to
  resolve that but the more general solution is a proper strip-debug pass.
* We should be able to test that GlobalISel does not lose debug info. I
  recently found that the legalizer can be unexpectedly lossy in seemingly
  simple cases (e.g. expanding one instr into many). I have a verifier
  (will be posted separately) that can be integrated with passes that use
  the observer interface and will catch location loss (it does not verify
  correctness, just that there's zero lossage). It is a little conservative
  as the line-0 locations that arise from conflicts do not track the
  conflicting locations but it can still catch a fair bit.

Depends on D77439, D77438

Reviewers: aprantl, bogner, vsk

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77446
The file was modifiedllvm/include/llvm/CodeGen/Passes.h (diff)
The file was modifiedllvm/include/llvm/InitializePasses.h (diff)
The file was modifiedllvm/lib/CodeGen/CodeGen.cpp (diff)
The file was addedllvm/test/CodeGen/Generic/MIRDebugify/locations.mir
The file was modifiedllvm/include/llvm/Transforms/Utils/Debugify.h (diff)
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt (diff)
The file was modifiedllvm/lib/Transforms/Utils/Debugify.cpp (diff)
The file was addedllvm/lib/CodeGen/MachineDebugify.cpp
Commit f30ebf437851d3c68fd0eee82afbc0cef7373c00 by ditaliano
[ManualDWARFIndex] Remove dead code, in preparation for moving this function.
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp (diff)
Commit 565b56a72cff067456e186c3fe7bca9a49c61cd7 by efriedma
[NFC] Clean up uses of LoadInst constructor.
The file was modifiedllvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp (diff)
The file was modifiedllvm/examples/BrainF/BrainF.cpp (diff)
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp (diff)
Commit 6fa0d0ae11a2a7009f4ac123a5ed6a283849869c by llvmgnsyncbot
[gn build] Port 1adeeabb79a
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn (diff)
Commit 0b43db5202eef38d736e22042f7b5038454f44fd by danalbert
Reset more globalMemCounters.

Reviewers: EricWF, #libc

Reviewed By: EricWF, #libc

Subscribers: broadwaylamb, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D77681
The file was modifiedlibcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.pass.cpp (diff)
The file was modifiedlibcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp (diff)
The file was modifiedlibcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp (diff)
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp (diff)
The file was modifiedlibcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp (diff)