SAN DIEGO — Robert De Niro and Al Pacino have been circling each other as contemporaries for around half a century, often making similar movies but rarely the same one. They only appeared in scenes with one another in 1995’s “Heat,” 2008’s “Righteous Kill” and this year in “The Irishman.”

So consider this the Irishman moment for the Yankees and Dodgers.

They have often been cross-country mirror images, participating in the big-city, upper-market terrain in which you would expect a long history of fighting it out for mega free agents. Just like De Niro and Pacino, they just have not been in many scenes with one another. Maybe for Masahiro Tanaka following the 2013 season, but the Cubs were really more the Yankees’ competition. Perhaps for Tommy John following the 1978 campaign.

It just hasn’t happened all that much.

It is now. They are both breaking from recent austerity when it comes to free agency to bid for Gerrit Cole. This sets up a heavyweight match like the sport has never previously seen, albeit with the Angels and perhaps Giants, Phillies, Rangers and others also in the ring.

In this corner you have the Dodgers, who have spent billions yet gone without a title since 1988. In the opposite corner you have the Yankees, who have spent billions yet gone without a title since 2009. Both would very much like to spend about another quarter of a billion-ish to land Cole to front their rotation to help end championship droughts that register as forever in their markets.

The Dodgers and Yankees have rosters good enough to win their divisions as they stand today. So both are looking for players who impact their rosters at the very top as a way to improve championship odds.

As opposed to GM Brian Cashman and the Yankees, who are narrowly focused on Cole, the Dodgers would consider it a victory to land Cole or third baseman Anthony Rendon. Scott Boras represents both and, of course, his job is to do so individually and apart to their best outcome. But, for example, if Boras were able to get Cole signed first to the Yankees, that would keep the Dodgers as bidders for Rendon.

A sense exists that location matters to Cole, who is from Orange County, lives in Newport Beach and has the Dodgers and Angels in play. But it could matter more for Rendon, who is from Houston and has the Rangers very interested. The Nationals also would like to try to retain Rendon, and an executive for a team that would like to land Rendon said the belief is the Phillies, and quietly the Braves, might be in play as well. The field is believed similar for the second-best free-agent third baseman, Josh Donaldson.

The Dodgers have been under the luxury tax each of the past two years. At the GM meetings, president of baseball operations Andrew Friedman said his club is not afraid to do a substantial deal. Last year, they danced with Bryce Harper (another Boras client), but only on a short-term deal with a high annual average value. They seem ready to do more than that with Cole or Rendon, whose addition would likely force Justin Turner across the diamond to first.

Cole is a neater sign. He simply would go atop the rotation, pushing Walker Buehler and Clayton Kershaw into Nos. 2-3 starters.

The Yanks envision Cole doing the same with James Paxton, Luis Severino and Tanaka. They went back over the luxury tax threshold last season and recognize a Cole signing would take them toward the top payroll penalty line of $248 million. One outside executive, though, mentioned Boras’ usual goal is to set records and secure the largest possible total. So the Yanks, for example, could far outdo David Price’s $217 million record for a pitcher but do so over many years because it is the average value that counts toward the tax.

So, for example, if the Yankees gave Cole an eight-year, $280 million pact, that would be a $35 million average, but if they did it for 10 years, it would be a $28 million average. This is what was done last year when the Phillies signed Harper for $330 million over 13 years ($25.38 million). And/or money could be deferred, which lowers the current-day value (for luxury tax too) as Boras did with, say, Max Scherzer in Washington.

But one official said the Yanks also know a new collective bargaining agreement is coming after 2021 with the players demanding to either eliminate the tax or make the thresholds substantially higher to allow the big markets to more comfortably spend.

Plus, Cole is in a dominating position. He is not begging for suitors. So he may be able to get the largest pitching pact ever on annual value too (currently $33 million in present value by Justin Verlander), no deferrals and a deal of, say, seven years that gives him another shot at free agency at 36. Everyone in these negotiations has understood that record money is a necessity.

Which leads to curiosity about Angels owner Arte Moreno, who has historically been hesitant to go over the threshold or do big deals with Boras. But when he personally has wanted something — Albert Pujols, Josh Hamilton — Moreno has gone big to get it. And he has reasons to want Cole, who grew up going to Angels games. Moreno just guaranteed $325 million to buy Angels Stadium, develop 153 acres around it and keep the team there through at least 2050, so the desire to put on a great show that people want to attend is vital. Plus, the first eight years of Mike Trout’s career already has been squandered (one playoff appearance, zero wins).

So the Angels must get needed pitching. But it is possible — if Cole wants to go to a glam team in the Dodgers or Yankees — that the Angels will be forced toward other Boras clients: Stephen Strasburg, Hyun-jin Ryu or Dallas Keuchel.

And this really could come down to Dodgers vs. Yankees for Cole, which just works out great for the ace: Netflix invested $175 million-ish to assure a Martin Scorsese film with De Niro and Pacino. What might MLB’s heavyweights do for Cole in his prime?