[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
Mon Sep 14 20:20:26 PDT 2020


lxfind added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:484
+  ///
+  /// Side Effects: Because We use `DenseMap` to record the allocas, the order
+  /// of allocas in the frame may be different with the order in the source
----------------
ChuanqiXu wrote:
> lxfind wrote:
> > What is this referring to? Allocas in this function seems to be `SmallVector` type.
> We add the field for allocas in `addFieldForAllocas`, where the allocas are in `DenseMap`. I think it is more clear to move the comment to `addFieldForAllocas` function.
I see. In that case, my understanding is that the order of allocas in the frame may be different with the order in the source code not because we use DenseMap but because we sort using the size.


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

https://reviews.llvm.org/D87596



More information about the llvm-commits mailing list