[PATCH] D142861: [Clang] avoid relying on StringMap iteration order when roundtripping -analyzer-config

2023-01-29 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins created this revision.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, 
a.sidorin, mgrang, baloghadamsoftware.
Herald added a project: All.
erikdesjardins requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

I am working on another patch that changes StringMap's hash function,
which changes the iteration order here, and breaks some tests,
specifically:

  clang/test/Analysis/NSString.m
  clang/test/Analysis/shallow-mode.m

with errors like:

  generated arguments do not match in round-trip
  generated arguments #1 in round-trip: <...> "-analyzer-config" "ipa=inlining" 
"-analyzer-config" "max-nodes=75000" <...>
  generated arguments #2 in round-trip: <...> "-analyzer-config" 
"max-nodes=75000" "-analyzer-config" "ipa=inlining" <...>

To avoid this, sort the options by key, instead of using the default map
iteration order.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142861

Files:
  clang/lib/Frontend/CompilerInvocation.cpp


Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -877,14 +877,25 @@
   AnalyzerOptions ConfigOpts;
   parseAnalyzerConfigs(ConfigOpts, nullptr);
 
+  // Sort options by key to avoid relying on StringMap iteration order.
+  SmallVector, 4> SortedConfigOpts;
   for (const auto &C : Opts.Config) {
+SortedConfigOpts.emplace_back(C.getKey(), C.getValue());
+  }
+  llvm::sort(SortedConfigOpts, [](const auto &A, const auto &B) {
+return std::get<0>(A) < std::get<0>(B);
+  });
+
+  for (const auto &C : SortedConfigOpts) {
+const llvm::StringRef &Key = std::get<0>(C);
+const std::string &Value = std::get<1>(C);
 // Don't generate anything that came from parseAnalyzerConfigs. It would be
 // redundant and may not be valid on the command line.
-auto Entry = ConfigOpts.Config.find(C.getKey());
-if (Entry != ConfigOpts.Config.end() && Entry->getValue() == C.getValue())
+auto Entry = ConfigOpts.Config.find(Key);
+if (Entry != ConfigOpts.Config.end() && Entry->getValue() == Value)
   continue;
 
-GenerateArg(Args, OPT_analyzer_config, C.getKey() + "=" + C.getValue(), 
SA);
+GenerateArg(Args, OPT_analyzer_config, Key + "=" + Value, SA);
   }
 
   // Nothing to generate for FullCompilerInvocation.


Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -877,14 +877,25 @@
   AnalyzerOptions ConfigOpts;
   parseAnalyzerConfigs(ConfigOpts, nullptr);
 
+  // Sort options by key to avoid relying on StringMap iteration order.
+  SmallVector, 4> SortedConfigOpts;
   for (const auto &C : Opts.Config) {
+SortedConfigOpts.emplace_back(C.getKey(), C.getValue());
+  }
+  llvm::sort(SortedConfigOpts, [](const auto &A, const auto &B) {
+return std::get<0>(A) < std::get<0>(B);
+  });
+
+  for (const auto &C : SortedConfigOpts) {
+const llvm::StringRef &Key = std::get<0>(C);
+const std::string &Value = std::get<1>(C);
 // Don't generate anything that came from parseAnalyzerConfigs. It would be
 // redundant and may not be valid on the command line.
-auto Entry = ConfigOpts.Config.find(C.getKey());
-if (Entry != ConfigOpts.Config.end() && Entry->getValue() == C.getValue())
+auto Entry = ConfigOpts.Config.find(Key);
+if (Entry != ConfigOpts.Config.end() && Entry->getValue() == Value)
   continue;
 
-GenerateArg(Args, OPT_analyzer_config, C.getKey() + "=" + C.getValue(), SA);
+GenerateArg(Args, OPT_analyzer_config, Key + "=" + Value, SA);
   }
 
   // Nothing to generate for FullCompilerInvocation.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-01-29 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins created this revision.
Herald added subscribers: Moerafaat, zero9178, Enna1, bzcheeseman, sdasgup3, 
wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, wenlei, msifontes, 
jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, 
antiagainst, shauheen, rriddle, mehdi_amini, thopre, kadircet, arphaman, 
JDevlieghere, hiraditya.
Herald added a reviewer: JDevlieghere.
Herald added a project: All.
erikdesjardins requested review of this revision.
Herald added subscribers: cfe-commits, llvm-commits, lldb-commits, Sanitizers, 
stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, Sanitizers, LLDB, MLIR, LLVM, clang-tools-extra.

Depends on https://reviews.llvm.org/D142861.

Alternative to https://reviews.llvm.org/D137601.

xxHash is much faster than djbHash. This makes a simple Rust test case with a 
large constant string 10% faster to compile.

Previous attempts at changing this hash function (e.g. 
https://reviews.llvm.org/D97396) had to be reverted due to breaking tests that 
depended on iteration order.
No additional tests fail with this patch compared to `main` when running 
`check-all` with `-DLLVM_ENABLE_PROJECTS="all"` (on a Linux host), so I hope I 
found everything that needs to be changed.

For posterity, the tests that fail on main are:

  ompd-test :: api_tests/test_ompd_finalize.c
  ompd-test :: api_tests/test_ompd_get_curr_parallel_handle.c

Overall:

  Skipped  : 43
  Unsupported  :   2862
  Passed   : 100507
  Expectedly Failed:296
  Failed   :  2


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142862

Files:
  clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
  clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
  clang-tools-extra/test/modularize/ProblemsInconsistent.modularize
  clang/unittests/Basic/SarifTest.cpp
  compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
  lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
  llvm/lib/Support/StringMap.cpp
  llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
  llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
  llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
  llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/ObjectYAML/Offload/binary.yaml
  llvm/test/ObjectYAML/Offload/multiple_members.yaml
  llvm/test/tools/dsymutil/ARM/extern-alias.test
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  mlir/test/Transforms/print-op-graph.mlir
  mlir/test/mlir-lsp-server/completion.test

Index: mlir/test/mlir-lsp-server/completion.test
===
--- mlir/test/mlir-lsp-server/completion.test
+++ mlir/test/mlir-lsp-server/completion.test
@@ -84,18 +84,18 @@
 // CHECK-NEXT:"isIncomplete": false,
 // CHECK-NEXT:"items": [
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
-// CHECK-NEXT:"insertText": "cast",
-// CHECK-NEXT:"insertTextFormat": 1,
-// CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%cast"
-// CHECK-NEXT:  },
-// CHECK-NEXT:  {
 // CHECK-NEXT:"detail": "arg #0: i32",
 // CHECK-NEXT:"insertText": "arg",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
 // CHECK-NEXT:"label": "%arg"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  {
+// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
+// CHECK-NEXT:"insertText": "cast",
+// CHECK-NEXT:"insertTextFormat": 1,
+// CHECK-NEXT:"kind": 6,
+// CHECK-NEXT:"label": "%cast"
 // CHECK-NEXT:  }
 // CHECK: ]
 // CHECK-NEXT:  }
Index: mlir/test/Transforms/print-op-graph.mlir
===
--- mlir/test/Transforms/print-op-graph.mlir
+++ mlir/test/Transforms/print-op-graph.mlir
@@ -6,49 +6,49 @@
 //   DFG: subgraph {{.*}}
 //   DFG:   label = "func.func{{.*}}merge_blocks
 //   DFG:   subgraph {{.*}} {
-//   DFG: v[[ARG0:.*]] [label = "arg0"
-//   DFG: v[[CONST10:.*]] [label ={{.*}}10 : i32
+//   DFG: v[[ARG0:.*]] [shape = ellipse, label = "arg0"
+//   DFG: v[[CONST10:.*]] [shape = ellipse, label ={{.*}}10 : i32
 //   DFG: subgraph [[CLUSTER_MERGE_BLOCKS:.*]] {
-//   DFG:   v[[ANCHOR:.*]] [label = " ", shape = plain]
+//   DFG:   v[[ANCHOR:.*]] [shape = plain, label = " "]
 //   DFG:   label = "test.merge_blocks
 //   DFG:   subgraph {{.*}} {
-//   DFG: v[[TEST_BR:.*]] [label = "test.br
+//   DFG: v[[TEST_BR:.*]] [shape = ellipse, label = "test.br
 //   DFG:   }
 //   DFG:   subgraph {{.*}} {
 //   DFG:   }
 //   DFG:  

[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-01-29 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins added inline comments.



Comment at: llvm/test/DebugInfo/X86/gnu-public-names.ll:68-71
 ; ASM: .byte   32  # Attributes: VARIABLE, EXTERNAL
+; ASM-NEXT: .asciz  "ns::global_namespace_variable"   # External Name
+; ASM: .byte   32  # Attributes: VARIABLE, EXTERNAL
 ; ASM-NEXT: .asciz  "global_variable"   # External Name

Previously, this was

```
; ASM: .byte   32  # Attributes: VARIABLE, EXTERNAL
; ASM-NEXT: .asciz  "global_variable"   # External Name
...more lines...
; ASM: .byte   32  # Attributes: VARIABLE, EXTERNAL
; ASM-NEXT: .asciz  "ns::global_namespace_variable"   # External Name
```

but the reordering resulted in there being another `.byte   32` (a very fragile 
check line!) before `global_variable`.



Comment at: llvm/test/DebugInfo/X86/gnu-public-names.ll:189
 
-; CHECK:   DW_TAG_subprogram
+; CHECK:   [[GLOBAL_F7:0x[0-9a-f]+]]: DW_TAG_subprogram
+; CHECK: DW_AT_linkage_name

Similarly here--`f7` used to be at the end of the list below, and was just 
ignored, but now it appears in the middle


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-01-30 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins added a subscriber: nikic.
erikdesjardins added a comment.

In D142862#4089860 , 
@serge-sans-paille wrote:

> Can  you take a shot against https://llvm-compile-time-tracker.com/ so that 
> we get an hint of the practical speedup?

I don't think I have permission to use that. @nikic?

> Looks like xxhash.h is missing from the patch.

It already exists: 
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/xxhash.h


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142861: [Clang] avoid relying on StringMap iteration order when roundtripping -analyzer-config

2023-01-30 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins updated this revision to Diff 493426.
erikdesjardins added a comment.

Improve code style. `ninja check-clang` still passes (as expected)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142861

Files:
  clang/lib/Frontend/CompilerInvocation.cpp


Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -877,14 +877,20 @@
   AnalyzerOptions ConfigOpts;
   parseAnalyzerConfigs(ConfigOpts, nullptr);
 
-  for (const auto &C : Opts.Config) {
+  // Sort options by key to avoid relying on StringMap iteration order.
+  SmallVector, 4> SortedConfigOpts;
+  for (const auto &C : Opts.Config)
+SortedConfigOpts.emplace_back(C.getKey(), C.getValue());
+  llvm::sort(SortedConfigOpts, llvm::less_first());
+
+  for (const auto &[Key, Value] : SortedConfigOpts) {
 // Don't generate anything that came from parseAnalyzerConfigs. It would be
 // redundant and may not be valid on the command line.
-auto Entry = ConfigOpts.Config.find(C.getKey());
-if (Entry != ConfigOpts.Config.end() && Entry->getValue() == C.getValue())
+auto Entry = ConfigOpts.Config.find(Key);
+if (Entry != ConfigOpts.Config.end() && Entry->getValue() == Value)
   continue;
 
-GenerateArg(Args, OPT_analyzer_config, C.getKey() + "=" + C.getValue(), 
SA);
+GenerateArg(Args, OPT_analyzer_config, Key + "=" + Value, SA);
   }
 
   // Nothing to generate for FullCompilerInvocation.


Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -877,14 +877,20 @@
   AnalyzerOptions ConfigOpts;
   parseAnalyzerConfigs(ConfigOpts, nullptr);
 
-  for (const auto &C : Opts.Config) {
+  // Sort options by key to avoid relying on StringMap iteration order.
+  SmallVector, 4> SortedConfigOpts;
+  for (const auto &C : Opts.Config)
+SortedConfigOpts.emplace_back(C.getKey(), C.getValue());
+  llvm::sort(SortedConfigOpts, llvm::less_first());
+
+  for (const auto &[Key, Value] : SortedConfigOpts) {
 // Don't generate anything that came from parseAnalyzerConfigs. It would be
 // redundant and may not be valid on the command line.
-auto Entry = ConfigOpts.Config.find(C.getKey());
-if (Entry != ConfigOpts.Config.end() && Entry->getValue() == C.getValue())
+auto Entry = ConfigOpts.Config.find(Key);
+if (Entry != ConfigOpts.Config.end() && Entry->getValue() == Value)
   continue;
 
-GenerateArg(Args, OPT_analyzer_config, C.getKey() + "=" + C.getValue(), SA);
+GenerateArg(Args, OPT_analyzer_config, Key + "=" + Value, SA);
   }
 
   // Nothing to generate for FullCompilerInvocation.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142861: [Clang] avoid relying on StringMap iteration order when roundtripping -analyzer-config

2023-01-31 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins added a comment.

I don't have commit access, please commit this on my behalf: `Erik Desjardins 
`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142861

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-01 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins updated this revision to Diff 494155.
erikdesjardins added a comment.

rebase over landed D142861 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

Files:
  clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
  clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
  clang-tools-extra/test/modularize/ProblemsInconsistent.modularize
  clang/unittests/Basic/SarifTest.cpp
  compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
  lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
  llvm/lib/Support/StringMap.cpp
  llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
  llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
  llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
  llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/ObjectYAML/Offload/binary.yaml
  llvm/test/ObjectYAML/Offload/multiple_members.yaml
  llvm/test/tools/dsymutil/ARM/extern-alias.test
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  mlir/test/Transforms/print-op-graph.mlir
  mlir/test/mlir-lsp-server/completion.test

Index: mlir/test/mlir-lsp-server/completion.test
===
--- mlir/test/mlir-lsp-server/completion.test
+++ mlir/test/mlir-lsp-server/completion.test
@@ -84,18 +84,18 @@
 // CHECK-NEXT:"isIncomplete": false,
 // CHECK-NEXT:"items": [
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
-// CHECK-NEXT:"insertText": "cast",
-// CHECK-NEXT:"insertTextFormat": 1,
-// CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%cast"
-// CHECK-NEXT:  },
-// CHECK-NEXT:  {
 // CHECK-NEXT:"detail": "arg #0: i32",
 // CHECK-NEXT:"insertText": "arg",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
 // CHECK-NEXT:"label": "%arg"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  {
+// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
+// CHECK-NEXT:"insertText": "cast",
+// CHECK-NEXT:"insertTextFormat": 1,
+// CHECK-NEXT:"kind": 6,
+// CHECK-NEXT:"label": "%cast"
 // CHECK-NEXT:  }
 // CHECK: ]
 // CHECK-NEXT:  }
Index: mlir/test/Transforms/print-op-graph.mlir
===
--- mlir/test/Transforms/print-op-graph.mlir
+++ mlir/test/Transforms/print-op-graph.mlir
@@ -6,49 +6,49 @@
 //   DFG: subgraph {{.*}}
 //   DFG:   label = "func.func{{.*}}merge_blocks
 //   DFG:   subgraph {{.*}} {
-//   DFG: v[[ARG0:.*]] [label = "arg0"
-//   DFG: v[[CONST10:.*]] [label ={{.*}}10 : i32
+//   DFG: v[[ARG0:.*]] [shape = ellipse, label = "arg0"
+//   DFG: v[[CONST10:.*]] [shape = ellipse, label ={{.*}}10 : i32
 //   DFG: subgraph [[CLUSTER_MERGE_BLOCKS:.*]] {
-//   DFG:   v[[ANCHOR:.*]] [label = " ", shape = plain]
+//   DFG:   v[[ANCHOR:.*]] [shape = plain, label = " "]
 //   DFG:   label = "test.merge_blocks
 //   DFG:   subgraph {{.*}} {
-//   DFG: v[[TEST_BR:.*]] [label = "test.br
+//   DFG: v[[TEST_BR:.*]] [shape = ellipse, label = "test.br
 //   DFG:   }
 //   DFG:   subgraph {{.*}} {
 //   DFG:   }
 //   DFG: }
-//   DFG: v[[TEST_RET:.*]] [label = "test.return
+//   DFG: v[[TEST_RET:.*]] [shape = ellipse, label = "test.return
 //   DFG:   v[[ARG0]] -> v[[TEST_BR]]
 //   DFG:   v[[CONST10]] -> v[[TEST_BR]]
-//   DFG:   v[[ANCHOR]] -> v[[TEST_RET]] [{{.*}}, ltail = [[CLUSTER_MERGE_BLOCKS]]]
-//   DFG:   v[[ANCHOR]] -> v[[TEST_RET]] [{{.*}}, ltail = [[CLUSTER_MERGE_BLOCKS]]]
+//   DFG:   v[[ANCHOR]] -> v[[TEST_RET]] [ltail = [[CLUSTER_MERGE_BLOCKS]], {{.*}}]
+//   DFG:   v[[ANCHOR]] -> v[[TEST_RET]] [ltail = [[CLUSTER_MERGE_BLOCKS]], {{.*}}]
 
 // CFG-LABEL: digraph G {
 //   CFG:   subgraph {{.*}} {
 //   CFG: subgraph {{.*}}
 //   CFG:   label = "func.func{{.*}}merge_blocks
 //   CFG:   subgraph {{.*}} {
-//   CFG: v[[C1:.*]] [label = "arith.constant
-//   CFG: v[[C2:.*]] [label = "arith.constant
-//   CFG: v[[C3:.*]] [label = "arith.constant
-//   CFG: v[[C4:.*]] [label = "arith.constant
-//   CFG: v[[TEST_FUNC:.*]] [label = "test.func
+//   CFG: v[[C1:.*]] [shape = ellipse, label = "arith.constant
+//   CFG: v[[C2:.*]] [shape = ellipse, label = "arith.constant
+//   CFG: v[[C3:.*]] [shape = ellipse, label = "arith.constant
+//   CFG: v[[C4:.*]] [shape = ellipse, 

[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-01 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins added a comment.

In D142862#4089860 , 
@serge-sans-paille wrote:

> Can  you take a shot against https://llvm-compile-time-tracker.com/ so that 
> we get an hint of the practical speedup?

I ran rustc perf tests using a patched LLVM in 
https://github.com/rust-lang/rust/pull/107552#issuecomment-1411927687,
you can see the results here: 
https://perf.rust-lang.org/compare.html?start=ad8e1dc2863f63c35ef3ceef3064d0851a1d2582&end=8aaf54b663467dc48ff24d764aa9f73c61db2733&stat=instructions:u
Improvements from 0.2%-2% on various benchmarks, no regressions.

@serge-sans-paille it looks like you have access to llvm-compile-time-tracker, 
can you push this patch up so we can see those perf tests too?
Probable oneliner: `git remote add erikdesjardins 
https://github.com/erikdesjardins/llvm-project.git && git fetch erikdesjardins 
&& git push origin erikdesjardins/xxhash-perf:refs/heads/perf/xxhash`

> Do you intend to (optionnaly) provide XXH3 as described in 
> https://github.com/Cyan4973/xxHash ?

The current version of xxhash in tree is stripped down to just xxhash64. I 
don't intend to change that as part of this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-02 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins added inline comments.



Comment at: mlir/test/Transforms/print-op-graph.mlir:9
 //   DFG:   subgraph {{.*}} {
-//   DFG: v[[ARG0:.*]] [label = "arg0"
-//   DFG: v[[CONST10:.*]] [label ={{.*}}10 : i32
+//   DFG: v[[ARG0:.*]] [shape = ellipse, label = "arg0"
+//   DFG: v[[CONST10:.*]] [shape = ellipse, label ={{.*}}10 : i32

Opened https://reviews.llvm.org/D143239 for this test, I'll rebase once it 
lands.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-04 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins updated this revision to Diff 494835.
erikdesjardins added a comment.

rebase, remove now-unnecessary test changes


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

Files:
  clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
  clang/unittests/Basic/SarifTest.cpp
  compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
  lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
  llvm/lib/Support/StringMap.cpp
  llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
  llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
  llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
  llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/ObjectYAML/Offload/binary.yaml
  llvm/test/ObjectYAML/Offload/multiple_members.yaml
  llvm/test/tools/dsymutil/ARM/extern-alias.test
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  mlir/test/mlir-lsp-server/completion.test

Index: mlir/test/mlir-lsp-server/completion.test
===
--- mlir/test/mlir-lsp-server/completion.test
+++ mlir/test/mlir-lsp-server/completion.test
@@ -84,18 +84,18 @@
 // CHECK-NEXT:"isIncomplete": false,
 // CHECK-NEXT:"items": [
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
-// CHECK-NEXT:"insertText": "cast",
-// CHECK-NEXT:"insertTextFormat": 1,
-// CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%cast"
-// CHECK-NEXT:  },
-// CHECK-NEXT:  {
 // CHECK-NEXT:"detail": "arg #0: i32",
 // CHECK-NEXT:"insertText": "arg",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
 // CHECK-NEXT:"label": "%arg"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  {
+// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
+// CHECK-NEXT:"insertText": "cast",
+// CHECK-NEXT:"insertTextFormat": 1,
+// CHECK-NEXT:"kind": 6,
+// CHECK-NEXT:"label": "%cast"
 // CHECK-NEXT:  }
 // CHECK: ]
 // CHECK-NEXT:  }
Index: llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
===
--- llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
+++ llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
@@ -6,15 +6,15 @@
 RUN: -suppl-min-size-threshold=0 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX1
 
-MIX1: foo:
-MIX1-NEXT: Hash: 0x0007
-MIX1-NEXT: Counters: 5
-MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: goo:
 MIX1-NEXT: Hash: 0x0005
 MIX1-NEXT: Counters: 3
 MIX1-NOT: Block counts:
 MIX1-SAME: 
+MIX1: foo:
+MIX1-NEXT: Hash: 0x0007
+MIX1-NEXT: Counters: 5
+MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: moo:
 MIX1-NEXT: Hash: 0x0009
 MIX1-NEXT: Counters: 4
@@ -27,16 +27,16 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX2
 
-MIX2: foo:
-MIX2-NEXT: Hash: 0x0007
-MIX2-NEXT: Counters: 5
-MIX2-NOT: Block counts:
-MIX2-SAME: 
 MIX2: goo:
 MIX2-NEXT: Hash: 0x0005
 MIX2-NEXT: Counters: 3
 MIX2-NOT: Block counts:
 MIX2-SAME: 
+MIX2: foo:
+MIX2-NEXT: Hash: 0x0007
+MIX2-NEXT: Counters: 5
+MIX2-NOT: Block counts:
+MIX2-SAME: 
 MIX2: moo:
 MIX2-NEXT: Hash: 0x0009
 MIX2-NEXT: Counters: 4
@@ -49,15 +49,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX3
 
-MIX3: foo:
-MIX3-NEXT: Hash: 0x0007
-MIX3-NEXT: Counters: 5
-MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: goo:
 MIX3-NEXT: Hash: 0x0005
 MIX3-NEXT: Counters: 3
 MIX3-NOT: Block counts:
 MIX3-SAME: 
+MIX3: foo:
+MIX3-NEXT: Hash: 0x0007
+MIX3-NEXT: Counters: 5
+MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: moo:
 MIX3-NEXT: Hash: 0x0009
 MIX3-NEXT: Counters: 4
@@ -71,15 +71,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr_small.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX4
 
-MIX4: foo:
-MIX4-NEXT: Hash: 0x0007
-MIX4-NEXT: Counters: 1
-MIX4-NEXT: Block counts: [0]
 MIX4: goo:
 MIX4-NEXT: Hash: 0x0005
 MIX4-NEXT: Counters: 3
 MIX4-NOT: Block counts:
 MIX4-SAME: 
+MIX4: foo:
+MIX4-NEXT: Hash: 0x0007
+MIX4-NEXT: Counters: 1
+MIX4-NEXT: Block counts: [0]
 MIX4: moo:
 MIX4-NEXT: Hash: 0x0009
 MIX4-NEXT: Counters: 1
Index: llvm/test/tools/dsymutil/ARM/extern-alias.test

[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-04 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins updated this revision to Diff 494836.
erikdesjardins edited the summary of this revision.
erikdesjardins added a comment.

update description


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

Files:
  clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
  clang/unittests/Basic/SarifTest.cpp
  compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
  lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
  llvm/lib/Support/StringMap.cpp
  llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
  llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
  llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
  llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/ObjectYAML/Offload/binary.yaml
  llvm/test/ObjectYAML/Offload/multiple_members.yaml
  llvm/test/tools/dsymutil/ARM/extern-alias.test
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  mlir/test/mlir-lsp-server/completion.test

Index: mlir/test/mlir-lsp-server/completion.test
===
--- mlir/test/mlir-lsp-server/completion.test
+++ mlir/test/mlir-lsp-server/completion.test
@@ -84,18 +84,18 @@
 // CHECK-NEXT:"isIncomplete": false,
 // CHECK-NEXT:"items": [
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
-// CHECK-NEXT:"insertText": "cast",
-// CHECK-NEXT:"insertTextFormat": 1,
-// CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%cast"
-// CHECK-NEXT:  },
-// CHECK-NEXT:  {
 // CHECK-NEXT:"detail": "arg #0: i32",
 // CHECK-NEXT:"insertText": "arg",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
 // CHECK-NEXT:"label": "%arg"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  {
+// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
+// CHECK-NEXT:"insertText": "cast",
+// CHECK-NEXT:"insertTextFormat": 1,
+// CHECK-NEXT:"kind": 6,
+// CHECK-NEXT:"label": "%cast"
 // CHECK-NEXT:  }
 // CHECK: ]
 // CHECK-NEXT:  }
Index: llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
===
--- llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
+++ llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
@@ -6,15 +6,15 @@
 RUN: -suppl-min-size-threshold=0 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX1
 
-MIX1: foo:
-MIX1-NEXT: Hash: 0x0007
-MIX1-NEXT: Counters: 5
-MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: goo:
 MIX1-NEXT: Hash: 0x0005
 MIX1-NEXT: Counters: 3
 MIX1-NOT: Block counts:
 MIX1-SAME: 
+MIX1: foo:
+MIX1-NEXT: Hash: 0x0007
+MIX1-NEXT: Counters: 5
+MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: moo:
 MIX1-NEXT: Hash: 0x0009
 MIX1-NEXT: Counters: 4
@@ -27,16 +27,16 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX2
 
-MIX2: foo:
-MIX2-NEXT: Hash: 0x0007
-MIX2-NEXT: Counters: 5
-MIX2-NOT: Block counts:
-MIX2-SAME: 
 MIX2: goo:
 MIX2-NEXT: Hash: 0x0005
 MIX2-NEXT: Counters: 3
 MIX2-NOT: Block counts:
 MIX2-SAME: 
+MIX2: foo:
+MIX2-NEXT: Hash: 0x0007
+MIX2-NEXT: Counters: 5
+MIX2-NOT: Block counts:
+MIX2-SAME: 
 MIX2: moo:
 MIX2-NEXT: Hash: 0x0009
 MIX2-NEXT: Counters: 4
@@ -49,15 +49,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX3
 
-MIX3: foo:
-MIX3-NEXT: Hash: 0x0007
-MIX3-NEXT: Counters: 5
-MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: goo:
 MIX3-NEXT: Hash: 0x0005
 MIX3-NEXT: Counters: 3
 MIX3-NOT: Block counts:
 MIX3-SAME: 
+MIX3: foo:
+MIX3-NEXT: Hash: 0x0007
+MIX3-NEXT: Counters: 5
+MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: moo:
 MIX3-NEXT: Hash: 0x0009
 MIX3-NEXT: Counters: 4
@@ -71,15 +71,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr_small.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX4
 
-MIX4: foo:
-MIX4-NEXT: Hash: 0x0007
-MIX4-NEXT: Counters: 1
-MIX4-NEXT: Block counts: [0]
 MIX4: goo:
 MIX4-NEXT: Hash: 0x0005
 MIX4-NEXT: Counters: 3
 MIX4-NOT: Block counts:
 MIX4-SAME: 
+MIX4: foo:
+MIX4-NEXT: Hash: 0x0007
+MIX4-NEXT: Counters: 1
+MIX4-NEXT: Block counts: [0]
 MIX4: moo:
 MIX4-NEXT: Hash: 0x0009
 MIX4-NEXT: Counters: 1
Index: llvm/test/tools/dsymutil/ARM/extern-alias.test
=

[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-04 Thread Erik Desjardins via Phabricator via cfe-commits
erikdesjardins updated this revision to Diff 494861.
erikdesjardins added a comment.

rebase


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

Files:
  clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
  clang/unittests/Basic/SarifTest.cpp
  compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
  lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
  llvm/lib/Support/StringMap.cpp
  llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
  llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
  llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
  llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/tools/dsymutil/ARM/extern-alias.test
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  mlir/test/mlir-lsp-server/completion.test

Index: mlir/test/mlir-lsp-server/completion.test
===
--- mlir/test/mlir-lsp-server/completion.test
+++ mlir/test/mlir-lsp-server/completion.test
@@ -84,18 +84,18 @@
 // CHECK-NEXT:"isIncomplete": false,
 // CHECK-NEXT:"items": [
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
-// CHECK-NEXT:"insertText": "cast",
-// CHECK-NEXT:"insertTextFormat": 1,
-// CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%cast"
-// CHECK-NEXT:  },
-// CHECK-NEXT:  {
 // CHECK-NEXT:"detail": "arg #0: i32",
 // CHECK-NEXT:"insertText": "arg",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
 // CHECK-NEXT:"label": "%arg"
+// CHECK-NEXT:  },
+// CHECK-NEXT:  {
+// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
+// CHECK-NEXT:"insertText": "cast",
+// CHECK-NEXT:"insertTextFormat": 1,
+// CHECK-NEXT:"kind": 6,
+// CHECK-NEXT:"label": "%cast"
 // CHECK-NEXT:  }
 // CHECK: ]
 // CHECK-NEXT:  }
Index: llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
===
--- llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
+++ llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
@@ -6,15 +6,15 @@
 RUN: -suppl-min-size-threshold=0 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX1
 
-MIX1: foo:
-MIX1-NEXT: Hash: 0x0007
-MIX1-NEXT: Counters: 5
-MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: goo:
 MIX1-NEXT: Hash: 0x0005
 MIX1-NEXT: Counters: 3
 MIX1-NOT: Block counts:
 MIX1-SAME: 
+MIX1: foo:
+MIX1-NEXT: Hash: 0x0007
+MIX1-NEXT: Counters: 5
+MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: moo:
 MIX1-NEXT: Hash: 0x0009
 MIX1-NEXT: Counters: 4
@@ -27,16 +27,16 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX2
 
-MIX2: foo:
-MIX2-NEXT: Hash: 0x0007
-MIX2-NEXT: Counters: 5
-MIX2-NOT: Block counts:
-MIX2-SAME: 
 MIX2: goo:
 MIX2-NEXT: Hash: 0x0005
 MIX2-NEXT: Counters: 3
 MIX2-NOT: Block counts:
 MIX2-SAME: 
+MIX2: foo:
+MIX2-NEXT: Hash: 0x0007
+MIX2-NEXT: Counters: 5
+MIX2-NOT: Block counts:
+MIX2-SAME: 
 MIX2: moo:
 MIX2-NEXT: Hash: 0x0009
 MIX2-NEXT: Counters: 4
@@ -49,15 +49,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX3
 
-MIX3: foo:
-MIX3-NEXT: Hash: 0x0007
-MIX3-NEXT: Counters: 5
-MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: goo:
 MIX3-NEXT: Hash: 0x0005
 MIX3-NEXT: Counters: 3
 MIX3-NOT: Block counts:
 MIX3-SAME: 
+MIX3: foo:
+MIX3-NEXT: Hash: 0x0007
+MIX3-NEXT: Counters: 5
+MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: moo:
 MIX3-NEXT: Hash: 0x0009
 MIX3-NEXT: Counters: 4
@@ -71,15 +71,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr_small.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX4
 
-MIX4: foo:
-MIX4-NEXT: Hash: 0x0007
-MIX4-NEXT: Counters: 1
-MIX4-NEXT: Block counts: [0]
 MIX4: goo:
 MIX4-NEXT: Hash: 0x0005
 MIX4-NEXT: Counters: 3
 MIX4-NOT: Block counts:
 MIX4-SAME: 
+MIX4: foo:
+MIX4-NEXT: Hash: 0x0007
+MIX4-NEXT: Counters: 1
+MIX4-NEXT: Block counts: [0]
 MIX4: moo:
 MIX4-NEXT: Hash: 0x0009
 MIX4-NEXT: Counters: 1
Index: llvm/test/tools/dsymutil/ARM/extern-alias.test
===
--- llvm/test/tools/dsymutil/ARM/extern-alias.test
+++ llvm/test/tools/dsymutil/ARM/extern-alias.test

[PATCH] D142862: [Support] change StringMap hash function from djbHash to xxHash

2023-02-07 Thread Erik Desjardins via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd768b97424f9: [Support] change StringMap hash function from 
djbHash to xxHash (authored by erikdesjardins).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142862

Files:
  clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
  clang/unittests/Basic/SarifTest.cpp
  compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
  lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
  llvm/lib/Support/StringMap.cpp
  llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
  llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
  llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
  llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll
  llvm/test/tools/dsymutil/ARM/extern-alias.test
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  mlir/test/mlir-lsp-server/completion.test

Index: mlir/test/mlir-lsp-server/completion.test
===
--- mlir/test/mlir-lsp-server/completion.test
+++ mlir/test/mlir-lsp-server/completion.test
@@ -84,18 +84,18 @@
 // CHECK-NEXT:"isIncomplete": false,
 // CHECK-NEXT:"items": [
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
-// CHECK-NEXT:"insertText": "cast",
+// CHECK-NEXT:"detail": "arg #0: i32",
+// CHECK-NEXT:"insertText": "arg",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%cast"
+// CHECK-NEXT:"label": "%arg"
 // CHECK-NEXT:  },
 // CHECK-NEXT:  {
-// CHECK-NEXT:"detail": "arg #0: i32",
-// CHECK-NEXT:"insertText": "arg",
+// CHECK-NEXT:"detail": "builtin.unrealized_conversion_cast: !pdl.value",
+// CHECK-NEXT:"insertText": "cast",
 // CHECK-NEXT:"insertTextFormat": 1,
 // CHECK-NEXT:"kind": 6,
-// CHECK-NEXT:"label": "%arg"
+// CHECK-NEXT:"label": "%cast"
 // CHECK-NEXT:  }
 // CHECK: ]
 // CHECK-NEXT:  }
Index: llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
===
--- llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
+++ llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
@@ -6,15 +6,15 @@
 RUN: -suppl-min-size-threshold=0 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX1
 
-MIX1: foo:
-MIX1-NEXT: Hash: 0x0007
-MIX1-NEXT: Counters: 5
-MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: goo:
 MIX1-NEXT: Hash: 0x0005
 MIX1-NEXT: Counters: 3
 MIX1-NOT: Block counts:
 MIX1-SAME: 
+MIX1: foo:
+MIX1-NEXT: Hash: 0x0007
+MIX1-NEXT: Counters: 5
+MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
 MIX1: moo:
 MIX1-NEXT: Hash: 0x0009
 MIX1-NEXT: Counters: 4
@@ -27,16 +27,16 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX2
 
-MIX2: foo:
-MIX2-NEXT: Hash: 0x0007
-MIX2-NEXT: Counters: 5
-MIX2-NOT: Block counts:
-MIX2-SAME: 
 MIX2: goo:
 MIX2-NEXT: Hash: 0x0005
 MIX2-NEXT: Counters: 3
 MIX2-NOT: Block counts:
 MIX2-SAME: 
+MIX2: foo:
+MIX2-NEXT: Hash: 0x0007
+MIX2-NEXT: Counters: 5
+MIX2-NOT: Block counts:
+MIX2-SAME: 
 MIX2: moo:
 MIX2-NEXT: Hash: 0x0009
 MIX2-NEXT: Counters: 4
@@ -49,15 +49,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX3
 
-MIX3: foo:
-MIX3-NEXT: Hash: 0x0007
-MIX3-NEXT: Counters: 5
-MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: goo:
 MIX3-NEXT: Hash: 0x0005
 MIX3-NEXT: Counters: 3
 MIX3-NOT: Block counts:
 MIX3-SAME: 
+MIX3: foo:
+MIX3-NEXT: Hash: 0x0007
+MIX3-NEXT: Counters: 5
+MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
 MIX3: moo:
 MIX3-NEXT: Hash: 0x0009
 MIX3-NEXT: Counters: 4
@@ -71,15 +71,15 @@
 RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr_small.proftext -o %t
 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX4
 
-MIX4: foo:
-MIX4-NEXT: Hash: 0x0007
-MIX4-NEXT: Counters: 1
-MIX4-NEXT: Block counts: [0]
 MIX4: goo:
 MIX4-NEXT: Hash: 0x0005
 MIX4-NEXT: Counters: 3
 MIX4-NOT: Block counts:
 MIX4-SAME: 
+MIX4: foo:
+MIX4-NEXT: Hash: 0x0007
+MIX4-NEXT: Counters: 1
+MIX4-NEXT: Block counts: [0]
 MIX4: moo:
 MIX4-NEXT: Hash: 0x0009
 MIX4-NEXT: Counters: 1
Index: llvm/test/tools/dsymutil/ARM/extern-alias.test
=