test.ll, and the corresponding line numbers.
test.ll.part is test.ll for the section but with unentered blocks
stripped.
Gary Benson wrote:> From the trace I posted yesterday (also attached), at the top:
>
> lines 2646-2648 print "632: iload"
> lines 2649-2652 print "local_5_114 = 57" (the correct value)
These two are lines 3993 and 3994 in test.ll.
> From line 2651 you can see that the 57 came from r26.
>
> At the bottom:
>
> lines 4901-4903 print "632: iload"
> lines 4904-4907 print "local_5_420 = 261095424" (the junk value)
7791 and 7792 in test.ll.
> From line 4906 you can see that the 261095424 also came from r26.
> Looking at what happens to r26 in the meantime it seems it's being
> used to hold temporary values:
>
> lines 2684 and 2685 calculate an offset into an array which is
> then used in line 2687.
lines 4048 and 4049 in test.ll.
> line 2703 stores the high word of a pair of inlined pointers,
> used in lines 2704 and 2711.
The top half of the 261101980 in lines 4074 and 4075.
Cheers,
Gary
--
http://gbenson.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ll.gz
Type: application/x-gzip
Size: 56813 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20080612/a1ec7e8d/attachment.bin>
-------------- next part --------------
3980: bci_630_private_copy: ; preds = %bci_129
3981: %method108 = phi [84 x i8]* [ %method98, %bci_129 ] ; <[84 x i8]*>
[#uses=2]
3982: %local_0_109 = phi [8 x i8]* [ %local_0_99, %bci_129 ] ; <[8 x
i8]*> [#uses=2]
3983: %local_1_110 = phi [8 x i8]* [ %local_1_100, %bci_129 ] ; <[8 x
i8]*> [#uses=2]
3984: %local_2_111 = phi [8 x i8]* [ %local_2_101, %bci_129 ] ; <[8 x
i8]*> [#uses=2]
3985: %local_3_112 = phi [8 x i8]* [ %local_3_102, %bci_129 ] ; <[8 x
i8]*> [#uses=2]
3986: %local_4_113 = phi i32 [ %local_4_103, %bci_129 ] ; <i32>
[#uses=5]
3987: %local_5_114 = phi i32 [ %local_5_104, %bci_129 ] ; <i32>
[#uses=4]
3988: %local_6_115 = phi [8 x i8]* [ %local_6_105, %bci_129 ] ; <[8 x
i8]*> [#uses=2]
3989: %local_7_116 = phi i32 [ %local_7_106, %bci_129 ] ; <i32>
[#uses=2]
3990: %local_8_117 = phi i32 [ %local_8_107, %bci_129 ] ; <i32>
[#uses=2]
3991: call void @trace_bytecode( i32 630, i32 261101980 )
3992: call void @print_value( i32 ptrtoint ([12 x i8]* @dump55 to i32), i32
%local_4_113 )
3993: call void @trace_bytecode( i32 632, i32 261101980 )
3994: call void @print_value( i32 ptrtoint ([12 x i8]* @dump56 to i32), i32
%local_5_114 )
3995: call void @print_value( i32 ptrtoint ([12 x i8]* @dump57 to i32), i32
%local_4_113 )
3996: call void @trace_bytecode( i32 634, i32 261103136 )
3997: %state = load i32* inttoptr (i32 264162664 to i32*) ; <i32>
[#uses=1]
3998: icmp eq i32 %state, 1 ; <i1>:632 [#uses=1]
3999: br i1 %632, label %do_safepoint, label %safepointed
4005: safepointed: ; preds = %bci_630_private_copy
4006: icmp slt i32 %local_4_113, %local_5_114 ; <i1>:633 [#uses=1]
4007: br i1 %633, label %safepointed.bci_132_crit_edge, label
%safepointed.bci_637_crit_edge
4012: safepointed.bci_132_crit_edge: ; preds = %safepointed
4013: br label %bci_132
4014:
4015: bci_132: ; preds = %safepointed901.bci_132_crit_edge,
%safepointed.bci_132_crit_edge
4016: %method118 = phi [84 x i8]* [ %method414,
%safepointed901.bci_132_crit_edge ], [ %method108,
%safepointed.bci_132_crit_edge ] ; <[84 x i8]*> [#uses=2]
4017: %local_0_119 = phi [8 x i8]* [ %local_0_415,
%safepointed901.bci_132_crit_edge ], [ %local_0_109,
%safepointed.bci_132_crit_edge ] ; <[8 x i8]*> [#uses=2]
4018: %local_1_120 = phi [8 x i8]* [ %local_1_416,
%safepointed901.bci_132_crit_edge ], [ %local_1_110,
%safepointed.bci_132_crit_edge ] ; <[8 x i8]*> [#uses=2]
4019: %local_2_121 = phi [8 x i8]* [ %local_2_417,
%safepointed901.bci_132_crit_edge ], [ %local_2_111,
%safepointed.bci_132_crit_edge ] ; <[8 x i8]*> [#uses=2]
4020: %local_3_122 = phi [8 x i8]* [ %local_3_418,
%safepointed901.bci_132_crit_edge ], [ %local_3_112,
%safepointed.bci_132_crit_edge ] ; <[8 x i8]*> [#uses=5]
4021: %local_4_123 = phi i32 [ %local_4_419, %safepointed901.bci_132_crit_edge
], [ %local_4_113, %safepointed.bci_132_crit_edge ] ; <i32> [#uses=4]
4022: %local_5_124 = phi i32 [ %local_5_420, %safepointed901.bci_132_crit_edge
], [ %local_5_114, %safepointed.bci_132_crit_edge ] ; <i32> [#uses=2]
4023: %local_6_125 = phi [8 x i8]* [ %local_6_421,
%safepointed901.bci_132_crit_edge ], [ %local_6_115,
%safepointed.bci_132_crit_edge ] ; <[8 x i8]*> [#uses=2]
4024: %local_7_126 = phi i32 [ %local_7_422, %safepointed901.bci_132_crit_edge
], [ %local_7_116, %safepointed.bci_132_crit_edge ] ; <i32> [#uses=2]
4025: %local_8_127 = phi i32 [ %local_8_423, %safepointed901.bci_132_crit_edge
], [ %local_8_117, %safepointed.bci_132_crit_edge ] ; <i32> [#uses=2]
4026: call void @trace_bytecode( i32 132, i32 261102180 )
4027: call void @trace_bytecode( i32 133, i32 261101980 )
4028: call void @trace_bytecode( i32 135, i32 261102236 )
4029: icmp eq [8 x i8]* %local_3_122, null ; <i1>:634 [#uses=1]
4030: br i1 %634, label %null546, label %not_null547
4036: not_null547: ; preds = %bci_132
4037: getelementptr [8 x i8]* %local_3_122, i32 0, i32 8 ; <i8*>:635
[#uses=1]
4038: bitcast i8* %635 to i32* ; <i32*>:636 [#uses=1]
4039: %length = load i32* %636 ; <i32> [#uses=1]
4040: icmp slt i32 %local_4_123, %length ; <i1>:637 [#uses=1]
4041: br i1 %637, label %in_bounds, label %out_of_bounds
4047: in_bounds: ; preds = %not_null547
4048: shl i32 %local_4_123, 1 ; <i32>:638 [#uses=1]
4049: add i32 12, %638 ; <i32>:639 [#uses=1]
4050: ptrtoint [8 x i8]* %local_3_122 to i32 ; <i32>:640 [#uses=1]
4051: add i32 %640, %639 ; <i32>:641 [#uses=1]
4052: inttoptr i32 %641 to i16* ; <i16*>:642 [#uses=1]
4053: load i16* %642 ; <i16>:643 [#uses=1]
4054: zext i16 %643 to i32 ; <i32>:644 [#uses=3]
4055: call void @trace_bytecode( i32 136, i32 261102252 )
4056: call void @trace_bytecode( i32 138, i32 261101980 )
4057: call void @trace_bytecode( i32 140, i32 261101940 )
4058: call void @trace_bytecode( i32 143, i32 261103148 )
4059: icmp sge i32 %644, 128 ; <i1>:645 [#uses=1]
4060: br i1 %645, label %bci_202, label %bci_146
4061:
4062: bci_146: ; preds = %in_bounds
4063: %method128 = phi [84 x i8]* [ %method118, %in_bounds ] ; <[84 x
i8]*> [#uses=2]
4064: %local_0_129 = phi [8 x i8]* [ %local_0_119, %in_bounds ] ; <[8 x
i8]*> [#uses=2]
4065: %local_1_130 = phi [8 x i8]* [ %local_1_120, %in_bounds ] ; <[8 x
i8]*> [#uses=2]
4066: %local_2_131 = phi [8 x i8]* [ %local_2_121, %in_bounds ] ; <[8 x
i8]*> [#uses=2]
4067: %local_3_132 = phi [8 x i8]* [ %local_3_122, %in_bounds ] ; <[8 x
i8]*> [#uses=2]
4068: %local_4_133 = phi i32 [ %local_4_123, %in_bounds ] ; <i32>
[#uses=2]
4069: %local_5_134 = phi i32 [ %local_5_124, %in_bounds ] ; <i32>
[#uses=2]
4070: %local_6_135 = phi [8 x i8]* [ %local_6_125, %in_bounds ] ; <[8 x
i8]*> [#uses=2]
4071: %local_7_136 = phi i32 [ %local_7_126, %in_bounds ] ; <i32>
[#uses=3]
4072: %local_8_137 = phi i32 [ %local_8_127, %in_bounds ] ; <i32>
[#uses=3]
4073: %local_9_ = phi i32 [ %644, %in_bounds ] ; <i32> [#uses=2]
4074: call void @trace_bytecode( i32 146, i32 261101980 )
4075: call void @trace_bytecode( i32 148, i32 261101980 )
4076: call void @trace_bytecode( i32 150, i32 261103136 )
4077: icmp slt i32 %local_7_136, %local_8_137 ; <i1>:646 [#uses=1]
4078: br i1 %646, label %bci_185, label %bci_153
4079:
4611: bci_185: ; preds = %bci_146
4612: %method160 = phi [84 x i8]* [ %method128, %bci_146 ] ; <[84 x
i8]*> [#uses=1]
4613: %local_0_161 = phi [8 x i8]* [ %local_0_129, %bci_146 ] ; <[8 x
i8]*> [#uses=1]
4614: %local_1_162 = phi [8 x i8]* [ %local_1_130, %bci_146 ] ; <[8 x
i8]*> [#uses=1]
4615: %local_2_163 = phi [8 x i8]* [ %local_2_131, %bci_146 ] ; <[8 x
i8]*> [#uses=1]
4616: %local_3_164 = phi [8 x i8]* [ %local_3_132, %bci_146 ] ; <[8 x
i8]*> [#uses=1]
4617: %local_4_165 = phi i32 [ %local_4_133, %bci_146 ] ; <i32>
[#uses=1]
4618: %local_5_166 = phi i32 [ %local_5_134, %bci_146 ] ; <i32>
[#uses=1]
4619: %local_6_167 = phi [8 x i8]* [ %local_6_135, %bci_146 ] ; <[8 x
i8]*> [#uses=4]
4620: %local_7_168 = phi i32 [ %local_7_136, %bci_146 ] ; <i32>
[#uses=3]
4621: %local_8_169 = phi i32 [ %local_8_137, %bci_146 ] ; <i32>
[#uses=1]
4622: %local_9_170 = phi i32 [ %local_9_, %bci_146 ] ; <i32> [#uses=2]
4623: call void @trace_bytecode( i32 185, i32 261102020 )
4624: call void @trace_bytecode( i32 187, i32 261101980 )
4625: call void @trace_bytecode( i32 189, i32 261102940 )
4626: add i32 1, %local_7_168 ; <i32>:956 [#uses=1]
4627: call void @trace_bytecode( i32 192, i32 261101980 )
4628: call void @trace_bytecode( i32 194, i32 261103008 )
4629: shl i32 %local_9_170, 24 ; <i32>:957 [#uses=1]
4630: ashr i32 %957, 24 ; <i32>:958 [#uses=1]
4631: call void @trace_bytecode( i32 195, i32 261102572 )
4632: icmp eq [8 x i8]* %local_6_167, null ; <i1>:959 [#uses=1]
4633: br i1 %959, label %null599, label %not_null600
4639: not_null600: ; preds = %bci_185
4640: getelementptr [8 x i8]* %local_6_167, i32 0, i32 8 ; <i8*>:960
[#uses=1]
4641: bitcast i8* %960 to i32* ; <i32*>:961 [#uses=1]
4642: %length603 = load i32* %961 ; <i32> [#uses=1]
4643: icmp slt i32 %local_7_168, %length603 ; <i1>:962 [#uses=1]
4644: br i1 %962, label %in_bounds602, label %out_of_bounds601
4650: in_bounds602: ; preds = %not_null600
4651: trunc i32 %958 to i8 ; <i8>:963 [#uses=1]
4652: add i32 12, %local_7_168 ; <i32>:964 [#uses=1]
4653: ptrtoint [8 x i8]* %local_6_167 to i32 ; <i32>:965 [#uses=1]
4654: add i32 %965, %964 ; <i32>:966 [#uses=1]
4655: inttoptr i32 %966 to i8* ; <i8*>:967 [#uses=1]
4656: store i8 %963, i8* %967
4657: call void @trace_bytecode( i32 196, i32 261102940 )
4658: add i32 1, %local_4_165 ; <i32>:968 [#uses=1]
4659: call void @trace_bytecode( i32 199, i32 261103208 )
4660: br label %bci_630
7777: bci_630: ; preds = %bci_616.bci_630_crit_edge, %no_exception898,
%in_bounds738, %in_bounds673, %in_bounds602
7778: %method414 = phi [84 x i8]* [ %method160, %in_bounds602 ], [ %method227,
%in_bounds673 ], [ %method283, %in_bounds738 ], [ %2562, %no_exception898 ], [
%method390, %bci_616.bci_630_crit_edge ] ; <[84 x i8]*> [#uses=2]
7779: %local_0_415 = phi [8 x i8]* [ %local_0_161, %in_bounds602 ], [
%local_0_228, %in_bounds673 ], [ %local_0_284, %in_bounds738 ], [ %2577,
%no_exception898 ], [ %local_0_391, %bci_616.bci_630_crit_edge ] ; <[8 x
i8]*> [#uses=2]
7780: %local_1_416 = phi [8 x i8]* [ %local_1_162, %in_bounds602 ], [
%local_1_229, %in_bounds673 ], [ %local_1_285, %in_bounds738 ], [ %2574,
%no_exception898 ], [ %local_1_392, %bci_616.bci_630_crit_edge ] ; <[8 x
i8]*> [#uses=2]
7781: %local_2_417 = phi [8 x i8]* [ %local_2_163, %in_bounds602 ], [
%local_2_230, %in_bounds673 ], [ %local_2_286, %in_bounds738 ], [ %2571,
%no_exception898 ], [ %local_2_393, %bci_616.bci_630_crit_edge ] ; <[8 x
i8]*> [#uses=2]
7782: %local_3_418 = phi [8 x i8]* [ %local_3_164, %in_bounds602 ], [
%local_3_231, %in_bounds673 ], [ %local_3_287, %in_bounds738 ], [ %2568,
%no_exception898 ], [ %local_3_394, %bci_616.bci_630_crit_edge ] ; <[8 x
i8]*> [#uses=2]
7783: %local_4_419 = phi i32 [ %968, %in_bounds602 ], [ %1370, %in_bounds673 ],
[ %1725, %in_bounds738 ], [ %2583, %no_exception898 ], [ %local_4_395,
%bci_616.bci_630_crit_edge ] ; <i32> [#uses=5]
7784: %local_5_420 = phi i32 [ %local_5_166, %in_bounds602 ], [ %local_5_233,
%in_bounds673 ], [ %local_5_289, %in_bounds738 ], [ %local_5_384,
%no_exception898 ], [ %local_5_396, %bci_616.bci_630_crit_edge ] ; <i32>
[#uses=4]
7785: %local_6_421 = phi [8 x i8]* [ %local_6_167, %in_bounds602 ], [
%local_6_234, %in_bounds673 ], [ %local_6_290, %in_bounds738 ], [ %2565,
%no_exception898 ], [ %local_6_397, %bci_616.bci_630_crit_edge ] ; <[8 x
i8]*> [#uses=2]
7786: %local_7_422 = phi i32 [ %956, %in_bounds602 ], [ %1356, %in_bounds673 ],
[ %1711, %in_bounds738 ], [ %2505, %no_exception898 ], [ %local_7_398,
%bci_616.bci_630_crit_edge ] ; <i32> [#uses=2]
7787: %local_8_423 = phi i32 [ %local_8_169, %in_bounds602 ], [ %local_8_236,
%in_bounds673 ], [ %local_8_292, %in_bounds738 ], [ %local_8_387,
%no_exception898 ], [ %local_8_399, %bci_616.bci_630_crit_edge ] ; <i32>
[#uses=2]
7788: %local_9_424 = phi i32 [ %local_9_170, %in_bounds602 ], [ %local_9_237,
%in_bounds673 ], [ %local_9_293, %in_bounds738 ], [ %local_9_388,
%no_exception898 ], [ %local_9_400, %bci_616.bci_630_crit_edge ] ; <i32>
[#uses=0]
7789: call void @trace_bytecode( i32 630, i32 261101980 )
7790: call void @print_value( i32 ptrtoint ([12 x i8]* @dump58 to i32), i32
%local_4_419 )
7791: call void @trace_bytecode( i32 632, i32 261101980 )
7792: call void @print_value( i32 ptrtoint ([12 x i8]* @dump59 to i32), i32
%local_5_420 )
7793: call void @print_value( i32 ptrtoint ([12 x i8]* @dump60 to i32), i32
%local_4_419 )
7794: call void @trace_bytecode( i32 634, i32 261103136 )
7795: %state902 = load i32* inttoptr (i32 264162664 to i32*) ; <i32>
[#uses=1]
7796: icmp eq i32 %state902, 1 ; <i1>:2584 [#uses=1]
7797: br i1 %2584, label %do_safepoint900, label %safepointed901