Attempt to reduce the mess (276 lines of code in this function)
by putting the functionality of emitting cascaded selects into
a separate function and by extracting the common piece of code
(creating PHIs in the sink block).
Details
Diff Detail
Event Timeline
Few minor comments. below.
If I understood the code well, this is a non functional change, is that correct?
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
25596 | How about adding the "static" keyword? | |
25611 | You would need this comment before line 25608 above, as it explains the map define at that line. | |
25724 | [Style]: Any reason you break the comment line before reaching 80 characters? | |
25781 | Calling this helper function for one CMOV is not need (you will not be using half of the code that exist in the helper function), and it is even confusing. | |
25784 | [Style]: Please, use capital letter, "The second ..." | |
25927 | You may simply call: ThisMBB->erase(MIItBegin, MIItEnd); |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
25644 | Maybe put a blank line before this return | |
25742 | The addLiveIn for jcc1MBB was only conditional on cascadedCMOV in the original code. Should it really be inside this if now? | |
25901–25905 | Comment should say ThisMBB not ThiMBB | |
25909 | Space after 'always'. |
How about adding the "static" keyword?