Commit Graph

1352 Commits

Author SHA1 Message Date
Tim Northover 646ddb51d2 AArch64/ARM64: update Clang after AArch64 removal.
A few (mostly CodeGen) parts of Clang were tightly coupled to the
AArch64 backend. Now that it's gone, they will not even compile.

I've also deduplicated RUN lines in many of the AArch64 tests. This
might improve "make check-all" time noticably: some of those NEON
tests were monsters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209578 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-24 12:51:25 +00:00
Rafael Espindola 6d1cc57727 Don't reduce the stack protector level given -fstack-protector.
Before -fstack-protector would always force a level of 1, even if the default
was 2.

Patch by Brad Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 22:57:39 +00:00
Alexey Samsonov 9cd6c51cd8 Unify the name of compiler-rt builtins library on Linux.
Call it "libclang_rt.builtins-<arch>.a" to be consistent
with sanitizers/profile libraries naming. Modify Makefile
and CMake build systems and Clang driver accordingly.

Fixes PR19822.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 21:13:30 +00:00
Tim Northover 8b409a0877 MachO: perform ARM ABI detection even for non-Darwin triples.
When "-arch armv7m" is specified, we want "aapcs", for example.

rdar://problem/16581138

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209434 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 12:54:30 +00:00
Oliver Stannard 066aa1a095 Pass -gdwarf-N options to integrated assembler
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19 13:39:13 +00:00
Saleem Abdulrasool d1376d1370 Driver: force restricted IT blocks for Windows on ARM
Windows on ARM expects ARMv8 (restricted IT) conditional instructions only.
Force enable the restricted IT mode via the backend option when targeting WoA.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209086 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-18 06:42:02 +00:00
Craig Topper 03208adb78 [C++11] Use 'nullptr'. Driver edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209069 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-17 16:56:41 +00:00
Duncan P. N. Exon Smith 5b07cece1b InstrProf: Look for the PIC-version of the profile runtime
If `-shared` is specified, pull in a PIC-version of the profile runtime,
which was added to compiler-rt in r208947.  I'm hoping this will get the
bots on my side.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208948 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-16 04:09:41 +00:00
Reid Kleckner 00b2b6dc04 clang-cl: Fall back immediately if /GR and /fallback were both passed
None of our tests use /fallback, so this lets us gradually add RTTI
support without breaking projects using /fallback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14 16:03:05 +00:00
Nico Weber 8277d9c946 Support -masm= flag for x86 targets.
`clang -S -o - file.c -masm=att` will write assembly to stdout in at&t syntax
(the default), `-masm=intel` will instead output intel style asm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208683 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-13 11:11:24 +00:00
Alexey Samsonov 53ba0df283 [ASan] Fixup for r208610: link in asan_cxx library on Windows
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208625 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-12 20:20:20 +00:00
Alexey Samsonov 161a85d878 [ASan] Split static ASan runtime in two parts: asan and asan_cxx.
asan_cxx containts replacements for new/delete operators, and should
only be linked in C++ mode. We plan to start building this part
with exception support to make new more standard-compliant.

See https://code.google.com/p/address-sanitizer/issues/detail?id=295
for more details.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208610 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-12 18:39:51 +00:00
Nico Weber c2b54ef6c9 Wrap at 80 columns. No code change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208485 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-11 01:04:02 +00:00
Matheus Almeida b9ec38bf4e [mips] Pass nan2008 info to the back-end.
Summary: The initial support for NaN2008 was added to the back-end in r206396.

Reviewers: atanasyan

Reviewed By: atanasyan

Differential Revision: http://reviews.llvm.org/D3448

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208220 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 16:16:07 +00:00
Joerg Sonnenberger 63b875dd61 Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.
Don't bother with keeping the old support for x86_64 in 6.99.23+, just
use a single range. Update test cases for the always-on --eh-frame-hdr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208170 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 08:45:26 +00:00
Kevin Qin 600a7d7213 [PATCH] [ARM64] Enable alignment control option in front-end for ARM64.
This patch is to get "-mno-unaligned-access" and "-munaligned-access"
work in front-end for ARM64 target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208075 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06 09:51:32 +00:00
Christian Pirker a337b33ab3 Simplify getARMCPUForMArch() and make it more consistent
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207956 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-05 08:48:18 +00:00
Chad Rosier bea199a705 [driver] Enable the slp vectorizer at -Oz.
PR19568

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207858 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 18:41:57 +00:00
Bradley Smith 32f676ea19 [ARM64/AArch64] Hook up CRC32 subtarget feature to the driver
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207841 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 15:17:51 +00:00
Robert Lytton 6f10763ffb XCore target: fix handling of -g0 flag
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207833 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 09:33:25 +00:00
Logan Chien 03102d591a Android uses -fpic for arm64 as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207642 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30 12:18:12 +00:00
Rafael Espindola 42e599fb3f Drop non-cfi assembly support from clang.
After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and
always print assembly that uses cfi directives.

In llvm, MC itself supports cfi since the end of 2010 (support started
in r119972, is reported in the 2.9 release notes).

In binutils the support has been around for much longer. It looks like
support started to be added in May 2003. It is available in 2.15
(31-Aug-2011, 2.14 is from 12-Jun-2003).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207602 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30 02:22:09 +00:00
Logan Chien 32f64aa449 Android uses -fpic for aarch64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207567 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 18:18:58 +00:00
Alexey Volkov a41049b43e Add comments regarding isPIEDefault usage for r207520
Differential Revision: http://reviews.llvm.org/D2668


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207521 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 12:07:34 +00:00
Alexey Volkov ab5d05bc91 Pass -pie to linker when generating executable on Android
This fixes problem with LTO on Android.

Differential Revision: http://reviews.llvm.org/D2668


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207520 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 10:25:20 +00:00
Chad Rosier bf6a66cd29 [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors the
behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast
and -Os.
PR19568

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207433 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-28 19:30:57 +00:00
Hans Wennborg 8a6fa5cade clang-cl: /fallback only applies to C or C++ files
We would previously hit an assert if using /fallback with an .ll file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207234 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-25 16:44:17 +00:00
Hans Wennborg b67bacf5c6 clang-cl: pass -debug flag to the linker when compiling with debug info
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207233 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-25 16:24:19 +00:00
James Molloy 7b6cff5e08 [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206462 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-17 12:51:23 +00:00
James Molloy 99c0a323fd [ARM64] Default to the 'generic' CPU, unless -arch is present for backwards compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206461 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-17 12:51:17 +00:00
Diego Novillo d31ddfcf61 Add support for optimization reports.
Summary:
This patch adds a new flag -Rpass=. The flag indicates the name
of the optimization pass that should emit remarks stating when it
made a transformation to the code.

This implements the design I proposed in:

https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing

Other changes:
- Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to
  print "-R" instead of "-W" in the diagnostic message.

- In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation
  object out of the file name, line and column number. Use that location
  in the call to Diags.Report().

- When -Rpass is used without debug info a note is emitted alerting
  the user that they need to use -gline-tables-only -gcolumn-info to
  get this information.

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3226

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206401 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 16:54:24 +00:00
James Molloy 6eeb8eb072 [ARM64] Plumb in the -mfpu= flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206395 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 15:33:56 +00:00
Quentin Colombet 525967bb80 [Driver][ARM64] Make sure the default CPU is passed to the assembler.
<rdar://problem/16573920>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206227 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-15 00:27:35 +00:00
Daniel Jasper 0e1ed6bc35 Add -fmodules-strict-decluse to check that all headers are in modules
Review: http://reviews.llvm.org/D3335

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206027 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-11 11:47:45 +00:00
Reid Kleckner c61cae9c89 clang-cl: Disable TBAA by default for MSVC compatibility
MSVC doesn't have an option to enable TBAA, so make -fstrict-aliasing
and -fno-strict-aliasing available in clang-cl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205924 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-09 20:07:39 +00:00
David Majnemer 15d1581446 Fix a typo introduced in r205716
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205717 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07 16:19:27 +00:00
David Majnemer c9f61e8be9 clang-cl: make /Gw map to -fdata-sections
Note that /Gy no longer implies -fdata-sections.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205716 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07 16:14:38 +00:00
Saleem Abdulrasool a92b40825a Driver: add target definition for Windows on ARM
This introduces the definitions needed for the Windows on ARM target.  Add
target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI
environment.  The Visual Studio definitions correspond to the definitions
provided by Visual Studio 2012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205650 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-04 20:31:19 +00:00
Logan Chien 5fdd7751b7 Code cleanup (re-indent)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205536 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-03 13:12:44 +00:00
Alexey Samsonov a9a63dc859 Add support for dynamic ASan runtime (on Linux) to Clang driver.
Based on http://llvm-reviews.chandlerc.com/D3043 by Yuri Gribov!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205310 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-01 13:31:10 +00:00
David Blaikie e3989ea116 Warn when requesting compress-debug-sections and zlib is not available
Another shot in the dark, since I do have zlib installed. Will be
watching the bots for fallout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-31 23:29:38 +00:00
Tim Northover 7e0e8ef787 ARM64: initial clang support commit.
This adds Clang support for the ARM64 backend. There are definitely
still some rough edges, so please bring up any issues you see with
this patch.

As with the LLVM commit though, we think it'll be more useful for
merging with AArch64 from within the tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205100 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-29 15:09:45 +00:00
Tim Northover 899bcb6b9b Driver: implement addClangWarningOptions
This function allows certain platforms to enable or disable diagnostics
by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205095 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-29 13:16:12 +00:00
Duncan P. N. Exon Smith 97140c9270 InstrProf: Emit runtime hook directly in IRGen
-u behaviour is apparently not portable between linkers (see cfe-commits
discussions for r204379 and r205012).  I've moved the logic to IRGen,
where it should have been in the first place.

I don't have a Linux system to test this on, so it's possible this logic
*still* doesn't pull in the instrumented profiling runtime on Linux.

I'm in the process of getting tests going on the compiler-rt side
(llvm-commits "[PATCH] InstrProf: Add initial compiler-rt test").  Once
we have tests for the full flow there, the runtime logic should get a
whole lot less brittle.

<rdar://problem/16458307>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205023 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28 17:53:22 +00:00
Duncan P. N. Exon Smith d12127df41 Revert "Link in profile library on Linux using --whole-archive"
This reverts commit r205012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205022 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28 17:53:17 +00:00
Alexey Samsonov 8d29648d80 Link in profile library on Linux using --whole-archive
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205012 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28 15:39:08 +00:00
Christian Pirker 37a9afe9eb Add ARM big endian Target (armeb, thumbeb)
Reviewed at http://llvm-reviews.chandlerc.com/D3096



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205008 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28 14:40:46 +00:00
Saleem Abdulrasool 1e57f17deb Use the new Windows environment for target detection
This follows the LLVM change to canonicalise the Windows target triple
spellings.  Rather than treating each Windows environment as a single entity,
the environments are now modelled properly as an environment.  This is a
mechanical change to convert the triple use to reflect that change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204978 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27 22:50:18 +00:00
David Blaikie d87684dddb Support for -Wa,-compress-debug-sections.
Also, while I'm here, support -nocompress-debug-sections too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204959 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27 20:47:30 +00:00
Duncan P. N. Exon Smith 67b42c1649 InstrProf: Pull in runtime on non-Darwin
r204379 changed the way the profile runtime gets pulled in, but missed
updating non-Darwin targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204939 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27 16:20:02 +00:00