Move the core part of the hoist check into a function to avoid redundancy.
Move the core part of the hoist check into a function to avoid redundancy.

IntelLabs/numba,sklam/numba,stuartarchibald/numba,sklam/numba,cpcloud/numba,IntelLabs/numba,sklam/numba,stuartarchibald/numba,stuartarchibald/numba,stonebig/numba,cpcloud/numba,jriehl/numba,sklam/numba,IntelLabs/numba,numba/numba,seibert/numba,gmarkall/numba,numba/numba,IntelLabs/numba,cpcloud/numba,jriehl/numba,IntelLabs/numba,seibert/numba,numba/numba,stonebig/numba,numba/numba,gmarkall/numba,gmarkall/numba,gmarkall/numba,stonebig/numba,seibert/numba,jriehl/numba,seibert/numba,numba/numba,sklam/numba,stonebig/numba,jriehl/numba,jriehl/numba,cpcloud/numba,gmarkall/numba,seibert/numba,cpcloud/numba,stuartarchibald/numba,stuartarchibald/numba,stonebig/numba