Comments (3)
The second line of the CIR error output gives the position of the error:
clangir/clang/lib/CIR/CodeGen/CIRGenerator.cpp
Lines 162 to 165 in b26f21d
Basically this code checks whether we have -fopenmp
flag in the command line. If the flag is present, then we crash with llvm_unreachable
. So if you are implementing OpenMP stuff, you will need to replace this llvm_unreachable
with your implementation code.
Note that this code only gets executed when we meet a TagDecl
(which represents a struct / class / enum / union) on the clang AST. The inclusing of omp.h
introduces a bunch of TagDecl
s so you get the error once you include omp.h
.
If you are not sure what to do at here, a good reference is always the original clang CodeGen module. The corresponding part in the clang CodeGen is:
clangir/clang/lib/CodeGen/ModuleBuilder.cpp
Lines 258 to 268 in b26f21d
You can start by understanding what the original clang CodeGen is doing and port it to CIRGen accordingly.
from clangir.
Thanks for the detailed explanation @Lancern.
@eZWALT another possibility is to mock the relevant constructs out of #include <omp.h>
and use them directly into your testcase, so you don't need to handle all the things not yet supported from that header. It's also possible that under clang/test/OpenMP
you will find those mocked versions to copy from.
from clangir.
Great explanation @Lancern , thanks for all the time invested, after implementing the task construct I will be checking this out!
from clangir.
Related Issues (20)
- Does CIR support CUDA? HOT 2
- higher level representation for initlist HOT 4
- Add ternary select op and (maybe) binary boolean op HOT 4
- Debug info should not be emitted when `-g` is not specified HOT 1
- assign new expr result to const global variant cause crash HOT 2
- [ABI][CallingConvention] Functional call with `byval` HOT 2
- Globals: LLVM lowering missing comdat and constant attributes HOT 4
- Design representation for OpenCL builtin types and other types lowered to `llvm::TargetExtType`
- Make `cir.call` aware of calling conventions HOT 1
- Add critical `convergent` attributes to functions for OpenCL HOT 1
- Switch to a new theme for website HOT 5
- Update link to living agenda document HOT 2
- [Accesibility][clangir webpage] Problem with new website look and feel HOT 1
- Keep unmangled fully qualified function name in cir.func HOT 1
- Split CIRSimplify into two new passes
- Intermitent bug in CIRGenException.cpp HOT 7
- Global temporaries LLVM lowering different from OG HOT 1
- How should we handle va_arg? HOT 5
- Encode C/C++ constness in CIR HOT 1
- Crash with label in block 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.