[PATCH] D37570: [XRay][CodeGen][PowerPC] Fix tail exit codegen for XRay in PPC

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 07:25:19 PDT 2017


dberris created this revision.
Herald added subscribers: kbarton, nemanjai.

This fixes code-gen for XRay in PPC. The regression wasn't caught by
codegen tests  which we add in this change.

What happened was the following:

- For tail exits, we used to unconditionally prepend the returns/exits with a pseudo-instruction that gets lowered to the instrumentation sled (and leave the actual return/exit instruction as-is).
- Changes to the XRay instrumentation pass caused the tail exits to suddenly also emit the tail exit pseudo-instruction, since the check for whether a return instruction was also a call instruction meant it was a tail exit instruction.
- None of the tests caught the regression either due to non-existent tests, or the tests being disabled/removed for continuous breakage.

This change re-introduces some of the basic tests and verifies that
we're back to a state that allows the back-end to generate appropriate
XRay instrumented binaries for PPC in the presence of tail exits.


https://reviews.llvm.org/D37570

Files:
  lib/CodeGen/XRayInstrumentation.cpp
  lib/Target/PowerPC/PPCAsmPrinter.cpp
  test/CodeGen/PowerPC/xray-attribute-instrumentation.ll
  test/CodeGen/PowerPC/xray-tail-call-hidden.ll
  test/CodeGen/PowerPC/xray-tail-call-sled.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37570.114177.patch
Type: text/x-patch
Size: 6794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170907/2df79a49/attachment.bin>


More information about the llvm-commits mailing list