[PATCH] Support for stack map generation in X86.

hfinkel at anl.gov hfinkel at anl.gov
Tue Oct 22 10:18:28 PDT 2013


  Hi Andy,

  A few quick comments below. Also, aside from the fact that you call OutContext.getMachOSection, is there anything here that is really not trivial to generalize to other x86 targets?

  Thanks again,
  Hal


================
Comment at: lib/CodeGen/StackMaps.cpp:99
@@ +98,3 @@
+  const MCSection *StackMapSection =
+    OutContext.getMachOSection("__LLVM_STACKMAPS", "__js_stackmaps", 0,
+                               SectionKind::getMetadata());
----------------
Why is there a _js_ here? Why not just _llvm_stackmaps?

================
Comment at: test/CodeGen/X86/webkit-patchpoint.ll:36
@@ +35,3 @@
+
+attributes #0 = { noinline nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
----------------
Remove unneeded attributes.

================
Comment at: test/CodeGen/X86/webkit-stackmap.ll:142
@@ +141,3 @@
+;
+; FIXME: reenable these checks when stack maps support frame indices.
+; CHECK:        .long  8
----------------
These look enabled?

================
Comment at: test/CodeGen/X86/webkit-stackmap.ll:160
@@ +159,3 @@
+  %add = add i64 %result, 3
+  ret i64 %add
+}
----------------
This seems to be the only test where you actually capture the result of the patchpoint/stackmap; should we check the codegen? Also, if the results of these are dead, does that matter?

================
Comment at: test/CodeGen/X86/webkit-stackmap.ll:178
@@ +177,3 @@
+declare void @llvm.experimental.patchpoint.void(i32, i32, i8*, i32, ...) #2
+declare i64 @llvm.experimental.patchpoint.i64(i32, i32, i8*, i32, ...) #2
+
----------------
The return types of these look different; does that matter?


http://llvm-reviews.chandlerc.com/D1996



More information about the llvm-commits mailing list