[PATCH] D37582: CodeGen: Remove pipeline dependencies on StackProtector; NFC

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 15:17:26 PST 2018


MatzeB added inline comments.


================
Comment at: include/llvm/CodeGen/StackProtector.h:53
   /// A mapping of AllocaInsts to their required SSP layout.
-  using SSPLayoutMap = ValueMap<const AllocaInst *, SSPLayoutKind>;
+  using SSPLayoutMap = DenseMap<const AllocaInst *, SSPLayoutKind>;
 
----------------
rinon wrote:
> MatzeB wrote:
> > Maybe split this into a separate commit before pushing.
> I believe this needs to stay atomic with the rest of the changeset to avoid a bug between the changes. StackColoring used to call `adjustForColoring()` which would cause the StackProtector pass to update its mapping in the SSPLayoutMap before StackColoring RAUWed the old Alloca with a BitCast. This update is now done in the MFI without changing the StackProtector mapping. Without the change to this data type, the RAUW breaks the SSPLayoutMap since it can no longer refer to the replaced Alloca.
Makes sense.


Repository:
  rL LLVM

https://reviews.llvm.org/D37582





More information about the llvm-commits mailing list