[PATCH] D132554: Add helper func to get first non-alloca position
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 06:19:04 PDT 2022
sebastian-ne created this revision.
sebastian-ne added reviewers: nhaehnle, nikic.
Herald added a subscriber: hiraditya.
Herald added a project: All.
sebastian-ne requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The LLVM performance tips suggest that allocas should be placed at the
beginning of the entry block. So far, llvm doesn’t provide any helper to
find that position.
Add BasicBlock::getFirstNonPHIOrDbgOrAlloca and IRBuilder::SetInsertPointPastAllocas(Function*)
that get an insert position after the (static) allocas at the start of a
function and use it in ShadowStackGCLowering.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132554
Files:
llvm/include/llvm/IR/BasicBlock.h
llvm/include/llvm/IR/IRBuilder.h
llvm/lib/CodeGen/ShadowStackGCLowering.cpp
llvm/lib/IR/BasicBlock.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132554.455181.patch
Type: text/x-patch
Size: 4005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220824/ceab8dec/attachment.bin>
More information about the llvm-commits
mailing list