Closed
Description
This involves 4 steps:
- Gather up several different loop/iterator idioms that should optimize to e.g. memset/memcopy and run it through
rustc -opt-level=0 --emit=llvm-ir
- Feed the IR from step 1 into
opt -O2 -print-before-all
and grab the IR from beforeRecognize loop idioms
- Write a LoopIdiomRecognize pass that handles the IR in step 2
- Write codegen tests for rustc that verify that the idioms are being optimized to the right IR
CC @pcwalton