Commit c3d16514 authored by Piotr Zegar's avatar Piotr Zegar
Browse files

[clang][NFC] Optimize clang::ASTNodeKind::isBaseOf

Create dedicated isBaseOf method without calculating
distance.

Tested on RISCVISelDAGToDAG.cpp with:
clang-tidy --checks=*,-bugprone-unchecked-optional-access

Amount of CPU cycles for isBaseOf reduced by ~15% (according to perf).

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D149518
parent 7e6bcb35
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment