[PATCH] D133150: [llvm-exegesis] Cross compile all enabled targets

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 07:49:42 PDT 2022


reames added a comment.

In D133150#3766354 <https://reviews.llvm.org/D133150#3766354>, @RKSimon wrote:

> Does this affect which tests we can run for each target? For x86 at least we split the jit/runtime tests off into subfolders from the analysis-only tests so we could at least test analysis on builds that didn't have PFM.

At the moment, no, it should not.  It does run the target initialization code for all targets now, but that shouldn't be a visible change in behavior.

Thank you for pointing out the analysis tests being separated for x86, I hadn't noticed that.  Getting those enabled on all targets is likely a reasonable initial goal for the next change or two.

My eventual plan is to enable testing of the code gen in a target independent manner, and have only the benchmark execution be restricted to native target.  (Well, even then I want to support cross builds, but step by step.)



================
Comment at: llvm/tools/llvm-exegesis/llvm-exegesis.cpp:301
 
-  InitializeNativeTarget();
-  InitializeNativeTargetAsmPrinter();
-  InitializeNativeTargetAsmParser();
+  InitializeAllTargets();
+  InitializeAllTargetMCs();
----------------
courbet wrote:
> I think building all targets makes sens so that you can run an `llvm-exegesis` compiled on (say) X86  on AArch64. However at runtime we should only need to initialize the native target as we're going to jit compile and execute only for the host anyway.
My eventual goal for this is to be able to exercise the jitting part in a cross compilation environment.  So, initializing all targets will be necessary.  

For this particular patch, I need the All variants to check linkage.  Without them, you can skip compiling a target specific library and not notice.  If you really want, I can remove them and do just the compile step in this patch, but I don't really see why.  


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133150/new/

https://reviews.llvm.org/D133150



More information about the llvm-commits mailing list