106c3fb27SDimitry Andric<!doctype html> 206c3fb27SDimitry Andric<html> 306c3fb27SDimitry Andric<!-- HTMLLogger.cpp ---------------------------------------------------- 406c3fb27SDimitry Andric 506c3fb27SDimitry Andric Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 606c3fb27SDimitry Andric See https://llvm.org/LICENSE.txt for license information. 706c3fb27SDimitry Andric SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 806c3fb27SDimitry Andric 906c3fb27SDimitry Andric//===------------------------------------------------------------------------> 1006c3fb27SDimitry Andric 1106c3fb27SDimitry Andric<head> 1206c3fb27SDimitry Andric<?INJECT?> 1306c3fb27SDimitry Andric 1406c3fb27SDimitry Andric<template id="value-template"> 1506c3fb27SDimitry Andric <details class="value" open> 1606c3fb27SDimitry Andric <summary> 1706c3fb27SDimitry Andric <span>{{v.kind}} 1806c3fb27SDimitry Andric <template data-if="v.value_id"><span class="address">#{{v.value_id}}</span></template> 1906c3fb27SDimitry Andric </span> 2006c3fb27SDimitry Andric <template data-if="v.location"> 215f757f3fSDimitry Andric <span class="location">{{v.type}} <span class="address">@{{v.location}}</span></span> 2206c3fb27SDimitry Andric </template> 2306c3fb27SDimitry Andric </summary> 2406c3fb27SDimitry Andric <template 2506c3fb27SDimitry Andric data-for="kv in Object.entries(v)" 2606c3fb27SDimitry Andric data-if="['kind', 'value_id', 'type', 'location'].indexOf(kv[0]) < 0"> 2706c3fb27SDimitry Andric <div class="property"><span class="key">{{kv[0]}}</span> 2806c3fb27SDimitry Andric <template data-if="typeof(kv[1]) != 'object'">{{kv[1]}}</template> 2906c3fb27SDimitry Andric <template data-if="typeof(kv[1]) == 'object'" data-let="v = kv[1]"> 3006c3fb27SDimitry Andric <template data-use="value-template"></template> 3106c3fb27SDimitry Andric </template> 3206c3fb27SDimitry Andric </div> 3306c3fb27SDimitry Andric </template> 3406c3fb27SDimitry Andric </details> 3506c3fb27SDimitry Andric</template> 3606c3fb27SDimitry Andric 3706c3fb27SDimitry Andric</head> 3806c3fb27SDimitry Andric 3906c3fb27SDimitry Andric<body> 4006c3fb27SDimitry Andric 4106c3fb27SDimitry Andric<section id="timeline" data-selection=""> 4206c3fb27SDimitry Andric<header>Timeline</header> 4306c3fb27SDimitry Andric<template data-for="entry in timeline"> 445f757f3fSDimitry Andric <div id="{{entry.block}}:{{entry.iter}}" data-bb="{{entry.block}}" class="entry"> 45*0fca6ea1SDimitry Andric <span class="counter"></span> 465f757f3fSDimitry Andric {{entry.block}} 475f757f3fSDimitry Andric <template data-if="entry.post_visit">(post-visit)</template> 485f757f3fSDimitry Andric <template data-if="!entry.post_visit">({{entry.iter}})</template> 495f757f3fSDimitry Andric <template data-if="entry.converged"> →|<!--Rightwards arrow, vertical line--></template> 505f757f3fSDimitry Andric </div> 5106c3fb27SDimitry Andric</template> 5206c3fb27SDimitry Andric</section> 5306c3fb27SDimitry Andric 5406c3fb27SDimitry Andric<section id="function" data-selection=""> 5506c3fb27SDimitry Andric<header>Function</header> 5606c3fb27SDimitry Andric<div id="code"></div> 5706c3fb27SDimitry Andric<div id="cfg"></div> 5806c3fb27SDimitry Andric</section> 5906c3fb27SDimitry Andric 6006c3fb27SDimitry Andric<section id="block" data-selection="bb"> 6106c3fb27SDimitry Andric<header><template>Block {{selection.bb}}</template></header> 6206c3fb27SDimitry Andric<div id="iterations"> 635f757f3fSDimitry Andric <template data-for="iter in cfg[selection.bb].iters"> 645f757f3fSDimitry Andric <a class="chooser {{selection.bb}}:{{iter.iter}}" data-iter="{{selection.bb}}:{{iter.iter}}"> 655f757f3fSDimitry Andric <template data-if="iter.post_visit">Post-visit</template> 665f757f3fSDimitry Andric <template data-if="!iter.post_visit">{{iter.iter}}</template> 675f757f3fSDimitry Andric <template data-if="iter.converged"> →|<!--Rightwards arrow, vertical line--></template> 685f757f3fSDimitry Andric </a> 6906c3fb27SDimitry Andric </template> 7006c3fb27SDimitry Andric</div> 7106c3fb27SDimitry Andric<table id="bb-elements"> 7206c3fb27SDimitry Andric<template> 7306c3fb27SDimitry Andric <tr id="{{selection.bb}}.0"> 7406c3fb27SDimitry Andric <td class="{{selection.bb}}">{{selection.bb}}.0</td> 7506c3fb27SDimitry Andric <td>(initial state)</td> 7606c3fb27SDimitry Andric </tr> 7706c3fb27SDimitry Andric</template> 7806c3fb27SDimitry Andric<template data-for="elt in cfg[selection.bb].elements"> 7906c3fb27SDimitry Andric <tr id="{{selection.bb}}.{{elt_index+1}}"> 8006c3fb27SDimitry Andric <td class="{{selection.bb}}">{{selection.bb}}.{{elt_index+1}}</td> 8106c3fb27SDimitry Andric <td>{{elt}}</td> 8206c3fb27SDimitry Andric </tr> 8306c3fb27SDimitry Andric</template> 8406c3fb27SDimitry Andric</table> 8506c3fb27SDimitry Andric</section> 8606c3fb27SDimitry Andric 8706c3fb27SDimitry Andric<section id="element" data-selection="iter,elt"> 8806c3fb27SDimitry Andric<template data-let="state = states[selection.iter + '_' + selection.elt]"> 8906c3fb27SDimitry Andric<header> 905f757f3fSDimitry Andric <template data-if="state.element == 0">{{state.block}} initial state</template> 915f757f3fSDimitry Andric <template data-if="state.element != 0">Element {{selection.elt}}</template> 925f757f3fSDimitry Andric <template data-if="state.post_visit"> (post-visit)</template> 935f757f3fSDimitry Andric <template data-if="!state.post_visit"> (iteration {{state.iter}})</template> 9406c3fb27SDimitry Andric</header> 9506c3fb27SDimitry Andric<template data-if="state.value" data-let="v = state.value"> 9606c3fb27SDimitry Andric <h2>Value</h2> 9706c3fb27SDimitry Andric <template data-use="value-template"></template> 9806c3fb27SDimitry Andric</template> 9906c3fb27SDimitry Andric<template data-if="state.logs"> 10006c3fb27SDimitry Andric <h2>Logs</h2> 10106c3fb27SDimitry Andric <pre>{{state.logs}}</pre> 10206c3fb27SDimitry Andric</template> 10306c3fb27SDimitry Andric<h2>Built-in lattice</h2> 10406c3fb27SDimitry Andric<pre>{{state.builtinLattice}}</pre> 10506c3fb27SDimitry Andric</template> 10606c3fb27SDimitry Andric</section> 10706c3fb27SDimitry Andric 10806c3fb27SDimitry Andric<script> 10906c3fb27SDimitry AndricaddBBColors(Object.keys(HTMLLoggerData.cfg).length); 11006c3fb27SDimitry AndricwatchSelection(HTMLLoggerData); 11106c3fb27SDimitry AndricupdateSelection({}, HTMLLoggerData); 11206c3fb27SDimitry Andric// Copy code and cfg from <template>s into the body. 11306c3fb27SDimitry Andricfor (tmpl of document.querySelectorAll('template[data-copy]')) 11406c3fb27SDimitry Andric document.getElementById(tmpl.dataset.copy).replaceChildren( 11506c3fb27SDimitry Andric ...tmpl.content.cloneNode(/*deep=*/true).childNodes); 11606c3fb27SDimitry Andric</script> 11706c3fb27SDimitry Andric 11806c3fb27SDimitry Andric</body> 11906c3fb27SDimitry Andric</html> 120