LLVM
22.0.0git
lib
Transforms
Vectorize
SandboxVectorizer
Interval.cpp
Go to the documentation of this file.
1
//===- Interval.cpp -------------------------------------------------------===//
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
#include "
llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h
"
10
#include "
llvm/SandboxIR/Instruction.h
"
11
#include "
llvm/Support/Compiler.h
"
12
#include "
llvm/Support/Debug.h
"
13
#include "
llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
"
14
15
namespace
llvm::sandboxir
{
16
17
template
<
typename
T>
bool
Interval<T>::disjoint
(
const
Interval
&
Other
)
const
{
18
if
(
Other
.empty())
19
return
true
;
20
if
(
empty
())
21
return
true
;
22
return
Other
.Bottom->comesBefore(Top) || Bottom->comesBefore(
Other
.Top);
23
}
24
25
#ifndef NDEBUG
26
template
<
typename
T>
void
Interval<T>::print
(
raw_ostream
&OS)
const
{
27
auto
*Top =
top
();
28
auto
*Bot =
bottom
();
29
OS <<
"Top: "
;
30
if
(Top !=
nullptr
)
31
OS << *Top;
32
else
33
OS <<
"nullptr"
;
34
OS <<
"\n"
;
35
36
OS <<
"Bot: "
;
37
if
(Bot !=
nullptr
)
38
OS << *Bot;
39
else
40
OS <<
"nullptr"
;
41
OS <<
"\n"
;
42
}
43
template
<
typename
T>
void
Interval<T>::dump
()
const
{
print
(
dbgs
()); }
44
#endif
45
46
template
class
LLVM_EXPORT_TEMPLATE
Interval<Instruction>
;
47
template
class
LLVM_EXPORT_TEMPLATE
Interval<MemDGNode>
;
48
49
}
// namespace llvm::sandboxir
Compiler.h
LLVM_EXPORT_TEMPLATE
#define LLVM_EXPORT_TEMPLATE
Definition
Compiler.h:215
DependencyGraph.h
Interval.h
Instruction.h
Debug.h
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition
raw_ostream.h:53
llvm::sandboxir::Interval
Definition
Interval.h:79
llvm::sandboxir::Interval::bottom
T * bottom() const
Definition
Interval.h:117
llvm::sandboxir::Interval::top
T * top() const
Definition
Interval.h:116
llvm::sandboxir::Interval::Interval
Interval()
Definition
Interval.h:84
llvm::sandboxir
Definition
Argument.h:15
llvm::sandboxir::empty
bool empty() const
Definition
BasicBlock.h:101
llvm::print
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
Definition
GCNRegPressure.cpp:237
llvm::dbgs
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition
Debug.cpp:207
llvm::IRMemLocation::Other
@ Other
Any other memory.
Definition
ModRef.h:68
Generated on
for LLVM by
1.14.0