[llvm] [GVN] Permit load PRE to happen in more cases (PR #79324)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 10:30:07 PST 2024


================
@@ -1324,15 +1390,11 @@ void GVNPass::AnalyzeLoadAvailability(LoadInst *Load, LoadDepVect &Deps,
       continue;
     }
 
-    if (!DepInfo.isLocal()) {
-      UnavailableBlocks.push_back(DepBB);
-      continue;
-    }
----------------
paulwalker-arm wrote:

How important is this?  Do you know how `!local` the case you care about is.  My knowledge is a little weak here but I ask because if this is known `isNonLocal` then that suggests you don't need to scan DepBB and can jump straight to the predecessors, which might reduce the amount of refactoring and thus make my earlier comments redundant.

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


More information about the llvm-commits mailing list