[GHC] #1016: Avoidance of unaligned loads is overly conservative
GHC
trac at galois.com
Mon Nov 20 11:08:12 EST 2006
#1016: Avoidance of unaligned loads is overly conservative
-------------------------+--------------------------------------------------
Reporter: igloo | Owner:
Type: task | Status: new
Priority: normal | Milestone: 6.8
Component: Compiler | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase: N/A
Architecture: Unknown | Os: Unknown
-------------------------+--------------------------------------------------
On alpha, mips, mipsel and arm we do loads in a way that is safe even if
they are unaligned (see `cLoad` in `compiler/cmm/PprC.hs`). We need this
when, for example, we read things with `indexInt16OffAddr#` from `Addr#`s
in alex-generated lexers, but most of the time we know that the address is
aligned appropriately so loads are slower than they need be.
A better way to do this would be to make Load a `MachOp` parameterised by
whether it's known to be aligned or not. Likewise, Store should be a
`CallishMachOp`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1016>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list