The stellar initial mass function (IMF) is a very important question in modern astrophysics. Globular clusters (GCs) are good samples for studying the IMF, but the Galactic GCs can provide only one time-scale evolutionary stage. The Large Magellanic Cloud (LMC) is an ideal environment for studying the IMF because it contains compact clusters at different evolutionary stages. By studying the IMF at different evolutionary stages, we can see how the mass function evolves with time.