Skip to content

Commit

Permalink
[clang][dataflow] Various formatting tweaks to HTMLLogger. (#68392)
Browse files Browse the repository at this point in the history
*  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)
  • Loading branch information
martinboehme committed Oct 12, 2023
1 parent 072713a commit e54b0be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion clang/lib/Analysis/FlowSensitive/HTMLLogger.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ section header {
color: white;
font-weight: bold;
font-size: large;
padding-right: 0.5em;
}
section h2 {
font-size: medium;
Expand All @@ -27,7 +28,7 @@ section h2 {
border-top: 1px solid #aaa;
}
#timeline {
min-width: 0;
min-width: max-content;
}
#timeline .entry.hover {
background-color: #aaa;
Expand Down Expand Up @@ -62,6 +63,10 @@ section h2 {
#iterations .chooser {
flex-grow: 1;
text-align: center;
padding-left: 0.2em;
}
#iterations .chooser :last-child {
padding-right: 0.2em;
}
#iterations .chooser:not(.iter-select).hover {
background-color: #ddd;
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Analysis/FlowSensitive/HTMLLogger.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<template data-for="iter in cfg[selection.bb].iters">
<a class="chooser {{selection.bb}}:{{iter.iter}}" data-iter="{{selection.bb}}:{{iter.iter}}">
<template data-if="iter.post_visit">Post-visit</template>
<template data-if="!iter.post_visit">Iteration {{iter.iter}}</template>
<template data-if="!iter.post_visit">{{iter.iter}}</template>
<template data-if="iter.converged"> &#x2192;&#x7c;<!--Rightwards arrow, vertical line--></template>
</a>
</template>
Expand Down

0 comments on commit e54b0be

Please sign in to comment.