Skip to content

Commit

Permalink
Resolve of merge (conflict) 7b7a193 Cherry pick a couple of commits t…
Browse files Browse the repository at this point in the history
…o improve llvm-spirv perf.. '"xmain"' -> '"xmain-web"' (7 commits) (KhronosGroup#49)

* Resolve of merge (conflict) 7b7a193 Cherry pick a couple of commits to improve llvm-spirv perf.. '"xmain"' -> '"xmain-web"' (7 commits)

  CONFLICT (content): Merge conflict in test/transcoding/annotate_attribute.ll
  CONFLICT (content): Merge conflict in test/transcoding/NoSignedUnsignedWrap.ll

  commit 7b7a193
  Author: Alexey Sotkin <[email protected]>
  Date:   Tue Oct 26 11:12:43 2021 +0300

      Cherry pick a couple of commits to improve llvm-spirv performance (KhronosGroup#46)

      * [NFC] Optimize adding of decorations (KhronosGroup#1233)

      Use std::undordered_set instead of std::multiset with custom comparator.
      It is a bit unclear why std::multiset was required since there is no
      order requirement for OpDecorate instructions in SPIR-V spec, in addition old
      data structure was highly inefficient.

      * [NFC] Optimize OCLUtil::toString usage in checkError function (KhronosGroup#1229)

      `toString` function is called to convert an LLVM IR instruction to a string,
      mostly in order to include it into an error message in case LLVM IR is invalid.
      The problem is that this function is called even when IR is valid which
      significantly slows translator's work.

      This patch reworks `toString` usage in `checkError` method to generate a string
      only in case when LLVM IR is invalid.

      Co-authored-by: Mariya Podchishchaeva <[email protected]>
      Co-authored-by: Viktoria Maximova <[email protected]>

* Resolve of merge (conflict) 7b7a193 Cherry pick a couple of commits to improve llvm-spirv perf.. '"xmain"' -> '"xmain-web"' (7 commits)

  CONFLICT (content): Merge conflict in test/transcoding/annotate_attribute.ll
  CONFLICT (content): Merge conflict in test/transcoding/NoSignedUnsignedWrap.ll

  commit 7b7a193
  Author: Alexey Sotkin <[email protected]>
  Date:   Tue Oct 26 11:12:43 2021 +0300

      Cherry pick a couple of commits to improve llvm-spirv performance (KhronosGroup#46)

      * [NFC] Optimize adding of decorations (KhronosGroup#1233)

      Use std::undordered_set instead of std::multiset with custom comparator.
      It is a bit unclear why std::multiset was required since there is no
      order requirement for OpDecorate instructions in SPIR-V spec, in addition old
      data structure was highly inefficient.

      * [NFC] Optimize OCLUtil::toString usage in checkError function (KhronosGroup#1229)

      `toString` function is called to convert an LLVM IR instruction to a string,
      mostly in order to include it into an error message in case LLVM IR is invalid.
      The problem is that this function is called even when IR is valid which
      significantly slows translator's work.

      This patch reworks `toString` usage in `checkError` method to generate a string
      only in case when LLVM IR is invalid.

      Co-authored-by: Mariya Podchishchaeva <[email protected]>
      Co-authored-by: Viktoria Maximova <[email protected]>

Co-authored-by: iclsrc <[email protected]>
  • Loading branch information
iclsrc and iclsrc authored Oct 26, 2021
1 parent a13949b commit 7c1e63c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/transcoding/NoSignedUnsignedWrap.ll
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM-NEGATIVE

<<<<<<< HEAD
; INTEL_CUSTOMIZATION
; Check SPIR-V versions in a format magic number + version
; CHECK-SPIRV-EXT: 119734787 65536
; CHECK-SPIRV-EXT: Extension "SPV_KHR_no_integer_wrap_decoration"
; CHECK-SPIRV-NOEXT: 119734787 66560
=======
; end INTEL_CUSTOMIZATION

; CHECK-SPIRV: Extension "SPV_KHR_no_integer_wrap_decoration"
>>>>>>> 7b7a1932a0721d31b7517b10c0fe16c16917e888
; CHECK-SPIRV-DAG: Decorate {{[0-9]+}} NoSignedWrap
; CHECK-SPIRV-DAG: Decorate {{[0-9]+}} NoUnsignedWrap
;
Expand Down
5 changes: 2 additions & 3 deletions test/transcoding/annotate_attribute.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_fpga_memory_accesses,+SPV_INTEL_fpga_memory_attributes -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV

<<<<<<< HEAD
; INTEL_CUSTOMIZATION
; Check SPIR-V versions in a format magic number + version
; CHECK-SPIRV: 119734787 66560
; end INTEL_CUSTOMIZATION

=======
>>>>>>> 7b7a1932a0721d31b7517b10c0fe16c16917e888
; CHECK-SPIRV-DAG: Decorate {{[0-9]+}} UserSemantic "42"
; CHECK-SPIRV-DAG: Decorate {{[0-9]+}} UserSemantic "bar"
; CHECK-SPIRV-DAG: Decorate {{[0-9]+}} UserSemantic "{FOO}"
Expand Down

0 comments on commit 7c1e63c

Please sign in to comment.