[Mlir-commits] [mlir] [MLIR][Transforms] Update block arg locations during inlining (PR #106064)

Christian Ulmann llvmlistbot at llvm.org
Mon Aug 26 05:33:46 PDT 2024


================
@@ -25,22 +25,36 @@
 
 using namespace mlir;
 
-/// Remap locations from the inlined blocks with CallSiteLoc locations with the
-/// provided caller location.
+/// Remap all locations from the inlined blocks with CallSiteLoc locations with
+/// the provided caller location.
 static void
 remapInlinedLocations(iterator_range<Region::iterator> inlinedBlocks,
                       Location callerLoc) {
   DenseMap<Location, Location> mappedLocations;
-  auto remapOpLoc = [&](Operation *op) {
-    auto it = mappedLocations.find(op->getLoc());
+  auto remapLoc = [&](Location loc) {
+    auto it = mappedLocations.find(loc);
----------------
Dinistro wrote:

Not really. This cache only avoids querying the attribute uniquer, which doesn't work once we actually need to create the CallSiteLoc. 

https://github.com/llvm/llvm-project/pull/106064


More information about the Mlir-commits mailing list