This patch implements dynamic stack allocation for the VE target. Changes:
- compiler-rt: __ve_grow_stack to request stack allocation on the VE.
- VE: base pointer support, dynamic stack allocation.
Paths
| Differential D79084
[VE] Dynamic stack allocation ClosedPublic Authored by simoll on Apr 29 2020, 6:10 AM.
Details
Summary This patch implements dynamic stack allocation for the VE target. Changes:
Diff Detail
Unit TestsFailed
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 29 2020, 6:10 AM Herald added subscribers: llvm-commits, Restricted Project, s.egerton and 6 others. · View Herald Transcript
Comment Actions
Comment Actions
Comment Actions
Sorry for late reply. I originally want to use it's own calling convention to allow caller to not spill registers since many program may call this function to grow their stack. Is it not acceptable in general? Or it's OK if there is a reason? It's OK to upstreaming C CC as a first step. I would like to know what we should do to improve the performance of alloca or dynamic stack allocation in C++. Thanks! Comment Actions
Would this just be the same as the existing PreserveMost or PreserveAll conventions? Comment Actions @arsenm Yes! I didn't notice those calling conventions. We can use them as our target depend special calling conventions. Thank you for informing us. Comment Actions verifyLeafProcRegUse function is not used anymore.
This revision is now accepted and ready to land.May 26 2020, 8:00 AM Closed by commit rGdedaf3a2ac59: [VE] Dynamic stack allocation (authored by kaz7, committed by simoll). · Explain WhyMay 27 2020, 1:35 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 264850 compiler-rt/cmake/Modules/CompilerRTUtils.cmake
compiler-rt/cmake/base-config-ix.cmake
compiler-rt/cmake/builtin-config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/builtins/ve/grow_stack.S
compiler-rt/lib/builtins/ve/grow_stack_align.S
llvm/lib/Target/VE/VECallingConv.td
llvm/lib/Target/VE/VEFrameLowering.h
llvm/lib/Target/VE/VEFrameLowering.cpp
llvm/lib/Target/VE/VEISelLowering.h
llvm/lib/Target/VE/VEISelLowering.cpp
llvm/lib/Target/VE/VEInstrInfo.h
llvm/lib/Target/VE/VEInstrInfo.cpp
llvm/lib/Target/VE/VEInstrInfo.td
llvm/lib/Target/VE/VERegisterInfo.cpp
llvm/lib/Target/VE/VESubtarget.h
llvm/test/CodeGen/VE/alloca.ll
llvm/test/CodeGen/VE/alloca_aligned.ll
|
Calling this builtin seems a bit wrong to me. builtin is usually a clang/C/frontend wrapper around an IR intrinsic. __ve_grow_stack_align? If it's already called this in some ABI spec then it doesn't matter