'The Flash' season 3 episode 21 sees Barry alter his memory to stop Savitar

Barry will sacrifice everything to save Iris.Facebook/CWTheFlash

Barry (Grant Gustin) will try to change his memories to stop his future self, Savitar, from killing Iris (Candice Patton), in episode 21 of "The Flash" season 3.

On the next episode of "The Flash" season 3, titled "Cause and Effect," Barry is willing to sacrifice everything to save Iris from being killed by Savitar.

Previously on the show, Barry discovered that Savitar is his future self. This made him realize that Savitar will always be steps ahead of him because they share the same memories.

As seen in the episode 21 promo, Barry consults with Cisco (Carlos Valdes), Wally (Keiynan Lonsdale), and the rest of S.T.A.R. Labs to figure out how they can stop the future Flash from killing Iris.

Cisco forms a possible solution and asks, "What if Barry can't remember what we're doing now?"

This leads Cisco to experiment on trying to change Barry's memories. However, his test appears to have gone a little too far when Barry wakes up from the machine bewildered and askS, "Who are all you? Where the hell am I? Is this a dentist office?"

While Cisco works on altering Barry's memories, H.R. (Tom Cavanagh) continues to motivate Tracy Brand (Anne Dudek) in creating the trap for Savitar and Killer Frost (Danielle Panabaker) makes an interesting proposal for the team.

Meanwhile, executive producer Andrew Kreisberg shares with Entertainment Weekly that Barry sympathizes with Savitar.

In Barry's point of view, he does not understand what made these bad guys turn dark.

"They just seemed to be filled with so much hate and anger and did terrible things, I would look at them and be like, 'Why are you doing this?' But when Barry looks at Savitar, he sees it and he kind of understands it," Kreisberg explains.

Although Barry already has an understanding of who Savitar is and why he has turned bad, one mystery that he has yet to uncover is why his future self would want the love of his life dead.

"The Flash" season 3 airs every Tuesday night at 8 p.m. EDT on The CW.