harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: FW: [general][performance] Stefan Krause's Harmony performance evaluation
Date Fri, 04 Jul 2008 10:04:58 GMT
2008/7/4 xiaoming gu <xiaoming.gu@gmail.com>:
> Hi, Aleksey. With a quick look I think the problem is in code
> generation/selection and there are two files in jitrino -
> Ia32CodeGenerator.cpp and Ia32CodeSelector.cpp. I'm planning to use the
> simple case you mentioned to do some tracing and hope to find the problem.
> Any comments?
Actually I see two ways:
 1. Patch InstCodeSelector::divOp (Ia32InstCodeSelector.cpp:850) to
handle division by 2^k immediates. Need the quotient: do "shl reg,
<value>", need the remainder: do "and reg, <mask>" (just came up with
this, you'll need to investigate it).
 2. Handle IDIV in peephole (Ia32Peephole.cpp), but there you should
test whether you use quotient or remainder.

I think (1) is easier.


View raw message