Consider a class of graphs $$\mathcal{G}$$ having a polynomial time algorithm computing the set of all minimal separators for every graph in $$\mathcal{G}$$ . We show that there is a polynomial time algorithm for treewidth and minimum fill-in, respectively, when restricted to the class $$\mathcal{G}$$ . Many interesting classes of intersection graphs have a polynomial time algorithm computing all minimal separators, like permutation graphs, circle graphs, circular arc graphs, distance hereditary graphs, chordal bipartite graphs etc. Our result generalizes earlier results for the treewidth and minimum fill-in for several of these classes. We also consider the related problems pathwidth and interval completion when restricted to some special graph classes.