Datalayout optimization and load reordering

Hello everyone
I’m new to the LLVM and having a hard time getting to work with it.
I want to optimize the data layout and load reordering for consecutivity reasons.
I believe that I need to do that through the backend AST. Is it true? In that case, how can I do that?
Any other suggestions would be appreciated as well.

Thank you all in advance