[PATCH] D141057: Introduce and use codegen::createTargetMachineForTriple()

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 10:56:30 PDT 2023


arichardson added inline comments.


================
Comment at: llvm/lib/CodeGen/CommandFlags.cpp:725
+                                      CodeGenOpt::Level OptLevel) {
+  Triple TheTriple(TargetTriple);
+  std::string Error;
----------------
nikic wrote:
> Some of the uses called `Triple::normalize()`, but this doesn't. Is that a problem?
I don't think it will but I've added back the calls.


================
Comment at: llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp:142
+  ExitOnError ExitOnErr(std::string(*argv[0]) + ": error:");
+  TM = ExitOnErr(codegen::createTargetMachineForTriple(TargetTriple, OLvl));
   assert(TM && "Could not allocate target machine!");
----------------
Oh missed the normalize here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141057



More information about the llvm-commits mailing list