Files
clang-p2996/mlir/lib/Interfaces/DataLayoutInterfaces.cpp
Johannes de Fine Licht 11ee125cc1 [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
2023-04-19 18:39:54 +00:00

23 KiB