[clang] [llvm] [RISCV] Add Codegen support for ACLIC (PR #238325)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 17:00:27 PST 2026
lenary wrote:
> I've put together a diagram illustrating the ACLIC codegen pattern, similar to the ones I created for CLIC, to help make the review easier:
>
> <img alt="image" width="2000" height="1011" src="https://private-user-images.githubusercontent.com/132126433/693519000-a1a95d24-c91d-4e0f-86f7-40d536922cb9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTU3NDA5MDEsIm5iZiI6MTc5NTc0MDYwMSwicGF0aCI6Ii8xMzIxMjY0MzMvNjkzNTE5MDAwLWExYTk1ZDI0LWM5MWQtNGUwZi04NmY3LTQwZDUzNjkyMmNiOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTEyN1QwMDUwMDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05MTM4ZTg2ZmZhZGRkMTBkMGY2MWNlODFjNDZiMmE5MTgyOGI2YjllYzRmMDg5NGExZDhhYWExMjY2MGNmZjAwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.Yi4ASQtkpQvAAJaPLwxfpyP6QSLZsRkddowB6576hz4">
> Since this patch is fairly large, I'll also leave some inline comments to provide additional context and make the changes easier to follow.
One quick question in reviewing the diagrams: in the preemptible + push/pop case, we'd save the latency of two stores between entry and re-enabling interrupts if we use registers from a0-a5 instead of `t0` to save mepc and mistatus - but we wouldn't be able to share the code with the sifive clic handling. This could be part of a follow-up, as the generated code right now (which matches the diagram) is not incorrect.
https://github.com/llvm/llvm-project/pull/238325
More information about the cfe-commits
mailing list