[llvm-commits] New function attr: ExecuteBarrier to prevent llvm from duplicating barriers

Villmow, Micah Micah.Villmow at amd.com
Mon Feb 13 07:37:54 PST 2012


Nadav,
One thing that we have noticed when we hit this issue, is sometimes it is safe to duplicate barriers. I am trying to figure out all the locations where we made modifications to LLVM to disable barrier duplication, but I know that loop unrolling was not one of those passes. Maybe the documentation for it can include more information about why barriers cannot be duplicated and when it is safe to do so.

Micah

From: Rotem, Nadav [mailto:nadav.rotem at intel.com]
Sent: Sunday, February 12, 2012 1:11 PM
To: llvm-commits at cs.uiuc.edu
Cc: Eli Friedman (eli.friedman at gmail.com); Villmow, Micah
Subject: New function attr: ExecuteBarrier to prevent llvm from duplicating barriers

Hi,

Last year we talked about the problem of LLVM duplicating function calls that are considered 'barrier' in data-parallel languages, such as OpenCL.  I implemented Eli's proposal[1] to add a new function attribute (executebarrier) which prevents the duplication of barriers in a number of LLVM optimizations.  I still need to handle the loop unswitch pass and review a few other passes.

Please review the attached patch.

Thanks,
Nadav

[1] - http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-October/026344.html

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120213/c93353ec/attachment.html>


More information about the llvm-commits mailing list