Skip to content

LLVM doesn't discard obviously incorrect annotations #154292

@philnik777

Description

@philnik777

LLVM currently doesn't discard likelihood information even when a condition is known to be true in certain cases. e.g.

if (condition) [[likely]]
  do_something();
else
  do_something_else();

will avoid inlining do_something_else even if condition is known to be false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions