[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-27 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Sorry for cross post, but I guess some people might not follow closely in discourse (like me :P): Another proposal from me is using gp as platform register: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/371 Some advantage on taking gp as platform registe

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-27 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. I've flagged this proposed change on Discourse (more the fact we're looking to change it, rather than the precise register we end up with). Repository: rG LLVM Github Monorepo

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-23 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 507811. paulkirth added a comment. Restore check lines in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 Files: clang/lib/Driver/SanitizerArgs.cpp compil

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-23 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 507805. paulkirth added a comment. Remove unrelated changes, due to bad commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 Files: clang/lib/Driver/SanitizerA

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-23 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. ugh. I accidentally commited some temporary work here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 ___ cfe-commits mailing list c

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-23 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 507801. paulkirth added a comment. Address comments. - Remove `.` from warning message - use `;;` prefix in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 Fi

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:58 const auto *RVFI = MF.getInfo(); if (RVFI->useSaveRestoreLibCalls(MF)) { paulkirth wrote: > craig.topper wrote: > > paulkirth wrote: > > > craig.topper wrote: > > >

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-22 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. https://lists.riscv.org/g/sig-toolchains/message/548 has a proposal where X27 is one of the registers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 _

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-21 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. In principle I think this is good, but I see two considerations: 1. Sam was right that there's an ability to change the register after the fact, but 2.5 years have passed since then. We should make a good faith attempt to see if any downstream users are relying on the curre

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-21 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:62 -MF.getFunction(), -"Shadow Call Stack cannot be combined with Save/Restore LibCalls."}); return; ❤ Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-21 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 507048. paulkirth added a comment. Split out save/restore tests for SCS into its own file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 Files: clang/lib/Driver/

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added inline comments. Comment at: llvm/test/CodeGen/RISCV/shadowcallstack.ll:184 + +; RUN: llc -mtriple=riscv32 -mattr=+reserve-x27 < %s | FileCheck %s -check-prefix=RV32I +; RUN: llc -mtriple=riscv64 -mattr=+reserve-x27 < %s | FileCheck %s -check-prefix=RV64I --

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/test/CodeGen/RISCV/shadowcallstack.ll:184 + +; RUN: llc -mtriple=riscv32 -mattr=+reserve-x27 < %s | FileCheck %s -check-prefix=RV32I +; RUN: llc -mtriple=riscv64 -mattr=+reserve-x27 < %s | FileCheck %s -check-prefix=RV64I ---

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya accepted this revision. hiraditya added a comment. This revision is now accepted and ready to land. Thanks for putting the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 506790. paulkirth added a comment. Remove outdated diagnostics and add tests for SCS + save/restore. I'm not 100% on if this is the right approach for save/restore testing, so I'm hapy to back this bit out or add more cases. Repository: rG LLVM Github

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth marked an inline comment as done. paulkirth added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:58 const auto *RVFI = MF.getInfo(); if (RVFI->useSaveRestoreLibCalls(MF)) { craig.topper wrote: > paulkirth wrote: > > cr

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:58 const auto *RVFI = MF.getInfo(); if (RVFI->useSaveRestoreLibCalls(MF)) { paulkirth wrote: > craig.topper wrote: > > Can you add a FIXME here? Using x27 should

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth marked 2 inline comments as done. paulkirth added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:58 const auto *RVFI = MF.getInfo(); if (RVFI->useSaveRestoreLibCalls(MF)) { craig.topper wrote: > Can you add a FIXME her

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 506762. paulkirth added a comment. Fix comment and add `FIXME` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146463/new/ https://reviews.llvm.org/D146463 Files: clang/lib/Driver/SanitizerArgs.cpp compile

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:58 const auto *RVFI = MF.getInfo(); if (RVFI->useSaveRestoreLibCalls(MF)) { Can you add a FIXME here? Using x27 should hopefully remove this restriction ===

[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to S11

2023-03-20 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth created this revision. paulkirth added reviewers: asb, phosek, hiraditya, jrtc27, mcgrathr. Herald added subscribers: jobnoorman, luke, Enna1, VincentWu, abrachet, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, bruce