[PATCH] D133949: Make sure the right parameter extension attributes are added in various instrumentation passes.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 08:48:14 PDT 2022


jonpa created this revision.
jonpa added reviewers: efriedma, uweigand, rnk.
Herald added subscribers: Enna1, JDevlieghere, hiraditya.
Herald added a project: All.
jonpa requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Herald added a project: LLVM.

Initial patch (in progress):

- It seemed like a good idea to make setArgExtAttr available as a member of TargetLibraryInfo to make it available easily.

- Don't know how to handle OpenMP/OMPIRBuilder.cpp as there is no TargetLibraryInfo available. Furthermore, those functions are all declared in a .def file. It would have been nice to put in the extension attributes there, but that's not possible since the type of extension needs to be determined per target, right? Is there by any chance a known single type of extension used for all these function parameters, or is it needed to handle them one by one?

- AddressSanitizer.cpp, MemorySanitizer.cpp, GCOVProfiling.cpp: These have a lot of missing attributes and I started adding as best I could, but not sure about all of them (sext or zext).

It's a little frustrating to have to fill all these out as it seems they really should only ever be used by clang, or? If so, maybe these functions could have something like an llvm-internal attribute so as to do the same trick as before by safely ignoring them?


https://reviews.llvm.org/D133949

Files:
  llvm/include/llvm/Analysis/TargetLibraryInfo.h
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
  llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
  llvm/lib/Transforms/Utils/BuildLibCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133949.460425.patch
Type: text/x-patch
Size: 12705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220915/b2548df5/attachment.bin>


More information about the llvm-commits mailing list