[PATCH] D19141: [SSP, 2/2] Create llvm.stackguard() intrinsic and lower it to LOAD_STACK_GUARD

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 14:32:47 PDT 2016


echristo added a comment.

Can you add in the patch description explanations of the changes in stack size and code generation?

A few inline comments as well.

Thanks!

-eric


================
Comment at: lib/CodeGen/StackProtector.cpp:282-284
@@ +281,5 @@
+
+  /// Use SelectionDAG SSP handling, since there isn't an IR guard.
+  if (SupportsSelectionDAGSP)
+    *SupportsSelectionDAGSP = true;
+  TLI->insertSSPDeclarations(*M);
----------------
This looks weird, can you explain it?

================
Comment at: test/CodeGen/AArch64/stack-guard-remat-bitcast.ll:9
@@ -8,2 +8,3 @@
 ; CHECK: ldr  [[R1:x[0-9]+]], {{\[}}[[R0]], ___stack_chk_guard at GOTPAGEOFF{{\]}}
+; CHECK: adrp [[GUARD_PAGE:x[0-9]+]], ___stack_chk_guard at GOTPAGE
 ; CHECK: ldr  [[R2:x[0-9]+]], {{\[}}[[R1]]{{\]}}
----------------
This looks like what I'd expect, but can you explain why the test changed?

================
Comment at: test/CodeGen/X86/ssp-guard-spill.ll:3
@@ +2,3 @@
+target triple = "x86_64-apple-macosx10.4.0"
+
+; bool Bar(int*);
----------------
Add comments of what you're testing here.


http://reviews.llvm.org/D19141





More information about the llvm-commits mailing list