[PATCH] D82193: [OpenMPOpt] ICV macro definitions

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 08:38:07 PDT 2020


jhuber6 added inline comments.


================
Comment at: llvm/test/Transforms/OpenMP/icv_tracking.ll:13
 
+; ICV_REMARKS: remark: <unknown>:0:0: OpenMP ICV nthreads Value: IMPLEMENTATION_DEFINED
+; ICV_REMARKS: remark: <unknown>:0:0: OpenMP ICV active_levels Value: 0
----------------
sstefan1 wrote:
> I wasn't sure how to add filenames here like in other remarks tests. Not sure we need them, but if someone knows how, please let me know.
It reads the debug information for the filename and line numbers. Something like this should let you set the filename.

```
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0 ")
!1 = !DIFile(filename: "filename.c", directory: "/tmp")
```

Adding line numbers manually is a bit more complicated since it requires scoping information. There's usually a line like this
```
!21 = !DILocation(line: 5, column: 10, scope: !14)
```
And a corresponding usage assigning it to one of the instructions
```
  %1 = tail call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @0), !dbg !21
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82193/new/

https://reviews.llvm.org/D82193





More information about the llvm-commits mailing list