WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228890
[ARM64] Clean up and fix Pre/Post-Indexed Address Mode to Air for ARM64 (Load Instruction)
https://bugs.webkit.org/show_bug.cgi?id=228890
Summary
[ARM64] Clean up and fix Pre/Post-Indexed Address Mode to Air for ARM64 (Load...
Yijia Huang
Reported
2021-08-06 20:54:36 PDT
...
Attachments
Patch
(10.72 KB, patch)
2021-08-06 23:04 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(11.53 KB, patch)
2021-08-07 16:42 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(12.72 KB, patch)
2021-08-07 17:15 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(12.78 KB, patch)
2021-08-07 20:58 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(12.78 KB, patch)
2021-08-07 21:01 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(15.79 KB, patch)
2021-08-08 03:40 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(15.81 KB, patch)
2021-08-08 14:14 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(16.02 KB, patch)
2021-08-08 19:10 PDT
,
Yijia Huang
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(16.15 KB, patch)
2021-08-08 19:30 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Patch
(16.27 KB, patch)
2021-08-08 23:18 PDT
,
Yijia Huang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Yijia Huang
Comment 1
2021-08-06 23:04:15 PDT
Created
attachment 435116
[details]
Patch
Mark Lam
Comment 2
2021-08-07 10:21:09 PDT
Comment on
attachment 435116
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435116&action=review
> Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:142 > + auto detect = [&] (const HashMap<MemoryValue*, Value*>& candidates, bool isPreIndexCandidiates) {
Typo: /isPreIndexCandidiates/isPreIndexCandidates/
> Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:165 > + if (!controlEquivalent(memory, address->child(1)))
Can you put a brief description in the ChangeLog as to why this is needed?
> Source/JavaScriptCore/b3/B3LowerToAir.cpp:2585 > + // memory = load(base, 0) MoveWithIncrement (%address, posfix(offset)) %memory
/posfix/postfix/
> Source/JavaScriptCore/b3/B3LowerToAir.cpp:2591 > + if (m_locked.contains(address) || address->opcode() != Add || address->type() != Int64)
Please put a brief description in the ChangeLog as to why this m_locked check is needed.
> Source/JavaScriptCore/b3/air/AirArg.h:1319 > + return isValidIncrementIndexForm(offset());
You can remove this line too.
Yijia Huang
Comment 3
2021-08-07 16:42:01 PDT
Created
attachment 435137
[details]
Patch
Yijia Huang
Comment 4
2021-08-07 16:43:04 PDT
(In reply to Mark Lam from
comment #2
)
> Comment on
attachment 435116
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=435116&action=review
>
Thanks for reviewing. Updated.
Yijia Huang
Comment 5
2021-08-07 17:15:17 PDT
Created
attachment 435139
[details]
Patch
Yijia Huang
Comment 6
2021-08-07 20:58:45 PDT
Created
attachment 435142
[details]
Patch
Yijia Huang
Comment 7
2021-08-07 21:01:47 PDT
Created
attachment 435143
[details]
Patch
Yijia Huang
Comment 8
2021-08-08 03:40:40 PDT
Created
attachment 435148
[details]
Patch
Yijia Huang
Comment 9
2021-08-08 14:14:32 PDT
Created
attachment 435156
[details]
Patch
Yijia Huang
Comment 10
2021-08-08 19:10:36 PDT
Created
attachment 435162
[details]
Patch
Yijia Huang
Comment 11
2021-08-08 19:30:23 PDT
Created
attachment 435164
[details]
Patch
Yijia Huang
Comment 12
2021-08-08 23:18:04 PDT
Created
attachment 435168
[details]
Patch
Keith Miller
Comment 13
2021-08-09 15:33:32 PDT
Comment on
attachment 435168
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
r=me with nit.
> Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:147 > + auto detect = [&] (const HashMap<MemoryValue*, Value*>& candidates, bool isPreIndexCandidates) {
Nit: I'd change `isPreIndexCandidate` to a lambda which contains the logic to do the canonicalization. I find it to be an anti pattern to pass a bool to a lambda where there is exactly one call with true and false.
EWS
Comment 14
2021-08-09 16:46:17 PDT
Committed
r280808
(
240378@main
): <
https://commits.webkit.org/240378@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 435168
[details]
.
Radar WebKit Bug Importer
Comment 15
2021-08-09 16:59:24 PDT
<
rdar://problem/81719365
>
Mark Lam
Comment 16
2021-08-09 18:08:11 PDT
(In reply to Keith Miller from
comment #13
)
> Comment on
attachment 435168
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
> > r=me with nit. > > > Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:147 > > + auto detect = [&] (const HashMap<MemoryValue*, Value*>& candidates, bool isPreIndexCandidates) { > > Nit: I'd change `isPreIndexCandidate` to a lambda which contains the logic > to do the canonicalization. I find it to be an anti pattern to pass a bool > to a lambda where there is exactly one call with true and false.
Why was this not addressed in the landed patch?
Yijia Huang
Comment 17
2021-08-09 18:28:16 PDT
(In reply to Mark Lam from
comment #16
)
> (In reply to Keith Miller from
comment #13
) > > Comment on
attachment 435168
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
> > > > r=me with nit. > > > > > Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:147 > > > + auto detect = [&] (const HashMap<MemoryValue*, Value*>& candidates, bool isPreIndexCandidates) { > > > > Nit: I'd change `isPreIndexCandidate` to a lambda which contains the logic > > to do the canonicalization. I find it to be an anti pattern to pass a bool > > to a lambda where there is exactly one call with true and false. > > Why was this not addressed in the landed patch?
Sorry, I will update it in the next patch with the store instruction.
Mark Lam
Comment 18
2021-08-09 18:34:53 PDT
Comment on
attachment 435168
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
> Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:157 > + // *** --> newMemory = Load(base, offset) > + // *** ***
Curious: what is the meaning of the "***" here?
Yijia Huang
Comment 19
2021-08-09 18:46:11 PDT
(In reply to Mark Lam from
comment #18
)
> Comment on
attachment 435168
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
> > > Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:157 > > + // *** --> newMemory = Load(base, offset) > > + // *** *** > > Curious: what is the meaning of the "***" here?
I was using the ellipsis (...) to indicate any code between them. But it violates the code style, where the format checker requires only one space after the period.
Mark Lam
Comment 20
2021-08-09 19:39:19 PDT
(In reply to Yijia Huang from
comment #19
)
> (In reply to Mark Lam from
comment #18
) > > Comment on
attachment 435168
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
> > > > > Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:157 > > > + // *** --> newMemory = Load(base, offset) > > > + // *** *** > > > > Curious: what is the meaning of the "***" here? > > I was using the ellipsis (...) to indicate any code between them. But it > violates the code style, where the format checker requires only one space > after the period.
Oh, in that case, I would just ignore the style checker because you have a valid use case there.
Yijia Huang
Comment 21
2021-08-09 19:47:07 PDT
(In reply to Mark Lam from
comment #20
)
> (In reply to Yijia Huang from
comment #19
) > > (In reply to Mark Lam from
comment #18
) > > > Comment on
attachment 435168
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=435168&action=review
> > > > > > > Source/JavaScriptCore/b3/B3CanonicalizePrePostIncrements.cpp:157 > > > > + // *** --> newMemory = Load(base, offset) > > > > + // *** *** > > > > > > Curious: what is the meaning of the "***" here? > > > > I was using the ellipsis (...) to indicate any code between them. But it > > violates the code style, where the format checker requires only one space > > after the period. > > Oh, in that case, I would just ignore the style checker because you have a > valid use case there.
If I ignore that, would others encounter the checker warning every time they upload a patch because of it?
Mark Lam
Comment 22
2021-08-09 20:01:30 PDT
(In reply to Yijia Huang from
comment #21
)
> If I ignore that, would others encounter the checker warning every time they > upload a patch because of it?
Only if they touch that line.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug