[PATCH] D21424: StackColoring for SafeStack.
Aditya Kumar via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 19 22:31:05 PDT 2016
hiraditya added a subscriber: hiraditya.
================
Comment at: lib/CodeGen/SafeStack.cpp:531
@@ +530,3 @@
+ unsigned Align = std::max((unsigned)DL->getPrefTypeAlignment(Ty),
+ StackGuardSlot->getAlignment());
+ SSL.addObject(StackGuardSlot, getStaticAllocaAllocationSize(StackGuardSlot),
----------------
DataLayout::getPrefTypeAlignment already returns unsigned.
================
Comment at: lib/CodeGen/SafeStackColoring.h:61
@@ +60,3 @@
+ DenseMap<Instruction *, unsigned> InstructionNumbering;
+ DenseMap<BasicBlock *, std::pair<unsigned, unsigned>> BlockInstRange;
+
----------------
It seems you can use DenseMap<const BasicBlock *, std::pair<unsigned, unsigned>>. Also it will be good if you could add some comments about what the numbers in 'std::pair<unsigned, unsigned>' represent; similar to what you have in line 77-78
Repository:
rL LLVM
http://reviews.llvm.org/D21424
More information about the llvm-commits
mailing list