HomePhabricator

[Attributor] Function signature rewrite infrastructure

Authored by jdoerfert on Oct 9 2019, 11:39 PM.

Description

[Attributor] Function signature rewrite infrastructure

As part of the Attributor manifest we want to change the signature of
functions. This patch introduces a fairly generic interface to do so.
As a first, very simple, use case, we remove unused arguments. A second
use case, pointer privatization, will be committed with this patch as
well.

A lot of the code and ideas are taken from argument promotion and we
run all argument promotion tests through this framework as well.

Reviewed By: uenoku

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