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?