IPF is a disease in which fibrous tissue clogs the lungs. This eventually damages air sacs in the lungs and leads to widespread and permanent scarring of lung tissue. Individuals with IPF may experience breathing difficulties, cough, chest pain, and a decreased exercise capacity. Pulmonary hypertension, which is high blood pressure in the arteries of the lungs, affects half of all people with IPF. The fibrous tissue that clogs the lungs also blocks blood from flowing through the lungs effectively, reducing the amount of oxygen in the lungs. The fibrous tissue also reduces the lungs' ability to use what oxygen is available. These factors can cause breathing difficulties and may eventually lead to heart disease. Sildenafil is a medication that can increase blood supply to the lungs and reduce the heart's workload. The purpose of this study is to evaluate the effectiveness of sildenafil at improving breathing function, exercise capacity, and quality of life in people with advanced IPF.