Hi,

I noticed in the generated code (llvm as well as native) that in some cases
the GC calls are in the straight path and the regular code is out of the
straight line path. Like this:

=> 0x408fc0:  lea    0x30(%r12),%rax
=> 0x408fc5:  cmp    0x358(%r13),%rax
=> 0x408fcc:  jbe    0x408fe9                   # notice jbe instead of ja
i.e. branch taken in normal case

I tried to count in how many cases its happening in my executable and found
that its only a small percentage (4-6%) of cases but those cases include
the code which runs 99% of the time in my benchmark. Though it does not
make a whole lot of difference but the difference is perceptible and
especially when it is in a tight loop.

Is it possible to somehow force all the GC calls out of the line during
code generation? Has it been thought/discussed before?

-harendra
_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to