This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add an OpenMP pass for redundant runtime library call removal
Needs ReviewPublic

Authored by lildmh on Jan 18 2017, 1:26 PM.

Details

Summary

This patch implements redundant OpenMP barrier & flush calls removal to optimize OpenMP performance. There are implicit barrier & flush calls in many places for OpenMP programs (e.g., at the end of a parallel region). Together with explicit calls written by programmers, it is possible to have redundant barrier & flush calls, which can adversely affect performance. Currently there is no mechanism in LLVM to eliminate these redundant calls. In this patch, we create a transformation pass to check all barrier and flush calls within a basic block and see if they are necessary. If not, they are removed from the program. We also plan to continue developing this code to handle more complex situations.

Diff Detail

Event Timeline

lildmh created this revision.Jan 18 2017, 1:26 PM
lildmh updated this revision to Diff 84886.Jan 18 2017, 2:03 PM

Add a full context diff