[PATCH] D53889: [CodeGen] Prefer static frame index for STATEPOINT liveness args

Cherry Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 09:11:29 PST 2018


cherry added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/StatepointLowering.cpp:527
+    // If the argument is a static frame index, use it without spilling.
+    if (isa<AllocaInst>(V) ||
+        (isa<Argument>(V) &&
----------------
niravd wrote:
> Can we fold this into getValue/getValueImpl? IIUC, this is a reasonable expectation for getValue for these inputs and it'd be nicer 
> there. I haven't checked, but I think it must be the case that all possible matches are always non-register values in any context we encounter them so there's no reason for getValue to be otherwise defined.
> 
> 
> 
I tried this, but it turns out a number of tests failing, mostly on 32-bit architectures handling 64-bit values. I think I'll do it in the current way here for this patch, as a targeted change. And I can look into the 32-bit architecture issue and do a cleanup later. Thanks.



================
Comment at: test/CodeGen/X86/statepoint-stack-usage.ll:143
+
+define void @test_fixed_arg(%struct* byval %x) gc "statepoint-example" {
+; CHECK-LABEL: test_fixed_arg
----------------
reames wrote:
> Can you expand the check statements here?  And check the actual debug output for the stackmap?  I can't judge whether the encoding is correct from the test.
Done. Added CHECK for stack map output, and moved to statepoint-stackmap-format.ll where it emits and checks the stack map output.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53889/new/

https://reviews.llvm.org/D53889





More information about the llvm-commits mailing list