brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.1 KiB · ad2c813 Raw
176 lines · plain
1; RUN: opt %loadNPMPolly -pass-remarks-missed=polly-detect -polly-detect-track-failures '-passes=polly-custom<detect>' -polly-print-detect -disable-output -polly-process-unprofitable=false < %s 2>&1 | FileCheck %s2 3; RUN: opt %loadNPMPolly -pass-remarks-missed=polly-detect -polly-detect-track-failures '-passes=polly-custom<detect>' -polly-print-detect -disable-output -polly-process-unprofitable=false -pass-remarks-output=%t.yaml < %s 2>&14; RUN: cat %t.yaml | FileCheck -check-prefix=YAML %s5target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"6 7; void onlyWrite(float *A) {8;   for (long i = 0; i < 100; i++)9;     A[i] = 0;10; }11;12; void onlyRead(float *A) {13;   for (long i = 0; i < 100; i++)14;     A[i];15; }16 17; CHECK: remark: /tmp/test.c:2:3: The following errors keep this region from being a Scop.18; CHECK: remark: /tmp/test.c:2:3: No profitable polyhedral optimization found19; CHECK: remark: /tmp/test.c:3:10: Invalid Scop candidate ends here.20 21; CHECK: remark: /tmp/test.c:7:3: The following errors keep this region from being a Scop.22; CHECK: remark: /tmp/test.c:7:3: No profitable polyhedral optimization found23; CHECK: remark: /tmp/test.c:8:10: Invalid Scop candidate ends here.24 25; YAML: --- !Missed26; YAML: Pass:            polly-detect27; YAML: Name:            RejectionErrors28; YAML: DebugLoc:        { File: '/tmp/test.c', Line: 2, Column: 3 }29; YAML: Function:        onlyWrite30; YAML: Args:31; YAML:   - String:          The following errors keep this region from being a Scop.32; YAML: ...33; YAML: --- !Missed34; YAML: Pass:            polly-detect35; YAML: Name:            Unprofitable36; YAML: DebugLoc:        { File: '/tmp/test.c', Line: 2, Column: 3 }37; YAML: Function:        onlyWrite38; YAML: Args:39; YAML:   - String:          No profitable polyhedral optimization found40; YAML: ...41; YAML: --- !Missed42; YAML: Pass:            polly-detect43; YAML: Name:            InvalidScopEnd44; YAML: DebugLoc:        { File: '/tmp/test.c', Line: 3, Column: 10 }45; YAML: Function:        onlyWrite46; YAML: Args:47; YAML:   - String:          Invalid Scop candidate ends here.48; YAML: ...49; YAML: --- !Missed50; YAML: Pass:            polly-detect51; YAML: Name:            RejectionErrors52; YAML: DebugLoc:        { File: '/tmp/test.c', Line: 7, Column: 3 }53; YAML: Function:        onlyRead54; YAML: Args:55; YAML:   - String:          The following errors keep this region from being a Scop.56; YAML: ...57; YAML: --- !Missed58; YAML: Pass:            polly-detect59; YAML: Name:            Unprofitable60; YAML: DebugLoc:        { File: '/tmp/test.c', Line: 7, Column: 3 }61; YAML: Function:        onlyRead62; YAML: Args:63; YAML:   - String:          No profitable polyhedral optimization found64; YAML: ...65; YAML: --- !Missed66; YAML: Pass:            polly-detect67; YAML: Name:            InvalidScopEnd68; YAML: DebugLoc:        { File: '/tmp/test.c', Line: 8, Column: 10 }69; YAML: Function:        onlyRead70; YAML: Args:71; YAML:   - String:          Invalid Scop candidate ends here.72 73; Function Attrs: nounwind uwtable74define void @onlyWrite(ptr %A) !dbg !4 {75entry:76  call void @llvm.dbg.value(metadata ptr %A, i64 0, metadata !14, metadata !15), !dbg !1677  call void @llvm.dbg.value(metadata i64 0, i64 0, metadata !17, metadata !15), !dbg !2078  br label %for.cond, !dbg !2179 80for.cond:                                         ; preds = %for.inc, %entry81  %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]82  %exitcond = icmp ne i64 %i.0, 100, !dbg !2283  br i1 %exitcond, label %for.body, label %for.end, !dbg !2284 85for.body:                                         ; preds = %for.cond86  %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.0, !dbg !2387  store float 0.000000e+00, ptr %arrayidx, align 4, !dbg !2588  br label %for.inc, !dbg !2389 90for.inc:                                          ; preds = %for.body91  %inc = add nuw nsw i64 %i.0, 1, !dbg !2692  call void @llvm.dbg.value(metadata i64 %inc, i64 0, metadata !17, metadata !15), !dbg !2093  br label %for.cond, !dbg !2794 95for.end:                                          ; preds = %for.cond96  ret void, !dbg !2897}98 99; Function Attrs: nounwind readnone100declare void @llvm.dbg.declare(metadata, metadata, metadata)101 102; Function Attrs: nounwind uwtable103define void @onlyRead(ptr %A) !dbg !10 {104entry:105  call void @llvm.dbg.value(metadata ptr %A, i64 0, metadata !29, metadata !15), !dbg !30106  call void @llvm.dbg.value(metadata i64 0, i64 0, metadata !31, metadata !15), !dbg !33107  br label %for.cond, !dbg !34108 109for.cond:                                         ; preds = %for.inc, %entry110  %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]111  %exitcond = icmp ne i64 %i.0, 100, !dbg !35112  br i1 %exitcond, label %for.body, label %for.end, !dbg !35113 114for.body:                                         ; preds = %for.cond115  %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.0, !dbg !36116  %val = load float, ptr %arrayidx, align 4, !dbg !38117  br label %for.inc, !dbg !36118 119for.inc:                                          ; preds = %for.body120  %inc = add nuw nsw i64 %i.0, 1, !dbg !39121  call void @llvm.dbg.value(metadata i64 %inc, i64 0, metadata !31, metadata !15), !dbg !33122  br label %for.cond, !dbg !40123 124for.end:                                          ; preds = %for.cond125  ret void, !dbg !41126}127 128; Function Attrs: nounwind readnone129declare void @llvm.dbg.value(metadata, i64, metadata, metadata)130 131!llvm.dbg.cu = !{!0}132!llvm.module.flags = !{!11, !12}133!llvm.ident = !{!13}134 135!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0  (llvm/trunk 229257)", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)136!1 = !DIFile(filename: "/tmp/test.c", directory: "/home/grosser/Projects/polly/git/tools/polly")137!2 = !{}138!4 = distinct !DISubprogram(name: "onlyWrite", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2)139!5 = !DIFile(filename: "/tmp/test.c", directory: "/home/grosser/Projects/polly/git/tools/polly")140!6 = !DISubroutineType(types: !7)141!7 = !{null, !8}142!8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9)143!9 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)144!10 = distinct !DISubprogram(name: "onlyRead", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, retainedNodes: !2)145!11 = !{i32 2, !"Dwarf Version", i32 4}146!12 = !{i32 2, !"Debug Info Version", i32 3}147!13 = !{!"clang version 3.7.0  (llvm/trunk 229257)"}148!14 = !DILocalVariable(name: "A", line: 1, arg: 1, scope: !4, file: !5, type: !8)149!15 = !DIExpression()150!16 = !DILocation(line: 1, column: 23, scope: !4)151!17 = !DILocalVariable(name: "i", line: 2, scope: !18, file: !5, type: !19)152!18 = distinct !DILexicalBlock(line: 2, column: 3, file: !1, scope: !4)153!19 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed)154!20 = !DILocation(line: 2, column: 13, scope: !18)155!21 = !DILocation(line: 2, column: 8, scope: !18)156!22 = !DILocation(line: 2, column: 3, scope: !18)157!23 = !DILocation(line: 3, column: 5, scope: !24)158!24 = distinct !DILexicalBlock(line: 2, column: 3, file: !1, scope: !18)159!25 = !DILocation(line: 3, column: 10, scope: !24)160!26 = !DILocation(line: 2, column: 30, scope: !24)161!27 = !DILocation(line: 2, column: 3, scope: !24)162!28 = !DILocation(line: 4, column: 1, scope: !4)163!29 = !DILocalVariable(name: "A", line: 6, arg: 1, scope: !10, file: !5, type: !8)164!30 = !DILocation(line: 6, column: 22, scope: !10)165!31 = !DILocalVariable(name: "i", line: 7, scope: !32, file: !5, type: !19)166!32 = distinct !DILexicalBlock(line: 7, column: 3, file: !1, scope: !10)167!33 = !DILocation(line: 7, column: 13, scope: !32)168!34 = !DILocation(line: 7, column: 8, scope: !32)169!35 = !DILocation(line: 7, column: 3, scope: !32)170!36 = !DILocation(line: 8, column: 5, scope: !37)171!37 = distinct !DILexicalBlock(line: 7, column: 3, file: !1, scope: !32)172!38 = !DILocation(line: 8, column: 10, scope: !37)173!39 = !DILocation(line: 7, column: 30, scope: !37)174!40 = !DILocation(line: 7, column: 3, scope: !37)175!41 = !DILocation(line: 9, column: 1, scope: !10)176