[llvm-dev] How to test that GlobalsAA is non unintentionally invalidated (original) (raw)
Kristof Beyls via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 7 11:34:47 PDT 2017
- Previous message: [llvm-dev] How to test that GlobalsAA is non unintentionally invalidated
- Next message: [llvm-dev] [cfe-dev] Help needed in analyzing liveness of variables with LLVM IR
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7 Apr 2017, at 12:09, Elovikov, Andrei via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hello,
During the last month we've faced two cases where some performance degradations were observed due to GlobalsAA not being preserved till the LICM:
- New pass pgo-memop-opt (fixed in http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170403/443360.html)
- GVNHoist (when it was moved to the simplification part of the pipeline) So it would be good to guard against such issues. However, this highly depends on the particular structure of the optimization pipeline. LIT test like this seems to work:
; RUN: opt < %s -O3 -debug-pass=Details -disable-output 2>&1 | FileCheck %s ; CHECK-NOT: is not preserving 'Globals Alias Analysis' ; CHECK: 'Loop Invariant Code Motion' is not preserving 'Rotate Loops'
but looks too hard-coded. Are there ways to do it in a cleaner manner?
Thanks, Andrei
I added a somewhat similar test, with similar intentions as part of https://reviews.llvm.org/D19806, committed in http://llvm.org/viewvc/llvm-project?view=revision&revision=268370. That test didn't get touched in the 10 months it has been in tree, so it seems to me that testing it like this has a reasonable chance of highlighting accidentally dropping GlobalsAA. Maybe just adding a simple loop that should be optimized by LICM to the same test file (test/Transforms/PhaseOrdering/globalaa-retained.ll) might be all what's needed?
Thanks,
Kristof
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170407/244801ca/attachment.html>
- Previous message: [llvm-dev] How to test that GlobalsAA is non unintentionally invalidated
- Next message: [llvm-dev] [cfe-dev] Help needed in analyzing liveness of variables with LLVM IR
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]