Other forms: antimetaboles
When you repeat a phrase in reverse, you use the literary device known as antimetabole. Shakespeare was a fan of a good antimetabole, as in "Fair is foul and foul is fair."
Literature, songwriting, and rhetoric are full of antimetabole examples, from truisms like "When the going gets tough, the tough get going" to Snoop Dogg's lyric, "With my mind on my money and my money on my mind." Antimetabole, a clever trick of swapping words around to make a point, comes from a Greek root that means "turning about."