aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2021-10-11 12:31:02 -0500
committerChris Bieneman <chris.bieneman@me.com>2021-10-11 14:50:34 -0500
commit121b2252de0eed68f2ddf5f09e924a6c35423d47 (patch)
treee06befcd6cd040e8415cb4c891f6b56d2c8b9852 /llvm/lib/ExecutionEngine/Orc
parentedfdce2627633a161292c6ba46e868330569ee9d (diff)
downloadllvm-121b2252de0eed68f2ddf5f09e924a6c35423d47.zip
llvm-121b2252de0eed68f2ddf5f09e924a6c35423d47.tar.gz
llvm-121b2252de0eed68f2ddf5f09e924a6c35423d47.tar.bz2
AddGlobalAnnotations for function with or without function body.
When AnnotateAttr is on a function, AddGlobalAnnotations is only called in CodeGenModule::EmitGlobalFunctionDefinition which means AnnotateAttr on function declaration without function body will be ignored. The patch will move AddGlobalAnnotations to CodeGenModule::SetFunctionAttributes, so with or without function body, the AnnotateAttr will get code gen for a function. It'll help case when AnnotateAttr is on external function, and the AnnotateAttr will be consumed in IR level. For example, a pass to collect num of uses for functions with __attribute((annotate("count_use"))) after optimizations, As long as there's __attribute((annotate("count_use"))), function with or without function body should be counted. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D111109 Patch by: python3kgae (Xiang Li)
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc')
0 files changed, 0 insertions, 0 deletions