]> granicus.if.org Git - llvm/commit
[Bugpoint redesign] Added Pass to Remove Global Variables
authorDiego Trevino Ferrer <diegof30@gmail.com>
Wed, 14 Aug 2019 21:01:19 +0000 (21:01 +0000)
committerDiego Trevino Ferrer <diegof30@gmail.com>
Wed, 14 Aug 2019 21:01:19 +0000 (21:01 +0000)
commitdbc62cefba151b78de3779348509c27581c58d72
tree57159e52ddf2ed9fabd56d0b7a2e1e2b9f01e67c
parent62927b4e5f755d20b55c63aa92470b79089e0b47
[Bugpoint redesign] Added Pass to Remove Global Variables

Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368918 91177308-0d34-0410-b5e6-96231b3b80d8
test/Reduce/Inputs/remove-global-vars.py [new file with mode: 0755]
test/Reduce/remove-funcs.ll
test/Reduce/remove-global-vars.ll [new file with mode: 0644]
tools/llvm-reduce/CMakeLists.txt
tools/llvm-reduce/DeltaManager.h
tools/llvm-reduce/deltas/ReduceGlobalVars.cpp [new file with mode: 0644]
tools/llvm-reduce/deltas/ReduceGlobalVars.h [new file with mode: 0644]