This patch basically enables fast-isel for AIX 64-bit subtarget (previously enabled only for ELF 64). The initial motivation is to introduce branch folding to AIX generated code for correct debug behavior. I also saw some compiling time improvement in a few LLVM test-suite benchmarks. (toast, dbms, cjpeg, burg, etc.)
Details
- Reviewers
jsji nemanjai shchenz jasonliu - Group Reviewers
Restricted Project - Commits
- rGd0f9553ef564: [PowerPC] Enable fast-isel on AIX 64 subtarget
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This patch is missing context as well as a description. Can you please add both? It would be good to understand why we want FISEL on AIX. Perhaps some compile-time measurement on some significantly sized code. Also, some notes about how well this was tested would be useful. A different instruction selector is a significant change so it would be good to do some thorough testing at -O0 including some binary compatibility testing (with GCC and/or the system compiler).
The motivating case is that unconditional branches are not folded for AIX O0 code. Like code below:
void foo(); int x = 1000; int main() { for (int i = 0; i < x; i++) foo(); return 0; }
DAG ISel counts on later optimization passes to do the folding while FastISel does it in branch selection. This is needed for correct debug behavior on AIX.
As for compiling time, I saw improvement on some benchmarks in test-suite. For 64-bit AIX target, this patch (actually, a smaller one) can pass SPEC benchmarks and LLVM test-suite, more work is needed for enabling it on 32-bit.
LGTM. Make sure you run all the tests we have on AIX before committing. Thanks.
llvm/lib/Target/PowerPC/PPCFastISel.cpp | ||
---|---|---|
2473 | Can we just check isPPC64() now? Do we have 64 target other than ELF + AIX? |
Can we just check isPPC64() now? Do we have 64 target other than ELF + AIX?