/// value will trap if the value is dynamically null. PHIs keeps track of any
/// phi nodes we've seen to avoid reprocessing them.
static bool AllUsesOfValueWillTrapIfNull(const Value *V,
- SmallPtrSetImpl<const PHINode*> &PHIs) {
+ SmallPtrSet<const PHINode*, 8> &PHIs) {
for (const User *U : V->users())
if (isa<LoadInst>(U)) {
// Will trap.
/// it is to the specified global.
static bool ValueIsOnlyUsedLocallyOrStoredToOneGlobal(const Instruction *V,
const GlobalVariable *GV,
- SmallPtrSetImpl<const PHINode*> &PHIs) {
+ SmallPtrSet<const PHINode*, 8> &PHIs) {
for (const User *U : V->users()) {
const Instruction *Inst = cast<Instruction>(U);
/// of a load) are simple enough to perform heap SRA on. This permits GEP's
/// that index through the array and struct field, icmps of null, and PHIs.
static bool LoadUsesSimpleEnoughForHeapSRA(const Value *V,
- SmallPtrSetImpl<const PHINode*> &LoadUsingPHIs,
- SmallPtrSetImpl<const PHINode*> &LoadUsingPHIsPerLoad) {
+ SmallPtrSet<const PHINode*, 32> &LoadUsingPHIs,
+ SmallPtrSet<const PHINode*, 32> &LoadUsingPHIsPerLoad) {
// We permit two users of the load: setcc comparing against the null
// pointer, and a getelementptr of a specific form.
for (const User *U : V->users()) {
static inline bool
isSimpleEnoughValueToCommit(Constant *C,
- SmallPtrSetImpl<Constant*> &SimpleConstants,
+ SmallPtrSet<Constant*, 8> &SimpleConstants,
const DataLayout *DL);
/// in SimpleConstants to avoid having to rescan the same constants all the
/// time.
static bool isSimpleEnoughValueToCommitHelper(Constant *C,
- SmallPtrSetImpl<Constant*> &SimpleConstants,
+ SmallPtrSet<Constant*, 8> &SimpleConstants,
const DataLayout *DL) {
// Simple global addresses are supported, do not allow dllimport or
// thread-local globals.
static inline bool
isSimpleEnoughValueToCommit(Constant *C,
- SmallPtrSetImpl<Constant*> &SimpleConstants,
+ SmallPtrSet<Constant*, 8> &SimpleConstants,
const DataLayout *DL) {
// If we already checked this constant, we win.
if (!SimpleConstants.insert(C)) return true;
return MutatedMemory;
}
- const SmallPtrSetImpl<GlobalVariable*> &getInvariants() const {
+ const SmallPtrSet<GlobalVariable*, 8> &getInvariants() const {
return Invariants;
}
}
static void setUsedInitializer(GlobalVariable &V,
- SmallPtrSetImpl<GlobalValue *> Init) {
+ SmallPtrSet<GlobalValue *, 8> Init) {
if (Init.empty()) {
V.eraseFromParent();
return;