Commit Graph

209160 Commits

Author SHA1 Message Date
Simon Pilgrim
9362270f78 [X86][F16C] Added debug codegen test for F16C intrinsics
Part of PR24590

llvm-svn: 246204
2015-08-27 20:34:02 +00:00
Lang Hames
e2edcdcd93 Oops - Re-add the Kaleidoscope regression tests themselves (accidentally left
out of r246201).

llvm-svn: 246203
2015-08-27 20:33:22 +00:00
Eric Christopher
53b2afa28f Remove a dead assert, we'd have gotten the case above.
llvm-svn: 246202
2015-08-27 20:32:24 +00:00
Lang Hames
d76e067150 Recommit r246175 - Add Kaleidoscope regression tests, with a fix to make sure
the kaleidoscope 'library' functions aren't dead-stripped in release builds.

llvm-svn: 246201
2015-08-27 20:31:44 +00:00
Simon Pilgrim
a79dfb3223 [X86] Add __builtin_ia32_undef* intrinsics to test
Minor tweak to rL246083

llvm-svn: 246200
2015-08-27 20:29:13 +00:00
Chris Bieneman
f12cf13f38 [CMake] Add ARCHS option to add_sanitizer_rt_symbols.
Summary:
This is another step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt.

Changes to CMakeLists files are all minimal except ubsan which tests the new ARCHS loop.

Further cleanup patches will follow.

Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov

Subscribers: llvm-commits

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

llvm-svn: 246199
2015-08-27 20:07:54 +00:00
Alexey Samsonov
34620a8e4f [Sanitizer] Use internal_memmove instead of the one implicitly generated by compiler.
llvm-svn: 246198
2015-08-27 20:07:28 +00:00
Eric Christopher
3751bce2a9 Target attribute syntax compatibility fix - gcc uses no- rather than mno-.
llvm-svn: 246197
2015-08-27 20:05:48 +00:00
Eric Christopher
5d2db529cb Rename this file to have a processor suffix to help identify.
llvm-svn: 246196
2015-08-27 20:05:46 +00:00
Eric Christopher
3a98b3c1a5 Rewrite the code generation handling for function feature and cpu attributes.
A couple of changes here:

a) Do less work in the case where we don't have a target attribute on the
function. We've already canonicalized the attributes for the function -
no need to do more work.

b) Use the newer canonicalized feature adding functions from TargetInfo
to do the work when we do have a target attribute. This enables us to diagnose
some warnings in the case of conflicting written attributes (only ppc does
this today) and also make sure to get all of the features for a cpu that's
listed rather than just change the cpu.

Updated all testcases accordingly and added a new testcase to verify that we'll
error out on ppc if we have some incompatible options using the existing diagnosis
framework there.

llvm-svn: 246195
2015-08-27 19:59:34 +00:00
Erik Schnetter
5e93e28d8b Enable constant propagation for more math functions
Constant propagation for single precision math functions (such as
tanf) is already working, but was not enabled. This patch enables
these for many single-precision functions, and adds respective test
cases.

Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf
exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf

llvm-svn: 246194
2015-08-27 19:56:57 +00:00
Artem Belevich
5ef02c2db7 [CUDA] Check register names on appropriate side of cuda compilation only.
Differential Revision: http://reviews.llvm.org/D11950

llvm-svn: 246193
2015-08-27 19:54:21 +00:00
Adrian Prantl
6b21ab21d1 Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1
to enable the use of external type references in the debug info
(a.k.a. module debugging).

The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs"
and passes that to cc1. All this does at the moment is set a flag
codegenopts.

http://reviews.llvm.org/D11958

llvm-svn: 246192
2015-08-27 19:46:20 +00:00
Erik Schnetter
ed6eab32b3 Revert 246186; still breaks on some systems
llvm-svn: 246191
2015-08-27 19:34:14 +00:00
Evgeniy Stepanov
b732e384e1 [sanitizer] Disable sem_* interceptors on Mac.
llvm-svn: 246190
2015-08-27 19:20:01 +00:00
Tyler Nowicki
8cb274ed0d Improve options printed on vectorization analysis diagnostics.
The LLVM patch changes the analysis diagnostics produced when loops with            
floating-point recurrences or memory operations are identified. The new messages
say "cannot prove it is safe to reorder * operations; allow reordering by       
specifying #pragma clang loop vectorize(enable)". Depending on the type of      
diagnostic the message will include additional options such as ffast-math or    
__restrict__.                                                                   

llvm-svn: 246189
2015-08-27 18:58:34 +00:00
Gabor Horvath
e9984b28ef [Static Analyzer] BugReporter.cpp:2869: Assertion failed: !RemainingNodes.empty() && "No error node found in the trimmed graph"
The assertion is caused by reusing a “filler” ExplodedNode as an error node.
The “filler” nodes are only used for intermediate processing and are not
essential for analyzer history, so they can be reclaimed when the
ExplodedGraph is trimmed by the “collectNode” function. When a checker finds a
bug, they generate a new transition in the ExplodedGraph. The analyzer will
try to reuse the existing predecessor node. If it cannot, it creates a new
ExplodedNode, which always has a tag to uniquely identify the creation site.
The assertion is caused when the analyzer reuses a “filler” node.

In the test case, some “filler” nodes were reused and then reclaimed later
when the ExplodedGraph was trimmed. This caused an assertion because the node
was needed to generate the report. The “filler” nodes should not be reused as
error nodes. The patch adds a constraint to prevent this happening, which
solves the problem and makes the test cases pass.

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

Patch by Ying Yi!

llvm-svn: 246188
2015-08-27 18:57:00 +00:00
Tyler Nowicki
5eaa5a9d26 Improve vectorization diagnostic messages and extend vectorize(enable) pragma.
This patch changes the analysis diagnostics produced when loops with
floating-point recurrences or memory operations are identified. The new messages 
say "cannot prove it is safe to reorder * operations; allow reordering by
specifying #pragma clang loop vectorize(enable)". Depending on the type of 
diagnostic the message will include additional options such as ffast-math or
__restrict__.

This patch also allows the vectorize(enable) pragma to override the low pointer
memory check threshold. When the hint is given a higher threshold is used.

See the clang patch for the options produced for each diagnostic.

llvm-svn: 246187
2015-08-27 18:56:49 +00:00
Erik Schnetter
05845d31c9 Enable constant propagation for more math functions
Constant propagation for single precision math functions (such as
tanf) is already working, but was not enabled. This patch enables
these for many single-precision functions, and adds respective test
cases.

Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf
exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf

llvm-svn: 246186
2015-08-27 18:56:23 +00:00
Lang Hames
a9248a2696 Revert r246175 to get builder green again.
llvm-svn: 246185
2015-08-27 18:54:41 +00:00
Evgeniy Stepanov
533fde9f4d [sanitizer] Move sem_* to common interceptors.
llvm-svn: 246184
2015-08-27 18:51:18 +00:00
Charles Li
430db1e717 [Tests] Modified Lit Tests to be C++11 compatibile
This 2nd patch should not change the test results, but it is useful if clang's
default C++ language is ever changed from gnu++98.

llvm-svn: 246183
2015-08-27 18:49:15 +00:00
Gabor Horvath
8d3ad6b617 [Static Analyzer] Make NonNullParamChecker emit implicit null dereference events.
Differential Revision: http://reviews.llvm.org/D11433

llvm-svn: 246182
2015-08-27 18:49:07 +00:00
Tom Stellard
8251f978d3 ELF/AMDGPU: Add more misssing: using namespace lld;
Hopefully, this will resolve the remaining windows bot errors.

llvm-svn: 246181
2015-08-27 18:43:12 +00:00
Eric Christopher
1c07d8ce83 const-ify TargetInfo::handleUserFeatures.
llvm-svn: 246180
2015-08-27 18:42:57 +00:00
Tom Stellard
39b3d71177 ELF/AMDGPU: Add missing: using namespace lld; to try to fix windows bot
llvm-svn: 246179
2015-08-27 18:27:52 +00:00
Chris Bieneman
2be86df4b1 [CMake] Add PARENT_TARGET option to add_sanitizer_rt_symbols.
Summary: This is another step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt.

Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov

Subscribers: llvm-commits

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

llvm-svn: 246178
2015-08-27 18:27:33 +00:00
Enrico Granata
db3d58b94a Remove class Language - the only thing it was actually being used for is provided by LanguageRuntime already
llvm-svn: 246177
2015-08-27 18:18:49 +00:00
Ahmed Bougacha
874e93f4b4 [TableGen] Remove dead code. NFC.
The only user of this was removed in r129670.

llvm-svn: 246176
2015-08-27 18:14:21 +00:00
Lang Hames
f624d1ab8d Add Kaleidoscope regression tests.
These will be run if LLVM_BUILD_EXAMPLES is enabled.

llvm-svn: 246175
2015-08-27 18:13:34 +00:00
Artem Belevich
f8144ab44f [CUDA] Improve CUDA compilation pipeline creation.
Current implementation tries to guess which Action will result in a
job which needs to incorporate device-side GPU binaries. The guessing
was attempting to work around the fact that multiple actions may be
combined into a single compiler invocation. If CudaHostAction ends up
being combined (and thus bypassed during action list traversal) no
device-side actions it pointed to were processed. The guessing worked
for most of the usual cases, but fell apart when external assembler
was used.

This change removes the guessing and makes sure we create and pass
device-side jobs regardless of how the jobs get combined.

* CudaHostAction is always inserted either at Compile phase or the
  FinalPhase of current compilation, whichever happens first.
* If selectToolForJob combines CudaHostAction with other actions, it
  passes info about CudaHostAction up to the caller
* When it sees that CudaHostAction got combined with other actions
  (and hence will never be passed to BuildJobsForActions),
  BuildJobsForActions creates device-side jobs the same way they would
  be created if CudaHostAction was passed to BuildJobsForActions
  directly.
* Added two more test cases to make sure GPU binaries are passed to
  correct jobs.

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

llvm-svn: 246174
2015-08-27 18:10:41 +00:00
Alexander Kornienko
aabfadef84 [clang-tidy] Move clang-tidy docs to a separate directory. Create doc files for checks
The doc files for checks have been generated from the corresponding header files
using the docs/clang-tidy/tools/dump_check_docs.py script. Committing the script
as well, but the intention is to move all the user-facing docs from header files
to the rST files and add links to .h files appropriately.

llvm-svn: 246173
2015-08-27 18:10:07 +00:00
Greg Clayton
5ce1a84f9a More cleanup to make sure no one plays with DWARFDebugInfoEntry. Clients outside of DWARFDebugInfoEntry of DWARFCompileUnit should use DWARFDIE only.
llvm-svn: 246172
2015-08-27 18:09:44 +00:00
Reid Kleckner
255ee043cb Unit test the CRLF change to suppression parsing
It's a simpler, faster, and more portable.

llvm-svn: 246171
2015-08-27 18:05:33 +00:00
Alexander Kornienko
2588cb93af [clang-tidy] Renamed a test file to <check-name>.cpp.
llvm-svn: 246170
2015-08-27 18:03:37 +00:00
Alexander Kornienko
f8ed0a8d35 [clang-tidy] Update docs for clang-tidy checks. NFC
Changes mostly address formatting and unification of the style. Use
MarkDown style for inline code snippets and lists. Added some text
for a few checks.

The idea is to move most of the documentation out to separate rST files and have
implementation files refer to the corresponding documentation files.

llvm-svn: 246169
2015-08-27 18:01:58 +00:00
Jonathan Roelofs
643e0ab8df Do not include pthread.h and sched.h when threads are disabled
Patch by Philippe Daouadi!

http://reviews.llvm.org/D9639

llvm-svn: 246168
2015-08-27 17:47:34 +00:00
Matt Arsenault
053ae1f5e3 AMDGPU/SI: Add test for folding constants into operands
Patch by Axel Davy

llvm-svn: 246167
2015-08-27 17:41:27 +00:00
Erik Schnetter
a23672626d Revert r246158 since it breaks LLVM.Transforms/ConstProp.calls.ll
llvm-svn: 246166
2015-08-27 17:24:01 +00:00
Jonathan Peyton
851a2afce9 Update README.txt to include table of supported Power processors
Small patch to the README.txt file which adds a table that shows what compiler
version works on what Power processor. 

Patch by Carlo Bertolli

http://lists.llvm.org/pipermail/openmp-commits/2015-August/000595.html

llvm-svn: 246165
2015-08-27 17:19:17 +00:00
Tom Stellard
fbbbc01caa ELF/AMDGPU: Remove another unused private member variable
llvm-svn: 246164
2015-08-27 17:11:10 +00:00
Jonathan Roelofs
054026dba2 Fix a case of CHECK[^:]*$.
http://reviews.llvm.org/D11917

llvm-svn: 246163
2015-08-27 17:03:14 +00:00
Reid Kleckner
766e507784 [windows] Avoid unix2dos, it seems to not work on our bot
llvm-svn: 246162
2015-08-27 16:56:10 +00:00
Tobias Grosser
ed21a1fc7e Do not detect Scops with only one loop.
If a region does not have more than one loop, we do not identify it as
a Scop in ScopDetection. The main optimizations Polly is currently performing
(tiling, preparation for outer-loop vectorization and loop fusion) are unlikely
to have a positive impact on individual loops. In some cases, Polly's run-time
alias checks or conditional hoisting may still have a positive impact, but those
are mostly enabling transformations which LLVM already performs for individual
loops. As we do not focus on individual loops, we leave them untouched to not
introduce compile time regressions and execution time noise. This results in
good compile time reduction (oourafft: -73.99%, smg2000: -56.25%).

Contributed-by: Pratik Bhatu <cs12b1010@iith.ac.in>

Reviewers: grosser

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

llvm-svn: 246161
2015-08-27 16:55:18 +00:00
Tom Stellard
36c6f6b874 ELF/AMDGPU: Remove unused private member variable
This should fix the one of the failing bots.

llvm-svn: 246160
2015-08-27 16:52:58 +00:00
Tom Stellard
ff8dfbd965 ELF/AMDGPU: Attempt to fix windows bots
Broken by r246155.

llvm-svn: 246159
2015-08-27 16:48:46 +00:00
Erik Schnetter
694bf5c9b5 Enable constant propagation for more math functions
Constant propagation for single precision math functions (such as
tanf) is already working, but was not enabled. This patch enables
these for many single-precision functions, and adds respective test
cases.

Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf
exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf

llvm-svn: 246158
2015-08-27 16:36:37 +00:00
NAKAMURA Takumi
e6bc093b42 [CMake] OBJLIB-ize *-tblgen.
This improves dependency chain of;

  (LLVMSupport && LLVMTableGen) && (*.cpp in *-tblgen) && (linking *-tblgen)

with;

  (LLVMSupport && LLVMTableGen && *.cpp) && (linking *-tblgen)

llvm-svn: 246156
2015-08-27 16:10:47 +00:00
Tom Stellard
15d1fa1bcc ELF: Add AMDGPU ReaderWriter
This is a basic implementation that allows lld to emit binaries
consumable by the HSA runtime.

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

llvm-svn: 246155
2015-08-27 15:55:44 +00:00
Chad Rosier
dc8c48924a [LoopVectorize] Move test from r246149 into a target-specific folder to appease bots.
llvm-svn: 246154
2015-08-27 15:24:47 +00:00