diff --git a/llvm/tools/opt-viewer/opt-viewer.py b/llvm/tools/opt-viewer/opt-viewer.py index bdf21bb03c97..5af78b062e63 100755 --- a/llvm/tools/opt-viewer/opt-viewer.py +++ b/llvm/tools/opt-viewer/opt-viewer.py @@ -119,17 +119,21 @@ class SourceFileRenderer:
- +
+ - - - - - -''', file=self.stream) + + +''', file=self.stream) self.render_source_lines(self.source_stream, line_remarks) print(''' +
LineHotnessOptimizationSourceInline Context
Line +Hotness +Optimization +Source +Inline Context +
''', file=self.stream) diff --git a/llvm/tools/opt-viewer/style.css b/llvm/tools/opt-viewer/style.css index 595c3e46847d..0d3347c1578c 100644 --- a/llvm/tools/opt-viewer/style.css +++ b/llvm/tools/opt-viewer/style.css @@ -1,3 +1,13 @@ +.source { + table-layout: fixed; + width: 100%; + white-space: nowrap; +} +.source td { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} .red { background-color: #ffd0d0; }