[PATCH] D46315: [RegUsageInfoCollector] Fix handling of callee saved registers with CSR optimization.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 16:24:52 PDT 2018


qcolombet added a comment.

Hi Jonas,

> Target needed to save and restore the return register (and therefore also the SP), but those registers were missing from the regmask on the call to that function (in other words they were "not preserved")

Usually those are marked reserved and don't need to show up in the mask. Though having them here is probably a good thing :).

Anyhow, shouldn't getCallPreservedMask be a super set of determineCalleeSaves? (A quick look at the header of TFI confirms that.)
Therefore, the current implementation should be conservatively correct.

What am I missing here?

Cheers,
-Quentin



================
Comment at: test/CodeGen/SystemZ/ipra-04.ll:17
+define internal fastcc void @fun1(i16*, i16* nocapture) unnamed_addr #0 {
+  %3 = load i16, i16* undef, align 2
+  %4 = shl i16 %3, 4
----------------
Nit: use `opt -instnamer`


https://reviews.llvm.org/D46315





More information about the llvm-commits mailing list