kstoimenov added a comment.

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.

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.



================
Comment at: llvm/lib/Target/X86/X86MCInstLower.cpp:1334
+
+  unsigned Reg = MI.getOperand(0).getReg().id();
+  uint64_t ShadowBase = MI.getOperand(1).getImm();
----------------
vitalybuka wrote:
> Why this called reg when it's address?
Because it is the id of the register which is used to pass the address. For 
example for X86::RDI it will be 53. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107850

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to