Comments (5)
Hey Keyi! What exactly is your project? We certainly don't have as much of the Clang AST supported as Polygeist as of today. We hope to improve the story over the next year, but it'll be a relatively long process.
But the default cir output is unoptimized compared to Polygeist's. For instance, cgeist runs mem2reg and code motion optimizations, which are very helpful for downstream tools to analyze the IR.
Yes, we currently don't run any optimization passes. That's a bit of a "phase 2" topic. For "phase 1" we're prioritizing solving the problem of handling more of Clang's AST and codegen.
May I ask what your project and interest is? We're definitely interested more about it. We have a monthly meeting and the next one is this coming Monday if you'd like to join. @bcardosolopes will be sharing a reminder in https://discourse.llvm.org/tag/clang shortly.
from clangir.
For instance, cgeist runs mem2reg and code motion optimizations, which are very helpful for downstream tools to analyze the IR.
We currently have WIP support for CIR -> "in-tree MLIR dialects" lowering, so theoretically you could use that output as an input for poligesit already existing mem2reg and other code motion optimizations.
The problem here, as Nathan stated, is that we don't yet cover all AST nodes, which is what we are heavily working atm. Also, CIR -> MLIR in-tree dialects progress is a bit stalled since no one is actively working on it yet, but patches are welcome - and it's the probably best way to connect the two projects.
Is there any plan to add common optimizations to clangir before LLVM lowering pass?
We plan to work on that at some point in the future but it's not the current short-term priority.
from clangir.
@bcardosolopes will be sharing a reminder in https://discourse.llvm.org/tag/clang shortly
https://discourse.llvm.org/t/mlir-c-c-frontend-working-group-monday-march-27th/69511
from clangir.
Thanks for the quick response!
May I ask what your project and interest is?
As much as I'd like to talk about it, unfortunately we are not ready to share the project details yet. Sorry about that.
Also, CIR -> MLIR in-tree dialects progress is a bit stalled since no one is actively working on it yet, but patches are welcome - and it's the probably best way to connect the two projects.
That sounds promising, but one potential issue is that Polygesit and clangir use slightly different version of MLIR. It's likely that we need to have two different LLVMs in order to connect these two projects. I will discuss it with my colleagues and see if there is any interest choosing this route.
Thank you again for the information. I will try to attend the Monday meeting.
from clangir.
That sounds promising, but one potential issue is that Polygesit and clangir use slightly different version of MLIR. It's likely that we need to have two different LLVMs in order to connect these two projects.
Indeed, we try to rebase on ToT often, but at times we might get few months behind, if it helps we can tag specific points in time for others to consume, or open to hear suggestions.
I will discuss it with my colleagues and see if there is any interest choosing this route.
Hit us up if you wanna discuss any piece further!
from clangir.
Related Issues (20)
- Both `cir.const_struct` and `cir.const_array` should support `#cir.zero`
- Create a common interface/trait for CIR global values
- LLVM install failure `clang/CIR/Dialect/IR/CIROpsEnums.h.inc: No such file or directory` HOT 3
- Move struct field name from callsite to type HOT 2
- Verification failure for recursive struct HOT 3
- Invalid lowering of for-loops HOT 2
- Lowering of nested break/continue in loops HOT 4
- Crash when lowering endless for loop HOT 4
- Revise usage of `const_struct` and `const_array` to enhance codegen parity
- Invalid order of global variables lowering HOT 4
- Invalid IR when accessing union HOT 2
- CIR Dialect Struct Type Recursive Reference HOT 13
- Support of symbol references in CIRGenExprConst HOT 2
- Support for `Decl::PragmaComment` HOT 1
- Create custom CIR floating point types. HOT 5
- Create a custom CIR void type HOT 1
- Patch remaining undesired usages of MLIR's built-in integer type HOT 1
- Use readable representation for char types
- Harden operation constraints from AnyType to CIRType HOT 2
- Consider change cir.br block targets to have operands. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clangir.