1) Personification is when inanimate objects are spoken about as if they were human. For example, the following sentence uses personification: The sun was smiling on the children in the park.
"If" is not very rich in personification. The only example I can find is:
And so hold on when there is nothing in you
Except the Will which says to them: "Hold on";
In this passage, a person's "will" is pictured as a living being that can "talk" and say, "Hold on."
2) Alliteration is the repetition of beginning consonant sounds. Some examples from "If" are:
"treat those two impostors";
"the truth you've spoken/Twisted by knaves to make a trap for fools";
"sinew/To serve your turn.../And so hold on..."
These examples of alliteration, and others, serve to draw the reader's attention to certain key phrases. In the second passage, for example, alliteration draws our attention to some of the opposing forces that the poem discusses: truth, and traps.
3) Metaphors are comparisons that do not use the words "like" or "as." This poem speaks mostly in straightforward language; still, it does contain some metaphors, such as:
"triumph and disaster...those two impostors"';
"the truth.../Twisted by knaves to make a trap for fools" (truth is compared to a metal object that can be twisted out of shape).
Metaphors such as these make the poem much more beautiful and memorable. Imagine if Kipling had written: If you can bear to hear the truth you've spoken misrepresented by knaves in such a way that they would cause fools to make intellectual errors. Not exactly memorable!
4) By far the most important device used in this poem is the repetition of similar words or phrases; this is referred to as anaphora.
Consider these examples just from the first stanza:
when all men DOUBT you,/But make allowance for their DOUBTING;
If you can WAIT and not be tired by WAITING;
Or, being LIED about, don't deal in LIES;
Or, being HATED, don't give way to HATING.
These repetitions serve to emphasis one of the poem's major themes: balance. Kipling believes that many character traits and actions must be used, but always in the proper balance.
You must wait sometimes, but not become worn out by waiting. You must be decisive, but not so cocksure that you cannot "make allowance" for others who doubt. You must dream, but not be enslaved to your dreams; you must think, but "not make thoughts your aim."
Kipling uses several devices effectively to draw the attention of the reader and make us think.
First in these lines:
If you can meet with triumph and disaster
And treat those two imposters just the same;
he personifies triumph and disaster by giving them the abilities to be imposters. Imposters are humans who distract or get involved in something we don't want them to. They could even be disguised humans. Thus, his point here is to look at both success and loss as elements in life that do the same thing for us: teach us lessons.
In terms of poetic style, it seems to have an ababcdcd rhyme scheme and Kipling has gone to great effort to put the poem in iambic pentameter.
Kipling uses word play or repetition or parallel structure in the lines:
If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
to play with the purposes of thoughts and dreams. You obviously see the repetition of words, but to see these same grammatical structures mean that parallel structure or parallelism is at work.
Kipling captializes the word "Will" in the 3rd stanza at the end. I believe this is a biblical allusion to God's will. When authors capitalize a word, they are often personifying. Given the era, another possibility is that this author is encouraging his son to invoke God's Will. This would make sense because the stanza is about the points in life at which we sort of lose our grip on a given situation.
The simple repetition of so many "if" statements that never reach their "then" until the very end makes the end suspenseful. The list given from the father to the son is tremendously difficult. But the prize of being a true Man is worth it. The riches and material items of the world mean nothing compared to the character that is produced.
Hope this helps.