[llvm] 09742be - [llvm-profgen] Remove target triple check to allow for more targets
Hongtao Yu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 10:16:31 PDT 2023
Author: Hongtao Yu
Date: 2023-06-23T10:16:24-07:00
New Revision: 09742be8186b1162e09cbfb4a8e1275d88d9c462
URL: https://github.com/llvm/llvm-project/commit/09742be8186b1162e09cbfb4a8e1275d88d9c462
DIFF: https://github.com/llvm/llvm-project/commit/09742be8186b1162e09cbfb4a8e1275d88d9c462.diff
LOG: [llvm-profgen] Remove target triple check to allow for more targets
Llvm-profgen internally uses the llvm libraries and the MCDesc interface to do disassembling and symblization and it never checks against target-specific instruction operators. This makes it quite transparent to targets and a first attempt for an aarch64 binary just works. Therefore I'm removing the unnecessary triple check to unblock for new targets.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D153449
Added:
Modified:
llvm/tools/llvm-profgen/ProfiledBinary.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.cpp b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
index ebd455709472d..4755f758a828b 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.cpp
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.cpp
@@ -215,9 +215,7 @@ void ProfiledBinary::load() {
exitWithError("not a valid Elf image", Path);
TheTriple = Obj->makeTriple();
- // Current only support X86
- if (!TheTriple.isX86())
- exitWithError("unsupported target", TheTriple.getTriple());
+
LLVM_DEBUG(dbgs() << "Loading " << Path << "\n");
// Find the preferred load address for text sections.
More information about the llvm-commits
mailing list