prune the callgraph