[PATCH] [stack protector] Improved data layout rules, WIP, part 3

Josh Magee Joshua_Magee at playstation.sony.com
Wed Dec 11 12:35:59 PST 2013


  > I'm assuming that you mean the layout won't be the same as it was before your change? I just want  to make sure that, once your changes go in, the output will be deterministic. :-)

  Yes - the point was the layout will not be identical to before my change.  Specifically, after my change it will place structures with large arrays near the protector where as before my change it would not.

  Once my change goes in, the layout will be deterministic.

  My wording ("in some cases") was rather ambiguous - sorry about that :-)


================
Comment at: include/llvm/CodeGen/StackProtector.h:23
@@ -22,2 +22,3 @@
 #include "llvm/ADT/ValueMap.h"
+#include "llvm/Analysis/Dominators.h"
 #include "llvm/Pass.h"
----------------
Bill Wendling wrote:
> Is this #include necessary in the .h file? I don't see other changes in here where the forward declaration doesn't work.
It is needed for the use of DominatorTree as a template type:

  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
    AU.addPreserved<DominatorTree>();
  }

I didn't catch this until I included StackProtector.h from passes that did not include Dominators.h.



http://llvm-reviews.chandlerc.com/D2158



More information about the llvm-commits mailing list