search for: createnewgvnpass

Displaying 1 result from an estimated 1 matches for "createnewgvnpass".

2017 Dec 21
2
Pass ordering - GVN vs. loop optimizations
...oops) MPM.add(createSimpleLoopUnrollPass()); // Unroll small loops addExtensionsToPM(EP_LoopOptimizerEnd, MPM); // <GVN is now immediately after loop optimizatons if (OptLevel > 1) { MPM.add(createMergedLoadStoreMotionPass()); // Merge ld/st in diamonds MPM.add(NewGVN ? createNewGVNPass() : createGVNPass(DisableGVNLoadPRE)); // Remove redundancies } This causes a problem, because GVN appears to be the only pass that can merge loads across basic blocks. This means that if a loop index only appears behind a pointer, LLVM will not be able to optimize out bounds...