[LLVMdev] [cfe-dev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)
clattner at apple.com
Tue Oct 2 22:17:44 PDT 2012
On Oct 2, 2012, at 11:42 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> As I've stated, whether the metadata is preserved is not really the
> relevant metric. It is fine for a pass that does not understand
> parallelization metadata to drop it. The important part is that dropping
> the metadata, and moving instructions to which that metadata is
> attached, must not cause miscompiles. For example:
> - Instructions with unknown side effects or dependencies must not be
> moved from outside a parallel region to inside a parallel region.
> - Serialized subregions inside of parallel regions cannot be deleted
> without deleting the enclosing parallel region.
> The outstanding proposals have ways of dealing with these things. In
> the case of my proposal, it is though cross-referencing the metadata
> sufficiently and using function boundaries to prevent unwanted code
I haven't looked at your proposal, but I completely agree in principle that using procedure boundaries is a good way to handle this.
> In Intel's case, it is by using the barriers implied by the
> intrinsics calls.
That's just it - intrinsics using metadata don't imply barriers that would restrict code motion.
More information about the llvm-dev