HomePhabricator

[Remarks] Emit variable info in auto-init remarks

Authored by thegameg on Mar 1 2021, 1:07 PM.

Description

[Remarks] Emit variable info in auto-init remarks

This enhances the auto-init remark with information about the variable
that is auto-initialized.

This is based of debug info if available, or alloca names (mostly for
development purposes).

auto-init.c:4:7: remark: Call to memset inserted by -ftrivial-auto-var-init. Memory operation size: 4096 bytes.Variables: var (4096 bytes). [-Rpass-missed=annotation-remarks]
  int var[1024];
      ^

This allows to see things like partial initialization of a variable that
the optimizer won't be able to completely remove.

Differential Revision: https://reviews.llvm.org/D97734

Details

Committed
thegamegMar 4 2021, 12:51 PM
Differential Revision
D97734: [Remarks] Emit variable info in auto-init remarks
Parents
rGd7834556b7ad: Reland [GlobalISel] Start using vectors in GISelKnownBits
Branches
Unknown
Tags
Unknown