[all-commits] [llvm/llvm-project] 4a0d53: PatternMatch: migrate to CmpPredicate (#118534)

Ramkumar Ramachandra via All-commits all-commits at lists.llvm.org
Fri Dec 13 06:18:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a0d53a0b0a58a3c6980a7c551357ac71ba3db10
      https://github.com/llvm/llvm-project/commit/4a0d53a0b0a58a3c6980a7c551357ac71ba3db10
  Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
    M llvm/include/llvm/IR/CmpPredicate.h
    M llvm/include/llvm/IR/PatternMatch.h
    M llvm/lib/Analysis/IVDescriptors.cpp
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/Analysis/OverflowInstAnalysis.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/ExpandMemCmp.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    M llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Scalar/EarlyCSE.cpp
    M llvm/lib/Transforms/Scalar/GuardWidening.cpp
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    M llvm/lib/Transforms/Scalar/LICM.cpp
    M llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp
    M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    M llvm/lib/Transforms/Utils/LoopPeel.cpp
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/unittests/IR/PatternMatch.cpp

  Log Message:
  -----------
  PatternMatch: migrate to CmpPredicate (#118534)

With the introduction of CmpPredicate in 51a895a (IR: introduce struct
with CmpInst::Predicate and samesign), PatternMatch is one of the first
key pieces of infrastructure that must be updated to match a CmpInst
respecting samesign information. Implement this change to Cmp-matchers.

This is a preparatory step in migrating the codebase over to
CmpPredicate. Since we no functional changes are desired at this stage,
we have chosen not to migrate CmpPredicate::operator==(CmpPredicate)
calls to use CmpPredicate::getMatching(), as that would have visible
impact on tests that are not yet written: instead, we call
CmpPredicate::operator==(Predicate), preserving the old behavior, while
also inserting a few FIXME comments for follow-ups.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list