Page MenuHomePhabricator

[RISCV] Use Generated Instruction Uncompresser
AcceptedPublic

Authored by lenary on Jul 2 2020, 9:57 AM.

Details

Reviewers
luismarques
asb
Summary

This change allows relaxInstruction to use the auto-generated
instruction uncompression routine, rather than a partial implementation
of the same.

I am yet to find a testcase that this affects.

Diff Detail

Unit TestsFailed

TimeTest
20 mslinux > LLVM.MC/RISCV::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-mc -filetype=obj -triple riscv64 -mattr=+c /mnt/disks/ssd0/agent/llvm-project/llvm/test/MC/RISCV/rv64-relax-all.s | /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-objdump -d -M no-aliases --no-show-raw-insn - | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/MC/RISCV/rv64-relax-all.s --check-prefix=INSTR
40 mslinux > Polly.Isl/CodeGen/MemAccess::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/MemAccess -polly-codegen-verify -polly-codegen -polly-codegen-generate-expressions=false -S < /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/MemAccess/generate-all.ll | FileCheck /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/MemAccess/generate-all.ll -check-prefix=SCEV
70 mslinux > Polly.ScopInfo::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo -polly-codegen-verify -analyze -polly-scops -S < /mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo/multidim_srem.ll | FileCheck /mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo/multidim_srem.ll
9,630 mslinux > libomp.env::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -fopenmp -pthread -fno-experimental-isel -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test -I /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/src -L /mnt/disks/ssd0/agent/llvm-project/build/lib -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/ompt /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/env/kmp_set_dispatch_buf.c -o /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/env/Output/kmp_set_dispatch_buf.c.tmp -lm -latomic && env KMP_DISP_NUM_BUFFERS=0 /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/env/Output/kmp_set_dispatch_buf.c.tmp
1,450 mslinux > libomp.worksharing/for::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -fopenmp -pthread -fno-experimental-isel -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test -I /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/src -L /mnt/disks/ssd0/agent/llvm-project/build/lib -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/ompt /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c -o /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/worksharing/for/Output/kmp_set_dispatch_buf.c.tmp -lm -latomic && /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/worksharing/for/Output/kmp_set_dispatch_buf.c.tmp 7
View Full Test Results (6 Failed)

Event Timeline

lenary created this revision.Jul 2 2020, 9:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2020, 9:57 AM
lenary planned changes to this revision.Jul 2 2020, 10:13 AM

Oh there's more to do, which may involve changes to llvm/utils/TableGen/RISCVCompressInstEmitter.cpp

lenary updated this revision to Diff 275166.Jul 2 2020, 10:51 AM
  • Enable More Relaxations
luismarques accepted this revision.Mon, Jul 6, 9:44 AM

LGTM.

llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
147–148

Nit: declare Res at the point of initialization or, probably better yet, just do the if on the result of uncompressInst.

This revision is now accepted and ready to land.Mon, Jul 6, 9:44 AM
asb added a comment.Tue, Jul 14, 11:04 PM

I'm getting a test failure on rv64-relax-all.s with this patch?