[PATCH] D113179: [Passes] Move AggressiveInstCombine after InstCombine

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 03:47:25 PDT 2021


anton-afanasyev created this revision.
anton-afanasyev added reviewers: spatel, RKSimon, lebedev.ri.
Herald added subscribers: ormris, wenlei, steven_wu, hiraditya.
anton-afanasyev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Swap AIC and IC neighbouring in pipeline. This looks more natural and even
almost has no effect for now (three slightly touched tests of test-suite). Also
this could be the first step towards merging AIC (or its part) to -O2 pipeline.

After several changes in AIC (like D108091 <https://reviews.llvm.org/D108091>, D108201 <https://reviews.llvm.org/D108201>, D107766 <https://reviews.llvm.org/D107766>, D109515 <https://reviews.llvm.org/D109515>, D109236 <https://reviews.llvm.org/D109236>)
there've been observed several regressions (like PR52078, PR52253, PR52289)
that were fixed in different passes (see D111330 <https://reviews.llvm.org/D111330>, D112721 <https://reviews.llvm.org/D112721>) by extending their
functionality, but these regressions were exposed since changed AIC prevents IC
from making some of early optimizations.

This is common problem and it should be fixed by just moving AIC after IC
which looks more logically by itself: make aggressive instruction combining
only after failed ordinary one.

Fixes PR52289


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113179

Files:
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-lto-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
  llvm/test/Transforms/PhaseOrdering/X86/pr52289.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113179.384697.patch
Type: text/x-patch
Size: 7648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211104/dc742dc2/attachment.bin>


More information about the llvm-commits mailing list