__clear_cache / clear_cache.c


I suggest two small changes here.

  1. Mark it however required to avoid inlining, i.e. for the x86/amd64 case.
    Control transfer is required. I realize it is likely anyway, you aren’t likely
    to “fall from” the caller into the code.

  2. #elif defined(_WIN32) && (defined(arm) || defined(aarch64))
    be changed to just:
    #elif defined(_WIN32)

since Win32 hypothetically/historically runs on more than just x86/amd64/arm/arm64, and
FlushInstructionCache has been and presumably will remain omnipresent.

  • Jay

Jay, is this an answer to a question? If so, it’s always best to leave the original question in the email for context.

Otherwise, is this a request for a fix/feature in compiler-rt?

If so, it is probably best to start with a PR on bugs.llvm.org if it’s a bug, a patch on reviews.llvm.org if you’re suggesting a change and/or an RFC on this list to explain your reasoning if you feel that this change may in some way be controversial or require input from the wider community.