[llvm] [PHIElimination] Handle subranges in LiveInterval updates (PR #69429)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 05:26:05 PDT 2023


================
@@ -136,6 +136,7 @@ INITIALIZE_PASS_END(PHIElimination, DEBUG_TYPE,
 
 void PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.addUsedIfAvailable<LiveVariables>();
+  AU.addUsedIfAvailable<LiveIntervals>();
----------------
jayfoad wrote:

Normally you would only add this if PHIElimination can do a better job when LiveIntervals is available. If you are just saying that PHIElimination is capable of updating LiveIntervals then you should not add this.

In this case it probably won't make any difference, but in the general case, not adding unnecessary "used if available" dependencies will allow the legacy pass manager to free unneeded analyses sooner, possibly saving some memory.

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


More information about the llvm-commits mailing list