Closed Bug 443884 Opened 14 years ago Closed 8 years ago

Demote fcmp involving constants and also fadd/fsub/fmul.

Categories

(Core Graveyard :: Nanojit, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: gal, Unassigned)

Details

(Whiteboard: PACMAN, has-patch)

Attachments

(1 file)

The current FuncFilter knows how to demote integers in demote(), but isPromote() never signals that constant operands are promoted, so fcmp does not get demoted if either operand is a constant (LIR_quad). Adding isconstq() in isPromote fixes this issue.

Also, I think it makes sense to demote add/sub/mul since we have LIR_ov now. They should overflow so rarely that we can just ignore the side exit there. I don't see any correctness issues with this but correct me if I am wrong. 

Together these two changes bought me some mean performance upgrades in tight loops. Your mileage may vary.

The patch is against tracemonkey. We should really share this code before we diverge too much.
I guess one also should check that the quad constant falls into the integer domain.
Demoting fmul doesn't work well for at least one sunspider benchmark.
Component: Tracing Virtual Machine → JIT Compiler (NanoJIT)
QA Contact: tracing-vm → nanojit
status?
Severity: normal → enhancement
Target Milestone: --- → Future
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Whiteboard: PACMAN, has-patch
Product: Core → Core Graveyard
Nanojit has been dead for several years. Its Bugzilla component has been moved to the graveyard (bug 984276).

I checked all the open bugs. They're all uninteresting, so I'm WONTFIXing them all. Apologies for the bugspam.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.