1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/// This op interface enables one to inject custom logic to determine whether an Operation can be
/// speculatively executed.
///
/// Ops that implement this interface need to implement the custom logic in the `speculatability`
/// method.
///
/// For instance, the `speculatability` for a specific op may check the attributes or input types to
/// determine whether that specific operation is speculatable.
/// This trait marks an op (which must be tagged as implementing the [ConditionallySpeculatable]
/// interface) as being recursively speculatable.
///
/// This means that said op can be speculated only if all the instructions in all the regions
/// attached to the op can be speculated.
/// This trait marks an op (which must be tagged as implementing the [ConditionallySpeculatable]
/// interface) as being always speculatable.