-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[debug-info] Add DIExpr to SILDebugVariable::operator== for real. #41294
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
[debug-info] Add DIExpr to SILDebugVariable::operator== for real. #41294
Conversation
@swift-ci test |
bf86797
to
85d9647
Compare
bool operator==(const SILDebugVariable &V) { | ||
return ArgNo == V.ArgNo && Constant == V.Constant && Name == V.Name && | ||
Implicit == V.Implicit && Type == V.Type && Loc == V.Loc && | ||
Scope == V.Scope && DIExpr == V.DIExpr; |
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 is the main change... DIExpr == DIExpr -> DIExpr == V.DIExpr.
85d9647
to
dcd3974
Compare
@swift-ci test |
I gathered statistics looking at dwarfdump --statistics on lib swift core both before/after I found the following:
The largest changes were:
So overall, except for those 4 changes all changes are < 1%. Even with those 4, the larger different is 3%. |
Build failed |
Build failed |
dcd3974
to
0d0bf13
Compare
@swift-ci smoke test |
I am smoke testing since that specific test that fails runs in the smoke test. |
// CHECK-LABEL: sil shared [noinline] @$s37specialize_unconditional_checked_cast31ArchetypeToConcreteConvertUInt8{{[_0-9a-zA-Z]*}}3Not{{.*}}Tg5 : $@convention(thin) (NotUInt8) -> NotUInt8 { | ||
// CHECK: bb0 | ||
// CHECK-NEXT: debug_value %0 | ||
// CHECK-NEXT: debug_value %0 |
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.
@adrian-prantl this was the test failure. It happens during optimization. I don't think it is interesting b/c it is in -O code.
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.
Adrian and I tracked this down to a bug in mem2reg. I restore this test in the last commit of this PR and in that commit return the test back to its former form.
Just batching this with another NFC commit in preparation for a larger later commit.
…lue remove the diexpr from the address SILDebugVariable. Otherwise they will never compare the same. Also restore the test that was updated for the previous commit to its old state. I did this to ensure that each commit would compile successfully and so that I could show the test associated with this commit.
AdrianP and I talked. I tracked down the test failure to a problem in SILMem2Reg. I am pushing a commit for that as part of this. We also sampled the dwarf dump diff offline and just saw changes in registers rather than functional changes. With my new changes, he said he is fine with post commit review. |
cac112e
to
0e3bca9
Compare
@swift-ci smoke test |
I in a previous commit attempted to do this but I thinkoed. I did this again and
at the same time also refactored SILDebugVariable into its own header. Just
combining two NFC commits into one.