Looking at the core Magento2 modules in the vendor folder, I notice that there are di.xml placed in different folders etc/adminhtml/di.xml, etc/frontend/di.xml and etc/di.xml.
The Magento_Cms module itself has di.xml in all 3 different folders!
What's the effect of placing the di.xml in the 3 different folders? How can I know when I should place my di.xml in which folder?