[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-22 Thread Di Mo via Phabricator via cfe-commits
modimo added inline comments. Comment at: clang/test/CodeGen/thinlto-funcattr-prop.ll:14 + +; RUN: llvm-dis %t/b.bc -o - | FileCheck %s + tejohnson wrote: > This is checking the summary generated by opt, not the result of the > llvm-lto2 run. Fixed. ==

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-22 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 374431. modimo marked 23 inline comments as done. modimo added a comment. Address feedback, rename funcattrs-prop-indirect.ll to funcattrs-prop-unknown.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36850/new/

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-22 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:575 unsigned AlwaysInline : 1; +unsigned NoUnwind : 1; +// Indicate if function contains instructions that mayThrow tejohnson wrote: > No Unwind needs a comment. A

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-22 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Thanks for your patience, finally had a chance to go through everything much more carefully. Looks good, mostly a bunch of small or nitpicky final suggestions. The main comment/question of significance relates to where hasUnknownCall is being set currently. Patch tit

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:580 +// If there are calls to unknown targets (e.g. indirect) +unsigned hasUnknownCall : 1; + modimo wrote: > tejohnson wrote: > > Now that we have MayThrow, can we avo

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-16 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. In D36850#3005254 , @tejohnson wrote: > Ok thanks. I need to go through the propagation code and tests again more > closely now, but one question/suggestion below in the meantime. Thanks! Comment at: llvm/inclu

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Ok thanks. I need to go through the propagation code and tests again more closely now, but one question/suggestion below in the meantime. Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:580 +// If there are calls to unknown targets (e.g. in

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-13 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 372398. modimo added a comment. Add mayThrow flag Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36850/new/ https://reviews.llvm.org/D36850 Files: clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll clang/t

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-09 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. In D36850#2990907 , @tejohnson wrote: > In D36850#2990847 , @modimo wrote: > >> In D36850#2990771 , @tejohnson >> wrote: >> >>> In D36850#2968536

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-08 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D36850#2990847 , @modimo wrote: > In D36850#2990771 , @tejohnson wrote: > >> In D36850#2968536 , @modimo wrote: >> >>> In D36850#2964293

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-08 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. In D36850#2990771 , @tejohnson wrote: > In D36850#2968536 , @modimo wrote: > >> In D36850#2964293 , @tejohnson >> wrote: >> >>> Good point on indirec

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-08 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D36850#2968536 , @modimo wrote: > In D36850#2964293 , @tejohnson wrote: > >> Good point on indirect calls. Rather than add a bit to the summary, can the >> flags just be set conservati

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-09-02 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. gentle ping @tejohnson Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36850/new/ https://reviews.llvm.org/D36850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-27 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 369158. modimo added a comment. Check for CachedAttributes count in map rather than value so conservative results are not re-calculated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36850/new/ https://reviews.l

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-26 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 369024. modimo marked 2 inline comments as done. modimo added a comment. Use prevailing for linkonce/weak. Add hasUnknownCall to model virtual and indirect calls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D368

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-26 Thread Di Mo via Phabricator via cfe-commits
modimo marked 3 inline comments as done. modimo added a comment. In D36850#2964293 , @tejohnson wrote: > Good point on indirect calls. Rather than add a bit to the summary, can the > flags just be set conservatively in any function containing an indirect

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-24 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D36850#2958594 , @modimo wrote: > @tejohnson Indirect calls are not captured in FunctionSummaries in CallGraph > or in a flag form saying they exist. Also looks like >

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-24 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. Checking build timing in release mode Clang self-build looking at purely thinlink timing: | Mode | Time (s) | | base | 2.254| | base + propagation | 2.556| | noinline | 8.870| | noinline + propagation | 10.

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-23 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 368178. modimo added a comment. Remove llvm/test/ThinLTO/X86/weak_externals.ll from diffs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36850/new/ https://reviews.llvm.org/D36850 Files: clang/test/CodeGen/thi

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-23 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 368174. modimo added a comment. Minor test fixups Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36850/new/ https://reviews.llvm.org/D36850 Files: clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll clang/t

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-20 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. @tejohnson Indirect calls are not captured in FunctionSummaries in CallGraph or in a flag form saying they exist. Also looks like speculative candidates for ICP do make i

[PATCH] D36850: [ThinLTO] Add norecurse function attribute propagation

2021-08-20 Thread Di Mo via Phabricator via cfe-commits
modimo updated this revision to Diff 367937. modimo marked 3 inline comments as done. modimo edited the summary of this revision. modimo added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adding more test cases and changed logic around weak linkages Repositor