This is part of the series started by D9375, and teaches CaptureTracking to look through calls to llvm.noalias.
P.S. One reason why llvm.noalias is not itself marked with nocapture is because it requires this special handling anyway.
LGTM w.r.t. code.
I would prefer the intrinsic definition be marked nocapture if it's legal to do so. There's too much chance of someone checking only an attribute somewhere. Better to be complete as we can.
Also, I don't believe the parameter on stripPointerCasts is still needed per discussion in another thread right?
Maybe 'passthrough' should return a boolean, indicating that we need to stop or not. (see code comment)
The places where it is called could become something like: 'if (passthrough()) return;
Moving this piece of code with a 'return' into a lambda results in a behavior change: instead of directly breaking the outer while loop when the Threshold is reached, it will now keep doing work with whatever is on the worklist. I don't think this change in behavior was intended.