[PATCH] D110514: MIPS: Triple::setArch as R6 if MipsSubArch_r6

YunQiang Su via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 20:07:17 PDT 2021


wzssyqa added a comment.

In D110514#3026049 <https://reviews.llvm.org/D110514#3026049>, @atanasyan wrote:

> If we construct `T = Triple("mipsisa64r6el-unknown-linux-gnuabi64")` what is result of the `T.getArchName()` call (without your patch)?

mipsisa64r6el

> If `getArchName()` returns `mipsisa64r6el` we need to investigate what is the reason for redundant `setArch()` call somewhere in the clang driver code.

setArch is not call by clang directly, while from:
llvm/lib/Support/Triple.cpp:

  Triple::get32BitArchVariant()
  Triple::get64BitArchVariant()

> If `getArchName()` does not return `mipsisa64r6el` we need to fix triple parsing. 
> One more question - why other targets which has "sub architectures" does not need to extend the `Triple::setArch` method?

x86_64 has similir problem, while since they they keep compatiable, it is not a big problem:

  $ bin/clang -target i686-linux-gnu -march=x86-64-v3 -m32 -c xx.c

For MIPS r6, it is not full compatiable with r2, so the falldown is a problem here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110514



More information about the llvm-commits mailing list