[PATCH] D122533: [avr] Remove AVRRelaxMemOperations

Patryk Wychowaniec via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 26 12:52:04 PDT 2022


Patryk27 created this revision.
Herald added subscribers: Jim, hiraditya, mgorny, dylanmckay.
Herald added a project: All.
Patryk27 requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

This commit contains a refactoring that merges AVRRelaxMemOperations
into AVRExpandPseudoInsts, so that we have a single place in code that
expands the STDWPtrQRr opcode.

Seizing the day, I've also fixed a couple of potential bugs with our
previous implementation (e.g. when the destination register was killed,
the previous implementation would try to `.addDef()` that killed
register, crashing LLVM in the process - that's fixed now, as proved by
the test).

In the bigger picture, this commit is the first step of fixing
https://reviews.llvm.org/D114611.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122533

Files:
  clang/docs/tools/clang-formatted-files.txt
  llvm/lib/Target/AVR/AVR.h
  llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
  llvm/lib/Target/AVR/AVRRelaxMemOperations.cpp
  llvm/lib/Target/AVR/AVRTargetMachine.cpp
  llvm/lib/Target/AVR/CMakeLists.txt
  llvm/test/CodeGen/AVR/pseudo/STDWPtrQRr.mir
  llvm/test/CodeGen/AVR/relax-mem/STDWPtrQRr.mir
  llvm/utils/gn/secondary/llvm/lib/Target/AVR/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122533.418412.patch
Type: text/x-patch
Size: 13738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220326/5049e9fa/attachment.bin>


More information about the cfe-commits mailing list