Avoidance of unaligned loads is overly conservative
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
.
Trac metadata
Trac field | Value |
---|---|
Version | 6.6 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |