[PATCH] D13914: Tolerate negative offset when matching sample profile.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 14:24:38 PDT 2015
danielcdh created this revision.
danielcdh added reviewers: dnovillo, davidxl.
danielcdh added a subscriber: llvm-commits.
In some cases (as illustrated in the unittest), lineno can be less than the heade_lineno because the function body are included from some other files. In this case, offset will be negative. This patch makes clang still able to match the profile to IR in this situation.
http://reviews.llvm.org/D13914
Files:
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/offset.prof
test/Transforms/SampleProfile/offset.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13914.37921.patch
Type: text/x-patch
Size: 6138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151020/dd14890e/attachment-0001.bin>
More information about the llvm-commits
mailing list