[AMDGPU] Move LDS lowering related utility functions to a separate utils file.

Move some utility functions which are used within LDS lowering pass to a separate utils
file so that other LDS related passes can make use of them when required.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D100526

GitOrigin-RevId: 82787eb2285dc03e7dbc635ddb2bc22f871d9b45
4 files changed