[PATCH] D153449: [llvm-profgen] Remove target triple check to allow for more targets
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 11:14:53 PDT 2023
hoy created this revision.
Herald added subscribers: wlei, modimo, wenlei, kristof.beyls.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Llvm-profgen internally uses the llvm libraries and the MCDesc interface to do disassembling and symblization and it rarely 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153449
Files:
llvm/tools/llvm-profgen/ProfiledBinary.cpp
Index: llvm/tools/llvm-profgen/ProfiledBinary.cpp
===================================================================
--- llvm/tools/llvm-profgen/ProfiledBinary.cpp
+++ llvm/tools/llvm-profgen/ProfiledBinary.cpp
@@ -215,9 +215,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153449.533347.patch
Type: text/x-patch
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230621/133854c0/attachment.bin>
More information about the llvm-commits
mailing list