Commit Graph

1053 Commits

Author SHA1 Message Date
Saleem Abdulrasool 9e910c672d Basic: correct `__WINT_TYPE__` on Windows
Windows uses `unsigned short` for `wint_t`.  Correct the type definition as
vended by the compiler.  This type is defined in corecrt.h and is
unconditionally typedef'ed.  cl does not have an equivalent to `__WINT_TYPE__`
which is why this was never detected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342557 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 16:18:55 +00:00
Richard Smith a497c8fddd Diagnose likely typos in #include directives.
Summary:
When someone writes

  #include "<some_file>"

or

  #include " some_file "

the compiler returns "file not fuond..." with fonts and quotes that may
make it hard to see there are excess quotes or surprising bytes in the
filename.  Assuming that files are usually logically named and start and
end with an alphanumeric character, we can check for the file's
existence by stripping the non-alphanumeric leading or trailing
characters.  If the file is found, emit a non-fatal error with a
FixItHint.

Patch by Christy Lee!

Reviewers: aaron.ballman, erikjv, rsmith

Reviewed By: rsmith

Subscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits

Differential Revision: https://reviews.llvm.org/D51333

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342177 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-13 21:10:08 +00:00
Erich Keane fc73f1c464 Fix test regression in r341862
The commit updates when AES is enabled, but failed to update the tests.
This patch fixes them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341871 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-10 21:57:53 +00:00
Artem Belevich d17c3edf3d Revert the tests that should've been reverted in rL341115
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341118 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 20:53:15 +00:00
Yaxun Liu b8a2d224a8 Add predefined macro __gnu_linux__ for proper aux-triple
Clang predefine macro __linx__ for aux-triple with Linux OS
but does not predefine macro __gnu_linux__. This causes
some compilation error for certain applications, e.g. Eigen.

This patch fixes that.

Differential Revision: https://reviews.llvm.org/D51441


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340967 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 20:39:22 +00:00
Sam Parker 17172e0af3 [ARM] Set __ARM_FEATURE_SIMD32 for +dsp cores
ARM_FEATURE_DSP is already set for targets with the +dsp feature. In
the backend, this target feature is also used to represent the
availability of the of the instructions that the ACLE guard through
the __ARM_FEATURE_SIMD32 macro. We don't have any cores that
implement one and not the other, so set this macro for cores later
than V6 or for Cortex-M cores that the target parser, or user, reports
that the 'dsp' instructions are supported.

Differential Revision: https://reviews.llvm.org/D51093


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340911 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 10:39:03 +00:00
Gheorghe-Teodor Bercea 56b1cc8d60 [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloading
Summary: When offloading to a device and using the powerpc64le version of the auxiliary triple, the _CALL_ELF macro is not set correctly to 2 resulting in the attempt to include a header that does not exist. This patch fixes this problem.

Reviewers: Hahnfeld, ABataev, caomhin

Reviewed By: Hahnfeld

Subscribers: guansong, cfe-commits

Differential Revision: https://reviews.llvm.org/D51312

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340772 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 20:16:20 +00:00
Jonas Hahnfeld 1bdec838c5 [CUDA/OpenMP] Define only some host macros during device compilation
When compiling CUDA or OpenMP device code Clang parses header files
that expect certain predefined macros from the host architecture. To
make this work the compiler passes the host triple via the -aux-triple
argument and (until now) pulls in all macros for that "auxiliary triple"
unconditionally.

However this results in defines like __SSE_MATH__ that will trigger
inline assembly making use of the "advertised" target features. See
the discussion of D47849 and PR38464 for a detailed explanation of
the encountered problems.

Instead of blacklisting "known bad" examples this patch starts adding
defines that are needed for certain headers like bits/wordsize.h and
bits/mathinline.h.
The disadvantage of this approach is that it decouples the definitions
from their target toolchain. However in my opinion it's more important
to keep definitions for one header close together. For one this will
include a clear documentation why these particular defines are needed.
Furthermore it simplifies maintenance because adding defines for a new
header or support for a new aux-triple only needs to touch one piece
of code.

Differential Revision: https://reviews.llvm.org/D50845

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340681 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-25 13:42:40 +00:00
Stefan Maksimovic 7aca6c1a08 [clang][mips] Set __mips_fpr correctly for -mfpxx
Set __mips_fpr to 0 if o32 ABI is used with either -mfpxx
or none of -mfp32, -mfpxx, -mfp64 being specified.

Introduce additional checks:
-mfpxx is only to be used in conjunction with the o32 ABI.
report an error when incompatible options are provided.

Formerly no errors were raised when combining n32/n64 ABIs
with -mfp32 and -mfpxx.

There are other cases when __mips_fpr should be set to 0
that are not covered, ex. using o32 on a mips64 cpu
which is valid but not supported in the backend as of yet.

Differential Revision: https://reviews.llvm.org/D50557


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340391 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 09:26:25 +00:00
Pirama Arumuga Nainar 651282142f [Android] Increase default new alignment for Android
Summary:
Android's memory allocators also guarantee 8-byte alignment for 32-bit
architectures and 16-byte alignment for 64-bit.

Reviewers: rsmith

Subscribers: cfe-commits, srhines, enh

Differential Revision: https://reviews.llvm.org/D50112

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338603 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 17:55:34 +00:00
Volodymyr Sapsai cb27abbb2b [Preprocessor] Stop entering included files after hitting a fatal error.
Fixes a problem when we have multiple inclusion cycles and try to
enumerate all possible ways to reach the max inclusion depth.

rdar://problem/38871876

Reviewers: bruno, rsmith, jkorous, aaron.ballman

Reviewed By: bruno, jkorous, aaron.ballman

Subscribers: dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D48786



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337953 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 19:16:26 +00:00
Dan Gohman 4c4d20cbc7 [WebAssembly] Change size_t to `unsigned long`.
Changing it to unsigned long (which is 32-bit on wasm32) makes it the same
type as wasm64 (where unsigned long is 64-bit), which would eliminate the most
common cause for mangled names being different between wasm32 and wasm64. For
example, export lists containing symbol names could now often be the same
between wasm32 and wasm64.

Differential Revision: https://reviews.llvm.org/D40526


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337783 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 00:29:58 +00:00
Reid Kleckner 6038d90129 [MS] Update _MSVC_LANG values for C++17 and C++2a
Fixes PR38262

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337715 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 17:44:00 +00:00
Joerg Sonnenberger d74a010716 By popular demand, switch in64_t on NetBSD/AArch64 and NetBSD/PowerPC64
to long for consistency with other 64bit platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337271 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 12:33:19 +00:00
Benjamin Kramer 7e77eaa236 [hmaptool] Turn %hmaptool into a proper substitution
This is still super ugly, but at least it doesn't require working
directories to just line up perfectly for python to find the tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335330 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-22 09:46:40 +00:00
Bruno Cardoso Lopes be7bb4eaa5 Re-apply: Add python tool to dump and construct header maps
Header maps are binary files used by Xcode, which are used to map
header names or paths to other locations. Clang has support for
those since its inception, but there's not a lot of header map
testing around.

Since it's a binary format, testing becomes pretty much brittle
and its hard to even know what's inside if you don't have the
appropriate tools.

Add a python based tool that allows creating and dumping header
maps based on a json description of those. While here, rewrite
tests to use the tool and remove the binary files from the tree.

This tool was initially written by Daniel Dunbar.

Thanks to Stella Stamenova for helping make this work on Windows.

Differential Revision: https://reviews.llvm.org/D46485

rdar://problem/39994722

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335295 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-21 21:45:24 +00:00
Bruno Cardoso Lopes db9cf08b1f Revert "Add python tool to dump and construct header maps"
This reverts commit fcfa2dd517.

Broke bots:

http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335196 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-21 01:23:58 +00:00
Bruno Cardoso Lopes fcfa2dd517 Add python tool to dump and construct header maps
Header maps are binary files used by Xcode, which are used to map
header names or paths to other locations. Clang has support for
those since its inception, but there's not a lot of header map
testing around.

Since it's a binary format, testing becomes pretty much brittle
and its hard to even know what's inside if you don't have the
appropriate tools.

Add a python based tool that allows creating and dumping header
maps based on a json description of those. While here, rewrite
tests to use the tool and remove the binary files from the tree.

This tool was initially written by Daniel Dunbar.

Differential Revision: https://reviews.llvm.org/D46485

rdar://problem/39994722

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335177 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-20 21:16:37 +00:00
Stefan Pintilie 9d8fe3e8b1 [PowerPC] The __float128 type should only be available on Power9
Diasble the use of the type __float128 for PPC machines older
than Power9.

The use of -mfloat128 for PPC machine older than Power9 will result
in an error.

Differential Revision: https://reviews.llvm.org/D48088

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334613 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-13 16:05:05 +00:00
Evandro Menezes 318f522d0c [PATCH 2/2] [test] Add support for Samsung Exynos M4 (NFC)
Add test cases for Exynos M4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334116 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-06 18:58:01 +00:00
Gabor Buella 724adfbac3 [x86] invpcid intrinsic
An intrinsic for an old instruction, as described in the Intel SDM.

Reviewers: craig.topper, rnk

Reviewed By: craig.topper, rnk

Differential Revision: https://reviews.llvm.org/D47142


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333256 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-25 06:34:42 +00:00
David Chisnall b8a49afcfa Revert "Revert r332955 "GNUstep Objective-C ABI version 2""
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332963 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 10:13:06 +00:00
Bjorn Pettersson 7f399dc659 Revert r332955 "GNUstep Objective-C ABI version 2"
Reverted due to buildbot failures.
Seems like isnumber() is some Apple addition to cctype.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332957 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 08:16:45 +00:00
David Chisnall f018741d7d GNUstep Objective-C ABI version 2
Summary:
This includes initial support for the (hopefully final) updated Objective-C ABI, developed here:

https://github.com/davidchisnall/clang-gnustep-abi-2

It also includes some cleanups and refactoring from older GNU ABIs.

The current version is ELF only, other formats to follow.

Reviewers: rjmccall, DHowett-MSFT

Reviewed By: rjmccall

Subscribers: smeenai, cfe-commits

Differential Revision: https://reviews.llvm.org/D46052

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332950 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-22 06:09:23 +00:00
Alexander Ivchenko 4fb03d7680 This patch aims to match the changes introduced
in gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html.
The -mibt feature flag is being removed, and the -fcf-protection
option now also defines a CET macro and causes errors when used
on non-X86 targets, while X86 targets no longer check for -mibt
and -mshstk to determine if -fcf-protection is supported. -mshstk
is now used only to determine availability of shadow stack intrinsics.

Comes with an LLVM patch (D46882).

Patch by mike.dvoretsky

Differential Revision: https://reviews.llvm.org/D46881



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332704 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-18 11:56:21 +00:00
Gabor Buella 5546e9f1ae [X86] ptwrite intrinsic
Reviewers: craig.topper, RKSimon

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D46540




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331962 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-10 07:28:54 +00:00
Gabor Buella 467384e603 [x86] Introduce the pconfig intrinsic
Reviewers: craig.topper, zvi

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D46431


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331740 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-08 06:49:41 +00:00
Gabor Buella b7af214275 [X86] directstore and movdir64b intrinsics
Reviewers: spatel, craig.topper, RKSimon

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D45984


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331249 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-01 10:05:42 +00:00
Oliver Stannard 6769f8d4c1 [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro
This adds a pre-defined macro to test if the compiler has support for the
v8.2-A dot rpoduct intrinsics in AArch32 mode.

The AAcrh64 equivalent has already been added by rL330229.

The ACLE spec which describes this macro hasn't been published yet, but this is
based on the final internal draft, and GCC has already implemented this.

Differential revision: https://reviews.llvm.org/D46108



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331038 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-27 13:56:02 +00:00
Yaxun Liu 38889b85be [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__
Differential Revision: https://reviews.llvm.org/D45441


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330824 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-25 13:33:19 +00:00
Gabor Buella ac235578c0 [X86] WaitPKG intrinsics
Reviewers: craig.topper, zvi

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D45254


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330463 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-20 18:44:33 +00:00
Junmo Park 1c97f39bbb [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition
This matches what GCC does.
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64-c.c

Differential Revision: https://reviews.llvm.org/D45544



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330229 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-17 22:38:40 +00:00
Gabor Buella b0a14b9116 [X86] Introduce archs: goldmont-plus & tremont
Reviewers: craig.topper

Reviewed By: craig.topper

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D45613


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330110 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-16 08:10:10 +00:00
Eli Friedman 49db1e4ff2 Fix test failure caused by r329965.
"-mllvm" options get parsed slightly earlier, and -arm-restrict-it is
only available if the ARM target is compiled in. Invoke "clang -cc1"
directly to avoid the issue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329968 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 22:50:50 +00:00
Gabor Buella 7636e500e3 NFC - Indentation fixes in predefined-arch-macros.c
Consistently separating tests with empty lines.
Helps while navigating this file.

Reviewers: craig.topper

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D45561


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329932 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 18:15:39 +00:00
Anastasia Stulova 4bdcbad8ff [OpenCL] Added -std/-cl-std=c++
This is std option for OpenCL C++ v1.0.

Differential Revision: https://reviews.llvm.org/D45363



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329911 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-12 14:17:04 +00:00
Gabor Buella 633f56e921 [x86] wbnoinvd intrinsic
The WBNOINVD instruction writes back all modified
cache lines in the processor’s internal cache to main memory
but does not invalidate (flush) the internal caches.

Reviewers: craig.topper, zvi, ashlykov

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D43817


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329848 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-11 20:09:09 +00:00
Gabor Buella 58670e4b98 [X86] Split up -march=icelake to -client & -server
Reviewers: craig.topper, zvi, echristo

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D45056



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329741 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 18:58:26 +00:00
Gabor Buella 7eb1a08705 [X86] Disable SGX for Skylake Server - CPP test
Summary: Fix test case - corresponding to r329701

Reviewers: craig.topper, davezarzycki

Reviewed By: davezarzycki

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D45488


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329710 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 15:03:03 +00:00
Alexander Kornienko b8b9458165 Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt
Where whitelist consists of:

  archtype
  cas
  classs
  checkk
  compres
  definit
  frome
  iff
  inteval
  ith
  lod
  methode
  nd
  optin
  ot
  pres
  statics
  te
  thru

Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few
files that have dubious fixes reverted.)

Differential revision: https://reviews.llvm.org/D44188

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329399 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-06 15:14:32 +00:00
Shiva Chen 20140d410f [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo
Summary:
This patch extend getTargetDefines and implement handleTargetFeatures
and hasFeature. and define corresponding marco for those features.

Reviewers: asb, apazos, eli.friedman

Differential Revision: https://reviews.llvm.org/D44727

Patch by Kito Cheng.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329278 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-05 12:54:00 +00:00
Richard Trieu cab3257e74 Fix some handling of AST nodes with diagnostics.
The diagnostic system for Clang can already handle many AST nodes.  Instead
of converting them to strings first, just hand the AST node directly to
the diagnostic system and let it handle the output.  Minor changes in some
diagnostic output.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328688 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-28 04:16:13 +00:00
Hans Wennborg 73fed20ccf [ms] Parse #pragma optimize and ignore it behind its own flag
This allows users to turn off warnings about this pragma specifically,
while still receiving warnings about other ignored pragmas.

Differential Revision: https://reviews.llvm.org/D44630

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327959 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-20 08:53:11 +00:00
Sjoerd Meijer 84c267252d [AAch64] Tests for ACLE FP16 macros
This adds some missing tests for the AArch64 FP16 macros.

Differential Revision: https://reviews.llvm.org/D44512


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327623 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-15 13:36:30 +00:00
Sjoerd Meijer 2c322ce8b7 [ARM] ACLE FP16 feature test macros
This is a partial recommit of r327189 that was reverted
due to test issues. I.e., this recommits minimal functional
change, the FP16 feature test macros, and adds tests that 
were missing in the original commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327455 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-13 22:11:06 +00:00
Matthew Voss 84305dfe2e Correct the alignment for the PS4 target
https://reviews.llvm.org/D44218


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326942 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-07 20:48:16 +00:00
Mandeep Singh Grang 40332b100c [RISCV] Enable __int128_t and __uint128_t through clang flag
Summary:
If the flag -fforce-enable-int128 is passed, it will enable support for __int128_t and __uint128_t types.
This flag can then be used to build compiler-rt for RISCV32.

Reviewers: asb, kito-cheng, apazos, efriedma

Reviewed By: asb, efriedma

Subscribers: shiva0217, efriedma, jfb, dschuff, sdardis, sbc100, jgravelle-google, aheejin, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, cfe-commits

Differential Revision: https://reviews.llvm.org/D43105

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326045 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-25 03:58:23 +00:00
Craig Topper 0a0f7ec18a [X86] Disable CLWB in Cannon Lake
Cannon Lake does not support CLWB, therefore it
does not include all features listed under SKX.

Patch by Gabor Buella

Differential Revision: https://reviews.llvm.org/D43459

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325655 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-21 00:16:50 +00:00
Keith Walker 12f2fe0e7d [ARM] disable FPU features when using soft floating point.
To be compatible with GCC if soft floating point is in effect any FPU
specified is effectively ignored, eg,

  -mfloat-abi=soft -fpu=neon

If any floating point features which require FPU hardware are enabled
they must be disable.

There was some support for doing this for NEON, but it did not handle
VFP, nor did it prevent the backend from emitting the build attribute
Tag_FP_arch describing the generated code as using the floating point
hardware if a FPU was specified (even though soft float does not use
the FPU).

Disabling the hardware floating point features for targets which are
compiling for soft float has meant that some tests which were incorrectly
checking for hardware support also needed to be updated. In such cases,
where appropriate the tests have been updated to check compiling for
soft float and a non-soft float variant (usually softfp). This was
usually because the target specified in the test defaulted to soft float.

Differential Revision: https://reviews.llvm.org/D42569


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325492 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-19 12:40:26 +00:00
Saleem Abdulrasool bcd5214fa1 Support `#pragma comment(lib, "name")` in the frontend for ELF
This adds the frontend support required to support the use of the
comment pragma to enable auto linking on ELFish targets. This is a
generic ELF extension supported by LLVM. We need to change the handling
for the "dependentlib" in order to accommodate the previously discussed
encoding for the dependent library descriptor. Without the custom
handling of the PCK_Lib directive, the -l prefixed option would be
encoded into the resulting object (which is treated as a frontend
error).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324438 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07 01:46:46 +00:00