[PATCH] D146003: [StandardInstrumentations] Check that the number of instructions doesn't change if analyses are preserved

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 17:11:59 PDT 2023


aeubanks created this revision.
Herald added subscribers: ormris, ChuanqiXu, wenlei, steven_wu, hiraditya.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

CoroCleanup was running SimplifyCFG in a separate function pass manager before invalidating analyses.

InstCombine wasn't seeing that LibCallSimplifier::optimizeSinCosPi() modified the IR because it always returns nullptr due to the way it optimizes multiple calls at once. There's likely a better way of fixing this.

Move PreservedAnalysisChecker further down StandardInstrumentations so other Instrumentations (e.g. printing) have a chance to run before PreservedAnalysisChecker crashes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146003

Files:
  clang/test/CodeGen/lto-newpm-pipeline.c
  llvm/include/llvm/Passes/StandardInstrumentations.h
  llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
  llvm/lib/Passes/StandardInstrumentations.cpp
  llvm/lib/Transforms/Coroutines/CoroCleanup.cpp
  llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/Other/loop-pm-invalidation.ll
  llvm/test/Other/new-pass-manager.ll
  llvm/test/Other/new-pm-O0-defaults.ll
  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/ConstraintElimination/analysis-invalidation.ll
  llvm/test/Transforms/InstCombine/sincospi.ll
  llvm/test/Transforms/LoopRotate/pr35210.ll
  llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-markloopasdeleted.ll
  llvm/unittests/IR/PassManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146003.504895.patch
Type: text/x-patch
Size: 77139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230314/3ed6b82a/attachment.bin>


More information about the llvm-commits mailing list