[PATCH] D108361: [InlineFunction] Extend addAliasScopeMetadata() for non inliner requirements.

Abinav Puthan Purayil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 04:26:43 PDT 2021


abinavpp added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1019
 
-  // Iterate over all new instructions in the map; for all memory-access
-  // instructions, add the alias scope metadata.
-  for (ValueToValueMapTy::iterator VMI = VMap.begin(), VMIE = VMap.end();
-       VMI != VMIE; ++VMI) {
-    if (const Instruction *I = dyn_cast<Instruction>(VMI->first)) {
-      if (!VMI->second)
-        continue;
-
-      Instruction *NI = dyn_cast<Instruction>(VMI->second);
-      if (!NI || InlinedFunctionInfo.isSimplified(I, NI))
-        continue;
-
+  {
+    auto addAliasMD = [&](const Instruction *I, Instruction *NI) -> void {
----------------
This is just to maintain the original indentation of the snippet in the loop that we've converted to a lambda expression. Removing this can introduce unrelated changes in the diff which might make the review more difficult.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108361/new/

https://reviews.llvm.org/D108361



More information about the llvm-commits mailing list