President Reagan made a sentimental journey to Notre Dame today to celebrate a football legend and predict the triumph of "the cause of freedom" over communism.

"The years ahead are great ones for our country, for the cause of freedom and for the spread of civilization," Reagan said in an emotional speech to the 136th Notre Dame commencement. "The West will not contain communism, it will transcend communism. We will not bother to denounce it, we'll dismiss it as some bizarre chapter in human history whose last pages are even now being written."

Four years ago, at another Notre Dame commencement, President Carter delivered what became one of his best-known and controversial statements: ". . . We are now free of that inordinate fear of communism which once led us to embrace any dictator who joined us in that fear. I'm glad that's being changed."

Today was a day of nostalgia for the president. Notre Dame is special to him because it was here, 41 years ago, that Warner Brothers filmed the movie "Knute Rockne -- All-American" in which Reagan played the small but significiant role of doomed Notre Dame football player George Gipp. Over the years, Reagan became known by the nickname of "The Gipper," and it was as such that he was welcomed back today.

As the president entered the Notre Dame field house, he was greeted by lusty cheers and the words of university president Theodore Hesburgh: "We welcome the president of the United States back to health, we welcome the president back to the body of his people the Americans, and here, at Notre Dame, in a very special way, we welcome 'The Griper' at long last back to get his degree."

Reagan is the fifth sitting U.S. president to receive an honorary degree from Notre Dame. The citation accompanying his doctor of laws degree declared: "His vision, now as then, has a compelling simplicity about it."

Another honorary doctor of laws degree, and more cheers, went to Pat O'Brien, who played the title role in the Rockne film and gave the then-obscure Reagan a chance to pay the cherished part of Gipp. Rockne was a Norwegian immigrant who starred as a football player at Notre Dame and became its most famous coach before dying in an airplane crash in 1931.

"As a coach, he did more than teach young men how to play a game," said Reagan. "He believed that the noblest work of man was molding the character of man. . . . No man connected with football has ever achieved the stature or occupied the singular niche in the nation that he carved out for himself, not just in a sport, but in our entire social structure."

Nearly half of the Reagan speech was devoted to Rockne, who once exhorted a losing Notre Dame football team to victory with his halftime plea to "win one for The Gipper." But Reagan said that the Rockne pep talk, which came eight years after Gipp's death of pneumonia, was intended not just to win a game but to bring together a team torn apart by dissension and personal animosity.

"Yes, it was only a game and it might seem somewhat maudlin but is there anything wrong with young men having the experience of feeling something so deeply they can give completely of themselves?" Reagan said. "There will come times in the lives of all of us when we'll be faced with causes bigger than ourselves and they won't be on a playing field."

Reagan received his loudest applause when he said that private institutions like Notre Dame were indispensable to academic freedom and were having some of their own freedom eroded.

"Virtually every aspect of campus life is now regulated -- hiring, firing, promotions, physical plant, construction, record-keeping, fund raising and to some extent curriculum and educational programs," Reagan said.

It was Reagan's first speech outside Washington since he was shot in an assassination attempt on March 30, and security was tight. All the 11,000 persons who crowded into the field house were screened by a metal detector. A small group of demonstrators opposed to administration policies in El Salvador were kept a third of a mile away.

Within the field house a sprinkling of students wore white armbands or white mortar boards to protest the awarding of a degree to Reagan. But the protesters were lost in a sea of cheering graduates who rose and sang the Notre Dame Fight Song after the president had finished speaking