Despite rapid successful developments toward promising perovskite solar cells (PSCs) efficiency, they often suffer significant hysteresis effects. Using synchrotron-based grazing incidence X-ray diffraction (GIXRD) with different probing depths by varying the incident angle, we found that the perovskite films consist of dual phases with a parent phase dominant in the interior and a child phase with a smaller (110) interplanar space (d(110)) after rapid thermal annealing (RTA), which is a widely used post treatment to improve the crystallization of solution-processed perovskite films for high-performance planar PSCs. In particular, the child phase composition gradually increases with decreasing depth till it becomes the majority on the surface, which might be one of the key factors related to hysteresis in fabricated PSCs. We further improve the crystalline phase purity of the solution-processed CH3NH3PbI3-xClx perovskite film (referred as g-perovskite) by using a facile gradient thermal annealing (GTA), which shows a uniformly distributed phase structure in pinhole-free morphology with less undercoordinated Pb and I ions determined by synchrotron-based GIXRD, grazing incidence small-angle X-ray scattering, scanning electron microscopy, and X-ray photoelectron spectroscopy. Regardless of device structures (conventional and inverted types), the planar heterojunction PSCs employing CH3NH3PbI3-xClx g-perovskite films exhibit negligible hysteresis with a champion power conversion efficiency of 17.04% for TiO2-based conventional planar PSCs and 14.83% for poly(3,4-ethylenedioxythiophene:poly(styrenesulfonate) (PEDOT:PSS)-based inverted planar PSCs. Our results indicate that the crystalline phase purity in CH3NH3PbI3-xClx perovskite film, especially in the surface region, plays a crucial role in determining the hysteresis effect and device performance.