[PATCH] parallel loop metadata


The reason for this was pointed out here:

That is, there might be optimizations that *should* invalidate the
parallel loop-assumption as they convert the loop to a sequential
one (without a possibility for the programmer to interfere).
This is detected by additional non-annotated memory instructions.

The reg2mem is one such example and there might be others not yet known.
So, it's just an additional safety measure due to most of the passes
not being aware of the "parallel loop concept" (yet).

Yes, it's "fragile" in the sense that the parallelism information is
dropped too easily in some cases. E.g. inlining calls inside the loop
body will at the moment make the loop a non-parallel one if the inlined
function contains at least one (unannotated) memory instruction.

It should be safe to do it this way around: add support for
propagating/keeping the parallelism data to passes gradually instead
boldly assume all passes do the safe thing.

E.g. the inliner should eventually propagate the parallelism data to the
memory instructions of the function calls it inlines to the parallel loop
body. These features can be added later on in an incremental fashion.

I added cc to llvmdev as this might be worth wider attention.