Commit Graph

211966 Commits

Author SHA1 Message Date
Angel Garcia Gomez 199e5232b3 Document a bug in loop-convert and fix one of its subcases.
Summary: Now that we prioritize copying trivial types over using const-references where possible, I found some cases where, after the transformation, the loop was using the address of the local copy instead of the original object.

Reviewers: klimek

Subscribers: alexfh, cfe-commits

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

llvm-svn: 249300
2015-10-05 11:15:39 +00:00
Mohit K. Bhakkad 72207b167c [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPS
Reviewers: jaydeep.
Subscribers: lldb-commits.
Differential Revision: http://reviews.llvm.org/D13335

llvm-svn: 249299
2015-10-05 10:56:19 +00:00
Vasileios Kalintiris fdfc010e84 Remove support for the mips-mti-linux toolchain.
There are two remaining buildbot failures that we'll have to
investigate before submitting this again.

llvm-svn: 249298
2015-10-05 10:34:46 +00:00
Igor Kudrin b1f2b51a89 [ELF2] Add DT_INIT and DT_FINI dynamic table entries
The entries are added if there are "_init" or "_fini" entries in
the symbol table respectively. According to the behavior of ld,
entries are inserted even for undefined symbols.

Symbol names can be overridden by using -init and -fini command
line switches. If used, these switches neither add new symbol table
entries nor require those symbols to be resolved.

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

llvm-svn: 249297
2015-10-05 10:29:46 +00:00
Vasileios Kalintiris 9ed154f921 Fix test failure on Windows buildbots for the mips-mti-linux toolchain.
Try to make the Windows buildbots happy by fixing the regexes that match the
paths to CRT files.

llvm-svn: 249296
2015-10-05 09:55:50 +00:00
Denis Protivensky 22220d5d5f [ELF2] Add --undefined option
Add symbol specified with -u as undefined which may cause additional
object files from archives to be linked into the resulting binary.

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

llvm-svn: 249295
2015-10-05 09:43:57 +00:00
Vasileios Kalintiris 6967527441 Re-commit "Add support for the new mips-mti-linux toolchain."
r249137 added support for the new mips-mti-linux toolchain. However,
the new tests of that commit, broke some buildbots because they didn't use
the correct regular expressions to capture the filename of Clang & LLD.

This commit re-applies the changes of r249137 and fixes the tests in
r249137 in order to match the filenames of the Clang and LLD executable.

llvm-svn: 249294
2015-10-05 09:12:36 +00:00
Angel Garcia Gomez c50b9fbb84 Fix bug in modernize-use-nullptr.
Summary:
https://llvm.org/bugs/show_bug.cgi?id=24960

modernize-use-nullptr would hit an assertion in some cases involving macros and initializer lists, due to finding a node with more than one parent (the two forms of the initializer list).

However, this doesn't mean that the replacement is incorrect, so instead of just rejecting this case I tried to find a way to make it work. Looking at the semantic form of the InitListExpr made sense to me (looking at both forms results in false negatives) but I am not sure of the things that we can miss by skipping the syntactic form.

Reviewers: klimek

Subscribers: cfe-commits, alexfh

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

llvm-svn: 249291
2015-10-05 08:40:13 +00:00
Daniel Jasper 28ff728787 clang-format: Remove sentence in option cost threshold that weakens the
statement. Specifically, we don't want people that have already written
a patch to just write a style guide for their 1-person project.

llvm-svn: 249290
2015-10-05 07:36:40 +00:00
Daniel Jasper 49d3d58a45 clang-format: Document threshold for adding new options.
llvm-svn: 249289
2015-10-05 07:24:55 +00:00
NAKAMURA Takumi 5bdde3bd5a Reformat partially.
llvm-svn: 249288
2015-10-05 04:46:30 +00:00
NAKAMURA Takumi 131cd5a35d Reformat 3 files in llvm/include/llvm/CodeGen/.
llvm-svn: 249287
2015-10-05 04:44:18 +00:00
NAKAMURA Takumi f68eb2d1bc Trailing whitespaces.
llvm-svn: 249286
2015-10-05 04:44:08 +00:00
NAKAMURA Takumi 1c880ba6dd Prune trailing whitespaces in comment lines.
llvm-svn: 249285
2015-10-05 04:43:57 +00:00
NAKAMURA Takumi 07609eab0f Reformat blank lines.
llvm-svn: 249284
2015-10-05 04:43:48 +00:00
NAKAMURA Takumi 72e03fd917 [CMake] Move CLANG_INCLUDE_TESTS in advance of add_subdirectory(tools).
The target "check-clang-tools" is affected by CLANG_INCLUDE_TESTS but it was undefined in 1st configuration procedure.

llvm-svn: 249283
2015-10-05 02:04:49 +00:00
Adrian Prantl f0cd677b17 Module Debugging: Emit (ObjC) function declarations in the module scope
when building a module.

llvm-svn: 249282
2015-10-04 23:23:04 +00:00
Keno Fischer 75fada0211 Fix makefile build on OSX when ARM targets are not enabled
Summary: When LLVM/Clang is built without ARM support, the ios_kext runtime
library is not built, but without this patch, the Makefile still tries to
copy it. This is a recent regression, because the ios_kext library used
to also be built on x86_64.

Reviewers: beanz

Subscribers: aemerson, cfe-commits, rengolin

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

llvm-svn: 249281
2015-10-04 18:51:04 +00:00
David Majnemer 429c8eda22 [SelectionDAGBuilder] Remove dead code
We already check for LandingPadInst two lines above.

llvm-svn: 249280
2015-10-04 18:44:47 +00:00
Saleem Abdulrasool d170c4b57a Add -f[no-]declspec to control recognition of __declspec as a keyword
In versions of clang prior to r238238, __declspec was recognized as a keyword in
all modes.  It was then changed to only be enabled when Microsoft or Borland
extensions were enabled (and for CUDA, as a temporary measure).  There is a
desire to support __declspec in Playstation code, and possibly other
environments.  This commit adds a command-line switch to allow explicit
enabling/disabling of the recognition of __declspec as a keyword.  Recognition
is enabled by default in Microsoft, Borland, CUDA, and PS4 environments, and
disabled in all other environments.

Patch by Warren Ristow!

llvm-svn: 249279
2015-10-04 17:51:05 +00:00
Chris Bieneman f9d71a5439 [CMake] [darwin] Removing a line of debug code that I accidentally committed.
llvm-svn: 249278
2015-10-04 15:48:16 +00:00
Teresa Johnson 19f517a7d7 Remove unused private field introduced by r249270.
llvm-svn: 249277
2015-10-04 15:00:55 +00:00
Johannes Doerfert f17a78ef63 Remove non-executed statements during SCoP simplifcation
A statement with an empty domain complicates the invariant load
  hoisting and does not help any subsequent analysis or transformation.
  In fact it might introduce parameter dimensions or increase the
  schedule dimensionality. To this end, we remove statements with an
  empty domain early in the SCoP simplification.

llvm-svn: 249276
2015-10-04 15:00:05 +00:00
Johannes Doerfert 634909c2c9 [FIX] Domain generation for non-affine loops
llvm-svn: 249275
2015-10-04 14:57:41 +00:00
Johannes Doerfert f61df69423 [FIX] Count affine loops correctly
The "unprofitable" heuristic was broken and counted boxed loops
  even though we do not represent and optimize them.

llvm-svn: 249274
2015-10-04 14:56:08 +00:00
Johannes Doerfert 757a32b5b3 [FIX] Approximate non-affine loops correctly
Before isValidCFG() could hide the fact that a loop is non-affine by
  over-approximation. This is problematic if a subregion of the loop contains
  an exit/latch block and is over-approximated. Now we do not over-approximate
  in the isValidCFG function if we check loop control.  If such control is
  non-affine the whole loop is over-approximated, not only a subregion.

llvm-svn: 249273
2015-10-04 14:54:27 +00:00
Johannes Doerfert 30ffb6fcb6 [FIX] Check loop latches for valid control too.
This patch cannot be tested on its own as the isValidCFG currently
  hides the fact that control is actually non-affine with
  over-approximation. This will be corrected in the next patch and a
  test for non-affine latches will be added.

llvm-svn: 249272
2015-10-04 14:53:18 +00:00
Johannes Doerfert 8dba07770f [NFC] Remove unused classes
llvm-svn: 249271
2015-10-04 14:52:43 +00:00
Teresa Johnson 403a787e03 Support for function summary index bitcode sections and files.
Summary:
The bitcode format is described in this document:
  https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view
For more info on ThinLTO see:
  https://sites.google.com/site/llvmthinlto

The first customer is ThinLTO, however the data structures are designed
and named more generally based on prior feedback. There are a few
comments regarding how certain interfaces are used by ThinLTO, and the
options added here to gold currently have ThinLTO-specific names as the
behavior they provoke is currently ThinLTO-specific.

This patch includes support for generating per-module function indexes,
the combined index file via the gold plugin, and several tests
(more are included with the associated clang patch D11908).

Reviewers: dexonsmith, davidxl, joker.eph

Subscribers: llvm-commits

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

llvm-svn: 249270
2015-10-04 14:33:43 +00:00
Tobias Grosser d78616f98a Make ScopAnnotator a function-local variable to ensure it is freed at each run
When the ScopAnnotator was a class member variable some of the maps it contains
have not been properly cleared. As a result we had dangling pointers to
llvm::Value(s) which got detected by the AssertingVH we recently added.

No test case as this issue is hard to reproduce reliably as subsequent
optimizations need to delete some of the llvm::Values we still keep in our
lists.

llvm-svn: 249269
2015-10-04 11:19:13 +00:00
Tobias Grosser ecdfae6b15 IRBuilder: Use AssertingVH
llvm-svn: 249268
2015-10-04 10:18:56 +00:00
Tobias Grosser 5762b31df4 Use AssertingVH for ValueToValue Maps
By using AssertingVH we will see assertions in case Values to which still
pointers in our maps exists are deleted. This is very useful as we previously
had some bugs that were caused by such stale Value pointers.

llvm-svn: 249267
2015-10-04 10:18:49 +00:00
Tobias Grosser 2f1acac610 BlockGenerator: Use plain Value * instead of const Value *
The use of const qualified Value pointers prevents the use of AssertingVH. We
could probably think of adding const support to AssertingVH, but as const
correctness seems to currently provide limited benefit in Polly, we do not do
this yet.

llvm-svn: 249266
2015-10-04 10:18:45 +00:00
Tobias Grosser 9646e3fe4b BlockGenerators: Use auto to be less sensitive to type changes
llvm-svn: 249265
2015-10-04 10:18:39 +00:00
Tobias Grosser f4bb7a6a4d Consolidate the different ValueMapTypes we are using
There have been various places where llvm::DenseMap<const llvm::Value *,
llvm::Value *> types have been defined, but all types have been expected to be
identical. We make this more clear by consolidating the different types and use
BlockGenerator::ValueMapT wherever there is a need for types to match
BlockGenerator::ValueMapT.

llvm-svn: 249264
2015-10-04 10:18:32 +00:00
Simon Pilgrim bb01c6fda2 [X86][SSE4A] Added shuffle decode tests for 'special case' SSE4A EXTRQI/INSERTQI ops.
llvm-svn: 249263
2015-10-04 10:12:53 +00:00
Joerg Sonnenberger 726e624c0c [SPARCv9] Add support for the rdpr/wrpr instructions.
llvm-svn: 249262
2015-10-04 09:11:22 +00:00
Igor Breger 78741a1b1e AVX512: Implemented encoding and intrinsics for VPERMILPS/PD instructions.
Added tests for intrinsics and encoding.

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

llvm-svn: 249261
2015-10-04 07:20:41 +00:00
Craig Topper 379539116e Pass SourceRange by value in a test I missed in r249259.
llvm-svn: 249260
2015-10-04 05:09:13 +00:00
Craig Topper e335f25949 SourceRanges are small and trivially copyable, don't them by reference.
llvm-svn: 249259
2015-10-04 04:53:55 +00:00
Craig Topper 8f70a9f892 SourceRanges are small and trivially copyable, don't them by reference. NFC
llvm-svn: 249258
2015-10-04 04:53:37 +00:00
David Majnemer 161935520d [WinEH] Permit branch folding in the face of funclets
Track which basic blocks belong to which funclets.  Permit branch
folding to fire but only if it can prove that doing so will not cause
code in one funclet to be reused in another.

llvm-svn: 249257
2015-10-04 02:22:52 +00:00
Todd Fiala 65b9056f3d cmake: ensure readline python module target is added before finishing swig.
When the readline target exists (only for non-Android Linux currently),
ensure that target is made a dependency of the finish_swig python-wrap-up
steps.  This ensures it is built when building the lldb target.

Fixes:
https://llvm.org/bugs/show_bug.cgi?id=25038

llvm-svn: 249256
2015-10-04 01:28:51 +00:00
Davide Italiano b00e523d00 [ELF2/AArch64] R_AARCH64_ABS{16,32} can fail.
Add tests to ensure we handle this case this case gracefully.

llvm-svn: 249255
2015-10-04 01:08:58 +00:00
Davide Italiano df88f968e3 [ELF2/AArch64] Add support for AARCH64_ABS{16,32,64} relocations.
I saw these in the wild while trying to link shared libraries.

llvm-svn: 249254
2015-10-04 00:59:16 +00:00
Jeroen Ketema 321fc30afc Fix typo in README
llvm-svn: 249253
2015-10-04 00:46:16 +00:00
Eric Fiselier a3a7c56143 Diagnose const atomics in __atomic builtins.
Diagnose when a pointer to const T is used as the first argument in at atomic
builtin unless that builtin is a load operation. This is already checked for
C11 atomics builtins but not for __atomic ones.

This patch was given the LGTM by rsmith when it was part
of a larger review. (See http://reviews.llvm.org/D10407)

llvm-svn: 249252
2015-10-04 00:11:02 +00:00
Simon Pilgrim dde63374c5 [DAGCombiner] Generalize FADD constant combines to work with vectors
Updated the FADD combines to work with vectors as well as scalars.

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

llvm-svn: 249251
2015-10-03 22:06:06 +00:00
Sanjay Patel 004ea240ad add test cases that demonstrate bad behavior
These are based on PR25016 and likely caused by a bug in
MachineCombiner's definition of improvesCriticalPathLen().

llvm-svn: 249249
2015-10-03 20:52:55 +00:00
Sanjay Patel acd4baefca include equal sign in debug equations; NFC
llvm-svn: 249248
2015-10-03 20:45:01 +00:00