WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
152223
Move the API(s) from B3MathExtras.h into FTL::Output
https://bugs.webkit.org/show_bug.cgi?id=152223
Summary
Move the API(s) from B3MathExtras.h into FTL::Output
Filip Pizlo
Reported
2015-12-12 22:19:12 PST
We need to keep the layering to a minimum. We already have a layer that is meant to help you generate low-level IR, and that's called FTL::Output. So, anytime we are tempted to add helpers that generate B3 IR on behalf of a client, we should just put that into FTL::Output. Also, anytime you create a helper that generates IR that consists of multiple basic blocks, you need to be mindful of where you insert those blocks. It's not good to just put them at the end of the procedure, since that breaks any range-based analyses. It also makes IR hard to read. This is why FTL::Output has all of this functionality about "inserting blocks before". So, in its current form, the API in B3MathExtras.h is suboptimal and produces weird-looking IR, and to fix that we would need to endow it with FTL::Output's smarts. Seems better to just move it to FTL::Output.
Attachments
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2015-12-13 13:54:03 PST
As I wrote in the ChangeLog, that was about easier testing and perf work. Point taken for the poor block layout though. I should definitely fix that.
Filip Pizlo
Comment 2
2015-12-13 14:27:13 PST
(In reply to
comment #1
)
> As I wrote in the ChangeLog, that was about easier testing and perf work. > > Point taken for the poor block layout though. I should definitely fix that.
It would be great if FTL::Output was moved to B3, and became the default way to build B3 IR. Then our tests could use it. I think you can already instantiate FTL::Output from testb3, so we could start moving in that direction now.
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