Skip to content

Commit e54b0be

Browse files
authored
[clang][dataflow] Various formatting tweaks to HTMLLogger. (#68392)
* Ensure timeline entries don't have linebreaks by setting `min-width: max-content`. * Give the timeline header some padding on the right so it doesn't run into the "Function" header. * Put some padding around the iteration choosers so they don't run into each other. * Eliminate the "Iteration" text from the iteration choosers, which took up a lot of space. It should be clear what these are without the "Iteration" text. (This makes the above problem of iteration choosers running into each other less likely, but also add the padding nonetheless.) Before: ![html_logger_before](https://github.com/llvm/llvm-project/assets/29098113/b938360f-c943-4552-829f-7b4857260959) After: ![html_logger_after](https://github.com/llvm/llvm-project/assets/29098113/fecf4eab-7992-4e7d-a6e1-451887b699ab)
1 parent 072713a commit e54b0be

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

clang/lib/Analysis/FlowSensitive/HTMLLogger.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ section header {
1919
color: white;
2020
font-weight: bold;
2121
font-size: large;
22+
padding-right: 0.5em;
2223
}
2324
section h2 {
2425
font-size: medium;
@@ -27,7 +28,7 @@ section h2 {
2728
border-top: 1px solid #aaa;
2829
}
2930
#timeline {
30-
min-width: 0;
31+
min-width: max-content;
3132
}
3233
#timeline .entry.hover {
3334
background-color: #aaa;
@@ -62,6 +63,10 @@ section h2 {
6263
#iterations .chooser {
6364
flex-grow: 1;
6465
text-align: center;
66+
padding-left: 0.2em;
67+
}
68+
#iterations .chooser :last-child {
69+
padding-right: 0.2em;
6570
}
6671
#iterations .chooser:not(.iter-select).hover {
6772
background-color: #ddd;

clang/lib/Analysis/FlowSensitive/HTMLLogger.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<template data-for="iter in cfg[selection.bb].iters">
6363
<a class="chooser {{selection.bb}}:{{iter.iter}}" data-iter="{{selection.bb}}:{{iter.iter}}">
6464
<template data-if="iter.post_visit">Post-visit</template>
65-
<template data-if="!iter.post_visit">Iteration {{iter.iter}}</template>
65+
<template data-if="!iter.post_visit">{{iter.iter}}</template>
6666
<template data-if="iter.converged"> &#x2192;&#x7c;<!--Rightwards arrow, vertical line--></template>
6767
</a>
6868
</template>

0 commit comments

Comments
 (0)