[PATCH] D134139: Introduce -enable-global-analyses to allow users to disable inter-procedural analyses

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 04:00:49 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd953d0173776: Introduce -enable-global-analyses to allow users to disable inter-procedural… (authored by nlopes).

Changed prior to commit:
  https://reviews.llvm.org/D134139?vs=461079&id=461180#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134139

Files:
  llvm/lib/Passes/PassBuilderPipelines.cpp


Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -186,6 +186,10 @@
     "enable-post-pgo-loop-rotation", cl::init(true), cl::Hidden,
     cl::desc("Run the loop rotation transformation after PGO instrumentation"));
 
+static cl::opt<bool> EnableGlobalAnalyses(
+    "enable-global-analyses", cl::init(true), cl::Hidden,
+    cl::desc("Enable inter-procedural analyses"));
+
 PipelineTuningOptions::PipelineTuningOptions() {
   LoopInterleaving = true;
   LoopVectorization = true;
@@ -1898,7 +1902,8 @@
   // Because the `AAManager` is a function analysis and `GlobalsAA` is a module
   // analysis, all that the `AAManager` can do is query for any *cached*
   // results from `GlobalsAA` through a readonly proxy.
-  AA.registerModuleAnalysis<GlobalsAA>();
+  if (EnableGlobalAnalyses)
+    AA.registerModuleAnalysis<GlobalsAA>();
 
   // Add target-specific alias analyses.
   if (TM)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134139.461180.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220919/938dbb6e/attachment.bin>


More information about the llvm-commits mailing list