[clang] [ARM] Introduce -mtp=auto and make it the default (PR #128728)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 03:24:29 PST 2025


================
@@ -580,6 +581,9 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D,
     Features.push_back("+read-tp-tpidruro");
----------------
smithp35 wrote:

We're calling getReadTPMode 4 times now, with the same parameters. and I don't think it can return a different value each time. I think this could be simplified to
```
arm::ReadTPMode TPMode = getReadTPMode(D, Args, Triple, ForAS);
if (TPMode == ReadTPMode::TPIDRURW)
    Features.push_back("+read-tp-tpidrurw");
else if (TPMode == ReadTPMode::TPIDRURO)
    ...
```

https://github.com/llvm/llvm-project/pull/128728


More information about the cfe-commits mailing list