Closed
Bug 615871
(float&float4_JIT)
Opened 15 years ago
Closed 10 years ago
Add JIT support for the float & float4 type
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), enhancement)
Tamarin Graveyard
Baseline JIT (CodegenLIR)
Tracking
(Not tracked)
RESOLVED
FIXED
Q2 12 - Cyril
People
(Reporter: virgilp, Assigned: virgilp)
References
Details
(Whiteboard: Tracking)
Attachments
(2 files, 15 obsolete files)
|
82.86 KB,
patch
|
edwsmith
:
feedback+
wmaddox
:
feedback+
|
Details | Diff | Splinter Review |
|
39.99 KB,
patch
|
edwsmith
:
feedback+
wmaddox
:
feedback+
|
Details | Diff | Splinter Review |
User-Agent: Jakarta Commons-HttpClient/3.0 (Deskzilla Lite/2.1.5508.129)
Build Identifier:
In order to have effictient support of float, we need to update the JIT - add
new LIR instructions, handle new opcodes/new semnatics of existing opcodes, etc.
Reproducible: Always
| Assignee | ||
Updated•15 years ago
|
Blocks: float/float4, float&float4_types
| Assignee | ||
Comment 1•14 years ago
|
||
need to apply patch from bug 616169 first
| Assignee | ||
Comment 2•14 years ago
|
||
| Assignee | ||
Comment 3•14 years ago
|
||
| Assignee | ||
Comment 4•14 years ago
|
||
| Assignee | ||
Comment 5•14 years ago
|
||
Only stub methods done; the PPC port is non-function, this is just so that it links & xcode may produce universal binaries (so that our QA workflows/build system remains unchanged)
| Assignee | ||
Comment 6•14 years ago
|
||
resubmitted, as "patch"
Attachment #532982 -
Attachment is obsolete: true
| Assignee | ||
Updated•14 years ago
|
Component: Virtual Machine → JIT Compiler (NanoJIT)
QA Contact: vm → nanojit
| Assignee | ||
Comment 7•14 years ago
|
||
| Assignee | ||
Updated•14 years ago
|
Attachment #533910 -
Attachment description: patch → lirasm changes for float support
| Assignee | ||
Comment 8•14 years ago
|
||
| Assignee | ||
Comment 9•14 years ago
|
||
This is just a stub so that other platforms would compile & run (as long as no float code is involved). It doesn't really add float support.
| Assignee | ||
Comment 10•14 years ago
|
||
Comment on attachment 532983 [details] [diff] [review]
NanoJIT changes for float - PPC-specific
obsoleted by the "other platforms" patch
Attachment #532983 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•14 years ago
|
||
Attachment #532974 -
Attachment is obsolete: true
| Assignee | ||
Comment 12•14 years ago
|
||
Attachment #532976 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•14 years ago
|
||
Attachment #532975 -
Attachment is obsolete: true
| Assignee | ||
Comment 14•14 years ago
|
||
Attachment #532978 -
Attachment is obsolete: true
| Assignee | ||
Updated•14 years ago
|
Attachment #533916 -
Attachment is patch: true
| Assignee | ||
Updated•14 years ago
|
Attachment #533910 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533911 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533912 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533913 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533914 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533915 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533916 -
Flags: review?(edwsmith)
| Assignee | ||
Comment 15•14 years ago
|
||
Attachment #533912 -
Attachment is obsolete: true
Attachment #535682 -
Flags: review?(edwsmith)
Attachment #533912 -
Flags: review?(edwsmith)
| Assignee | ||
Comment 16•14 years ago
|
||
changed mostly because of rebasing
Attachment #533914 -
Attachment is obsolete: true
Attachment #535684 -
Flags: review?(edwsmith)
Attachment #533914 -
Flags: review?(edwsmith)
| Assignee | ||
Comment 17•14 years ago
|
||
FWIW - my MQ "series" file (i.e. the order of the patches) is:
bug-616169.LIRopcodeTBL.diff // from bug 616169, (r+) but not integrated
bug-616169.lirasm.diff #+nanojit // from bug 616169
bug-615871.floatNanoJIT.diff // NanoJIT changes for float - new LIR opcodes
bug-615871.nJIT_Assembler.diff // NanoJIT changes for float - generic assembler
bug-615871.nJIT_x64.diff // NanoJIT changes for float - x64
bug-615871.nJIT_i386.diff // NanoJIT changes for float - x64
bug-615871.nJIT_others.diff // NanoJIT changes for float - ARM, PPC etc. - just stubs
bug-615871.nJIT_lirasm.diff // lirasm changes for float support
bug-615871.nJIT_tests.diff // lirasm tests for new float-related opcodes
Assignee: nobody → virgilp
Flags: flashplayer-qrb+
Flags: flashplayer-injection-
Flags: flashplayer-bug-
Priority: -- → P2
Target Milestone: --- → Q2 12 - Cyril
| Assignee | ||
Comment 18•14 years ago
|
||
Comment on attachment 533910 [details] [diff] [review]
lirasm changes for float support
cancel review request, will update soon to float+float4
Attachment #533910 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533911 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533913 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533915 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #533916 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #535682 -
Flags: review?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #535684 -
Flags: review?(edwsmith)
Updated•14 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Updated•14 years ago
|
Alias: float&float4_JIT
Summary: Add JIT support for the "float" type → Add JIT support for the float & float4 type
| Assignee | ||
Comment 19•14 years ago
|
||
Attachment #533910 -
Attachment is obsolete: true
Attachment #533911 -
Attachment is obsolete: true
Attachment #533913 -
Attachment is obsolete: true
| Assignee | ||
Comment 20•14 years ago
|
||
Attachment #533915 -
Attachment is obsolete: true
Attachment #533916 -
Attachment is obsolete: true
Attachment #535682 -
Attachment is obsolete: true
Attachment #535684 -
Attachment is obsolete: true
| Assignee | ||
Updated•14 years ago
|
Attachment #569026 -
Flags: feedback?(wmaddox)
Attachment #569026 -
Flags: feedback?(edwsmith)
| Assignee | ||
Updated•14 years ago
|
Attachment #569027 -
Flags: feedback?(wmaddox)
Attachment #569027 -
Flags: feedback?(edwsmith)
Comment 21•14 years ago
|
||
Comment on attachment 569026 [details] [diff] [review]
NanoJIT changes for float - new LIR opcodes
Review of attachment 569026 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, except for the use of f4_eq_i() in CseFilter::findImmF4() where a bitwise comparison should be used. It should not be used in findImmF4() for the same reason that you note in CseFilter::insImmF4(), i.e., NaNs and -0 vs. +0. There are also a few places in comments where you call Float4 a "128-bit float" -- it should always be described as a vector.
The following usage is questionable:
const uint32_t* up = reinterpret_cast<const uint32_t*>(&a);
The compiler may assume that *up does not alias with an object declared as a type other than uint32_t. It would be preferable to coerce via a union, as done elsewhere.
align_float_comparisons -> align_eqf (for consistency)
essentialy -> essentially
Attachment #569026 -
Flags: feedback?(wmaddox) → feedback+
Comment 22•14 years ago
|
||
Comment on attachment 569027 [details] [diff] [review]
NanoJIT changes for float/float4 - generic assembler changes
Review of attachment 569027 [details] [diff] [review]:
-----------------------------------------------------------------
This looks reasonable, but see comments and questions below prior to submitting for review. F+
The aligned allocator can be streamlined by noting that a pointer may be aligned like so:
current_top = (current_top + align - 1) & ~(align - 1)
We are already rounding up allocations to 8-byte alignment. Since this is a bump-pointer allocator, I presume we are doing it for the alignment, not to reduce fragmentation. We should not add any padding here to the request size before aligning to the user-specified boundary. In fact, I don't see any point for the extra 8-byte alignment in this case -- we should just pad to the alignment specified by the caller. We should assert that the alignment >= 8, as it looks like you use only the size of the key to determine the alignment, which might conceivably in some future scenario be smaller than a pointer.
Use consistent whitespace, e.g., space after commas, no space after open paren or before close paren. E.g., HashMap::keysEqual(). Don't include random whitespace cleanup in patches to be reviewed, however. Commit cleanups separately, and keep the patches you send out for review clean.
Is asm_condd() meant to handle floats as well as doubles?
While Tamarin may not generate LIR_livef or LIR_lifef4, this will need to change when float/float4 support goes into Halfmoon.
Why is there support for an IMMD pool and an an IMMF4 pool, but no IMMF pool?
Attachment #569027 -
Flags: feedback?(wmaddox) → feedback+
| Assignee | ||
Comment 23•14 years ago
|
||
f4_eq_i - you're right, good catch.
const uint32_t* vs. unions: I disagree, there are GCC bugs that make it crash when using unions, and besides Tamarin isn't ready for strict pointer aliasing anyway - there have been extensive discussions about this and AFIACT the decision is "we don't care about strict aliasing rules".
Ref aligning: I understand your point; I attempted "minimum modifications" so I kept nBytes aligned to 8 originally. Note that this guarantees that everything is at least 8-byte aligned, even if input alignment is less than 8. But yes, I think it's safe to consolidate alignment functions into a single one.
asm_condd: yes. Naming is a bit unfortunate, I know - but the difference between float&double did not justify a new function (unlike float4 which is quite different).
IMMF pool: I punted, I reuse the IMMD pool in the few cases where I need to. Thing is, float constants often fit in instruction immediates, but with float4 it's a completely different issue, no platform will allow you to specify a 128-bit immediate.
| Assignee | ||
Comment 24•14 years ago
|
||
"allocation functions" (with & without explicit alignment), not "alignment functions"
| Assignee | ||
Comment 25•14 years ago
|
||
Ok, I started rewriting the allocator functions, but then I gave up: there are assertions that the allocated quantities are multiple of 8, I don't want to break assumptions made somewhere else, and this doesn't seem important enough.
Comment 26•14 years ago
|
||
(In reply to William Maddox from comment #21)
> The following usage is questionable:
> const uint32_t* up = reinterpret_cast<const uint32_t*>(&a);
>
> The compiler may assume that *up does not alias with an object declared as a
> type other than uint32_t. It would be preferable to coerce via a union, as
> done elsewhere.
FWIW: There are three things about the state of things that make me make the opposite recommendation (ie leave it alone):
- The union trick is known to cause GCC 4.2 to crash when compiling FR on Mac,
and this is still the primary compiler for us on that platform. Ergo,
more likely than not such a change may be reverted.
- I am not convinced that the union trick is actually sufficient to allow
strict aliasing to be enabled, the way it is frequently used throughout the
code, even if it were employed generally.
- AVM+ and FR do not currently work when compiled with strict aliasing enabled,
so making changes that benefit strict aliasing is premature optimization.
Updated•14 years ago
|
Attachment #569026 -
Flags: feedback?(edwsmith) → feedback+
Updated•14 years ago
|
Attachment #569027 -
Flags: feedback?(edwsmith) → feedback+
Updated•14 years ago
|
Priority: P2 → P3
Whiteboard: Tracking
Updated•14 years ago
|
Severity: normal → enhancement
Priority: P3 → --
Comment 27•14 years ago
|
||
changeset: 6801:66466286527d
user: Virgil Palanciuc <virgilp@adobe.com>
summary: imported patch bug-615871.nJIT_Assembler.diff
http://hg.mozilla.org/tamarin-redux/rev/66466286527d
Comment 28•14 years ago
|
||
changeset: 6802:58cdb54f2569
user: Virgil Palanciuc <virgilp@adobe.com>
summary: imported patch bug-615871.nJIT_others.diff
http://hg.mozilla.org/tamarin-redux/rev/58cdb54f2569
Comment 29•14 years ago
|
||
changeset: 6803:b3de6aae82ac
user: Virgil Palanciuc <virgilp@adobe.com>
summary: imported patch bug-615871.nJIT_i386.diff
http://hg.mozilla.org/tamarin-redux/rev/b3de6aae82ac
Comment 30•14 years ago
|
||
changeset: 6804:8eec33b1b726
user: Virgil Palanciuc <virgilp@adobe.com>
summary: imported patch bug-615871.nJIT_x64.diff
http://hg.mozilla.org/tamarin-redux/rev/8eec33b1b726
Comment 31•14 years ago
|
||
changeset: 6805:63d0b1dccccf
user: Virgil Palanciuc <virgilp@adobe.com>
summary: imported patch bug-615871.nJIT_ARM.diff
http://hg.mozilla.org/tamarin-redux/rev/63d0b1dccccf
Comment 32•10 years ago
|
||
Pretty sure this can be closed now.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•