It doesn't matter.
It is a FACT that Iran has murdered many communists, especially in the aftermath of the successful Islamic revolution when they were solidifying power but also afterwards I'm sure.
It is a fact that Iran is run by reactionary socially backwards forces.
And it is a fact that it is never-the-less an important part of the international anti-imperialist bloc.
It is a fact that there is no near term hopes for a communist revolution in Iran, that if the current regime were to be overthrown that it would be by pro-US, pro-west compradors who'd sell out the people, sell out the region, and do their utmost to help the west destroy BRICS and the new emerging multipolarity. Thus that the best we can hope for is continued weakening of the US, of the zionist settler outpost occupying Palestine, and continuing growth of the power of China and Russia and that as that progresses there might be space for weakening of the grip reactionaries have on Iran over time.
There's no particular reason to mourn the dead president of Iran. He was no progressive force and from what I've read was from the more conservative elements of the government. Neither is there reason to celebrate his death, which has not materially changed anything important. It won't lead to better women's rights or gay rights or tolerance of communists in Iran. He was but one part of a larger and entrenched state.