mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
ade705c6e5
This re-applies r225808, fixed to avoid problems with SDAG dependencies along with the preceding fix to ScheduleDAGSDNodes::RegDefIter::InitNodeNumDefs. These problems caused the original regression tests to assert/segfault on many (but not all) systems. Original commit message: 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@225909 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
659 B
LLVM
25 lines
659 B
LLVM
; RUN: llc < %s -mtriple=powerpc64-unknown-gnu-linux | FileCheck %s
|
|
|
|
define void @test_shadow_optimization() {
|
|
entry:
|
|
; Expect 12 bytes worth of nops here rather than 32: With the shadow optimization
|
|
; in place, 20 bytes will be consumed by the frame teardown and return instr.
|
|
; CHECK-LABEL: test_shadow_optimization:
|
|
|
|
; CHECK: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NEXT: nop
|
|
; CHECK-NOT: nop
|
|
; CHECK: addi 1, 1, 64
|
|
; CHECK: ld [[REG1:[0-9]+]], 16(1)
|
|
; CHECK: ld 31, -8(1)
|
|
; CHECK: mtlr [[REG1]]
|
|
; CHECK: blr
|
|
|
|
tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 0, i32 32)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.experimental.stackmap(i64, i32, ...)
|
|
|