LLVM
20.0.0git
lib
Support
InstructionCost.cpp
Go to the documentation of this file.
1
//===- InstructionCost.cpp --------------------------------------*- C++ -*-===//
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
/// \file
9
/// This file includes the function definitions for the InstructionCost class
10
/// that is used when calculating the cost of an instruction, or a group of
11
/// instructions.
12
//===----------------------------------------------------------------------===//
13
14
#include "
llvm/Support/InstructionCost.h
"
15
#include "
llvm/Support/raw_ostream.h
"
16
17
using namespace
llvm
;
18
19
void
InstructionCost::print
(
raw_ostream
&
OS
)
const
{
20
if
(
isValid
())
21
OS
<<
Value
;
22
else
23
OS
<<
"Invalid"
;
24
}
InstructionCost.h
This file defines an InstructionCost class that is used when calculating the cost of an instruction,...
OS
raw_pwrite_stream & OS
Definition:
SampleProfWriter.cpp:53
llvm::InstructionCost::print
void print(raw_ostream &OS) const
Definition:
InstructionCost.cpp:19
llvm::InstructionCost::isValid
bool isValid() const
Definition:
InstructionCost.h:79
llvm::Value
LLVM Value Representation.
Definition:
Value.h:74
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:
raw_ostream.h:52
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
raw_ostream.h
Generated on Thu Nov 21 2024 02:05:44 for LLVM by
1.9.6