[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 21 11:14:20 PDT 2019


aprantl added inline comments.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4468
 }
 
+static void analyzeParametersModification(
----------------
/// Analyzes each function parameter to determine whether it is constant throughout the  function body.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4478
+      ExprMutationAnalyzer FuncAnalyzer(*FuncBody, Ctx);
+      if (!FuncAnalyzer.isMutated(Parm)) {
+        auto I = ParamCache.find(Parm);
----------------
```
if (FuncAnalyzer.isMutated(Parm))
  continue;
```


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4483
+          DIParm->setIsNotModified();
+        }
+      }
----------------
should the else be an assertion or are there legitimate failure cases?


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

https://reviews.llvm.org/D58035





More information about the cfe-commits mailing list