[all-commits] [llvm/llvm-project] fd5230: [exegesis] SnippetRepetitor: Don't access liveness...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Wed Dec 7 18:15:24 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd52305fdc7572534867247c8fb66093faf52e5c
      https://github.com/llvm/llvm-project/commit/fd52305fdc7572534867247c8fb66093faf52e5c
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    A llvm/test/tools/llvm-exegesis/X86/latency/latency-CVTSD2SI64rr.s
    M llvm/tools/llvm-exegesis/lib/Assembler.cpp
    M llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp

  Log Message:
  -----------
  [exegesis] SnippetRepetitor: Don't access liveness if we disabled it

Otherwise, we get:
```
llvm-exegesis: /repositories/llvm-project/llvm/lib/CodeGen/MachineBasicBlock.cpp:1628: MachineBasicBlock::livein_iterator llvm::MachineBasicBlock::livein_begin() const: Assertion `getParent()->getProperties().hasProperty( MachineFunctionProperties::Property::TracksLiveness) && "Liveness information is accurate"' failed.
```


  Commit: 7c36fcfbbae1fc9b55257f621dbb0bc8d241e5c9
      https://github.com/llvm/llvm-project/commit/7c36fcfbbae1fc9b55257f621dbb0bc8d241e5c9
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    A llvm/test/tools/llvm-exegesis/X86/uops/uops-HLT.s
    M llvm/tools/llvm-exegesis/lib/SnippetRepetitor.cpp

  Log Message:
  -----------
  [exegesis] SnippetRepetitor: don't deal with terminator instructions

These appear to be the only two crashing issues.
Afterwards, we seem to not crash for all opcodes in all repetition modes
in all measurement modes.

Otherwise, we get:
```
#
# Machine code for function foo: NoPHIs, TracksLiveness, NoVRegs

bb.0:
  successors: %bb.1(0x80000000); %bb.1(100.00%)

  $r8 = MOV64ri 2

bb.1:
; predecessors: %bb.0, %bb.1
  successors: %bb.1(0x80000000), %bb.2(0x00000000); %bb.1(100.00%), %bb.2(0.00%)
  liveins: $r8
  HLT
  HLT
  $r8 = ADD64ri8 $r8(tied-def 0), -1, implicit-def $eflags
  JCC_1 %bb.1, 5, implicit $eflags

bb.2:
; predecessors: %bb.1

  RET64

# End machine code for function foo.

*** Bad machine code: Non-terminator instruction after the first terminator ***
- function:    foo
- basic block: %bb.1  (0x55df06791048)
- instruction: $r8 = ADD64ri8 $r8(tied-def 0), -1, implicit-def $eflags
First terminator was:   HLT
LLVM ERROR: Found 1 machine code errors.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: bin/llvm-exegesis --skip-measurements -mode=uops --dump-object-to-disk=0 --repetition-mode=loop --loop-body-size=1000 --result-aggregation-mode=min --opcode-name=HLT --max-configs-per-opcode=8192
1.      Running pass 'Function Pass Manager' on module 'ExegesisInfoTest'.
2.      Running pass 'Verify generated machine code' on function '@foo'

```


Compare: https://github.com/llvm/llvm-project/compare/d3174549d25e...7c36fcfbbae1


More information about the All-commits mailing list