summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2018-08-28 15:27:25 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2018-08-28 15:27:25 +0000
commitc1b27b562b64766f5b6aa3db6c35020e033311b5 (patch)
tree9fa95c1d61c1c8906e9aa938cec34d25e8d1231e /lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
parentf1c111431b955d0eb8a6bee5c35749e5823e39e5 (diff)
downloadbcm5719-llvm-c1b27b562b64766f5b6aa3db6c35020e033311b5.tar.gz
bcm5719-llvm-c1b27b562b64766f5b6aa3db6c35020e033311b5.zip
[Inliner] Attribute callsites with inline remarks
Summary: Sometimes reading an output *.ll file it is not easy to understand why some callsites are not inlined. We can read output of inline remarks (option --pass-remarks-missed=inline) and try correlating its messages with the callsites. An easier way proposed by this patch is to add to every callsite processed by Inliner an attribute with the latest message that describes the cause of not inlining this callsite. The attribute is called //inline-remark//. By default this feature is off. It can be switched on by the option //-inline-remark-attribute//. For example in the provided test the result method //@test1// has two callsites //@bar// and inline remarks report different inlining missed reasons: remark: <unknown>:0:0: bar not inlined into test1 because too costly to inline (cost=-5, threshold=-6) remark: <unknown>:0:0: bar not inlined into test1 because it should never be inlined (cost=never): recursive It is not clear which remark correspond to which callsite. With the inline remark attribute enabled we get the reasons attached to their callsites: define void @test1() { call void @bar(i1 true) #0 call void @bar(i1 false) #2 ret void } attributes #0 = { "inline-remark"="(cost=-5, threshold=-6)" } .. attributes #2 = { "inline-remark"="(cost=never): recursive" } Patch by: yrouban (Yevgeny Rouban) Reviewers: xbolva00, tejohnson, apilipenko Reviewed By: xbolva00, tejohnson Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D50435 llvm-svn: 340834
Diffstat (limited to 'lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud