mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-26 06:22:56 +02:00
ffe8f6e43b
llvm-svn: 901
23 lines
749 B
C++
23 lines
749 B
C++
//===- 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/Pass.h"
|
|
|
|
struct HoistPHIConstants : public Pass {
|
|
// doHoistPHIConstants - Hoist constants out of PHI instructions
|
|
//
|
|
static bool doHoistPHIConstants(Method *M);
|
|
|
|
virtual bool doPerMethodWork(Method *M) { return doHoistPHIConstants(M); }
|
|
};
|
|
|
|
#endif
|