]> granicus.if.org Git - llvm/commit
[Bugpoint redesign] Added Pass to Remove Global Variables
authorDiego Trevino Ferrer <diegof30@gmail.com>
Wed, 7 Aug 2019 00:42:50 +0000 (00:42 +0000)
committerDiego Trevino Ferrer <diegof30@gmail.com>
Wed, 7 Aug 2019 00:42:50 +0000 (00:42 +0000)
commit2e1b796e06051a5f914e6ff98244596d09dfaaf8
treed7ad7648e6aa3696359024ac6d2de965b9d9fa4c
parent9fc0b127adbd6627aad56ba5f1e72d52b79949d7
[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@368115 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
test/Reduce/Inputs/remove-global-vars.sh [new file with mode: 0755]
test/Reduce/remove-global-vars.ll [new file with mode: 0644]
tools/llvm-reduce/CMakeLists.txt
tools/llvm-reduce/DeltaManager.h
tools/llvm-reduce/TestRunner.cpp
tools/llvm-reduce/TestRunner.h
tools/llvm-reduce/deltas/Delta.cpp [new file with mode: 0644]
tools/llvm-reduce/deltas/Delta.h
tools/llvm-reduce/deltas/RemoveFunctions.cpp
tools/llvm-reduce/deltas/RemoveFunctions.h
tools/llvm-reduce/deltas/RemoveGlobalVars.cpp [new file with mode: 0644]
tools/llvm-reduce/deltas/RemoveGlobalVars.h [new file with mode: 0644]
tools/llvm-reduce/llvm-reduce.cpp