[PowerPC] Add StackMap/PatchPoint support
authorHal Finkel <hfinkel@anl.gov>
Tue, 13 Jan 2015 17:48:12 +0000 (17:48 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 13 Jan 2015 17:48:12 +0000 (17:48 +0000)
commit232f393466fd324d791f43b1ad1449c988f87828
tree2e3727d0fad00b4935fc9e58835589f255ca589e
parent0ca9b79771095d19fab2575ec080084b497e1fa8
[PowerPC] Add StackMap/PatchPoint support

This commit does two things:

 1. Refactors PPCFastISel to use more of the common infrastructure for call
    lowering (this lets us take advantage of this common code for lowering some
    common intrinsics, stackmap/patchpoint among them).

 2. Adds support for stackmap/patchpoint lowering. For the most part, this is
    very similar to the support in the AArch64 target, with the obvious differences
    (different registers, NOP instructions, etc.). The test cases are adapted
    from the AArch64 test cases.

One difference of note is that the patchpoint call sequence takes 24 bytes, so
you can't use less than that (on AArch64 you can go down to 16). Also, as noted
in the docs, we take the patchpoint address to be the actual code address
(assuming the call is local in the TOC-sharing sense), which should yield
higher performance than generating the full cross-DSO indirect-call sequence
and is likely just as useful for JITed code (if not, we'll change it).

StackMaps and Patchpoints are still marked as experimental, and so this support
is doubly experimental. So go ahead and experiment!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225808 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
docs/StackMaps.rst
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCCallingConv.h [new file with mode: 0644]
lib/Target/PowerPC/PPCCallingConv.td
lib/Target/PowerPC/PPCFastISel.cpp
lib/Target/PowerPC/PPCFrameLowering.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.h
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
test/CodeGen/PowerPC/ppc64-anyregcc-crash.ll [new file with mode: 0644]
test/CodeGen/PowerPC/ppc64-anyregcc.ll [new file with mode: 0644]
test/CodeGen/PowerPC/ppc64-patchpoint.ll [new file with mode: 0644]
test/CodeGen/PowerPC/ppc64-stackmap-nops.ll [new file with mode: 0644]
test/CodeGen/PowerPC/ppc64-stackmap.ll [new file with mode: 0644]