[PATCH] D126838: [BPF] Introduce support for type match relocations

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 13:34:39 PDT 2022


yonghong-song added inline comments.


================
Comment at: llvm/test/CodeGen/BPF/CORE/intrinsic-typeinfo-type-match.ll:71-101
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0 (https://github.com/llvm/llvm-project.git d8b1394a0f4bbf57c254f69f8d3aa5381a89b5cd)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !7, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "t1.c", directory: "/tmp/home/yhs/tmp1")
+!2 = !{!3}
+!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "AA", file: !1, line: 1, baseType: !4, size: 32, elements: !5)
+!4 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
+!5 = !{!6}
+!6 = !DIEnumerator(name: "VAL", value: 100, isUnsigned: true)
----------------
d-e-s-o wrote:
> I am unsure how that blob is created or whether I need to adjust it. I just copied it from an existing file for now.
As mentioned in the test itself, it is generated with
  clang -target bpf -S -O2 -g -emit-llvm -Xclang -disable-llvm-passes t1.c

Let us use latest llvm-project to generate IR for this test. The test you are copied using llvm12 which is not correct for this patch as this patch will apply to llvm15. Also please add '/tmp' as the prefix to the path in the below IR,
```
!1 = !DIFile(filename: "t1.c", directory: "/tmp/home/yhs/tmp1")
```

The reason is to avoid test failures when merging the tests. The reason is the path will be actually used by llvm, so adding /tmp will make sure both your local run and also sanity run after merging will have the same behavior.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126838



More information about the llvm-commits mailing list