TargetIntrinsicInfo.cpp 979 B

123456789101112131415161718192021222324252627
  1. //===-- TargetIntrinsicInfo.cpp - Target Instruction Information ----------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file implements the TargetIntrinsicInfo class.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "llvm/Target/TargetIntrinsicInfo.h"
  13. #include "llvm/ADT/StringMapEntry.h"
  14. #include "llvm/IR/Function.h"
  15. using namespace llvm;
  16. TargetIntrinsicInfo::TargetIntrinsicInfo() = default;
  17. TargetIntrinsicInfo::~TargetIntrinsicInfo() = default;
  18. unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const {
  19. const ValueName *ValName = F->getValueName();
  20. if (!ValName)
  21. return 0;
  22. return lookupName(ValName->getKeyData(), ValName->getKeyLength());
  23. }