When the natural stack alignment is set and is larger than or equal to
the target alignment required by a read-only byval argument defined by
an alloca, avoid the copy by just realigning the alloca to the target
alignment.
This also includes a bugfix for passing a null DataLayoutInterface to
the DataLayout constructor when no parent op defines
DataLayoutInterface, and will now pass ModuleOp instead in this case.
nit: maybe rename declared_func to use_ptr to make sure it is obvious we are not testing that declarations are not inlined here. Using a load may also be a good option to avoid DCE.