mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-28 16:11:29 +00:00
Add prototypes for ADCE pass
llvm-svn: 115
This commit is contained in:
parent
b0810f37d3
commit
9dd7120a2a
@ -8,10 +8,8 @@
|
||||
#ifndef LLVM_OPT_DCE_H
|
||||
#define LLVM_OPT_DCE_H
|
||||
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Method.h"
|
||||
class Module;
|
||||
class SymTabValue;
|
||||
class BasicBlock;
|
||||
|
||||
namespace opt {
|
||||
|
||||
@ -19,6 +17,14 @@ bool DoDeadCodeElimination(Method *M); // DCE a method
|
||||
bool DoRemoveUnusedConstants(SymTabValue *S); // RUC a method or module
|
||||
bool DoDeadCodeElimination(Module *C); // DCE & RUC a whole module
|
||||
|
||||
|
||||
// DoADCE - Execute the Agressive Dead Code Elimination Algorithm
|
||||
//
|
||||
bool DoADCE(Method *M); // Defined in ADCE.cpp
|
||||
static inline bool DoADCE(Module *M) {
|
||||
return M->reduceApply(DoADCE);
|
||||
}
|
||||
|
||||
// SimplifyCFG - This function is used to do simplification of a CFG. For
|
||||
// example, it adjusts branches to branches to eliminate the extra hop, it
|
||||
// eliminates unreachable basic blocks, and does other "peephole" optimization
|
||||
|
Loading…
Reference in New Issue
Block a user