Commit Graph

2313 Commits

Author SHA1 Message Date
Hans Wennborg e0053474b9 clang-cl: Support /P and /E (preprocess to file or stdout)
llvm-svn: 197827
2013-12-20 18:40:46 +00:00
Roman Divacky 78589ecd50 Use the integrated assembler by default on FreeBSD/ppc and ppc64.
llvm-svn: 197521
2013-12-17 20:34:25 +00:00
Alp Toker b164a349f9 Fix indentation from r197490 plus some typos
llvm-svn: 197507
2013-12-17 17:25:19 +00:00
Richard Barton 5828d7b936 LIBRARY_PATH environment variable should only be supported on a native compiler.
llvm-svn: 197490
2013-12-17 11:11:25 +00:00
Joerg Sonnenberger d75a1f8761 Support EABIHF environment on ARM.
llvm-svn: 197406
2013-12-16 19:16:04 +00:00
Rafael Espindola 80d333ba22 Avoid temporary std::string.
llvm-svn: 197160
2013-12-12 15:48:19 +00:00
Rafael Espindola 9c5ef12d66 Don't return a pointer to a temporary std::string's c_str.
llvm-svn: 197157
2013-12-12 15:39:05 +00:00
Bernard Ogden f6ba17d340 Simple refactoring to eliminate single-use local variable
llvm-svn: 197154
2013-12-12 13:27:15 +00:00
Bernard Ogden 3156176c8c Refactor duplicate functions
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
2013-12-12 13:27:11 +00:00
Bernard Ogden 8af41b5a21 Make thumb the default instruction set for v7m and v7em
llvm-svn: 197152
2013-12-12 13:27:04 +00:00
Bernard Ogden 178d0dc95b Fix -mthumb resetting of target cpu
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
2013-12-12 13:26:59 +00:00
Tim Northover 9c7e035656 Darwin-embedded: find correct libclang_rt for embedded targets.
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
2013-12-12 11:55:52 +00:00
Renato Golin 1588cdaa4b Turning IAS on by default on ARM/Thumb
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
2013-12-11 09:35:10 +00:00
Argyrios Kyrtzidis 74aa0256c9 [objcmt] Transfer '-objcmt-migrate-designated-init' from the driver to cc1 invocation.
llvm-svn: 196993
2013-12-11 01:29:48 +00:00
David Fang adcdde013a style fix
llvm-svn: 196982
2013-12-10 23:13:11 +00:00
David Fang 073a7c9139 darwin asm driver: suppress -Q for -no-integrated-as on darwin<11
llvm-svn: 196981
2013-12-10 22:51:25 +00:00
Argyrios Kyrtzidis d5ba86be0d [Driver] Rename '-objcmt-white-list-dir-path' option to '-objcmt-whitelist-dir-path' and add an alias for now.
llvm-svn: 196944
2013-12-10 18:36:53 +00:00
NAKAMURA Takumi 02adf13ceb [CMake] clangDriver: Move LLVM stuff in target_link_library to LLVM_LINK_COMPONENTS.
llvm-svn: 196798
2013-12-09 19:04:19 +00:00
Joerg Sonnenberger 21baded28c Extend assembler handling for NetBSD/MIPS to pass down the correct ABI,
architecture and PIC flag.

llvm-svn: 196720
2013-12-08 13:54:58 +00:00
Joerg Sonnenberger ee3b2da880 Pass correct flags to assembler and linker for OpenBSD on AMD64, PowerPC
and MIPS64. From Brad Smith.

llvm-svn: 196630
2013-12-07 00:57:46 +00:00
Ana Pazos dd6068d400 Added support for mcpu krait
- 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
2013-12-06 22:43:17 +00:00
David Peixotto 3e325d7490 Add option to use temporary file for assembling with clang
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
2013-12-06 20:27:33 +00:00
Roman Divacky 326d998cfa Move the body of GCCInstallationDetector ctor into an init() function
and call it from its only user. The linux toolchain. This saves quite
a lot of directory searching on other platforms.

llvm-svn: 196590
2013-12-06 18:32:18 +00:00
Joerg Sonnenberger 706c28163b For NetBSD, use arm1176jzf-s as default CPU for ARMv6.
llvm-svn: 196538
2013-12-05 21:27:58 +00:00
Joerg Sonnenberger 1f94da5a9b Pass down the target CPU to the system assembler for NetBSD/ARM.
llvm-svn: 196532
2013-12-05 21:07:29 +00:00
Bob Wilson 83e723a9c9 Fix assertion failure left over from changes to move away from "darwin" triples.
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
2013-12-05 19:38:42 +00:00
Alp Toker f6a24ce40f Fix a tranche of comment, test and doc typos
llvm-svn: 196510
2013-12-05 16:25:25 +00:00
Alp Toker 8c8a875079 Fix method/variable name typos
llvm-svn: 196214
2013-12-03 06:53:35 +00:00
Alp Toker ce365ca0f4 Driver: Factor gold support out into a function
AddGoldPlugin() is the same on gnutools and freebsd so avoid the
copy-and-paste duplicate code.

No change in functionality.

llvm-svn: 196096
2013-12-02 12:43:03 +00:00
Alp Toker 965f882588 Remove a whole lot of unused variables
There are about 30 removed in this patch, generated by a new FixIt I haven't
got round to submitting yet.

llvm-svn: 195814
2013-11-27 05:22:15 +00:00
Simon Atanasyan bd98663c7a [Mips] Pass -mmsa option to the assembler.
llvm-svn: 195756
2013-11-26 11:58:04 +00:00
Simon Atanasyan 8cc7c123a1 [Mips] Replace explicit argument handling by the single ArgList::AddLastArg() call.
llvm-svn: 195755
2013-11-26 11:57:58 +00:00
Simon Atanasyan 3e0f388725 [Mips] Add support for nan2008 libraries and headers look up for Code
Sourcery MIPS toolchain.

llvm-svn: 195753
2013-11-26 11:57:48 +00:00
Simon Atanasyan 13e965a5c0 [Mips] Do not detect a used MIPS toolchain. Build a path suffix for FSF
toolchain first and check the path existence. If the path does not
exist build and check a path suffix for Code Sourcery toolchain.

llvm-svn: 195751
2013-11-26 11:57:14 +00:00
Simon Atanasyan 54f3f93988 [Mips] Call findMIPSABIDirSuffix() for MIPS targets only.
llvm-svn: 195750
2013-11-26 11:57:09 +00:00
Rafael Espindola a8b3b680c3 Make the integrated assembler the default for cygwin/mingw too.
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
2013-11-25 18:50:53 +00:00
Rafael Espindola 8de3f11e94 remove gcc::Precompile
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
2013-11-24 23:40:06 +00:00
Rafael Espindola 1462796cdd Remove the Darwin_Generic_GCC toolchain.
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
2013-11-24 23:28:23 +00:00
Rafael Espindola edaa444bda Don't use the gcc driver for assembling.
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
2013-11-23 16:40:57 +00:00
Rafael Espindola 9c6fb0f784 Don't pass +soft-float, +soft-float-abi to the arm assembler.
llvm-svn: 195551
2013-11-23 14:36:40 +00:00
Alp Toker c8d4f0fa1d Tidy up the no-external-assembler diag
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
2013-11-22 08:27:46 +00:00
Artyom Skrobov 53b000a86c [ARM] add basic support for Cortex-A7 and VFPv4 to Clang
llvm-svn: 195359
2013-11-21 14:04:38 +00:00
Manman Ren 17bdb0f815 Set default Dwarf Version for -gline-tables-only on Darwin to 2.
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
2013-11-20 20:22:14 +00:00
Simon Atanasyan 5c5b5daab2 [Mips] Take in account the -mfp64 command line option when build paths
to the crt*.o files, libraries and headers for the MIPS FSFS toolchain.

llvm-svn: 195249
2013-11-20 13:53:20 +00:00
Simon Atanasyan 22a6f4d456 [Mips] Do not adjust float-abi flags in case of MIPS16 mode. This code
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
2013-11-19 12:22:38 +00:00
Kevin Enderby 319baa4ed4 Change the clang driver with the use of -no-integrated-as for darwin to use
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
2013-11-18 23:30:29 +00:00
Rafael Espindola 8f41aee760 Remove method that always returns true.
llvm-svn: 194984
2013-11-17 22:42:24 +00:00
Rafael Espindola d1821587c7 Remove two unused #ifdefs.
llvm-svn: 194983
2013-11-17 22:36:07 +00:00
Hal Finkel ce0697f475 Add -freroll-loops to enable loop rerolling
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
2013-11-17 16:03:29 +00:00
Jim Grosbach 82eee26877 X86: Make specifying avx2 simpler on Darwin with '-arch'
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
2013-11-16 00:53:35 +00:00