Bank of America shares doubled in value last year, and CEO Brian Moynihan has been rewarded with a big pay raise.

The CEO was granted $11.1 million in restricted shares for 2012, according to a regulatory filing made Tuesday by the bank. Moynihan's base salary is reportedly $950,000, making for a total pay package of just more than $12 million.

The compensation package is much larger than in 2011, when Moynihan was paid $7 million.

The $12 million haul places Moynihan near the middle of the bank CEO compensation rankings. Moynihan just edged out JPMorgan's (JPM) Jamie Dimon, whose bonus was slashed by 53% amid fallout from the bank's so-called London Whale trading losses.

But Moynihan isn't expected to top Lloyd Blankfein of Goldman Sachs (GS) or John Stumpf of Wells Fargo (WFC).

Moynihan's pay hike comes as BofA's outlook brightens, as the bank has reduced litigation risk over the past year and reported revenue growth.

Investors have rewarded the megabank, pushing its share price from less than $6 in January 2012 to $12.19 on Tuesday.

Related: Hey Wall Street, get ready for more layoffs

Bank of America (BAC) isn't the only large bank to perform well. Shares of large-cap banks rallied between 25% and 50% last year.

The rally came as lending rebounded and credit quality improved, driven by a wave of mortgage refinancing last year. Profits were also bolstered by the release of funds previously used for loan loss provisions.

Analysts say bank stocks could get a boost in March, when the Federal Reserve is scheduled to release results from last year's so-called stress tests. This could pave the way for banks to repurchase shares and possibly boost dividend payments.

So far, banks have been able to offset low interest rates by managing expenses and cutting costs. Morgan Stanley (MS), for example, has announced plans to cut 1,600 jobs.

Analysts say more layoffs could be in the works as banks focus on maximizing efficiency.