[all-commits] [llvm/llvm-project] e760e8: [llvm-objdump][AMDGPU] Detect CPU string

Ronak Chauhan via All-commits all-commits at lists.llvm.org
Tue Aug 18 05:14:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e760e85680d6ade8934118d0854637b213a21f1a
      https://github.com/llvm/llvm-project/commit/e760e85680d6ade8934118d0854637b213a21f1a
  Author: Ronak Chauhan <RonakNilesh.Chauhan at amd.com>
  Date:   2020-08-18 (Tue, 18 Aug 2020)

  Changed paths:
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/include/llvm/Object/ObjectFile.h
    M llvm/lib/Object/ELFObjectFile.cpp
    A llvm/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump][AMDGPU] Detect CPU string

AMDGPU ISA isn't backwards compatible and hence -mcpu must always be specified during disassembly.
However, the AMDGPU target CPU is stored in e_flags in the ELF object.

This patch allows targets to implement CPU string detection, and also implements it for AMDGPU by looking at e_flags.

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D84519




More information about the All-commits mailing list