In most strongly correlated electron systems superconductivity appears nearby a magnetic quantum critical point (QCP) which is believed to cause unconventional behaviors. In order to explore this physics, we present here a study of the heavy-fermion superconductors CeIrSi3 and CeRhSi3 carried out using a newly developed system for high-resolution magnetic penetration-depth measurements under pressure. Superconductivity in CeIrSi3 shows a change from an excitation spectrum with a line-nodal gap to one which is entirely gapful when pressure is close but not yet at the QCP. In contrast, CeRhSi3 does not possess a T=0 quantum phase transition and the superconducting phase remains for all accessible pressures with a nodal gap. Combining both results suggests that in these compounds unconventional superconducting behaviors are rather connected with the coexisting antiferromagnetic order. This study provides another viewpoint on the interplay of superconductivity, magnetism, and quantum criticality in CeIrSi3 and CeRhSi3 and maybe in other heavy fermions.