First patch is x86 specific for Uros, the rest is the updated generic middle end implementation.
Support automatic data tracing using the PTWRITE instruction on Intel CPUs. This is an updated version addressing (nearly) all the excellent review comments. It ended up being large scale changes in the pass, so the code is quite different now. It now instruments more cases and has many bug fixes. Still open issues (hopefully some can be addressed in later phases): - There are still (and even more now) redundant PTWRITEs. - The tracing only accepts int and long, but not short and char or bitfields. - The vartrace pass still requires a full SSA rebuild if it changes anything in a function. I tried to fix it, but was not successfull. - There are some holes in tracing globals/local reads for function arguments. - Copies and memsets are not traced. - The store tracing re-reads the target memory, so could suffer from data races. This is needed for now to get the debug information of the store right. Later this could be improved to use the input of the store instead, but would require some changes to var tracing. Passed boot strap and testing with PTWRITE enabled in the compiler and also some fuzz testing with csmith. Ok to apply now? -Andi