inst_profile.h 695 B

123456789101112131415161718192021
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_SEM_IR_INST_PROFILE_H_
  5. #define CARBON_TOOLCHAIN_SEM_IR_INST_PROFILE_H_
  6. #include "llvm/ADT/FoldingSet.h"
  7. #include "toolchain/sem_ir/file.h"
  8. #include "toolchain/sem_ir/inst.h"
  9. namespace Carbon::SemIR {
  10. // Computes a profile of the given constant instruction, for canonicalization /
  11. // deduplication.
  12. auto ProfileConstant(llvm::FoldingSetNodeID& id, const File& sem_ir, Inst inst)
  13. -> void;
  14. } // namespace Carbon::SemIR
  15. #endif // CARBON_TOOLCHAIN_SEM_IR_INST_PROFILE_H_