[PATCH] Add the llvm.frameallocate and llvm.recoverframeallocation intrinsics

Reid Kleckner rnk at google.com
Tue Dec 2 18:09:33 PST 2014


Hi echristo,

These intrinsics allow multiple functions to share a single stack
allocation from one function's call frame. The function with the
allocation may only perform one allocation, and it must be in the entry
block.

Functions accessing the allocation call llvm.recoverframeallocation with
the function whose frame they are accessing and a frame pointer from an
active call frame of that function.

These intrinsics are very difficult to inline correctly, so the
intention is that they be introduced rarely, or at least very late
during EH preparation.

The patch is still a work in progress, but I wanted to send some code
along. It needs more comments, probably some name bikeshedding, and a
change to the inliner.

http://reviews.llvm.org/D6493

Files:
  docs/LangRef.rst
  include/llvm/CodeGen/AsmPrinter.h
  include/llvm/CodeGen/ISDOpcodes.h
  include/llvm/CodeGen/MachineFrameInfo.h
  include/llvm/IR/Intrinsics.td
  include/llvm/MC/MCContext.h
  include/llvm/Target/Target.td
  include/llvm/Target/TargetFrameLowering.h
  include/llvm/Target/TargetOpcodes.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/DeadMachineInstructionElim.cpp
  lib/CodeGen/MachineFunction.cpp
  lib/CodeGen/PrologEpilogInserter.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/IR/Verifier.cpp
  lib/MC/MCContext.cpp
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86InstrCompiler.td
  lib/Target/X86/X86InstrInfo.td
  test/CodeGen/X86/frameallocate.ll
  test/Verifier/frameallocate.ll
  utils/TableGen/CodeGenTarget.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6493.16844.patch
Type: text/x-patch
Size: 22386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141203/3f3ebd48/attachment.bin>


More information about the llvm-commits mailing list