HomePhabricator

[AMDGPU] Add a pass to promote bitcast calls

Authored by scott.linder on Oct 26 2018, 6:18 AM.

Description

[AMDGPU] Add a pass to promote bitcast calls

AMDGPU currently only supports direct calls, but at lower optimisation levels it
fails to lower statically direct calls which appear indirect due to a bitcast.

Add a pass to visit all CallSites and use CallPromotionUtils to "devirtualize"
calls.

Differential Revision: https://reviews.llvm.org/D52741

llvm-svn: 345382