[PATCH] D30914: [Outliner] Add outliner for AArch64

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 15:22:37 PDT 2017


paquette updated this revision to Diff 92071.
paquette marked 10 inline comments as done.
paquette added a comment.

Updated diff to address comments

**Major changes**

- Added `getScale` to AArch64InstrInfo.h. This returns the scale of an appropriate instruction.
- Added `getMemOpBaseRegImmOfsOffsetOperand` to hide the magical `getNumExplicitOperands()-1` stuff.
- Added `isEncodableLdStOffset`, which determines if the updated offset would overflow.

I noticed that the scale of an instruction is calculated in lots of places throughout AArch64InstrInfo.cpp. It might be good to refactor these to use something like `getScale` in the future to prevent breakage, since it seems like in all these places roughly the same instructions are being used. (I tried shoehorning the scale calculation into `getMemOpBaseRegImmOfsWidth`, but it seemed a little kludgey.)


https://reviews.llvm.org/D30914

Files:
  lib/Target/AArch64/AArch64InstrInfo.cpp
  lib/Target/AArch64/AArch64InstrInfo.h
  test/CodeGen/AArch64/machine-outliner.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30914.92071.patch
Type: text/x-patch
Size: 16207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/07c113e1/attachment.bin>


More information about the llvm-commits mailing list