[all-commits] [llvm/llvm-project] f26360: [IR] Don't store switch case values as operands (#...

Alexis Engelke via All-commits all-commits at lists.llvm.org
Fri Dec 5 08:25:44 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f26360f2150e7ff916f2aa5d5fe3ff32d1780c8c
      https://github.com/llvm/llvm-project/commit/f26360f2150e7ff916f2aa5d5fe3ff32d1780c8c
  Author: Alexis Engelke <engelke at in.tum.de>
  Date:   2025-12-05 (Fri, 05 Dec 2025)

  Changed paths:
    M llvm/docs/ReleaseNotes.md
    M llvm/include/llvm-c/Core.h
    M llvm/include/llvm/IR/Instructions.h
    M llvm/include/llvm/IR/User.h
    M llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
    M llvm/lib/CodeGen/TypePromotion.cpp
    M llvm/lib/IR/Core.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/IR/User.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
    M llvm/unittests/IR/InstructionsTest.cpp
    M llvm/unittests/IR/VerifierTest.cpp

  Log Message:
  -----------
  [IR] Don't store switch case values as operands (#166842)

SwitchInst case values must be ConstantInt, which have no use list.
Therefore it is not necessary to store these as Use, instead store them
more efficiently as a simple array of pointers after the uses, similar
to how PHINode stores basic blocks.

After this change, the successors of all terminators are stored
consecutively in the operand list. This is preparatory work for
improving the performance of successor access.



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