[all-commits] [llvm/llvm-project] 7cac7e: [IR] Prefer hasFnAttribute() where possible (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jun 15 00:30:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7cac7e0cfc72c865bfe42cc5c068e17218e600d5
      https://github.com/llvm/llvm-project/commit/7cac7e0cfc72c865bfe42cc5c068e17218e600d5
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86IndirectBranchTracking.cpp

  Log Message:
  -----------
  [IR] Prefer hasFnAttribute() where possible (NFC)

When checking for an enum function attribute, use hasFnAttribute()
rather than hasAttribute() at FunctionIndex, because it is
significantly faster (and more concise to boot).




More information about the All-commits mailing list