vitalybuka added inline comments.
================ Comment at: llvm/lib/Target/X86/X86MCInstLower.cpp:1369 + .addReg(X86::R8) + .addImm(MappingScale), + STI); ---------------- vitalybuka wrote: > I assumed the goal to move this shadow math into runtime code > so we have less instructions in the instrumented code. > > Also MappingScale and OrShadowOffset are constants. > It's a little bit not nice that ShadowBase can be dynamic, so each > __asan_check_ will have to load it, > but let's for now care about fixed shadow which is constant. > My mistake, runtime has nothing to do with that, we have implementation of callbacks here in object file. Still those parameters are not needed to be exposed to IR layers. They must be the same for AddressSanitizer.cpp and here. So please just expose some functions e.g. in llvm/Transforms/Instrumentation/AddressSanitizerCommon.h and use them here and there to calculate these values. 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