[PATCH] D97412: [Remarks] Provide more information about auto-init stores

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 13:27:51 PST 2021


thegameg created this revision.
thegameg added reviewers: fhahn, paquette, jdoerfert.
Herald added subscribers: jfb, hiraditya, mgorny.
thegameg requested review of this revision.
Herald added a project: LLVM.

This adds support for analyzing the instruction with the !annotation
"auto-init" in order to generate a more user-friendly remark.

For now, support the store size, and whether it's atomic/volatile.

Example:

  auto-init.c:4:7: remark: Store inserted by -ftrivial-auto-var-init.Store size: 4 bytes. [-Rpass-missed=annotation-remarks]
    int var;
        ^


https://reviews.llvm.org/D97412

Files:
  llvm/include/llvm/Transforms/Utils/AutoInitRemark.h
  llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
  llvm/lib/Transforms/Utils/AutoInitRemark.cpp
  llvm/lib/Transforms/Utils/CMakeLists.txt
  llvm/test/Transforms/Util/trivial-auto-var-init-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97412.326190.patch
Type: text/x-patch
Size: 12333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210224/44d4d8a4/attachment.bin>


More information about the llvm-commits mailing list