mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
Expose the low level DCE mechanism to external users
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
35d64564c8
commit
fd0375bf86
@ -9,6 +9,7 @@
|
||||
#define LLVM_OPT_DCE_H
|
||||
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
|
||||
namespace opt {
|
||||
|
||||
@ -17,6 +18,14 @@ struct DeadCodeElimination : public Pass {
|
||||
//
|
||||
static bool doDCE(Method *M);
|
||||
|
||||
// dceInstruction - Inspect the instruction at *BBI and figure out if it's
|
||||
// [trivially] dead. If so, remove the instruction and update the iterator
|
||||
// to point to the instruction that immediately succeeded the original
|
||||
// instruction.
|
||||
//
|
||||
static bool dceInstruction(BasicBlock::InstListType &BBIL,
|
||||
BasicBlock::iterator &BBI);
|
||||
|
||||
// Remove unused global values - This removes unused global values of no
|
||||
// possible value. This currently includes unused method prototypes and
|
||||
// unitialized global variables.
|
||||
|
Loading…
Reference in New Issue
Block a user