forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compiler.cpp
6374 lines (5290 loc) · 221 KB
/
compiler.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX XX
XX Compiler XX
XX XX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/
#include "jitpch.h"
#ifdef _MSC_VER
#pragma hdrstop
#endif // _MSC_VER
#include "emit.h"
#include "ssabuilder.h"
#include "valuenum.h"
#include "rangecheck.h"
#ifndef LEGACY_BACKEND
#include "lower.h"
#endif // !LEGACY_BACKEND
#if defined(DEBUG) || MEASURE_INLINING
unsigned Compiler::jitTotalMethodCompiled = 0;
unsigned Compiler::jitTotalMethodInlined = 0;
unsigned Compiler::jitTotalInlineCandidates = 0;
unsigned Compiler::jitTotalInlineCandidatesWithNonNullReturn = 0;
unsigned Compiler::jitTotalNumLocals = 0;
unsigned Compiler::jitTotalInlineReturnFromALocal = 0;
unsigned Compiler::jitInlineInitVarsFailureCount = 0;
unsigned Compiler::jitCheckCanInlineCallCount = 0;
unsigned Compiler::jitCheckCanInlineFailureCount = 0;
unsigned Compiler::jitInlineGetMethodInfoCallCount = 0;
unsigned Compiler::jitInlineInitClassCallCount = 0;
unsigned Compiler::jitInlineCanInlineCallCount = 0;
unsigned Compiler::jitIciStmtIsTheLastInBB = 0;
unsigned Compiler::jitInlineeContainsOnlyOneBB = 0;
#endif // defined(DEBUG) || MEASURE_INLINING
#if defined(DEBUG)
LONG Compiler::jitNestingLevel = 0;
#endif // defined(DEBUG)
#ifdef ALT_JIT
// static
AssemblyNamesList2* Compiler::s_pAltJitExcludeAssembliesList = nullptr;
#endif // ALT_JIT
// Compiler stored in the tls slot. This is used in the noway_assert exceptional path.
// If you are using it more broadly in retail code, you would need to understand the
// performance implications of accessing TLS slots.
#if !defined(FEATURE_MERGE_JIT_AND_ENGINE) || !defined(FEATURE_IMPLICIT_TLS)
__declspec(thread) Compiler* gTlsCompiler = NULL;
Compiler* GetTlsCompiler()
{
return gTlsCompiler;
}
void SetTlsCompiler(Compiler* c)
{
gTlsCompiler = c;
}
#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE) || !defined(FEATURE_IMPLICIT_TLS)
/*****************************************************************************/
inline
unsigned getCurTime()
{
SYSTEMTIME tim;
GetSystemTime(&tim);
return (((tim.wHour*60) + tim.wMinute)*60 + tim.wSecond)*1000 + tim.wMilliseconds;
}
/*****************************************************************************/
#ifdef DEBUG
/*****************************************************************************/
static
FILE * jitSrcFilePtr;
static
unsigned jitCurSrcLine;
void Compiler::JitLogEE(unsigned level, const char* fmt, ...)
{
va_list args;
#ifndef CROSSGEN_COMPILE
if (verbose)
{
va_start(args, fmt);
logf_stdout(fmt, args);
va_end(args);
}
#endif
va_start(args, fmt);
vlogf(level, fmt, args);
va_end(args);
}
void Compiler::compDspSrcLinesByLineNum(unsigned line, bool seek)
{
if (!jitSrcFilePtr)
return;
if (jitCurSrcLine == line)
return;
if (jitCurSrcLine > line)
{
if (!seek)
return;
if (fseek(jitSrcFilePtr, 0, SEEK_SET) != 0)
{
printf("Compiler::compDspSrcLinesByLineNum: fseek returned an error.\n");
}
jitCurSrcLine = 0;
}
if (!seek)
printf(";\n");
do
{
char temp[128];
size_t llen;
if (!fgets(temp, sizeof(temp), jitSrcFilePtr))
return;
if (seek)
continue;
llen = strlen(temp);
if (llen && temp[llen-1] == '\n')
temp[llen-1] = 0;
printf("; %s\n", temp);
}
while (++jitCurSrcLine < line);
if (!seek)
printf(";\n");
}
/*****************************************************************************/
void Compiler::compDspSrcLinesByNativeIP(UNATIVE_OFFSET curIP)
{
#ifdef DEBUGGING_SUPPORT
static IPmappingDsc * nextMappingDsc;
static unsigned lastLine;
if (!opts.dspLines)
return;
if (curIP==0)
{
if (genIPmappingList)
{
nextMappingDsc = genIPmappingList;
lastLine = jitGetILoffs(nextMappingDsc->ipmdILoffsx);
unsigned firstLine = jitGetILoffs(nextMappingDsc->ipmdILoffsx);
unsigned earlierLine = (firstLine < 5) ? 0 : firstLine - 5;
compDspSrcLinesByLineNum(earlierLine, true); // display previous 5 lines
compDspSrcLinesByLineNum( firstLine, false);
}
else
{
nextMappingDsc = NULL;
}
return;
}
if (nextMappingDsc)
{
UNATIVE_OFFSET offset = nextMappingDsc->ipmdNativeLoc.CodeOffset(genEmitter);
if (offset <= curIP)
{
IL_OFFSET nextOffs = jitGetILoffs(nextMappingDsc->ipmdILoffsx);
if (lastLine < nextOffs)
{
compDspSrcLinesByLineNum(nextOffs);
}
else
{
// This offset corresponds to a previous line. Rewind to that line
compDspSrcLinesByLineNum(nextOffs - 2, true);
compDspSrcLinesByLineNum(nextOffs);
}
lastLine = nextOffs;
nextMappingDsc = nextMappingDsc->ipmdNext;
}
}
#endif
}
/*****************************************************************************/
#endif//DEBUG
/*****************************************************************************/
#if defined(DEBUG) || MEASURE_NODE_SIZE || MEASURE_BLOCK_SIZE || DISPLAY_SIZES || CALL_ARG_STATS
static unsigned genMethodCnt; // total number of methods JIT'ted
unsigned genMethodICnt; // number of interruptible methods
unsigned genMethodNCnt; // number of non-interruptible methods
static unsigned genSmallMethodsNeedingExtraMemoryCnt = 0;
#endif
/*****************************************************************************/
#if MEASURE_NODE_SIZE
NodeSizeStats genNodeSizeStats;
NodeSizeStats genNodeSizeStatsPerFunc;
unsigned genTreeNcntHistBuckets[] = { 10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 1000, 5000, 10000, 0 };
histo genTreeNcntHist(DefaultAllocator::Singleton(), genTreeNcntHistBuckets);
unsigned genTreeNsizHistBuckets[] = { 1000, 5000, 10000, 50000, 100000, 500000, 1000000, 0 };
histo genTreeNsizHist(DefaultAllocator::Singleton(), genTreeNsizHistBuckets);
#endif // MEASURE_NODE_SIZE
/*****************************************************************************
*
* Variables to keep track of total code amounts.
*/
#if DISPLAY_SIZES
size_t grossVMsize; // Total IL code size
size_t grossNCsize; // Native code + data size
size_t totalNCsize; // Native code + data + GC info size (TODO-Cleanup: GC info size only accurate for JIT32_GCENCODER)
size_t gcHeaderISize; // GC header size: interruptible methods
size_t gcPtrMapISize; // GC pointer map size: interruptible methods
size_t gcHeaderNSize; // GC header size: non-interruptible methods
size_t gcPtrMapNSize; // GC pointer map size: non-interruptible methods
#endif // DISPLAY_SIZES
/*****************************************************************************
*
* Variables to keep track of argument counts.
*/
#if CALL_ARG_STATS
unsigned argTotalCalls;
unsigned argHelperCalls;
unsigned argStaticCalls;
unsigned argNonVirtualCalls;
unsigned argVirtualCalls;
unsigned argTotalArgs; // total number of args for all calls (including objectPtr)
unsigned argTotalDWordArgs;
unsigned argTotalLongArgs;
unsigned argTotalFloatArgs;
unsigned argTotalDoubleArgs;
unsigned argTotalRegArgs;
unsigned argTotalTemps;
unsigned argTotalLclVar;
unsigned argTotalDeferred;
unsigned argTotalConst;
unsigned argTotalObjPtr;
unsigned argTotalGTF_ASGinArgs;
unsigned argMaxTempsPerMethod;
unsigned argCntBuckets[] = { 0, 1, 2, 3, 4, 5, 6, 10, 0 };
histo argCntTable(DefaultAllocator::Singleton(), argCntBuckets);
unsigned argDWordCntBuckets[] = { 0, 1, 2, 3, 4, 5, 6, 10, 0 };
histo argDWordCntTable(DefaultAllocator::Singleton(), argDWordCntBuckets);
unsigned argDWordLngCntBuckets[] = { 0, 1, 2, 3, 4, 5, 6, 10, 0 };
histo argDWordLngCntTable(DefaultAllocator::Singleton(), argDWordLngCntBuckets);
unsigned argTempsCntBuckets[] = { 0, 1, 2, 3, 4, 5, 6, 10, 0 };
histo argTempsCntTable(DefaultAllocator::Singleton(), argTempsCntBuckets);
#endif // CALL_ARG_STATS
/*****************************************************************************
*
* Variables to keep track of basic block counts.
*/
#if COUNT_BASIC_BLOCKS
// --------------------------------------------------
// Basic block count frequency table:
// --------------------------------------------------
// <= 1 ===> 26872 count ( 56% of total)
// 2 .. 2 ===> 669 count ( 58% of total)
// 3 .. 3 ===> 4687 count ( 68% of total)
// 4 .. 5 ===> 5101 count ( 78% of total)
// 6 .. 10 ===> 5575 count ( 90% of total)
// 11 .. 20 ===> 3028 count ( 97% of total)
// 21 .. 50 ===> 1108 count ( 99% of total)
// 51 .. 100 ===> 182 count ( 99% of total)
// 101 .. 1000 ===> 34 count (100% of total)
// 1001 .. 10000 ===> 0 count (100% of total)
// --------------------------------------------------
unsigned bbCntBuckets[] = { 1, 2, 3, 5, 10, 20, 50, 100, 1000, 10000, 0 };
histo bbCntTable(DefaultAllocator::Singleton(), bbCntBuckets);
/* Histogram for the IL opcode size of methods with a single basic block */
unsigned bbSizeBuckets[] = { 1, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 0 };
histo bbOneBBSizeTable(DefaultAllocator::Singleton(), bbSizeBuckets);
#endif // COUNT_BASIC_BLOCKS
/*****************************************************************************
*
* Used by optFindNaturalLoops to gather statistical information such as
* - total number of natural loops
* - number of loops with 1, 2, ... exit conditions
* - number of loops that have an iterator (for like)
* - number of loops that have a constant iterator
*/
#if COUNT_LOOPS
unsigned totalLoopMethods; // counts the total number of methods that have natural loops
unsigned maxLoopsPerMethod; // counts the maximum number of loops a method has
unsigned totalLoopOverflows; // # of methods that identified more loops than we can represent
unsigned totalLoopCount; // counts the total number of natural loops
unsigned totalUnnatLoopCount; // counts the total number of (not-necessarily natural) loops
unsigned totalUnnatLoopOverflows; // # of methods that identified more unnatural loops than we can represent
unsigned iterLoopCount; // counts the # of loops with an iterator (for like)
unsigned simpleTestLoopCount; // counts the # of loops with an iterator and a simple loop condition (iter < const)
unsigned constIterLoopCount; // counts the # of loops with a constant iterator (for like)
bool hasMethodLoops; // flag to keep track if we already counted a method as having loops
unsigned loopsThisMethod; // counts the number of loops in the current method
bool loopOverflowThisMethod; // True if we exceeded the max # of loops in the method.
/* Histogram for number of loops in a method */
unsigned loopCountBuckets[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0 };
histo loopCountTable(DefaultAllocator::Singleton(), loopCountBuckets);
/* Histogram for number of loop exits */
unsigned loopExitCountBuckets[] = { 0, 1, 2, 3, 4, 5, 6, 0 };
histo loopExitCountTable(DefaultAllocator::Singleton(), loopExitCountBuckets);
#endif // COUNT_LOOPS
/*****************************************************************************
* variables to keep track of how many iterations we go in a dataflow pass
*/
#if DATAFLOW_ITER
unsigned CSEiterCount; // counts the # of iteration for the CSE dataflow
unsigned CFiterCount; // counts the # of iteration for the Const Folding dataflow
#endif // DATAFLOW_ITER
#if MEASURE_BLOCK_SIZE
size_t genFlowNodeSize;
size_t genFlowNodeCnt;
#endif // MEASURE_BLOCK_SIZE
/*****************************************************************************/
// We keep track of methods we've already compiled.
/*****************************************************************************
* Declare the statics
*/
#ifdef DEBUG
/* static */
unsigned Compiler::s_compMethodsCount = 0; // to produce unique label names
/* static */
bool Compiler::s_dspMemStats = false;
#endif
#ifndef DEBUGGING_SUPPORT
/* static */
const bool Compiler::Options::compDbgCode = false;
#endif
#ifndef PROFILING_SUPPORTED
const bool Compiler::Options::compNoPInvokeInlineCB = false;
#endif
#if defined(DEBUG)
//static ConfigDWORD fJitLRSampling;
/* static */
//bool Compiler::s_compInSamplingMode = (fJitLRSampling.val(CLRConfig::EXTERNAL_JitLRSampling) != 0);
bool Compiler::s_compInSamplingMode = false;
#else
/* static */
bool Compiler::s_compInSamplingMode = false;
#endif
/*****************************************************************************
*
* One time initialization code
*/
/* static */
void Compiler::compStartup()
{
#if DISPLAY_SIZES
grossVMsize =
grossNCsize =
totalNCsize = 0;
#endif // DISPLAY_SIZES
/* Initialize the single instance of the norls_allocator (with a page
* preallocated) which we try to reuse for all non-simulataneous
* uses (which is always, for the standalone)
*/
nraInitTheAllocator();
/* Initialize the table of tree node sizes */
GenTree::InitNodeSize();
#ifdef JIT32_GCENCODER
// Initialize the GC encoder lookup table
GCInfo::gcInitEncoderLookupTable();
#endif
/* Initialize the emitter */
emitter::emitInit();
// Static vars of ValueNumStore
ValueNumStore::InitValueNumStoreStatics();
compDisplayStaticSizes(stdout);
}
/*****************************************************************************
*
* One time finalization code
*/
/* static */
void Compiler::compShutdown()
{
#ifdef ALT_JIT
if (s_pAltJitExcludeAssembliesList != nullptr)
{
s_pAltJitExcludeAssembliesList->~AssemblyNamesList2(); // call the destructor
s_pAltJitExcludeAssembliesList = nullptr;
}
#endif // ALT_JIT
nraTheAllocatorDone();
/* Shut down the emitter */
emitter::emitDone();
#if defined(DEBUG) || MEASURE_NODE_SIZE || MEASURE_BLOCK_SIZE || DISPLAY_SIZES || CALL_ARG_STATS
if (genMethodCnt == 0)
{
return;
}
#endif
// Where should we write our statistics output?
FILE* fout = stdout;
#ifdef FEATURE_JIT_METHOD_PERF
if (compJitTimeLogFilename != NULL)
{
// I assume that this will return NULL if it fails for some reason, and
// that...
FILE* jitTimeLogFile = _wfopen(compJitTimeLogFilename, W("a"));
// ...Print will return silently with a NULL argument.
CompTimeSummaryInfo::s_compTimeSummary.Print(jitTimeLogFile);
fclose(jitTimeLogFile);
}
#endif // FEATURE_JIT_METHOD_PERF
#if FUNC_INFO_LOGGING
if (compJitFuncInfoFile != NULL)
{
fclose(compJitFuncInfoFile);
compJitFuncInfoFile = NULL;
}
#endif // FUNC_INFO_LOGGING
#if defined(DEBUG) || MEASURE_INLINING
#ifdef DEBUG
static ConfigDWORD fJitInlinePrintStats;
if ((unsigned)fJitInlinePrintStats.val(CLRConfig::INTERNAL_JitInlinePrintStats) == 1)
#endif // DEBUG
{
fprintf(fout, "\n");
fprintf(fout, "--------------------------------------\n");
fprintf(fout, "Inlining stats\n");
fprintf(fout, "--------------------------------------\n");
fprintf(fout,
"jitTotalMethodCompiled = %d\n"
"jitTotalMethodInlined = %d\n"
"jitTotalInlineCandidates = %d\n"
"jitTotalInlineCandidatesWithNonNullReturn = %d\n"
"jitTotalNumLocals = %d\n"
"jitTotalInlineReturnFromALocal = %d\n"
"jitInlineInitVarsFailureCount = %d\n"
"jitCheckCanInlineCallCount = %d\n"
"jitCheckCanInlineFailureCount = %d\n"
"jitInlineGetMethodInfoCallCount = %d\n"
"jitInlineInitClassCallCount = %d\n"
"jitInlineCanInlineCallCount = %d\n"
"jitIciStmtIsTheLastInBB = %d\n"
"jitInlineeContainsOnlyOneBB = %d\n",
jitTotalMethodCompiled,
jitTotalMethodInlined,
jitTotalInlineCandidates,
jitTotalInlineCandidatesWithNonNullReturn,
jitTotalNumLocals,
jitTotalInlineReturnFromALocal,
jitInlineInitVarsFailureCount,
jitCheckCanInlineCallCount,
jitCheckCanInlineFailureCount,
jitInlineGetMethodInfoCallCount,
jitInlineInitClassCallCount,
jitInlineCanInlineCallCount,
jitIciStmtIsTheLastInBB,
jitInlineeContainsOnlyOneBB
);
}
#endif // defined(DEBUG) || MEASURE_INLINING
#if COUNT_RANGECHECKS
if (optRangeChkAll > 0)
{
fprintf(fout,
"Removed %u of %u range checks\n",
optRangeChkRmv,
optRangeChkAll);
}
#endif // COUNT_RANGECHECKS
#if DISPLAY_SIZES
if (grossVMsize && grossNCsize)
{
fprintf(fout, "\n");
fprintf(fout, "--------------------------------------\n");
fprintf(fout, "Function and GC info size stats\n");
fprintf(fout, "--------------------------------------\n");
fprintf(fout,
"[%7u VM, %8u %6s %4u%%] %s\n",
grossVMsize,
grossNCsize,
Target::g_tgtCPUName,
100 * grossNCsize / grossVMsize,
"Total (excluding GC info)");
fprintf(fout,
"[%7u VM, %8u %6s %4u%%] %s\n",
grossVMsize,
totalNCsize,
Target::g_tgtCPUName,
100 * totalNCsize / grossVMsize,
"Total (including GC info)");
if (gcHeaderISize || gcHeaderNSize)
{
fprintf(fout, "\n");
fprintf(fout,
"GC tables : [%7uI,%7uN] %7u byt (%u%% of IL, %u%% of %s).\n",
gcHeaderISize + gcPtrMapISize,
gcHeaderNSize + gcPtrMapNSize,
totalNCsize - grossNCsize,
100 * (totalNCsize - grossNCsize) / grossVMsize,
100 * (totalNCsize - grossNCsize) / grossNCsize,
Target::g_tgtCPUName);
fprintf(fout,
"GC headers : [%7uI,%7uN] %7u byt, [%4.1fI,%4.1fN] %4.1f byt/meth\n",
gcHeaderISize,
gcHeaderNSize,
gcHeaderISize + gcHeaderNSize,
(float)gcHeaderISize / (genMethodICnt + 0.001),
(float)gcHeaderNSize / (genMethodNCnt + 0.001),
(float)(gcHeaderISize + gcHeaderNSize) / genMethodCnt);
fprintf(fout,
"GC ptr maps : [%7uI,%7uN] %7u byt, [%4.1fI,%4.1fN] %4.1f byt/meth\n",
gcPtrMapISize,
gcPtrMapNSize,
gcPtrMapISize + gcPtrMapNSize,
(float)gcPtrMapISize / (genMethodICnt + 0.001),
(float)gcPtrMapNSize / (genMethodNCnt + 0.001),
(float)(gcPtrMapISize + gcPtrMapNSize) / genMethodCnt);
}
else
{
fprintf(fout, "\n");
fprintf(fout,
"GC tables take up %u bytes (%u%% of instr, %u%% of %6s code).\n",
totalNCsize - grossNCsize,
100 * (totalNCsize - grossNCsize) / grossVMsize,
100 * (totalNCsize - grossNCsize) / grossNCsize,
Target::g_tgtCPUName);
}
#ifdef DEBUG
#if DOUBLE_ALIGN
fprintf(fout,
"%u out of %u methods generated with double-aligned stack\n",
Compiler::s_lvaDoubleAlignedProcsCount,
genMethodCnt);
#endif
#endif
}
#endif // DISPLAY_SIZES
#if CALL_ARG_STATS
compDispCallArgStats(fout);
#endif
#if COUNT_BASIC_BLOCKS
fprintf(fout, "--------------------------------------------------\n");
fprintf(fout, "Basic block count frequency table:\n");
fprintf(fout, "--------------------------------------------------\n");
bbCntTable.histoDsp(fout);
fprintf(fout, "--------------------------------------------------\n");
fprintf(fout, "\n");
fprintf(fout, "--------------------------------------------------\n");
fprintf(fout, "IL method size frequency table for methods with a single basic block:\n");
fprintf(fout, "--------------------------------------------------\n");
bbOneBBSizeTable.histoDsp(fout);
fprintf(fout, "--------------------------------------------------\n");
#endif // COUNT_BASIC_BLOCKS
#if COUNT_LOOPS
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "Loop stats\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "Total number of methods with loops is %5u\n", totalLoopMethods);
fprintf(fout, "Total number of loops is %5u\n", totalLoopCount);
fprintf(fout, "Maximum number of loops per method is %5u\n", maxLoopsPerMethod);
fprintf(fout, "# of methods overflowing nat loop table is %5u\n", totalLoopOverflows);
fprintf(fout, "Total number of 'unnatural' loops is %5u\n", totalUnnatLoopCount);
fprintf(fout, "# of methods overflowing unnat loop limit is %5u\n", totalUnnatLoopOverflows);
fprintf(fout, "Total number of loops with an iterator is %5u\n", iterLoopCount);
fprintf(fout, "Total number of loops with a simple iterator is %5u\n", simpleTestLoopCount);
fprintf(fout, "Total number of loops with a constant iterator is %5u\n", constIterLoopCount);
fprintf(fout, "--------------------------------------------------\n");
fprintf(fout, "Loop count frequency table:\n");
fprintf(fout, "--------------------------------------------------\n");
loopCountTable.histoDsp(fout);
fprintf(fout, "--------------------------------------------------\n");
fprintf(fout, "Loop exit count frequency table:\n");
fprintf(fout, "--------------------------------------------------\n");
loopExitCountTable.histoDsp(fout);
fprintf(fout, "--------------------------------------------------\n");
#endif // COUNT_LOOPS
#if DATAFLOW_ITER
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "Total number of iterations in the CSE dataflow loop is %5u\n", CSEiterCount);
fprintf(fout, "Total number of iterations in the CF dataflow loop is %5u\n", CFiterCount);
#endif // DATAFLOW_ITER
#if MEASURE_NODE_SIZE
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "GenTree node allocation stats\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout,
"Allocated %6u tree nodes (%7u bytes total, avg %4u bytes per method)\n",
genNodeSizeStats.genTreeNodeCnt,
genNodeSizeStats.genTreeNodeSize,
genNodeSizeStats.genTreeNodeSize / genMethodCnt);
fprintf(fout,
"Allocated %7u bytes of unused tree node space (%3.2f%%)\n",
genNodeSizeStats.genTreeNodeSize - genNodeSizeStats.genTreeNodeActualSize,
(float)(100 * (genNodeSizeStats.genTreeNodeSize - genNodeSizeStats.genTreeNodeActualSize)) / genNodeSizeStats.genTreeNodeSize);
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "Distribution of per-method GenTree node counts:\n");
genTreeNcntHist.histoDsp(fout);
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "Distribution of per-method GenTree node allocations (in bytes):\n");
genTreeNsizHist.histoDsp(fout);
#endif // MEASURE_NODE_SIZE
#if MEASURE_BLOCK_SIZE
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "BasicBlock and flowList/BasicBlockList allocation stats\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout,
"Allocated %6u basic blocks (%7u bytes total, avg %4u bytes per method)\n",
BasicBlock::s_Count,
BasicBlock::s_Size,
BasicBlock::s_Size / genMethodCnt);
fprintf(fout,
"Allocated %6u flow nodes (%7u bytes total, avg %4u bytes per method)\n",
genFlowNodeCnt,
genFlowNodeSize,
genFlowNodeSize / genMethodCnt);
#endif // MEASURE_BLOCK_SIZE
#if MEASURE_MEM_ALLOC
#ifdef DEBUG
// Under debug, we only dump memory stats when the COMPLUS_* variable is defined.
// Under non-debug, we don't have the COMPLUS_* variable, and we always dump it.
if (s_dspMemStats)
#endif
{
fprintf(fout, "\nAll allocations:\n");
s_aggMemStats.Print(stdout);
fprintf(fout, "\nLargest method:\n");
s_maxCompMemStats.Print(stdout);
}
#endif // MEASURE_MEM_ALLOC
#if LOOP_HOIST_STATS
#ifdef DEBUG // Always display loop stats in retail
static ConfigDWORD fDisplayLoopHoistStats;
if (fDisplayLoopHoistStats.val(CLRConfig::INTERNAL_JitLoopHoistStats) != 0)
#endif // DEBUG
{
PrintAggregateLoopHoistStats(stdout);
}
#endif // LOOP_HOIST_STATS
#if MEASURE_PTRTAB_SIZE
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "GC pointer table stats\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout,
"Reg pointer descriptor size (internal): %8u (avg %4u per method)\n",
GCInfo::s_gcRegPtrDscSize,
GCInfo::s_gcRegPtrDscSize / genMethodCnt);
fprintf(fout,
"Total pointer table size: %8u (avg %4u per method)\n",
GCInfo::s_gcTotalPtrTabSize,
GCInfo::s_gcTotalPtrTabSize / genMethodCnt);
#endif // MEASURE_PTRTAB_SIZE
#if MEASURE_NODE_SIZE || MEASURE_BLOCK_SIZE || MEASURE_PTRTAB_SIZE || DISPLAY_SIZES
if (genMethodCnt != 0)
{
fprintf(fout, "\n");
fprintf(fout, "A total of %6u methods compiled", genMethodCnt);
#if DISPLAY_SIZES
if (genMethodICnt || genMethodNCnt)
{
fprintf(fout, " (%u interruptible, %u non-interruptible)", genMethodICnt, genMethodNCnt);
}
#endif // DISPLAY_SIZES
fprintf(fout, ".\n");
}
#endif // MEASURE_NODE_SIZE || MEASURE_BLOCK_SIZE || MEASURE_PTRTAB_SIZE || DISPLAY_SIZES
#if EMITTER_STATS
emitterStats(fout);
#endif
#if MEASURE_FATAL
fprintf(fout, "\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, "Fatal errors stats\n");
fprintf(fout, "---------------------------------------------------\n");
fprintf(fout, " badCode: %u\n", fatal_badCode);
fprintf(fout, " noWay: %u\n", fatal_noWay);
fprintf(fout, " NOMEM: %u\n", fatal_NOMEM);
fprintf(fout, " noWayAssertBody: %u\n", fatal_noWayAssertBody);
#ifdef DEBUG
fprintf(fout, " noWayAssertBodyArgs: %u\n", fatal_noWayAssertBodyArgs);
#endif // DEBUG
fprintf(fout, " NYI: %u\n", fatal_NYI);
#endif // MEASURE_FATAL
#ifdef DEBUG
LogEnv::cleanup();
#endif
}
/*****************************************************************************
* Display static data structure sizes.
*/
/* static */
void Compiler::compDisplayStaticSizes(FILE* fout)
{
#if MEASURE_NODE_SIZE
/*
IMPORTANT: Use the following code to check the alignment of
GenTree members (in a retail build, of course).
*/
GenTree* gtDummy = nullptr;
fprintf(fout, "\n");
fprintf(fout, "Offset / size of gtOper = %2u / %2u\n", offsetof(GenTree, gtOper ), sizeof(gtDummy->gtOper ));
fprintf(fout, "Offset / size of gtType = %2u / %2u\n", offsetof(GenTree, gtType ), sizeof(gtDummy->gtType ));
#if FEATURE_ANYCSE
fprintf(fout, "Offset / size of gtCSEnum = %2u / %2u\n", offsetof(GenTree, gtCSEnum ), sizeof(gtDummy->gtCSEnum ));
#endif // FEATURE_ANYCSE
#if ASSERTION_PROP
fprintf(fout, "Offset / size of gtAssertionNum = %2u / %2u\n", offsetof(GenTree, gtAssertionNum), sizeof(gtDummy->gtAssertionNum));
#endif // ASSERTION_PROP
#if FEATURE_STACK_FP_X87
fprintf(fout, "Offset / size of gtFPlvl = %2u / %2u\n", offsetof(GenTree, gtFPlvl ), sizeof(gtDummy->gtFPlvl ));
#endif // FEATURE_STACK_FP_X87
// TODO: The section that report GenTree sizes should be made into a public static member function of the GenTree class (see https://github.com/dotnet/coreclr/pull/493)
// fprintf(fout, "Offset / size of gtCostEx = %2u / %2u\n", offsetof(GenTree, _gtCostEx ), sizeof(gtDummy->_gtCostEx ));
// fprintf(fout, "Offset / size of gtCostSz = %2u / %2u\n", offsetof(GenTree, _gtCostSz ), sizeof(gtDummy->_gtCostSz ));
fprintf(fout, "Offset / size of gtFlags = %2u / %2u\n", offsetof(GenTree, gtFlags ), sizeof(gtDummy->gtFlags ));
fprintf(fout, "Offset / size of gtVNPair = %2u / %2u\n", offsetof(GenTree, gtVNPair ), sizeof(gtDummy->gtVNPair ));
fprintf(fout, "Offset / size of gtRsvdRegs = %2u / %2u\n", offsetof(GenTree, gtRsvdRegs ), sizeof(gtDummy->gtRsvdRegs ));
#ifdef LEGACY_BACKEND
fprintf(fout, "Offset / size of gtUsedRegs = %2u / %2u\n", offsetof(GenTree, gtUsedRegs ), sizeof(gtDummy->gtUsedRegs ));
#endif // LEGACY_BACKEND
#ifndef LEGACY_BACKEND
fprintf(fout, "Offset / size of gtLsraInfo = %2u / %2u\n", offsetof(GenTree, gtLsraInfo ), sizeof(gtDummy->gtLsraInfo ));
#endif // !LEGACY_BACKEND
fprintf(fout, "Offset / size of gtNext = %2u / %2u\n", offsetof(GenTree, gtNext ), sizeof(gtDummy->gtNext ));
fprintf(fout, "Offset / size of gtPrev = %2u / %2u\n", offsetof(GenTree, gtPrev ), sizeof(gtDummy->gtPrev ));
fprintf(fout, "\n");
#if SMALL_TREE_NODES
fprintf(fout, "Small tree node size = %3u\n", TREE_NODE_SZ_SMALL);
#endif // SMALL_TREE_NODES
fprintf(fout, "Large tree node size = %3u\n", TREE_NODE_SZ_LARGE);
fprintf(fout, "Size of GenTree = %3u\n", sizeof(GenTree));
fprintf(fout, "Size of GenTreeUnOp = %3u\n", sizeof(GenTreeUnOp));
fprintf(fout, "Size of GenTreeOp = %3u\n", sizeof(GenTreeOp));
fprintf(fout, "Size of GenTreeVal = %3u\n", sizeof(GenTreeVal));
fprintf(fout, "Size of GenTreeIntConCommon = %3u\n", sizeof(GenTreeIntConCommon));
fprintf(fout, "Size of GenTreePhysReg = %3u\n", sizeof(GenTreePhysReg));
#ifndef LEGACY_BACKEND
fprintf(fout, "Size of GenTreeJumpTable = %3u\n", sizeof(GenTreeJumpTable));
#endif // !LEGACY_BACKEND
fprintf(fout, "Size of GenTreeIntCon = %3u\n", sizeof(GenTreeIntCon));
fprintf(fout, "Size of GenTreeLngCon = %3u\n", sizeof(GenTreeLngCon));
fprintf(fout, "Size of GenTreeDblCon = %3u\n", sizeof(GenTreeDblCon));
fprintf(fout, "Size of GenTreeStrCon = %3u\n", sizeof(GenTreeStrCon));
fprintf(fout, "Size of GenTreeLclVarCommon = %3u\n", sizeof(GenTreeLclVarCommon));
fprintf(fout, "Size of GenTreeLclVar = %3u\n", sizeof(GenTreeLclVar));
fprintf(fout, "Size of GenTreeLclFld = %3u\n", sizeof(GenTreeLclFld));
fprintf(fout, "Size of GenTreeRegVar = %3u\n", sizeof(GenTreeRegVar));
fprintf(fout, "Size of GenTreeCast = %3u\n", sizeof(GenTreeCast));
fprintf(fout, "Size of GenTreeBox = %3u\n", sizeof(GenTreeBox));
fprintf(fout, "Size of GenTreeField = %3u\n", sizeof(GenTreeField));
fprintf(fout, "Size of GenTreeArgList = %3u\n", sizeof(GenTreeArgList));
fprintf(fout, "Size of GenTreeColon = %3u\n", sizeof(GenTreeColon));
fprintf(fout, "Size of GenTreeCall = %3u\n", sizeof(GenTreeCall));
fprintf(fout, "Size of GenTreeCmpXchg = %3u\n", sizeof(GenTreeCmpXchg));
fprintf(fout, "Size of GenTreeFptrVal = %3u\n", sizeof(GenTreeFptrVal));
fprintf(fout, "Size of GenTreeQmark = %3u\n", sizeof(GenTreeQmark));
#if INLINE_MATH
fprintf(fout, "Size of GenTreeMath = %3u\n", sizeof(GenTreeMath));
#endif // INLINE_MATH
fprintf(fout, "Size of GenTreeIndex = %3u\n", sizeof(GenTreeIndex));
fprintf(fout, "Size of GenTreeArrLen = %3u\n", sizeof(GenTreeArrLen));
fprintf(fout, "Size of GenTreeBoundsChk = %3u\n", sizeof(GenTreeBoundsChk));
fprintf(fout, "Size of GenTreeArrElem = %3u\n", sizeof(GenTreeArrElem));
fprintf(fout, "Size of GenTreeAddrMode = %3u\n", sizeof(GenTreeAddrMode));
fprintf(fout, "Size of GenTreeIndir = %3u\n", sizeof(GenTreeIndir));
fprintf(fout, "Size of GenTreeStoreInd = %3u\n", sizeof(GenTreeStoreInd));
fprintf(fout, "Size of GenTreeRetExpr = %3u\n", sizeof(GenTreeRetExpr));
fprintf(fout, "Size of GenTreeStmt = %3u\n", sizeof(GenTreeStmt));
fprintf(fout, "Size of GenTreeLdObj = %3u\n", sizeof(GenTreeLdObj));
fprintf(fout, "Size of GenTreeClsVar = %3u\n", sizeof(GenTreeClsVar));
fprintf(fout, "Size of GenTreeArgPlace = %3u\n", sizeof(GenTreeArgPlace));
fprintf(fout, "Size of GenTreeLabel = %3u\n", sizeof(GenTreeLabel));
fprintf(fout, "Size of GenTreePhiArg = %3u\n", sizeof(GenTreePhiArg));
fprintf(fout, "Size of GenTreePutArgStk = %3u\n", sizeof(GenTreePutArgStk));
fprintf(fout, "\n");
#endif // MEASURE_NODE_SIZE
#if MEASURE_BLOCK_SIZE
BasicBlock* bbDummy = nullptr;
fprintf(fout, "\n");
fprintf(fout, "Offset / size of bbNext = %3u / %3u\n", offsetof(BasicBlock, bbNext ), sizeof(bbDummy->bbNext ));
fprintf(fout, "Offset / size of bbNum = %3u / %3u\n", offsetof(BasicBlock, bbNum ), sizeof(bbDummy->bbNum ));
fprintf(fout, "Offset / size of bbPostOrderNum = %3u / %3u\n", offsetof(BasicBlock, bbPostOrderNum ), sizeof(bbDummy->bbPostOrderNum ));
fprintf(fout, "Offset / size of bbRefs = %3u / %3u\n", offsetof(BasicBlock, bbRefs ), sizeof(bbDummy->bbRefs ));
fprintf(fout, "Offset / size of bbFlags = %3u / %3u\n", offsetof(BasicBlock, bbFlags ), sizeof(bbDummy->bbFlags ));
fprintf(fout, "Offset / size of bbWeight = %3u / %3u\n", offsetof(BasicBlock, bbWeight ), sizeof(bbDummy->bbWeight ));
fprintf(fout, "Offset / size of bbJumpKind = %3u / %3u\n", offsetof(BasicBlock, bbJumpKind ), sizeof(bbDummy->bbJumpKind ));
fprintf(fout, "Offset / size of bbJumpOffs = %3u / %3u\n", offsetof(BasicBlock, bbJumpOffs ), sizeof(bbDummy->bbJumpOffs ));
fprintf(fout, "Offset / size of bbJumpDest = %3u / %3u\n", offsetof(BasicBlock, bbJumpDest ), sizeof(bbDummy->bbJumpDest ));
fprintf(fout, "Offset / size of bbJumpSwt = %3u / %3u\n", offsetof(BasicBlock, bbJumpSwt ), sizeof(bbDummy->bbJumpSwt ));
fprintf(fout, "Offset / size of bbTreeList = %3u / %3u\n", offsetof(BasicBlock, bbTreeList ), sizeof(bbDummy->bbTreeList ));
fprintf(fout, "Offset / size of bbEntryState = %3u / %3u\n", offsetof(BasicBlock, bbEntryState ), sizeof(bbDummy->bbEntryState ));
fprintf(fout, "Offset / size of bbStkTempsIn = %3u / %3u\n", offsetof(BasicBlock, bbStkTempsIn ), sizeof(bbDummy->bbStkTempsIn ));
fprintf(fout, "Offset / size of bbStkTempsOut = %3u / %3u\n", offsetof(BasicBlock, bbStkTempsOut ), sizeof(bbDummy->bbStkTempsOut ));
fprintf(fout, "Offset / size of bbTryIndex = %3u / %3u\n", offsetof(BasicBlock, bbTryIndex ), sizeof(bbDummy->bbTryIndex ));
fprintf(fout, "Offset / size of bbHndIndex = %3u / %3u\n", offsetof(BasicBlock, bbHndIndex ), sizeof(bbDummy->bbHndIndex ));
fprintf(fout, "Offset / size of bbCatchTyp = %3u / %3u\n", offsetof(BasicBlock, bbCatchTyp ), sizeof(bbDummy->bbCatchTyp ));
fprintf(fout, "Offset / size of bbStkDepth = %3u / %3u\n", offsetof(BasicBlock, bbStkDepth ), sizeof(bbDummy->bbStkDepth ));
fprintf(fout, "Offset / size of bbFPinVars = %3u / %3u\n", offsetof(BasicBlock, bbFPinVars ), sizeof(bbDummy->bbFPinVars ));
fprintf(fout, "Offset / size of bbPreds = %3u / %3u\n", offsetof(BasicBlock, bbPreds ), sizeof(bbDummy->bbPreds ));
fprintf(fout, "Offset / size of bbReach = %3u / %3u\n", offsetof(BasicBlock, bbReach ), sizeof(bbDummy->bbReach ));
fprintf(fout, "Offset / size of bbIDom = %3u / %3u\n", offsetof(BasicBlock, bbIDom ), sizeof(bbDummy->bbIDom ));
fprintf(fout, "Offset / size of bbDfsNum = %3u / %3u\n", offsetof(BasicBlock, bbDfsNum ), sizeof(bbDummy->bbDfsNum ));
fprintf(fout, "Offset / size of bbCodeOffs = %3u / %3u\n", offsetof(BasicBlock, bbCodeOffs ), sizeof(bbDummy->bbCodeOffs ));
fprintf(fout, "Offset / size of bbCodeOffsEnd = %3u / %3u\n", offsetof(BasicBlock, bbCodeOffsEnd ), sizeof(bbDummy->bbCodeOffsEnd ));
fprintf(fout, "Offset / size of bbVarUse = %3u / %3u\n", offsetof(BasicBlock, bbVarUse ), sizeof(bbDummy->bbVarUse ));
fprintf(fout, "Offset / size of bbVarDef = %3u / %3u\n", offsetof(BasicBlock, bbVarDef ), sizeof(bbDummy->bbVarDef ));
fprintf(fout, "Offset / size of bbVarTmp = %3u / %3u\n", offsetof(BasicBlock, bbVarTmp ), sizeof(bbDummy->bbVarTmp ));
fprintf(fout, "Offset / size of bbLiveIn = %3u / %3u\n", offsetof(BasicBlock, bbLiveIn ), sizeof(bbDummy->bbLiveIn ));
fprintf(fout, "Offset / size of bbLiveOut = %3u / %3u\n", offsetof(BasicBlock, bbLiveOut ), sizeof(bbDummy->bbLiveOut ));
fprintf(fout, "Offset / size of bbHeapSsaPhiFunc = %3u / %3u\n", offsetof(BasicBlock, bbHeapSsaPhiFunc), sizeof(bbDummy->bbHeapSsaPhiFunc));
fprintf(fout, "Offset / size of bbHeapSsaNumIn = %3u / %3u\n", offsetof(BasicBlock, bbHeapSsaNumIn ), sizeof(bbDummy->bbHeapSsaNumIn ));
fprintf(fout, "Offset / size of bbHeapSsaNumOut = %3u / %3u\n", offsetof(BasicBlock, bbHeapSsaNumOut ), sizeof(bbDummy->bbHeapSsaNumOut ));
#ifdef DEBUGGING_SUPPORT
fprintf(fout, "Offset / size of bbScope = %3u / %3u\n", offsetof(BasicBlock, bbScope ), sizeof(bbDummy->bbScope ));
#endif // DEBUGGING_SUPPORT
fprintf(fout, "Offset / size of bbCseGen = %3u / %3u\n", offsetof(BasicBlock, bbCseGen ), sizeof(bbDummy->bbCseGen ));
fprintf(fout, "Offset / size of bbCseIn = %3u / %3u\n", offsetof(BasicBlock, bbCseIn ), sizeof(bbDummy->bbCseIn ));
fprintf(fout, "Offset / size of bbCseOut = %3u / %3u\n", offsetof(BasicBlock, bbCseOut ), sizeof(bbDummy->bbCseOut ));