3 ms·
That's a very good question. A proper compiler engineer would know, but I will do my best to find something and report back. Edit: I could not find any pass wi
by jerrinot 1y ago
That's a very good question. A proper compiler engineer would know, but I will do my best to find something and report back.
Edit: I could not find any pass with a pattern matching to replace CAS loops. The closest thing I could find is this pass: https://github.com/llvm/llvm-project/blob/06fb26c3a4ede667552f2dacefc8f9d8d1778271/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp https://github.com/llvm/llvm-project/blob/06fb26c3a4ede66755... I reckon one could write a similar pass to recognize CAS idioms, but its usefulness would be probably rather limited and not worth the effort/risks.