Hello,<div><br></div><div>In looking at some InstVisitor-based code that handles common intrinsics similarly to instuctions, I see a common pattern of a big switch in them. This is what the visitor pattern was designed to factor out of user code.</div>
<div><br></div><div>We also have really nice helper classes that wrap CallInst for intrinsic calls. These are being ignored in the delegation hierarchy of the InstVisitor.</div><div><br></div><div>The attached patch fixes this by having the visitor specially delegate through CallInst instructions into specialized intrinsic visitors as appropriate. Historically, this used to be avoided because it necessitated a string lookup for the intrinsic, but today it's a simple switch.</div>