getARMCPU and getLLVMArchSuffixForARM existed as very similar functions
in both ToolChain.cpp and Tools.cpp. Create a single implementation of
each in Tools.cpp, eliminate the duplicate and share via Tools.h.
Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools.
llvm-svn: 197153
Passing -mthumb with no explicit CPU on the command line
resulted in target CPU changing from the architecture
default to arm7tdmi. Now it does not.
llvm-svn: 197151
This refactors some of the Darwin toolchain classification to give a more solid
distinction between the three primary Darwin platforms (OS X, IOS and IOS
simulator) so that a 4th choice can be added temporarily: embedded MachO
targets.
Longer term, this support will be factored out into a separate class and no
longer classified as "darwin-eabi", but the refactoring should still be useful.
llvm-svn: 197148
This is an experimental feature, where -integrated-as will be
on by default on ARM/Thumb. We aim to detect the missing features
so that the next release is stable.
Updating the ReleaseNotes, too.
Also moving the AArch64 into the same place.
llvm-svn: 197024
- krait processor currently modeled with the same features as A9.
- Krait processor additionally has VFP4 (fused multiply add/sub)
and hardware division features enabled.
- krait has currently the same Schedule model as A9
- krait cpu flag is not recognized by the GNU assembler yet,
it is replaced with march=armv7-a to avoid a lower march
from being used.
llvm-svn: 196618
This commit adds the flag '-via-file-asm' to the clang driver. The
purpose of this flag is to have a way to test that clang can consume
the assembly code that it outputs. When passed this flag, clang will
generate a temporary file that contains the assembly output from the
compile step. This assembly file will then be consumed by either the
integrated assembler or the external assembler. To test that the
integrated assembler can consume its own output compile with:
$ clang -integrated-assembler -via-file-asm
Without the '-via-file-asm' flag, clang would directly create the
object file when using the integrated assembler. With the flag it
will first create the temporary assembly file and then read that
file and assemble it with the integrated assembler.
The flow is similar to -save-temps, except that it only effects
the assembly input and the temporary file is not saved.
llvm-svn: 196606
I happened to notice this while trying to write a test for an iOS simulator
target. I suspect we just missed this when we added separate "macosx" and "ios"
triples instead of the generic "darwin" OS.
llvm-svn: 196527
The integrated assembler was already the default for win32. It is now able
to handle a clang bootstrap on mingw, so make it the default.
llvm-svn: 195676
Clang still has support for running gcc for performing various stages
of a build. Right now it looks like this is used for
* Supporting Fortran in the clang driver
* Running an assembler or linker in systems we don't yet know how to
run them directly.
It looks like the gcc::Precompile is a vestige from the days when we
supported using clang for C and running gcc for c++. This patch removes it
(yes, we have no tests for it).
llvm-svn: 195586
This is currently unused by any test. The code path would still be hit
by clang on ppc, but
* PPC has not been supported on current versions of OS X
* A port of current clang to older OS X on ppc should be using
toolchains::DarwinClang.
llvm-svn: 195585
Clang knows how to use the gnu assembler directly from doing so on linux and
hurd. The existing support worked out of the box on cygwin and mingw and I was
able to bootstrap clang with it in both systems (with pending patches for the
new mingw abi, but that is independent of the assembler).
llvm-svn: 195554
Diags aren't usually in the first person, and 'windows' isn't the correct
product spelling to use in prose. Sidestep issues completely by making this
error message platform-neutral.
llvm-svn: 195422
We are still using Dwarf Version 2 for Darwin systems, make it consistent
with -gline-tables-only.
This should fix an internal buildbot.
llvm-svn: 195267
should be isolated in the backend (r195123). From the frontend point
of view in case of "-mhard-float -mips16" combination of flags the float
ABI mode should remain unchanged.
The patch reviewed by Reed Kotler.
llvm-svn: 195124
the -Q flag to the as(1) assembler driver.
We will soon be switching the darwin as(1) assembler driver to call clang(1)
and use the intergated assembler by default. To do this and still support
clang(1)'s -no-integrated-as flag, when clang(1) runs the as(1) assembler
driver and -no-integrated-as is used it needs to pass the -Q flag to as(1)
so it uses its GNU based assembler, and not turn around and call clag(1)'s
integrated assembler.
rdar://15495921
llvm-svn: 195054
This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable
loop rerolling as part of the optimization pass manager. This transformation
can enable vectorization, reduce code size (or both).
Briefly, loop rerolling can transform a loop like this:
for (int i = 0; i < 3200; i += 5) {
a[i] += alpha * b[i];
a[i + 1] += alpha * b[i + 1];
a[i + 2] += alpha * b[i + 2];
a[i + 3] += alpha * b[i + 3];
a[i + 4] += alpha * b[i + 4];
}
into this:
for (int i = 0; i < 3200; ++i) {
a[i] += alpha * b[i];
}
Loop rerolling is currently disabled by default at all optimization levels.
llvm-svn: 194967
Teach the '-arch' command line option to enable the compiler-friendly
features of core-avx2 CPUs on Darwin. Pass the information along in the
target triple like Darwin+ARM does.
llvm-svn: 194907