Yosys now has support for this. A short writeup of how to use the feature: https://stackoverflow.com/questions/44851894/how-can-i-use-multiple-ip-cores-that-both-contain-modules-with-the-same-names-wi/44851895#44851895 … cc @OlofKindgrenhttps://twitter.com/oe1cxw/status/863448926569074688 …
No, this will not miss out on any optimizations. In effect it's just smart renaming of modules to avoid namespace collisions.