/// predecessors.
void DeleteDeadBlock(BasicBlock *BB);
-
/// FoldSingleEntryPHINodes - We know that BB has one predecessor. If there are
/// any single-entry PHI nodes in it, fold them away. This handles the case
/// when all entries to the PHI nodes in a block are guaranteed equal, such as
bool Unreachable,
MDNode *BranchWeights = nullptr);
-
/// SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen,
/// but also creates the ElseBlock.
/// Before:
virtual void replaceCall(Value *With) = 0;
virtual bool isFoldable(unsigned SizeCIOp, unsigned SizeArgOp,
bool isString) const = 0;
+
public:
virtual ~SimplifyFortifiedLibCalls();
bool fold(CallInst *CI, const DataLayout *TD, const TargetLibraryInfo *TLI);
ClonedCodeInfo() : ContainsCalls(false), ContainsDynamicAllocas(false) {}
};
-
/// CloneBasicBlock - Return a copy of the specified basic block, but without
/// embedding the block into a particular function. The block returned is an
/// exact copy of the specified basic block, without any remapping having been
const DataLayout *DL = nullptr,
Instruction *TheCall = nullptr);
-
/// InlineFunctionInfo - This class captures the data input to the
/// InlineFunction call, and records the auxiliary results produced by it.
class InlineFunctionInfo {
BasicBlock *newHeader,
ValueSet &inputs,
ValueSet &outputs);
-
};
}
bool RecursivelyDeleteDeadPHINode(PHINode *PN,
const TargetLibraryInfo *TLI = nullptr);
-
/// SimplifyInstructionsInBlock - Scan the specified basic block and try to
/// simplify any instructions in it and recursively delete dead instructions.
///
void RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
DataLayout *TD = nullptr);
-
/// MergeBasicBlockIntoOnlyPred - BB is a block with one predecessor and its
/// predecessor is known to have one successor (BB!). Eliminate the edge
/// between them, moving the instructions in the predecessor into BB. This
///
void MergeBasicBlockIntoOnlyPred(BasicBlock *BB, Pass *P = nullptr);
-
/// TryToSimplifyUncondBranchFromEmptyBlock - BB is known to contain an
/// unconditional branch, and contains no instructions other than PHI nodes,
/// potential debug intrinsics and the branch. If possible, eliminate BB by
/// Returns true if any modifications are made to the loop.
bool formLCSSARecursively(Loop &L, DominatorTree &DT,
ScalarEvolution *SE = nullptr);
-
}
#endif
class LoadAndStorePromoter {
protected:
SSAUpdater &SSA;
+
public:
LoadAndStorePromoter(const SmallVectorImpl<Instruction*> &Insts,
SSAUpdater &S, StringRef Name = StringRef());
/// removed from the code.
void run(const SmallVectorImpl<Instruction*> &Insts) const;
-
/// \brief Return true if the specified instruction is in the Inst list.
///
/// The Insts list is the one passed into the constructor. Clients should
bool ShouldSplitOverflowIntrinsics;
virtual void anchor();
+
public:
IVVisitor(): DT(nullptr), ShouldSplitOverflowIntrinsics(false) {}
virtual ~IVVisitor() {}
/// Impl - A pointer to the actual implementation of the library call
/// simplifier.
LibCallSimplifierImpl *Impl;
+
public:
LibCallSimplifier(const DataLayout *TD, const TargetLibraryInfo *TLI,
bool UnsafeFPShrink);
struct UnifyFunctionExitNodes : public FunctionPass {
BasicBlock *ReturnBlock, *UnwindBlock, *UnreachableBlock;
+
public:
static char ID; // Pass identification, replacement for typeid
UnifyFunctionExitNodes() : FunctionPass(ID),
bool UnrollRuntimeLoopProlog(Loop *L, unsigned Count, LoopInfo *LI,
LPPassManager* LPM);
-
}
#endif
Materializer));
}
-
} // End llvm namespace
#endif
}
}
-
static Intrinsic::ID checkUnaryFloatSignature(const CallInst &I,
Intrinsic::ID ValidIntrinsicID) {
if (I.getNumArgOperands() != 1 ||
return Intrinsic::not_intrinsic;
}
-
} // llvm namespace
#endif