SimpleCompilerRuns:
CEDAR
PROGRAM
IMPORTS AssociativeCache, Convert, DirectMapCache, Rope, WrapDragoman
SHARES WrapDragoman =
BEGIN
TwoToTheTwo:
PROC[n:
INT]
RETURNS[
INT] = {
IF n=0 THEN RETURN[1] ELSE RETURN[2*TwoToTheTwo[n-1]]};
FOR logquads:
INT
IN [0..5]
DO
rc, mc: CacheModels.Cache;
handle: WrapDragoman.Handle ← WrapDragoman.Start[backingFile: Rope.Cat["SimpleCompilerRuns.", Convert.RopeFromInt[TwoToTheTwo[logquads]], ".ts"], instr: 1, data: 1];
rc ← DirectMapCache.NewCache[lines: 512*TwoToTheTwo[logquads], quadsPerLine: 1]; -- real cache
mc ← AssociativeCache.NewCache[lines: 64*TwoToTheTwo[logquads], quadsPerLine: 1, wordsPerQuad: 1]; -- map cache
WrapDragoman.SetInstructionCache[handle: handle, number: 0, cache: AssociativeCache.NewCache[lines: 115, quadsPerLine: 1, wordsPerQuad: 4, lru: FALSE, realCache: rc, mapCache: mc]]; -- instruction cache
WrapDragoman.SetDataCache[handle: handle, number: 0, cache: AssociativeCache.NewCache[lines: 115, quadsPerLine: 1, wordsPerQuad: 4, lru: FALSE, realCache: rc, mapCache: mc]]; -- data cache
WrapDragoman.MarkGFI[handle, "CommandToolUtilitiesImpl", "FileViewerOpsImpl", "FileStreamImpl", "FileNamesImpl", "FileImpl"];
WrapDragoman.MarkGFI[handle, "IOPrintImpl", "IOCommonImpl", "IOSimpleStreamsImpl", "IOConvertImpl", "ViewerIOImpl", "IOScanImpl"];
WrapDragoman.MarkGFI[handle, "FSLockImpl", "FSFileOpsImpl", "FSReportImpl", "FSOpenFileImpl", "FSStreamImpl", "FSNameImpl"];
WrapDragoman.MarkGFI[handle, "RopeImpl", "RopeImplExt", "ListImpl", "AtomImpl", "ConvertUnsafeImpl"];
WrapDragoman.MarkGFI[handle, "Compiler"];
WrapDragoman.Run[handle, "compile dummy dummyimpl"];
rc.print[rc, handle.tsOut, "Real cache"];
mc.print[mc, handle.tsOut, "Map cache"];
WrapDragoman.End[handle];
ENDLOOP;
FOR logquads:
INT
IN [0..0]
DO
rc, mc: CacheModels.Cache;
handle: WrapDragoman.Handle ← WrapDragoman.Start[backingFile: "SimCompSimple.115.ts", instr: 1, data: 1];
rc ← DirectMapCache.NewCache[lines: 512*TwoToTheTwo[logquads], quadsPerLine: 1]; -- real cache
mc ← DirectMapCache.NewCache[lines: 64*TwoToTheTwo[logquads], quadsPerLine: 1, wordsPerQuad: 1]; -- map cache
WrapDragoman.SetInstructionCache[handle: handle, number: 0, cache: AssociativeCache.NewCache[lines: 115, quadsPerLine: 1, wordsPerQuad: 4, lru: FALSE, realCache: rc, mapCache: mc]]; -- instruction cache
WrapDragoman.SetDataCache[handle: handle, number: 0, cache: AssociativeCache.NewCache[lines: 115, quadsPerLine: 1, wordsPerQuad: 4, lru: FALSE, realCache: rc, mapCache: mc]]; -- data cache
WrapDragoman.MarkGFI[handle, "CommandToolUtilitiesImpl", "FileViewerOpsImpl", "FileStreamImpl", "FileNamesImpl", "FileImpl"];
WrapDragoman.MarkGFI[handle, "IOPrintImpl", "IOCommonImpl", "IOSimpleStreamsImpl", "IOConvertImpl", "ViewerIOImpl", "IOScanImpl"];
WrapDragoman.MarkGFI[handle, "FSLockImpl", "FSFileOpsImpl", "FSReportImpl", "FSOpenFileImpl", "FSStreamImpl", "FSNameImpl"];
WrapDragoman.MarkGFI[handle, "RopeImpl", "RopeImplExt", "ListImpl", "AtomImpl", "ConvertUnsafeImpl"];
WrapDragoman.MarkGFI[handle, "Compiler"];
WrapDragoman.Run[handle, "compile dummy dummyimpl"];
rc.print[rc, handle.tsOut, "Real cache"];
mc.print[mc, handle.tsOut, "Map cache"];
WrapDragoman.End[handle];
ENDLOOP;
END.