[MLIR][LLVM] Realign allocas to avoid dynamic realignment in inliner.
When the natural stack alignment is not set or 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. The code to check existing alignment is reorganized a bit to avoid redundant casts. 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. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D148557
Loading
Please sign in to comment