Skip to content

Commit 9abc31a

Browse files
committed
Remove redundant example and use quotation mark escape
Signed-off-by: Steffen Larsen <[email protected]>
1 parent 21baacb commit 9abc31a

File tree

1 file changed

+2
-40
lines changed

1 file changed

+2
-40
lines changed

sycl/doc/design/CompileTimeProperties.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -465,45 +465,7 @@ When the device compiler generates code to reference the decorated member
465465
variable, it emits a call to the LLVM intrinsic function
466466
[`@llvm.ptr.annotation`][10] that annotates the pointer to that member
467467
variables, similar to the way the existing `[[clang::annotate()]]` attribute
468-
works. Illustrating this with some simplified LLVM IR that matches the example
469-
code above:
470-
471-
[10]: <https://llvm.org/docs/LangRef.html#llvm-ptr-annotation-intrinsic>
472-
473-
```
474-
@.str = private unnamed_addr constant [16 x i8] c"sycl-properties\00",
475-
section "llvm.metadata"
476-
@.str.1 = private unnamed_addr constant [9 x i8] c"file.cpp\00",
477-
section "llvm.metadata"
478-
@.str.2 = private unnamed_addr constant [9 x i8] c"sycl-foo\00", align 1
479-
@.str.3 = private unnamed_addr constant [9 x i8] c"sycl-bar\00", align 1
480-
481-
@.args = private unnamed_addr constant { [9 x i8]*, i8*, [9 x i8]*, i32 }
482-
{
483-
[9 x i8]* @.str.2, ; Name of first property "sycl-foo"
484-
i8* null, ; Null indicates this property has no value
485-
[9 x i8]* @.str.3, ; Name of second property "sycl-bar"
486-
i32 32 ; Value of second property
487-
},
488-
section "llvm.metadata"
489-
490-
define void @foo(i32* %ptr) {
491-
%aptr = alloca %class.annotated_ptr
492-
%ptr = getelementptr inbounds %class.annotated_ptr, %class.annotated_ptr* %aptr,
493-
i32 0, i32 0
494-
%1 = bitcast i32** %ptr to i8*
495-
496-
%2 = call i8* @llvm.ptr.annotation.p0i8(i8* nonnull %0,
497-
i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0),
498-
i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0),
499-
i32 3,
500-
i8* bitcast ({ [9 x i8]*, i8*, [9 x i8]*, i32 }* @.args to i8*))
501-
502-
%3 = bitcast i8* %2 to i32**
503-
store i32* %ptr, i32** %3
504-
ret void
505-
}
506-
```
468+
works.
507469

508470
The front-end encodes the properties from the C++ attribute
509471
`[[__sycl_detail__::add_ir_annotations_member()]]` into the
@@ -882,7 +844,7 @@ produced by `[[__sycl_detail__::add_ir_annotations_member()]]` into another
882844
; Contains decorations:
883845
; * 7744 with no value.
884846
; * 7745 with 20 and "str 1" as the values.
885-
@.str = private unnamed_addr constant [24 x i8] c"{7744}{7745:20,"str 1"}\00",
847+
@.str = private unnamed_addr constant [24 x i8] c"{7744}{7745:20,\22str 1\22}\00",
886848
section "llvm.metadata"
887849
@.str.1 = private unnamed_addr constant [9 x i8] c"file.cpp\00",
888850
section "llvm.metadata"

0 commit comments

Comments
 (0)