Comments (2)
It seems that struct_element_addr
has been renamed to get_member
, but the issue still exists.
If no one has already started working on it, I will look into it soon : )
from clangir.
I have checked the issue and it appears challenging to handle when dealing with bitfields.
The bitfield information in cir.struct
has already been erased, making it difficult to map each field type in cir.struct
to the data member's name.
It seems to me that one possible way is to maintain data member types in cir.struct with bitfield information, and transform it to the current form when dumping LLVM IR, e.g.
// SOURCE CODE
struct A {
int a;
int b : 1;
int c : 1;
};
// AS IS:
!ty_22A22 = !cir.struct<struct "A" {!cir.int<s, 32>, !cir.int<u, 8>}
// TO BE: (not real CIR code)
!ty_22A22 = !cir.struct<struct "A" {!cir.int<s, 32> a, !cir.int<s, 32> BITFIELD(1) b, !cir.int<s, 32> BITFIELD(1) c}
But in this way, the handling of memory location / memory layout in CIR will be a bit tricky.
Another way might be to keep the current approach and put the data member name in cir.get_member
.
Any suggestions for this? 🤔 cc @bcardosolopes @sitio-couto
from clangir.
Related Issues (20)
- Not completely implemented `CIRGenTypes::getRecordTypeName` HOT 10
- Implement a custom CIR Module Op and attributes HOT 2
- Use shared libs for github actions HOT 8
- [ClangIR][CIRGenFunction] implement buildToMemory HOT 1
- [ThroughMLIR] Cannot lower function with pointer arguments HOT 1
- Should use `getCalleeAttr` when lowering `CallOp`
- Should mark private visibility for extern symbols.
- Vector related arith missing `nsw` on addition HOT 2
- Revisit insertion point being restored by an InsertionGuard in `buildSwitchBody()` HOT 1
- [Umbrella] Switch stmt CIRGen issues
- Single-operand vector shuffling HOT 1
- [ThroughMLIR] cir-opt can not work when lowering ForOp to scf HOT 4
- Add a test for arrays of 3-component extended vectors
- Crash with try statement HOT 1
- [GSoC] Add OpenCL support to compile GPU kernels
- Reinstate #668 and #678 HOT 2
- Verify ZdlPv -> ZdlPvm in `test/CIR/CodeGen/dtors.cpp`
- Verify gep uses moving to i64
- Replace uses of `isa`/`dyn_cast`/`cast`/... member functions HOT 2
- Data layout modeling for CIR types
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.