brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 1ea519d Raw
84 lines · plain
1## Test mips32r6:2# RUN: llc -mtriple mips-linux-gnu -emit-call-site-info -run-pass=mips-delay-slot-filler %s -o -| FileCheck %s3 4## Following code is used for producing this test case.5##6## (*pm_power_off)();7## machine_power_off() { pm_power_off(); }8##9## Used command:10## clang --target=mips-linux-gnu -march=mips32r6 -g -O2 -c m.c -mllvm -stop-before=mips-delay-slot-filler11 12## Confirm that call site info exists after mips-delay-slot-filler, although, 13## the pass replaced the call instruction.14# CHECK: callSites:15# CHECK-NEXT: - { bb: {{.*}}, offset: {{.*}}, fwdArgRegs:16 17--- |18  ; ModuleID = 'm.c'19  source_filename = "m.c"20  target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"21  target triple = "mips-unknown-linux-gnu"22  23  @pm_power_off = dso_local local_unnamed_addr global i32 (...)* null, align 4, !dbg !024  25  ; Function Attrs: nounwind26  define dso_local i32 @machine_power_off() local_unnamed_addr #0 !dbg !14 {27  entry:28    %0 = load i32 ()*, i32 ()** bitcast (i32 (...)** @pm_power_off to i32 ()**), align 4, !dbg !1729    %call = tail call i32 %0(), !dbg !1730    ret i32 undef, !dbg !1731  }32  33  attributes #0 = { "target-cpu"="mips32r6" }34  35  !llvm.dbg.cu = !{!2}36  !llvm.module.flags = !{!10, !11, !12}37  !llvm.ident = !{!13}38  39  !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())40  !1 = distinct !DIGlobalVariable(name: "pm_power_off", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)41  !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)42  !3 = !DIFile(filename: "m.c", directory: "/dir")43  !4 = !{}44  !5 = !{!0}45  !6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32)46  !7 = !DISubroutineType(types: !8)47  !8 = !{!9, null}48  !9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)49  !10 = !{i32 7, !"Dwarf Version", i32 4}50  !11 = !{i32 2, !"Debug Info Version", i32 3}51  !12 = !{i32 1, !"wchar_size", i32 4}52  !13 = !{!"clang version 12.0.0"}53  !14 = distinct !DISubprogram(name: "machine_power_off", scope: !3, file: !3, line: 2, type: !15, scopeLine: 2, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !4)54  !15 = !DISubroutineType(types: !16)55  !16 = !{!9}56  !17 = !DILocation(line: 2, column: 23, scope: !14)57 58...59---60name:            machine_power_off61alignment:       462stack:63  - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4, 64      stack-id: default, callee-saved-register: '$ra', callee-saved-restored: true, 65      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }66callSites:67  - { bb: 0, offset: 6, fwdArgRegs: [] }68body:             |69  bb.0.entry:70    liveins: $ra71  72    $sp = ADDiu $sp, -2473    CFI_INSTRUCTION def_cfa_offset 2474    SW killed $ra, $sp, 20 :: (store (s32) into %stack.0)75    CFI_INSTRUCTION offset $ra_64, -476    renamable $at = LUi target-flags(mips-abs-hi) @pm_power_off, debug-location !1777    renamable $t9 = LW killed renamable $at, target-flags(mips-abs-lo) @pm_power_off, debug-location !17 :: (dereferenceable load (s32) from `i32 ()** bitcast (i32 (...)** @pm_power_off to i32 ()**)`)78    JALRPseudo $t9, csr_o32_fp64, implicit-def dead $ra, implicit-def $sp, implicit-def dead $v0, debug-location !1779    $ra = LW $sp, 20, debug-location !17 :: (load (s32) from %stack.0)80    $sp = ADDiu $sp, 2481    PseudoReturn undef $ra, implicit undef $v0, debug-location !1782 83...84