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 | ||
---|---|---|
25564 | How about adding the "static" keyword? | |
25577–25584 | You would need this comment before line 25608 above, as it explains the map define at that line. | |
25693 | [Style]: Any reason you break the comment line before reaching 80 characters? | |
25750 | 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. | |
25753 | [Style]: Please, use capital letter, "The second ..." | |
25901–25902 | You may simply call: ThisMBB->erase(MIItBegin, MIItEnd); |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
25612 | Maybe put a blank line before this return | |
25711 | The addLiveIn for jcc1MBB was only conditional on cascadedCMOV in the original code. Should it really be inside this if now? | |
25876–25880 | Comment should say ThisMBB not ThiMBB | |
25884 | Space after 'always'. |
How about adding the "static" keyword?