STATISTIC(NumDupBBs, "Number of duplicated blocks");
namespace {
- class IfConverter : public MachineFunctionPass {
+ class VISIBILITY_HIDDEN IfConverter : public MachineFunctionPass {
enum IfcvtKind {
ICNotClassfied, // BB data valid, but not classified.
ICSimpleFalse, // Same as ICSimple, but on the false path.
IfConverter() : MachineFunctionPass((intptr_t)&ID) {}
virtual bool runOnMachineFunction(MachineFunction &MF);
- virtual const char *getPassName() const { return "If converter"; }
+ virtual const char *getPassName() const { return "If Converter"; }
private:
bool ReverseBranchCondition(BBInfo &BBI);
char IfConverter::ID = 0;
}
+static RegisterPass<IfConverter>
+X("if-converter", "If Converter");
+
FunctionPass *llvm::createIfConverterPass() { return new IfConverter(); }
bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
: BBI.TrueBB->getNumber()) << ") ";
RetVal = IfConvertSimple(BBI, Kind);
DOUT << (RetVal ? "succeeded!" : "failed!") << "\n";
- if (RetVal)
+ if (RetVal) {
if (isFalse) NumSimpleFalse++;
else NumSimple++;
+ }
break;
}
case ICTriangle: