Who was khalid bin waleed and who gave him the title sword of Allah?

Khalid Ibn alWaleed was a man who waged wars against the Prophet, then he converted to Islam.

He was named sword of Allah by Abu Bakr. In the Shia opinion, he carried out crimes and killed Muslims like Malik Ibn Nuwayra.