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.
Differential D83059
[RISCV] Use Generated Instruction Uncompresser lenary on Jul 2 2020, 9:57 AM. Authored by
Details
This change allows relaxInstruction to use the auto-generated I am yet to find a testcase that this affects.
Diff Detail
Event TimelineComment Actions Oh there's more to do, which may involve changes to llvm/utils/TableGen/RISCVCompressInstEmitter.cpp Comment Actions LGTM.
Comment Actions Issues I still need to investigate:
However, this change is also blocking relaxing conditional branches, so I need to get to a conclusion on this quickly. Comment Actions Preliminary data says there's no major difference to code size from this patch, so I'm feeling more confident about it. I still want to do a GCC Torture test run, if possible. Comment Actions I'm afraid this causes compile-time failures with 20030323-1.c, multi-ix.c, and pr53645.c. e.g. +./output_rv64imafdc_lp64_O0/multi-ix.o: in function `.LBB0_1': +multi-ix.c:(.text+0x60): relocation truncated to fit: R_RISCV_BRANCH against `.LBB0_4' +clang-11: error: linker command failed with exit code 1 (use -v to see invocation) Comment Actions So, looking further into this for the failing test case:
|
Nit: declare Res at the point of initialization or, probably better yet, just do the if on the result of uncompressInst.