-
Notifications
You must be signed in to change notification settings - Fork 9
pre-commit: PR165700 #3003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
pre-commit: PR165700 #3003
Conversation
Diff moderunner: ariselab-64c-docker 960 files changed, 701384 insertions(+), 711743 deletions(-) +8 proxygen/HQFramer.ll |
|
The provided diff includes changes across multiple LLVM IR files, primarily focusing on code simplification, optimization, and restructuring. Below is a summary of the major changes observed:
These changes collectively aim to improve code efficiency, reduce redundancy, and enhance optimization potential by clarifying data flow and control dependencies. model: qwen-plus-latest |
| %.sink = phi i8 [ 1, %sw.epilog ], [ 1, %sw.bb ], [ 2, %if.then ] | ||
| %which_.i.i.i8 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 | ||
| store i8 %.sink, ptr %which_.i.i.i8, align 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regression: Early hoisting of %which_.i.i.i8 = getelementptr inbounds nuw i8, ptr %agg.result, i64 16 hinders the sinking of these code?
| sw.bb.i: ; preds = %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i, %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i | ||
| %6 = load i64, ptr %settingValue.i, align 8, !noalias !13 | ||
| store i64 %6, ptr %settingValue, align 8, !alias.scope !13 | ||
| br label %invoke.cont34 | ||
|
|
||
| sw.epilog.i: ; preds = %_ZN5folly8OptionalISt4pairImmEEptEv.exit5.i | ||
| store i8 0, ptr %settingValue, align 8, !alias.scope !13 | ||
| br label %invoke.cont34 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like positive: 2 new blocks representing different operations and invoke.cont34 representing the identical operations.
Previously, these identical operations were duplicated in block invoke.cont34 and invoke.cont40.
I.e.,
Before:
invoke.cont34:
// OP1
// Idenetical OPs
to cleanup
invoke.cont40:
// OP2
// Identical OPs
// OP3After:
sw.bb.i:
// OP1
to invoke.cont34
sw.epilog.i:
// OP2
to invoke/cont34
invoke.cont34:
// identical OPs
conditional to invoke.cont40 / cleanup
invoke.cont40:
// OP3| invoke.cont34: ; preds = %sw.epilog.i, %sw.bb.i | ||
| %.sink = phi i8 [ 0, %sw.epilog.i ], [ 1, %sw.bb.i ] | ||
| store i8 %.sink, ptr %hasValue.i.i.i.i.i.i, align 8, !alias.scope !13 | ||
| store i8 1, ptr %which_.i.i.i.i, align 8, !alias.scope !13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This store is useless to successor %cleanup, although it is a cold path to reach %cleanup
Link: llvm/llvm-project#165700
Requested by: @Camsyn