Closed GaoXiangYa closed 3 months ago
@ShivaChen can you review this and let us know if anything should be done regarding the loop canonicalization pass?
@ShivaChen can you review this and let us know if anything should be done regarding the loop canonicalization pass?
Sure, I'll take a look.
Hello, if you have review the code, and agree with me, I want to try to move the CIRWhileOpLowering
to LowerCIRLoopToSCF.cpp
file. @ShivaChen
Hello, if you have review the code, and agree with me, I want to try to move the
CIRWhileOpLowering
toLowerCIRLoopToSCF.cpp
file. @ShivaChen
Yes, I agree LowerCIRLoopToSCF.cpp could be right place to go. Thanks!
@ShivaChen can you review this and let us know if anything should be done regarding the loop canonicalization pass?
It seems cir.while to scf.while have one to one mapping. cir.while.cond -> scf.while.before, cir.while.body -> scf.while.after cir.condition -> scf.condition So I assume the canonicalization might not require.
Do you mean I add a SCFWhileLoop class ? And I will delete the header file. @ShivaChen
Do you mean I add a SCFWhileLoop class ? And I will delete the header file. @ShivaChen
I think the way you implement CIRWhileOpLowering in https://github.com/llvm/clangir/pull/636/commits/e882b20609a492a9b62dc0da04a6289a952281cb make sense to me. We could introduce new class if we think there are more analysis need to be done in the future.
Could you remove the changes of deleting empty lines and include headers in LowerCIRToMLIR.cpp?
Sorry , comparing with the old LowerCIRToMLIR.cpp , I don`t find some empty lines, and I have already deleted the un-used header files. @ShivaChen
Sorry , comparing with the old LowerCIRToMLIR.cpp , I don`t find some empty lines, and I have already deleted the un-used header files. @ShivaChen
It seems I could see when clicking File Chagned on the web page but it could be a nit-picking. Overall it's LGTM. Please wait for @bcardosolopes for another look. Thanks!
This pr intruduces CIRConditionLowering and CIRWhileLowering for lowering to scf.