[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D64675#1584016 , @jfb wrote: > I would keep single stores because it's pretty silly codegen to copy from a > global for that. > > I would also verify that `-O0` isn't affected too badly by this change. I will. And maybe

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I would keep single stores because it's pretty silly codegen to copy from a global for that. I would also verify that `-O0` isn't affected too badly by this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64675/new/

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 209638. vitalybuka added a comment. Remove single store Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64675/new/ https://reviews.llvm.org/D64675 Files: clang/lib/CodeGen/CGDecl.cpp Index:

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. That's interesting. If `MemCpyOpt` has picked up the slack and clang can be simpler here, then let's remove clang's "intelligence". I do want to make sure that it handles all the cases this handles though, and does indeed generate great code on both x86-64 and ARM64. I

[PATCH] D64675: WIP: Disable optimization in emitStoresForConstant

2019-07-12 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: glider, jfb. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Not rely a review, but removing this code I see slight improvements in binary size on CTMark. Looks like with "ptr" patches MemCpyOptPass is