FPGA開発日記

カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages , English Version https://fpgadevdiary.hatenadiary.com/

LLVM13でのAPI変更点について確認

LLVMバックエンドの開発で、これまで使用していたrelease/12.xブランチからrelease/13.xに移行したときのAPIの変更点について確認した。 今回はAPIの変更点が少ない。

namespace llvm {

// 以下のコードを追加
class formatted_raw_ostream;
  • MCTargetDesc/MYRISCVXTargetStreamer.h
bool MYRISCVXFrameLowering::hasFP(const MachineFunction &MF) const {
  const MachineFrameInfo &MFI = MF.getFrameInfo();
  const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo();

  // フレームの条件コードが変わっていた
   return MF.getTarget().Options.DisableFramePointerElim(MF) ||
      RegInfo->hasStackRealignment(MF) || MFI.hasVarSizedObjects() ||
      MFI.isFrameAddressTaken();
}

これでリコンパイルして一応動作を確認することが出来た。

$ ./bin/llvm-lit ../llvm/test/CodeGen/MYRISCVX
-- Testing: 37 tests, 16 workers --
PASS: LLVM :: CodeGen/MYRISCVX/fp_ops_mad.ll (1 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/fp_ops_simple.ll (2 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/func_lot_arguments.ll (3 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/constants.ll (4 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/struct_pass_rv32.ll (5 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/arith_32bit_rv32.ll (6 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/arith_64bit_rv64.ll (7 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/load_pointer.pic.ll (8 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/arith_32bit_rv64.ll (9 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/fp_args.ll (10 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/global_variable.pic.ll (11 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/sum_array.ll (12 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/int_array.static.ll (13 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/int_array.pic.ll (14 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/load_pointer.static.ll (15 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/global_variable.static.ll (16 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/do_while_count.static.ll (17 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/caller.static.ll (18 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/compare_slt.ll (19 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/cond_if.static.ll (20 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/arithmetics.ll (21 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/simple_func.ll (22 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/constants2.ll (23 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/callee.static.ll (24 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/switch_table.static.ll (25 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/mem_access.ll (26 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/select_exp.static.ll (27 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/struct_pass_rv64.ll (28 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/make_frame.ll (29 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/struct_char.static.ll (30 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/struct_pattern_match.static.ll (31 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/rotate.ll (32 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/zero_return.ll (33 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/simple_select.static.ll (34 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/value_return.ll (35 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/long_value.ll (36 of 37)
PASS: LLVM :: CodeGen/MYRISCVX/tailcall.ll (37 of 37)

Testing Time: 0.82s
  Passed: 37