If the threat is credible and imminent, yes. That's because killing people is obviously illegal, and those you threaten can reasonably take you at your word when you make a credible threat against them and respond accordingly to protect themselves. The speech is merely evidence of intent, not the crime itself. (Morally speaking, of course. Consult a local lawyer for legal advice applicable to your jurisdiction, as the law is not always moral or just.)
Socially, yes, of course there are views that will get you ostracized to some extent. But that's merely the consequence of freedom of association.