Changes between Version 3 and Version 4 of Internships/JanStolarek

Jul 5, 2013 11:04:36 AM (2 years ago)



  • Internships/JanStolarek

    v3 v4  
    11= Jan Stolarek's internship notes =
     3= Loopification =
     5Some points made by Geoffrey:
     6  - In the past, LLVM could not recognize all loops output by the LLVm back end as loops. Perhaps that has changed.
     7  - Answering the question "What does loopification do that isn't already being done?" would still be useful
     8  - So figuring out how to make LLVM recognize more loops would be good.
     9  - if you write a simple, tight loop in Haskell of the sort a C compiler would vectorize, will LLVm vectorize it? If not, why?
     11Some points made by Austin Seipp:
     12  - i took the time to implement a half-assed almost-working loopification pass a few months ago. the sinking pass by Simon is what really does a huge amount of the optimizations Kryzsztof's thesis attacked differently. but i think doing loopification could maybe lead to identifying things like loop invariant expressions. it can't bootstrap the compiler with it (JS: it = Austin's patch). i think whenever i tie the knot in the new graph, i don't abandon parts of the old CmmNode, which then causes dead labels to hang around
     13  - oh, yeah, and as i noted in the commit message, you have to be careful when ordering those optimizations around. this is obviously only a valid transform pre-CPS. also you have to run a block elimination passes, otherwise things can happen where work can get duplicated into empty blocks
     14  -  i think another problem is that the new codegen doesn't always discard empty basic blocks which pisses off the native code generator (see #7574 ) so we need a little refactoring to handle that correctly, too, by being able to do SCC passes from any particular node
     15  - i think that the fix for #7574 is probably pretty easily actually, it just requires shuffling things around. oh, and to be clear it's not *empty* basic blocks, it's *unreachable* basic blocks that make the codegen mad
     17#7574 bug can be triggered with `./inplace/bin/ghc-stage2 -c -no-hs-main -fasm -O2 ./testsuite/tests/llvm/should_compile/T7571.cmm`
    319= Various clean-up tasks =