X-Men: Days of Future Past
Robots known as Sentinels are exterminating mutants and oppressing humans, since humans harbor the genes that lead to mutant offspring. A small band of mutant survivors manage to evade the Sentinels thanks to the powers of Kitty Pryde, who has the ability to project a person’s consciousness back in time to deliver warnings.
They hatch a plan to send Wolverine‘s consciousness back in time to prevent Mystique from murdering Bolivar Trask, the lead designer of the Sentinels. Trask’s assassination will make him a martyr, and Mystique will be captured and her mutant powers will be reverse-engineered and used to create the formidable Sentinels of the future.