[PATCH] D68633: [utils] InlineFunction: fix for debug info affecting optimizations
Chris Ye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 05:39:47 PDT 2019
yechunliang updated this revision to Diff 225008.
yechunliang edited the summary of this revision.
yechunliang added a comment.
Rethink about this issue and the root cause should be caused by use_empty. Just resubmitted the patch with "[InlineFunction] Erase use_empty allocas when inline".
Updated patch description:
[InlineFunction] Erase use_empty allocas when inline
- When continuely scan block of allocas, in the inner loop, there is lack of use_empty check, this will cause use_empty alloca instruction next to previous alloca insert to the caller. This will make different output when there is debug instruction between two alloca instructions (with/without --with-strip). This patch add use_empty() check in the alloca scanning inner loop. Exit the inner loop when find use_empty is use_empty and handle to earse it in the outer loop.
a) callee:
%1 = alloca (used)
dbg
%2 = alloca (use empty)
dbg
%3 = alloca3 (used)
b) inline caller expection: (the use_empty %2 be removed)
%1 = alloca (used)
dbg
dbg
%3 = alloca3 (used)
- Also skip debug instruction in the inner loop for continue alloca scanning.
Fix the issue: https://bugs.llvm.org/show_bug.cgi?id=43291
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68633/new/
https://reviews.llvm.org/D68633
Files:
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/Transforms/Inline/inline-with-debuginfo.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68633.225008.patch
Type: text/x-patch
Size: 6299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191015/fc753bd1/attachment.bin>
More information about the llvm-commits
mailing list