[PATCH] D23355: getInstSizeInBytes: sentinel value fix for AArch64, AMDGPU, MSP430

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 08:44:53 PDT 2016


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: jmolloy, t.p.northover, arsenm, dexonsmith, asl, tstellarAMD.
SjoerdMeijer added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm, rengolin, aemerson.

In commit rL277126, target hook getInstSizeInBytes was added to TargetInstrInfo. This function was already implemented by most backends, but some of them can run into llvm_unreachable which makes it impossible to recover from unknown instruction sizes. This fix returns the sentinel value ~0U instead of unreachable in the AArch64, AMDGPU, MSP430 backends.

https://reviews.llvm.org/D23355

Files:
  lib/Target/AArch64/AArch64BranchRelaxation.cpp
  lib/Target/AArch64/AArch64InstrInfo.cpp
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/MSP430/MSP430BranchSelector.cpp
  lib/Target/MSP430/MSP430InstrInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23355.67525.patch
Type: text/x-patch
Size: 3841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/37ec834a/attachment.bin>


More information about the llvm-commits mailing list