[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb5216b295049: [PGO] Enable preinline and cleanup when optimize for size (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 310619. zequanwu added a comment. Herald added a subscriber: steven_wu. - fix existing failed testcase. - add new testcases for npm and lpm. - add comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/n

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I see two pre-commit test failures on the patch. Can you take a look at those as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/new/ https://reviews.llvm.org/D91673 ___ c

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-08 Thread Rong Xu via Phabricator via cfe-commits
xur accepted this revision. xur added a comment. Sorry to the late response (I somehow missed the reply). (1) Can we add some comments to explain the reason for enabling this for -Oz -- I think the comments from @rnk is useful to some people (at least to me). (2) Also please add a testcase. Fe

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Thanks, my concerns are addressed, and I believe @xur's are as well. Please wait for his input before landing, though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-12-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 308810. zequanwu added a comment. - sync NPM with LPM. - use PreInlineThreshold flag value instead of hardcode number. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/new/ https://reviews.llvm.org/D91673

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D91673#2401578 , @xur wrote: > This is probably OK for -Os (SizeLevel == 1), but we need to be careful with > Oz (SizeLevel == 2). > We already know that enabling preinliner in general will reduce size -- as > the preinliner

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Zequan, to build clang with PGO, you can follow the steps in Chrome's script to build clang with PGO: https://source.chromium.org/chromium/chromium/src/+/master:tools/clang/scripts/build.py;l=703?q=clang%2Fscripts%2F%20build.py&ss=chromium Regarding -Oz / minsize / SizeLevel

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Rong Xu via Phabricator via cfe-commits
xur added a comment. This is probably OK for -Os (SizeLevel == 1), but we need to be careful with Oz (SizeLevel == 2). We already know that enabling preinliner in general will reduce size -- as the preinliner is pretty conservative. But there will be cases size will be increased. I would like

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 305948. zequanwu added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. update wrong diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/new/ https://reviews.ll

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: xur, davidxl, rnk. Herald added subscribers: cfe-commits, wenlei. Herald added a project: clang. zequanwu requested review of this revision. This is intended to reduce the binary size of both phase 1 and phase 2 builds. By compiling chrome