[PATCH] D107850: [asan] Implemented custom calling convention similar to the one used by HWASan for X86.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 02:36:14 PDT 2021


vitalybuka added a comment.

In D107850#2952641 <https://reviews.llvm.org/D107850#2952641>, @kstoimenov wrote:

> I know it seems redundant to pass the constants with every function call, but otherwise the code generation code will have to take dependency on AddressSanitizerCommon.h, which I am not sure is ideal. I spent some time looking into it and > becomes quite messy. For example the tests now need a way to set the values for those variables. I think the main downside of this approach is the bloat in the IR code, but it is cleaner than exposing internal asan details.

Bloat in IR is bigger concert than include of AddressSanitizerCommon.h. And I don't see anything messy about that.
Similar AArch64/AArch64AsmPrinter.cpp does not hesitate to #include "llvm/Transforms/Instrumentation/HWAddressSanitizer.h"

> One other option I have looked into is to pass this info using the Module. For example using the addModuleFlag function, but again there is a problem of the tests. We could have a quick chat to discuss this if you want.

It will extend the language, we should try to avoid that if possible. So far all values directly calculated from target triple.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107850



More information about the llvm-commits mailing list