[all-commits] [llvm/llvm-project] dd28cc: [mlir][LLVM] Perform deep clone of alias scopes du...
Markus Böck via All-commits
all-commits at lists.llvm.org
Tue Jul 18 04:23:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd28cc707c49e90c3a10ac724f6f5f46a21031c3
https://github.com/llvm/llvm-project/commit/dd28cc707c49e90c3a10ac724f6f5f46a21031c3
Author: Markus Böck <markus.bock+llvm at nextsilicon.com>
Date: 2023-07-18 (Tue, 18 Jul 2023)
Changed paths:
M mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp
A mlir/test/Dialect/LLVMIR/inlining-alias-scopes.mlir
Log Message:
-----------
[mlir][LLVM] Perform deep clone of alias scopes during inlining
This is the first and most basic and important step for inlining memory operations with alias scopes.
For correctness, it is required that any alias scopes of inlined operations are replaced with deep copies. This is necessary as otherwise the same function could be inlined twice in one function, and suddenly the alias scopes extended.
A simple example would be `foo(a, b); foo(a2, b2)`. `a` and `a2` may alias. If `foo` is inlined in both instances, the store and load operations from `foo` may suddenly claim that `a` and `a2` do not alias if we were to keep the original alias scopes.
This is analogous to the following class/code in LLVM: https://github.com/llvm/llvm-project/blob/4eef2e30d6f89328a16d4f1d6b37f1c79afe850c/llvm/lib/Transforms/Utils/InlineFunction.cpp#L985
Differential Revision: https://reviews.llvm.org/D155479
More information about the All-commits
mailing list