Commit Graph

3 Commits

Author SHA1 Message Date
Ta-Wei Tu 59286b36df [NPM] Port -mergereturn to NPM
Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D89781
2020-10-20 10:33:58 -07:00
Arthur Eubanks 4b6e3ad9b4 [test][NewPM] Pin -mergereturn tests to legacy PM
Looks like this pass isn't really used and hasn't been worked on in a
loooong time.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89010
2020-10-13 22:56:59 -07:00
David Stenberg 48fc781438 [UnifyFunctionExitNodes] Fix Modified status for unreachable blocks
If a function had at most one return block, the pass would return false
regardless if an unified unreachable block was created.

This patch fixes that by refactoring runOnFunction into two separate
helper functions for handling the unreachable blocks respectively the
return blocks, as suggested by @bjope in a review comment.

This was caught using the check introduced by D80916.

Reviewed By: serge-sans-paille

Differential Revision: https://reviews.llvm.org/D85818
2020-09-09 13:36:03 +02:00