This change try to recompute LiveOutInfo for a PHI, which was invalidated, once its predecessors are all visited. This allows us to add AssertZext while building DAG, which enable eliminating redundant zexts during the DAGCombine phase.
Details
Diff Detail
Event Timeline
Kindling ping. please let me know any comment and also add other reviewers who could look over the code.
Just a few general comments.
include/llvm/CodeGen/FunctionLoweringInfo.h | ||
---|---|---|
187 | Please add a comment specifying what is contained in this set. | |
271 | The function name should begin with a lower case letter and the doxygen comment shouldn't have the function name. This differs from the style of the surrounding code, but we should make the jump to the preferred style. | |
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | ||
413 | Perhaps add a few comments describing the function and the assumptions it makes. |
Do you have a test case?
It looks like you're making this algorithm directly recursive with a worst-case recursion depth given only by the number of blocks. Is the right? Can we say something about the worst case here?
Sorry, I dropped the test case by mistake in my previous update; added it now.
Yes, the worst-case recursion depth is the number of blocks if every block has back edges, and a value used in the last block is passed through PHIs in every block.
Please add a comment specifying what is contained in this set.