llvm / llvm/llvm-project

Why llvm doesn't has the [target-independent] promote alloca from loop pass?

Open
#163,513 3 comments 0 reactions 0 assignees View on GitHub
llvm:ir question
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

I know NVPTX has implemented an llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp pass which can promote a compile-time-known-sized alloca op from the loop to entry bb, I think it is a very common feature, why it cannot have a target-independent version?

If it can't, would you please tell me the reason, or, I will try to commit a PR implemented by me?

Contributor guide

Open the contributing guide

Research direction

Start by reading llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp and identify the conditions under which it promotes compile-time-known-sized allocas from loops to the entry block. Compare that pass with the requirements for a target-independent implementation, then document the rationale or define the scope of a proposed change. No test file or entry point is named in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.