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
- Repository
- rL LLVM
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 ↗ | (On Diff #107512) | How about adding the "static" keyword? |
25611 ↗ | (On Diff #107512) | You would need this comment before line 25608 above, as it explains the map define at that line. |
25724 ↗ | (On Diff #107512) | [Style]: Any reason you break the comment line before reaching 80 characters? |
25781 ↗ | (On Diff #107512) | 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 ↗ | (On Diff #107512) | [Style]: Please, use capital letter, "The second ..." |
25927 ↗ | (On Diff #107512) | You may simply call: ThisMBB->erase(MIItBegin, MIItEnd); |
lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
25612 ↗ | (On Diff #109312) | Maybe put a blank line before this return |
25710 ↗ | (On Diff #109312) | The addLiveIn for jcc1MBB was only conditional on cascadedCMOV in the original code. Should it really be inside this if now? |
25871 ↗ | (On Diff #109312) | Comment should say ThisMBB not ThiMBB |
25879 ↗ | (On Diff #109312) | Space after 'always'. |