This is an archive of the discontinued LLVM Phabricator instance.

Add #pragma clang loop ivdep
Needs ReviewPublic

Authored by YashasAndaluri on Oct 24 2019, 9:26 AM.

Details

Summary

This patch adds a ivdep pragma to indicate to the vectorizer using the llvm.loop.vectorize.ivdep.enable metadata that dependencies of Unknown type can be considered to be safe for vectorization. This pragma will also imply vectorize(enable). This patch is used by D70634
Usage:

#pragma clang loop ivdep(enable)

Diff Detail

Event Timeline

YashasAndaluri created this revision.Oct 24 2019, 9:26 AM
YashasAndaluri created this object with edit policy "Administrators".
YashasAndaluri edited the summary of this revision. (Show Details)Oct 24 2019, 9:27 AM
YashasAndaluri edited the summary of this revision. (Show Details)
YashasAndaluri edited the summary of this revision. (Show Details)Oct 24 2019, 9:29 AM
YashasAndaluri edited the summary of this revision. (Show Details)
YashasAndaluri edited the summary of this revision. (Show Details)Oct 24 2019, 9:32 AM

Updated the diff to show context

"#pragma ivdep" should work too (compatibiluty mode with intel, gcc).

This is the same as #pragma clang loop vectorize(assume_safety)?

"#pragma ivdep" should work too (compatibiluty mode with intel, gcc).

The semantics are not the same, unfortunately.

YashasAndaluri edited the summary of this revision. (Show Details)
YashasAndaluri changed the edit policy from "Administrators" to "All Users".

Removed disable argument for ivdep

YashasAndaluri edited the summary of this revision. (Show Details)

Added IvdepEnable loop attribute and llvm.loop.vectorize.ivdep.enable metadata.