[PATCH] D36435: [MachineOutliner] Ensure AArch64 outliner doesn't mess with any register that overlaps with LR

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 14:45:44 PDT 2017

paquette marked an inline comment as done.
paquette added inline comments.

Comment at: lib/Target/AArch64/AArch64InstrInfo.cpp:4505
+    // Don't outline anything that uses the link register.
+    if (MOP.isReg() && getRegisterInfo().regsOverlap(MOP.getReg(), AArch64::LR))
+      return MachineOutlinerInstrType::Illegal;
MatzeB wrote:
> `modifiesRegister()`/`readsRegister()` can figure this out for you as well if you pass in a TRI argument (without that it has no idea about aliases unfortunately).
Oh neat, that's much better.

It requires that I use W30 rather than LR, which is a little less intuitive, but I like it more.


More information about the llvm-commits mailing list