Page MenuHomePhabricator

[LoopVersion] Unify SCEVChecks and alias check handling (NFC).
Needs ReviewPublic

Authored by fhahn on Jul 23 2020, 7:25 AM.

Details

Summary

This is an initial cleanup of the way LoopVersioning interacts with LAA.

Currently LoopVersioning has 2 ways of initializing things:

  1. Passing LAI and passing UseLAIChecks = true
  2. Passing UseLAIChecks = false, followed by calling setSCEVChecks and setAliasChecks.

Both ways of initializing lead to the same result and the duplication
seems more complicated than necessary.

This patch removes the UseLAIChecks flag from the constructor and the
setSCEVChecks & setAliasChecks helpers and move initialization
exclusively to the constructor.

This simplifies things, by providing a single way to initialize
LoopVersioning and reducing duplication.

Diff Detail

Unit TestsFailed

TimeTest
40 mslinux > LLVM.CodeGen/Thumb2::mve-pred-vctpvpsel.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/mve-pred-vctpvpsel.ll -verify-machineinstrs -o - | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/mve-pred-vctpvpsel.ll
70 mslinux > LLVM.CodeGen/Thumb2/LowOverheadLoops::cond-vector-reduce-mve-codegen.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llc -mtriple=thumbv8.1m.main -mattr=+mve -tail-predication=enabled --verify-machineinstrs /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll -o - | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-vector-reduce-mve-codegen.ll
50 mslinux > LLVM.CodeGen/Thumb2/LowOverheadLoops::iv-two-vcmp.mir
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llc -mtriple=thumbv8.1m.main -mattr=+mve -run-pass=arm-low-overhead-loops /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/iv-two-vcmp.mir -o - --verify-machineinstrs | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/iv-two-vcmp.mir
50 mslinux > LLVM.CodeGen/Thumb2/LowOverheadLoops::iv-vcmp.mir
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llc -mtriple=thumbv8.1m.main -mattr=+mve -run-pass=arm-low-overhead-loops /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/iv-vcmp.mir -verify-machineinstrs -o - | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/CodeGen/Thumb2/LowOverheadLoops/iv-vcmp.mir
150 mswindows > LLVM.CodeGen/Thumb2::mve-pred-vctpvpsel.ll
Script: -- : 'RUN: at line 2'; c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\llc.exe -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp C:\ws\w16n2-1\llvm-project\premerge-checks\llvm\test\CodeGen\Thumb2\mve-pred-vctpvpsel.ll -verify-machineinstrs -o - | c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16n2-1\llvm-project\premerge-checks\llvm\test\CodeGen\Thumb2\mve-pred-vctpvpsel.ll
View Full Test Results (8 Failed)

Event Timeline

fhahn created this revision.Jul 23 2020, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2020, 7:25 AM

I'm not really familiar with code in question, but ignoring
the question of whether or not this is moving in the right
direction, the code change itself looks like a cleanup to me.

fhahn updated this revision to Diff 292180.Wed, Sep 16, 4:17 AM

Rebase & ping