LLVM 23.0.0git
SparcTargetTransformInfo.cpp
Go to the documentation of this file.
1//===-- SparcTargetTransformInfo.cpp - SPARC specific TTI -----------------===//
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
11
12using namespace llvm;
13
14#define DEBUG_TYPE "sparctti"
15
17SparcTTIImpl::getPopcntSupport(unsigned TyWidth) const {
18 assert(isPowerOf2_32(TyWidth) && "Type width must be power of 2");
19 if (ST->usePopc())
21 return TTI::PSK_Software;
22}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file a TargetTransformInfoImplBase conforming object specific to the SPARC target machine.
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth) const override
PopcntSupportKind
Flags indicating the kind of support for population count.
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
Definition MathExtras.h:279