Add option to enable global-isel on arm64 archs

LLVM will eventually switch over to using global-isel on arm64 archs.
Setting this option (SWIFT_ENABLE_GLOBAL_ISEL_ARM64) can be used to experiment
with that in Swift before the switch happens.
This commit is contained in:
Arnold Schwaighofer
2021-08-17 12:58:09 -07:00
parent 5ea28a7d3a
commit 71f64ac348
6 changed files with 27 additions and 1 deletions

View File

@@ -1873,6 +1873,12 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
}
}
if (SWIFT_ENABLE_GLOBAL_ISEL_ARM64 &&
(Triple.getArch() == llvm::Triple::aarch64 ||
Triple.getArch() == llvm::Triple::aarch64_32)) {
Opts.EnableGlobalISel = true;
}
return false;
}