compiler-explorer icon indicating copy to clipboard operation
compiler-explorer copied to clipboard

[REQUEST]: Add option to hide LLVM function declarations in LLVM IR view

Open giordano opened this issue 3 months ago • 1 comments

Is your feature request related to a problem? Please describe

LLVM function declarations are somewhat uninteresting, they're similar to prototypes in C, but don't really add much information, since their signature is pretty much the same as how they look like on the call site. As an example, see https://godbolt.org/z/Prf3W87oP, where the LLVM IR contains 4 function definitions, and 12 function declarations, which only adds extra vertical space without conveying new information.

Describe the solution you'd like

The LLVM IR viewer could have a new "Filters" option to let users hide function declarations.

Describe alternatives you've considered

Not applicable

Additional context

Not applicable

giordano avatar Apr 02 '24 10:04 giordano

Hi @giordano, this could be useful and we'd happily accept a PR. The reason they aren't filtered out by default is that they are needed when copying over to other tools, such as for putting through opt / llc / alive2 / etc.

jeremy-rifkin avatar Apr 20 '24 19:04 jeremy-rifkin