Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ class SeedContainer {
unsigned size() const { return Bundles.size(); }

#ifndef NDEBUG
void print(raw_ostream &OS) const;
LLVM_DUMP_METHOD void dump() const;
#endif // NDEBUG
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,23 @@ template void SeedContainer::insert<LoadInst>(LoadInst *);
template void SeedContainer::insert<StoreInst>(StoreInst *);

#ifndef NDEBUG
void SeedContainer::dump() const {
void SeedContainer::print(raw_ostream &OS) const {
for (const auto &Pair : Bundles) {
auto [I, Ty, Opc] = Pair.first;
const auto &SeedsVec = Pair.second;
std::string RefType = dyn_cast<LoadInst>(I) ? "Load"
: dyn_cast<StoreInst>(I) ? "Store"
: "Other";
dbgs() << "[Inst=" << *I << " Ty=" << Ty << " " << RefType << "]\n";
OS << "[Inst=" << *I << " Ty=" << Ty << " " << RefType << "]\n";
for (const auto &SeedPtr : SeedsVec) {
SeedPtr->dump(dbgs());
dbgs() << "\n";
SeedPtr->dump(OS);
OS << "\n";
}
}
dbgs() << "\n";
OS << "\n";
}

LLVM_DUMP_METHOD void SeedContainer::dump() const { print(dbgs()); }
#endif // NDEBUG

} // namespace llvm::sandboxir
Loading