noreturn calls can never return normally so they do not need GC safepoints. Therefore, don't waste time on doing liveness analysis for them.
Diff Detail
Event Timeline
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
1009 | I'd rename this slightly. NoReturn is a well defined concept. Given the invoke case, this is more like doesntNeedLivePointers or something. | |
1035 | I'd be tempted to move this check inside the liveness analysis since you're still returning the correct result, just differently. Also, what are you actually saving in compute time here? Isn't walking back from the end of the block just as fast? | |
test/Transforms/RewriteStatepointsForGC/noreturn-calls.ll | ||
6 | Please don't check for this debug output. Checking that there are no gc.relocates would be more appropriate. | |
20 | Please trim unneeded deopt args. |
I'd rename this slightly. NoReturn is a well defined concept. Given the invoke case, this is more like doesntNeedLivePointers or something.