[PATCH] D87596: [Coroutines] Reuse storage for local variables with non-overlapping lifetimes

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 10:03:38 PDT 2020


lxfind added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Coroutines/CoroSplit.h:28-32
+  CoroSplitPass(PassBuilder::OptimizationLevel Level) {
+    /// If not both Speed level and Size level are zero,
+    /// the OptLevel should not be zero.
+    OptLevel = std::max(Level.getSpeedupLevel(), Level.getSizeLevel());
+  }
----------------
ChuanqiXu wrote:
> lxfind wrote:
> > This isn't needed anymore
> If CoroSplitPass don't accept PassBuilder::OptimizationLevel as a construct argument, we may need to transfer PassBuilder::OptimizationLevel to unsigned in `PassBuilder.cpp`.
Yes just call `getSpeedupLevel()` on `Level` when passing it. This optimization is independent to the size optimization flags, just speed.


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

https://reviews.llvm.org/D87596



More information about the llvm-commits mailing list