[PATCH] D97489: [Remarks] Provide more information about auto-init calls

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 11:06:09 PST 2021


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

This now analyzes calls to both intrinsics and functions.

For intrinsics, grab the ones we know and care about (mem* family) and
analyze the arguments.

For calls, use TLI to get more information about the libcalls, then
analyze the arguments if known.

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


https://reviews.llvm.org/D97489

Files:
  llvm/include/llvm/Transforms/Utils/AutoInitRemark.h
  llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
  llvm/lib/Transforms/Utils/AutoInitRemark.cpp
  llvm/test/Other/new-pm-O0-defaults.ll
  llvm/test/Transforms/Util/trivial-auto-var-init-call.ll
  llvm/test/Transforms/Util/trivial-auto-var-init-unknown.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97489.326446.patch
Type: text/x-patch
Size: 42544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210225/3607d25c/attachment-0001.bin>


More information about the llvm-commits mailing list