This change depends on a previous patch adding the noundef attribute to LLVM calls.
With this change, specifying the option -msan-eager-checks will cause MemorySanitizer to insert initialization checks for function arguments before calling them, and for return values before returning.
This change depends on the noundef keyword to determining cases where it it sound to check these shadows, and falls back to passing shadows values by TLS.
Checking at call boundaries enforces undefined behavior rules with passing uninitialized arguments by value. It also provides substantial improvements to the optimized instrumented code, decreasing binary size by up to 17% and runtime up to 25%.
... and return values ...