Home
last modified time | relevance | path

Searched refs:coro (Results 1 – 25 of 111) sorted by relevance

12345

/external/python/cpython3/Lib/asyncio/
Dcoroutines.py116 coro = func
119 def coro(*args, **kw): function
135 coro = types.coroutine(coro)
137 wrapper = coro
141 w = CoroWrapper(coro(*args, **kwds), func=func)
189 def _format_coroutine(coro): argument
190 assert iscoroutine(coro)
192 is_corowrapper = isinstance(coro, CoroWrapper)
194 def get_name(coro): argument
200 return format_helpers._format_callback(coro.func, (), {})
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/Coroutines/
Dno-suspend.ll13 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
14 %need.dyn.alloc = call i1 @llvm.coro.alloc(token %id)
15 br i1 %need.dyn.alloc, label %dyn.alloc, label %coro.begin
17 %size = call i32 @llvm.coro.size.i32()
19 br label %coro.begin
20 coro.begin:
22 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %phi)
28 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
35 call i1 @llvm.coro.end(i8* %hdl, i1 false)
39 ; SimplifySuspendPoint will detect that coro.resume resumes itself and will
[all …]
Dex4.ll8 %id = call token @llvm.coro.id(i32 0, i8* %pv, i8* null, i8* null)
9 %need.dyn.alloc = call i1 @llvm.coro.alloc(token %id)
10 br i1 %need.dyn.alloc, label %dyn.alloc, label %coro.begin
12 %size = call i32 @llvm.coro.size.i32()
14 br label %coro.begin
15 coro.begin:
17 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %phi)
20 %n.val = phi i32 [ %n, %coro.begin ], [ %inc, %loop ]
23 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
27 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
[all …]
Dex2.ll6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %need.dyn.alloc = call i1 @llvm.coro.alloc(token %id)
8 br i1 %need.dyn.alloc, label %dyn.alloc, label %coro.begin
10 %size = call i32 @llvm.coro.size.i32()
12 br label %coro.begin
13 coro.begin:
15 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %phi)
18 %n.val = phi i32 [ %n, %coro.begin ], [ %inc, %loop ]
21 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
25 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
[all …]
Dcoro-split-musttail.ll1 ; Tests that coro-split will convert coro.resume followed by a suspend to a
3 ; RUN: opt < %s -coro-split -S | FileCheck %s
7 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
9 %vFrame = call noalias nonnull i8* @llvm.coro.begin(token %id, i8* %alloc)
11 %save = call token @llvm.coro.save(i8* null)
12 %addr1 = call i8* @llvm.coro.subfn.addr(i8* null, i8 0)
16 %suspend = call i8 @llvm.coro.suspend(token %save, i1 false)
22 %save2 = call token @llvm.coro.save(i8* null)
23 %addr2 = call i8* @llvm.coro.subfn.addr(i8* null, i8 0)
27 %suspend2 = call i8 @llvm.coro.suspend(token %save2, i1 false)
[all …]
Dcoro-split-02.ll1 ; Tests that coro-split can handle the case when a code after coro.suspend uses
2 ; a value produces between coro.save and coro.suspend (%Result.i19)
3 ; and checks whether stray coro.saves are properly removed
4 ; RUN: opt < %s -coro-split -S | FileCheck %s
16 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
18 %vFrame = call noalias nonnull i8* @llvm.coro.begin(token %id, i8* %alloc)
20 %save = call token @llvm.coro.save(i8* null)
22 %suspend = call i8 @llvm.coro.suspend(token %save, i1 false)
28 %StrayCoroSave = call token @llvm.coro.save(i8* null)
33 call i1 @llvm.coro.end(i8* null, i1 false)
[all …]
Dcoro-split-01.ll6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %need.dyn.alloc = call i1 @llvm.coro.alloc(token %id)
8 br i1 %need.dyn.alloc, label %dyn.alloc, label %coro.begin
10 %size = call i32 @llvm.coro.size.i32()
12 br label %coro.begin
13 coro.begin:
15 %hdl = call i8* @llvm.coro.begin(token %id, i8* %phi)
17 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
25 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
29 call i1 @llvm.coro.end(i8* %hdl, i1 0)
[all …]
Dphi-coro-end.ll1 ; Verify that we correctly handle suspend when the coro.end block contains phi
6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %size = call i32 @llvm.coro.size.i32()
9 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
10 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
14 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
20 call i1 @llvm.coro.end(i8* %hdl, i1 false)
29 call void @llvm.coro.resume(i8* %hdl)
35 declare i8* @llvm.coro.alloc()
36 declare i32 @llvm.coro.size.i32()
[all …]
DArgAddr.ll2 ; coro.begin.
7 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null);
9 store i32 %n, i32* %n.addr ; this needs to go after coro.begin
10 %0 = tail call i32 @llvm.coro.size.i32()
12 %1 = tail call noalias nonnull i8* @llvm.coro.begin(token %id, i8* %call)
22 %4 = call i8 @llvm.coro.suspend(token none, i1 false)
30 %5 = call i8* @llvm.coro.free(token %id, i8* nonnull %1)
35 call i1 @llvm.coro.end(i8* null, i1 false)
43 call void @llvm.coro.resume(i8* %hdl)
44 call void @llvm.coro.resume(i8* %hdl)
[all …]
Dex3.ll6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %size = call i32 @llvm.coro.size.i32()
9 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %alloc)
14 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
21 %1 = call i8 @llvm.coro.suspend(token none, i1 false)
25 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
29 call i1 @llvm.coro.end(i8* %hdl, i1 false)
37 call void @llvm.coro.resume(i8* %hdl)
38 call void @llvm.coro.resume(i8* %hdl)
39 call void @llvm.coro.destroy(i8* %hdl)
[all …]
Dcoro-elide.ll1 ; Tests that the coro.destroy and coro.resume are devirtualized where possible,
3 ; RUN: opt < %s -S -inline -coro-elide -dce | FileCheck %s
25 %id = call token @llvm.coro.id(i32 0, i8* null,
28 %hdl = call i8* @llvm.coro.begin(token %id, i8* null)
38 %0 = call i8* @llvm.coro.subfn.addr(i8* %hdl, i8 0)
43 %2 = call i8* @llvm.coro.subfn.addr(i8* %hdl, i8 1)
57 %0 = call i8* @llvm.coro.subfn.addr(i8* %hdl, i8 0)
70 ; no devirtualization here, since coro.begin info parameter is null
73 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
74 %hdl = call i8* @llvm.coro.begin(token %id, i8* null)
[all …]
Dex0.ll6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %size = call i32 @llvm.coro.size.i32()
9 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
15 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
23 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
27 call i1 @llvm.coro.end(i8* %hdl, i1 0)
35 call void @llvm.coro.resume(i8* %hdl)
36 call void @llvm.coro.resume(i8* %hdl)
37 call void @llvm.coro.destroy(i8* %hdl)
46 declare token @llvm.coro.id(i32, i8*, i8*, i8*)
[all …]
Drestart-trigger.ll4 ; RUN: opt < %s -S -O0 -enable-coroutines -debug-only=coro-split 2>&1 | FileCheck %s
5 ; RUN: opt < %s -S -O1 -enable-coroutines -debug-only=coro-split 2>&1 | FileCheck %s
11 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
12 %size = call i32 @llvm.coro.size.i32()
14 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
16 %s1 = call i8 @llvm.coro.suspend(token none, i1 false)
24 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
28 call i1 @llvm.coro.end(i8* %hdl, i1 0)
32 declare token @llvm.coro.id(i32, i8*, i8*, i8*)
33 declare i8* @llvm.coro.begin(token, i8*)
[all …]
Dcoro-materialize.ll2 ; RUN: opt < %s -coro-split -S | FileCheck %s
6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %size = call i32 @llvm.coro.size.i32()
9 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
12 %sp1 = call i8 @llvm.coro.suspend(token none, i1 false)
17 %sp2 = call i8 @llvm.coro.suspend(token none, i1 false)
27 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
31 call i1 @llvm.coro.end(i8* %hdl, i1 0)
39 declare i8* @llvm.coro.free(token, i8*)
40 declare i32 @llvm.coro.size.i32()
[all …]
Dex1.ll6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %size = call i32 @llvm.coro.size.i32()
9 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %alloc)
15 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
19 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
23 call i1 @llvm.coro.end(i8* %hdl, i1 false)
31 call void @llvm.coro.resume(i8* %hdl)
32 call void @llvm.coro.resume(i8* %hdl)
33 call void @llvm.coro.destroy(i8* %hdl)
46 declare token @llvm.coro.id(i32, i8*, i8*, i8*)
[all …]
Dex5.ll6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %size = call i32 @llvm.coro.size.i32()
9 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %alloc)
19 %s = call i8 @llvm.coro.suspend(token none, i1 false)
23 %s.final = call i8 @llvm.coro.suspend(token none, i1 true)
30 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
34 call i1 @llvm.coro.end(i8* %hdl, i1 false)
43 declare token @llvm.coro.id( i32, i8*, i8*, i8*)
44 declare i32 @llvm.coro.size.i32()
45 declare i8* @llvm.coro.begin(token, i8*)
[all …]
Dcoro-spill-corobegin.ll1 ; Check that we can spills coro.begin from an inlined inner coroutine.
2 ; RUN: opt < %s -coro-split -S | FileCheck %s
12 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
13 %size = call i32 @llvm.coro.size.i32()
15 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
17 …%innerid = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* bitcast ([3 x void (%g.Frame*)*…
18 %innerhdl = call noalias nonnull i8* @llvm.coro.begin(token %innerid, i8* null)
21 %tok = call i8 @llvm.coro.suspend(token none, i1 false)
31 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
35 call i1 @llvm.coro.end(i8* %hdl, i1 0)
[all …]
Dcoro-catchswitch.ll2 ; RUN: opt < %s -coro-split -S | FileCheck %s
10 %id = call token @llvm.coro.id(i32 8, i8* null, i8* null, i8* null)
11 %size = call i32 @llvm.coro.size.i32()
13 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
18 to label %coro.ret unwind label %catch.dispatch
22 to label %coro.ret unwind label %catch.dispatch
46 %sp = call i8 @llvm.coro.suspend(token none, i1 false)
47 switch i8 %sp, label %coro.ret [
49 i8 1, label %coro.ret
54 br label %coro.ret
[all …]
Dcoro-split-alloc.ll1 ; Tests that coro-split passes initialized values to coroutine frame allocator.
2 ; RUN: opt < %s -coro-split -S | FileCheck %s
9 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
10 %need.alloc = call i1 @llvm.coro.alloc(token %id)
14 %size = call i32 @llvm.coro.size.i32()
21 %hdl = call i8* @llvm.coro.begin(token %id, i8* %phi)
24 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
32 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
36 call i1 @llvm.coro.end(i8* %hdl, i1 0)
51 declare i8* @llvm.coro.free(token, i8*)
[all …]
Dcoro-split-00.ll1 ; Tests that coro-split pass splits the coroutine into f, f.resume and f.destroy
2 ; RUN: opt < %s -coro-split -S | FileCheck %s
6 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
7 %need.alloc = call i1 @llvm.coro.alloc(token %id)
11 %size = call i32 @llvm.coro.size.i32()
17 %hdl = call i8* @llvm.coro.begin(token %id, i8* %phi)
19 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
27 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
31 call i1 @llvm.coro.end(i8* %hdl, i1 0)
37 ; CHECK: @llvm.coro.begin(token %id, i8* %phi)
[all …]
Dcoro-split-hidden.ll1 ; Tests that coro-split can convert functions with hidden visibility.
4 ; RUN: opt < %s -coro-split -S | FileCheck %s
8 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
9 %need.alloc = call i1 @llvm.coro.alloc(token %id)
13 %size = call i32 @llvm.coro.size.i32()
19 %hdl = call i8* @llvm.coro.begin(token %id, i8* %phi)
21 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
29 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
33 call i1 @llvm.coro.end(i8* %hdl, i1 0)
39 ; CHECK: @llvm.coro.begin(token %id, i8* %phi)
[all …]
Dsmoketest.ll9 ; RUN: -coro-early -coro-split -coro-elide -coro-cleanup 2>&1 | FileCheck %s
13 ; CHECK: coro-early
14 ; CHECK: coro-split
15 ; CHECK: coro-elide
16 ; CHECK: coro-cleanup
18 ; NOCORO-NOT: coro-early
19 ; NOCORO-NOT: coro-split
20 ; NOCORO-NOT: coro-elide
21 ; NOCORO-NOT: coro-cleanup
Dcoro-eh-aware-edge-split.ll2 ; RUN: opt < %s -coro-split -S | FileCheck %s
10 %id = call token @llvm.coro.id(i32 16, i8* null, i8* null, i8* null)
11 %size = tail call i64 @llvm.coro.size.i64()
13 %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
14 %sp = call i8 @llvm.coro.suspend(token none, i1 false)
15 switch i8 %sp, label %coro.ret [
63 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
65 br label %coro.ret
67 coro.ret:
68 call i1 @llvm.coro.end(i8* null, i1 false)
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/docs/
DCoroutines.rst33 call void @llvm.coro.resume(i8* %hdl)
34 call void @llvm.coro.resume(i8* %hdl)
35 call void @llvm.coro.destroy(i8* %hdl)
46 the `coro.destroy`_ intrinsic.
96 %id = call token @llvm.coro.id(i32 0, i8* null, i8* null, i8* null)
97 %size = call i32 @llvm.coro.size.i32()
99 %hdl = call noalias i8* @llvm.coro.begin(token %id, i8* %alloc)
105 %0 = call i8 @llvm.coro.suspend(token none, i1 false)
109 %mem = call i8* @llvm.coro.free(token %id, i8* %hdl)
113 %unused = call i1 @llvm.coro.end(i8* %hdl, i1 false)
[all …]
/external/python/cpython3/Lib/test/
Dtest_coroutines.py30 def run_async(coro): argument
31 assert coro.__class__ in {types.GeneratorType, types.CoroutineType}
37 buffer.append(coro.send(None))
44 def run_async__await__(coro): argument
45 assert coro.__class__ is types.CoroutineType
46 aw = coro.__await__()
538 coro = foo()
539 self.assertRegex(repr(coro), '^<coroutine object.* at 0x.*>$')
540 coro.close()
545 coro = foo()
[all …]

12345