raghesh via llvm-dev
2021-Nov-02 10:56 UTC
[llvm-dev] External linkage functions which allocate memory
Hi All, In a linked LLVM-IR module, I would like to know if any of the functions with external linkage allocate memory. The definitions of these functions are not available in the linked IR. For example, the 'strdup' function. If I understand the definition of 'readnone' attribute correctly, I think one way to do this is to check if the function declaration has 'readnone' attached to it [1]. Is this correct? Please let me know if there are any other reliable methods to do the same. [1] https://llvm.org/docs/LangRef.html Regards, Raghesh ------------------------------ Raghesh Aloor AMD India Pvt. Ltd. Bengaluru. ------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211102/f3b278a9/attachment.html>
raghesh via llvm-dev
2021-Nov-02 13:02 UTC
[llvm-dev] External linkage functions which allocate memory
Hi All, A correction in my query. Please ignore this part --> "if any of the functions with external linkage allocate memory". I think I have not used the term "external linkage" promptly as per its definition. What I would like to know is about the possibility of memory allocation by those functions whose definitions are not there in the linked LLMV-IR. Regards Raghesh ------------------------------ Raghesh Aloor AMD India Pvt. Ltd. Bengaluru. ------------------------------ On Tue, Nov 2, 2021 at 4:26 PM raghesh <raghesh.a at gmail.com> wrote:> Hi All, > > In a linked LLVM-IR module, I would like to know if any of the functions > with external linkage allocate memory. The definitions of these functions > are not available in the linked IR. For example, the 'strdup' function. > > If I understand the definition of 'readnone' attribute correctly, I think > one way to do this is to check if the function declaration has 'readnone' > attached to it [1]. Is this correct? > > Please let me know if there are any other reliable methods to do the same. > > [1] https://llvm.org/docs/LangRef.html > > Regards, > Raghesh > ------------------------------ > Raghesh Aloor > AMD India Pvt. Ltd. > Bengaluru. > ------------------------------ >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211102/19b66ea8/attachment.html>