1<!doctype html> 2<html> 3<!-- HTMLLogger.cpp ---------------------------------------------------- 4 5 Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 6 See https://llvm.org/LICENSE.txt for license information. 7 SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 8 9//===------------------------------------------------------------------------> 10 11<head> 12<?INJECT?> 13 14<template id="value-template"> 15 <details class="value" open> 16 <summary> 17 <span>{{v.kind}} 18 <template data-if="v.value_id"><span class="address">#{{v.value_id}}</span></template> 19 </span> 20 <template data-if="v.location"> 21 <span>{{v.type}} <span class="address">@{{v.location}}</span></span> 22 </template> 23 </summary> 24 <template 25 data-for="kv in Object.entries(v)" 26 data-if="['kind', 'value_id', 'type', 'location'].indexOf(kv[0]) < 0"> 27 <div class="property"><span class="key">{{kv[0]}}</span> 28 <template data-if="typeof(kv[1]) != 'object'">{{kv[1]}}</template> 29 <template data-if="typeof(kv[1]) == 'object'" data-let="v = kv[1]"> 30 <template data-use="value-template"></template> 31 </template> 32 </div> 33 </template> 34 </details> 35</template> 36 37</head> 38 39<body> 40 41<section id="timeline" data-selection=""> 42<header>Timeline</header> 43<template data-for="entry in timeline"> 44 <div id="{{entry.block}}:{{entry.iter}}" data-bb="{{entry.block}}" class="entry">{{entry.block}} ({{entry.iter}})</div> 45</template> 46</section> 47 48<section id="function" data-selection=""> 49<header>Function</header> 50<div id="code"></div> 51<div id="cfg"></div> 52</section> 53 54<section id="block" data-selection="bb"> 55<header><template>Block {{selection.bb}}</template></header> 56<div id="iterations"> 57 <template data-for="i in Array(cfg[selection.bb].iters).keys()"> 58 <a class="chooser {{selection.bb}}:{{i+1}}" data-iter="{{selection.bb}}:{{i+1}}">Iteration {{i+1}}</a> 59 </template> 60</div> 61<table id="bb-elements"> 62<template> 63 <tr id="{{selection.bb}}.0"> 64 <td class="{{selection.bb}}">{{selection.bb}}.0</td> 65 <td>(initial state)</td> 66 </tr> 67</template> 68<template data-for="elt in cfg[selection.bb].elements"> 69 <tr id="{{selection.bb}}.{{elt_index+1}}"> 70 <td class="{{selection.bb}}">{{selection.bb}}.{{elt_index+1}}</td> 71 <td>{{elt}}</td> 72 </tr> 73</template> 74</table> 75</section> 76 77<section id="element" data-selection="iter,elt"> 78<template data-let="state = states[selection.iter + '_' + selection.elt]"> 79<header> 80 <template data-if="state.element == 0">{{state.block}} (iteration {{state.iter}}) initial state</template> 81 <template data-if="state.element != 0">Element {{selection.elt}} (iteration {{state.iter}})</template> 82</header> 83<template data-if="state.value" data-let="v = state.value"> 84 <h2>Value</h2> 85 <template data-use="value-template"></template> 86</template> 87<template data-if="state.logs"> 88 <h2>Logs</h2> 89 <pre>{{state.logs}}</pre> 90</template> 91<h2>Built-in lattice</h2> 92<pre>{{state.builtinLattice}}</pre> 93</template> 94</section> 95 96<script> 97addBBColors(Object.keys(HTMLLoggerData.cfg).length); 98watchSelection(HTMLLoggerData); 99updateSelection({}, HTMLLoggerData); 100// Copy code and cfg from <template>s into the body. 101for (tmpl of document.querySelectorAll('template[data-copy]')) 102 document.getElementById(tmpl.dataset.copy).replaceChildren( 103 ...tmpl.content.cloneNode(/*deep=*/true).childNodes); 104</script> 105 106</body> 107</html> 108