This is an archive of the discontinued LLVM Phabricator instance.

Add alignment value to allowsUnalignedMemoryAccess
ClosedPublic

Authored by arsenm on Jul 26 2014, 2:24 PM.

Details

Reviewers
arsenm
Summary

Rename to allowsMisalignedMemoryAccess.

On R600, 8 and 16 byte accesses are mostly OK with 4-byte alignment,
and don't need to be split into multiple accesses. Vector loads with
an alignment of the element type are not uncommon in OpenCL code.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 11917.Jul 26 2014, 2:24 PM
arsenm retitled this revision from to Add alignment value to allowsUnalignedMemoryAccess .
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added a subscriber: Unknown Object (MLST).

I like the idea of adding the alignment as a function parameter, but I don't understand why you want to rename the function: Unaligned is generally the terminology I use for loads not naturally aligned.

arsenm accepted this revision.Jul 27 2014, 10:56 AM
arsenm added a reviewer: arsenm.

r214055

This revision is now accepted and ready to land.Jul 27 2014, 10:56 AM
arsenm closed this revision.Jul 27 2014, 10:56 AM
jroelofs added inline comments.
include/llvm/Target/TargetLowering.h
780

"in the third argument by reference"

This comment needs a little attention... the type of the parameter is 'bool*' and not 'bool&'. Can you fix the comment while you're here? Something like "in the fourth argument, if provided and non-null".

Also, I'm with Hal on this one. 'Unaligned' is the terminology normally used for this sort of thing. Why are you renaming this?