[llvm] [IPSCCP] Variable not visible at Og: (PR #66745)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 04:10:19 PDT 2023


================
@@ -371,6 +372,52 @@ static bool runIPSCCP(
       StoreInst *SI = cast<StoreInst>(GV->user_back());
       SI->eraseFromParent();
     }
+
+    // Try to create a debug constant expression for the glbal variable
+    // initializer value.
+    SmallVector<DIGlobalVariableExpression *, 1> GVEs;
+    GV->getDebugInfo(GVEs);
+    if (GVEs.size() == 1) {
----------------
CarlosAlbertoEnciso wrote:

Good point.

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


More information about the llvm-commits mailing list