[XRay] support conditional return on PPC.
authorTim Shen <timshen91@gmail.com>
Fri, 22 Sep 2017 18:30:02 +0000 (18:30 +0000)
committerTim Shen <timshen91@gmail.com>
Fri, 22 Sep 2017 18:30:02 +0000 (18:30 +0000)
commitcee75361885c50744afbc9ee4918c28e4210086f
treee19f16db39283594e8db88e350b7c3dda3de20b9
parent7725e497d10931a562a6263ce353d8eacf11e14b
[XRay] support conditional return on PPC.

Summary: Conditional returns were not taken into consideration at all. Implement them by turning them into jumps and normal returns. This means there is a slightly higher performance penalty for conditional returns, but this is the best we can do, and it still disturbs little of the rest.

Reviewers: dberris, echristo

Subscribers: sanjoy, nemanjai, hiraditya, kbarton, llvm-commits

Differential Revision: https://reviews.llvm.org/D38102

llvm-svn: 314005
llvm/include/llvm/Target/Target.td
llvm/lib/CodeGen/XRayInstrumentation.cpp
llvm/lib/Target/PowerPC/PPC.h
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
llvm/test/CodeGen/PowerPC/xray-conditional-return.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/xray-ret-is-terminator.ll [new file with mode: 0644]