"Top of the morning to you" Is it formal or informal?

In the UK, this is stereotypically Irish. A non-Irish person saying it would appear very strange, unless they were clearly making a joke. (How much Irish people really say it, I don't know). Formality doesn't enter into it.