[PATCH] D103100: [AIX] Enable stackprotect feature

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 22:11:02 PDT 2021


shchenz added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:16424
+Value *PPCTargetLowering::getSDagStackGuard(const Module &M) const {
+  if (Subtarget.isAIXABI())
+    return M.getGlobalVariable(AIXSSPCanaryWordName);
----------------
Is it better to add an assertion here to indicate that the return value will never be nullptr?


================
Comment at: llvm/test/CodeGen/PowerPC/stack-guard-oob.ll:2
 ; RUN: llc -mtriple=powerpc64le -O0 < %s | FileCheck %s
+; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -O0 < %s | FileCheck %s --check-prefix=AIX
 
----------------
Should we add the RUN line for 32-bit AIX? I think the enablement is also helpful for 32-bit.

Another nice to have is: should we add RUN line for the other file which is for stack protector on PowerPC on Linux? `llvm/test/CodeGen/PowerPC/stack-protector.ll`.

If we do this, we can know better about the difference between stack protectors on AIX and Linux?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103100



More information about the llvm-commits mailing list