There is a performance problem in StackLifetime::calculateLocalLiveness when a function has a lot of allocas. The stack-safety-max-allocas flag prevents this algorithm from being invoked for such functions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/StackSafetyAnalysis.cpp | ||
---|---|---|
62 | int is enough |
llvm/test/Analysis/StackSafetyAnalysis/stack-safety-max-allocas.ll | ||
---|---|---|
1 | not needed? | |
3 | broken lines hard to read when you have many of them, all RUNs looks the same them so I prefer long RUN line exactly for readability | |
3 | instead of asan please directly use the pass: -passes="print-stack-safety" example local.ll | |
4 | can you do at least =1 and have one function with 1 and one function with 2 allocas |
llvm/test/Analysis/StackSafetyAnalysis/stack-safety-max-allocas.ll | ||
---|---|---|
3 | it changes function local part, so please check -passes="print<stack-safety-local>"as well |
I guess I understand the problem. Algorithm is O(A*B*B) for ::Must case, where A-num allocas, B is num of basic blocks. But it should be O(A*B) as of ::May case.
ll try to create a patch.
If we do a limiter, it should be by B.
int is enough