WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122746
[sh4] Introduce const pools in LLINT
https://bugs.webkit.org/show_bug.cgi?id=122746
Summary
[sh4] Introduce const pools in LLINT
Julien Brianceau
Reported
2013-10-14 02:44:34 PDT
In current implementation of LLINT for sh4, immediate values outside range -128..127 are loaded this way: mov.l .label, rx bra out nop .balign 4 .label: .long immvalue out: These immediate values could be grouped in constant pools placed behind non-return opcodes to avoid useless branches and reduce code size.
Attachments
Introduce const pools in sh4 LLINT
(12.51 KB, patch)
2013-10-14 02:50 PDT
,
Julien Brianceau
no flags
Details
Formatted Diff
Diff
generated LLIntAssembly.h on r157387 without patch
(1.07 MB, application/octet-stream)
2013-10-14 02:54 PDT
,
Julien Brianceau
no flags
Details
generated LLIntAssembly.h on r157387 with patch
(1.08 MB, application/octet-stream)
2013-10-14 03:03 PDT
,
Julien Brianceau
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Julien Brianceau
Comment 1
2013-10-14 02:50:58 PDT
Created
attachment 214139
[details]
Introduce const pools in sh4 LLINT generated LowLevelInterpreter.o size is 32848 bytes with this patch instead of 33928 bytes without (-3.2%).
Julien Brianceau
Comment 2
2013-10-14 02:54:51 PDT
Created
attachment 214140
[details]
generated LLIntAssembly.h on
r157387
without patch
Julien Brianceau
Comment 3
2013-10-14 03:03:15 PDT
Created
attachment 214141
[details]
generated LLIntAssembly.h on
r157387
with patch
Julien Brianceau
Comment 4
2013-10-14 03:05:30 PDT
Ooops, sorry for the size of the patches.. a zip would have been more appropriate. If there's a way to delete attachments, feel free to delete the 2 generated LLIntAssembly.h, I'll upload a zip file then.
kov's GTK+ EWS bot
Comment 5
2013-10-14 03:21:07 PDT
Comment on
attachment 214139
[details]
Introduce const pools in sh4 LLINT
Attachment 214139
[details]
did not pass gtk-wk2-ews (gtk-wk2): Output:
http://webkit-queues.appspot.com/results/4004005
Julien Brianceau
Comment 6
2013-10-14 16:09:25 PDT
The ConstPoolEntry class describes a constant: a size (16 or 32 bits), a value, a label (instance of LocalLabel) and a reference on it (instance of LocalLabelReference). The ConstPool class describes a contant pool: a set of entries (ConstPoolEntry instances) of a specific size (16 or 32 bits). The sh4LowerConstPool function iterates on all opcodes and handles two constant pools: one for 16 bit constants (currentPool16) and one for 32 bit constants (currentPool32): - these 2 pools will be filled with constants when needed (case of the "move" opcode with values outside -127..128 range) - these 2 pools will be flushed (if non empty) after non return opcodes "jmp" and "ret" - before adding an entry in the pool, we check that there isn't already an entry with the matching value in it (in this case we reuse it instead of creating a new one) - 16 bit entries are put before 32 bit ones because the max offset between the move opcode and the constant is 512 bytes for 16 bit values, whereas it's 1024 bytes for 32 bit ones - there is 2 separate pools to avoid space wasted by alignment constraints
WebKit Commit Bot
Comment 7
2013-10-15 11:02:06 PDT
Comment on
attachment 214139
[details]
Introduce const pools in sh4 LLINT Clearing flags on attachment: 214139 Committed
r157452
: <
http://trac.webkit.org/changeset/157452
>
WebKit Commit Bot
Comment 8
2013-10-15 11:02:10 PDT
All reviewed patches have been landed. Closing bug.
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