2001-10-15 17:31:51 +00:00
|
|
|
//===- llvm/Transforms/HoistPHIConstants.h - Normalize PHI nodes -*- C++ -*--=//
|
|
|
|
//
|
|
|
|
// HoistPHIConstants - Remove literal constants that are arguments of PHI nodes
|
|
|
|
// by inserting cast instructions in the preceeding basic blocks, and changing
|
|
|
|
// constant references into references of the casted value.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TRANSFORMS_HOISTPHICONSTANTS_H
|
|
|
|
#define LLVM_TRANSFORMS_HOISTPHICONSTANTS_H
|
|
|
|
|
|
|
|
#include "llvm/Transforms/Pass.h"
|
|
|
|
|
2001-10-18 05:22:15 +00:00
|
|
|
struct HoistPHIConstants : public Pass {
|
|
|
|
static bool doHoistPHIConstants(Method *M);
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool doPerMethodWork(Method *M) { return doHoistPHIConstants(M); }
|
2001-10-15 17:31:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|