[all-commits] [llvm/llvm-project] f7d784: [LoongArch][MC] Refine MCInstrAnalysis based on re...

ZhaoQi via All-commits all-commits at lists.llvm.org
Thu Nov 9 23:54:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f7d784709673ca185f6fb0633fd53c72e81f2ae1
      https://github.com/llvm/llvm-project/commit/f7d784709673ca185f6fb0633fd53c72e81f2ae1
  Author: ZhaoQi <zhaoqi01 at loongson.cn>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCTargetDesc.cpp
    M llvm/unittests/Target/LoongArch/CMakeLists.txt
    A llvm/unittests/Target/LoongArch/MCInstrAnalysisTest.cpp

  Log Message:
  -----------
  [LoongArch][MC] Refine MCInstrAnalysis based on registers used (#71276)

MCInstrAnalysis can return properties of instructions (e.g., isCall(),
isBranch(),...) based on the informations that MCInstrDesc can get from
*InstrInfo*.td files. These infos are based on opcodes only, but JIRL
can have different properties based on different registers used.

So this patch refines several MCInstrAnalysis methods: isTerminator,
isCall,isReturn,isBranch,isUnconditionalBranch and isIndirectBranch.

This patch also allows BOLT which will be supported on LoongArch later
to get right instruction infos.




More information about the All-commits mailing list