Commit Graph

233338 Commits

Author SHA1 Message Date
Justin Bogner 3adaa8cf4a cmake: Simplify add_lit_testsuites
cmake 3.4 introduced LIST_DIRECTORIES to glob recurse, which can be
used to simplify this code greatly.

llvm-svn: 272217
2016-06-08 22:36:37 +00:00
Marshall Clow 79e7c2c9b4 Add notes for 2688
llvm-svn: 272216
2016-06-08 22:33:25 +00:00
Vedant Kumar 89262b6928 [docs] Coverage: Clarify return value of __llvm_profile_write_file
llvm-svn: 272215
2016-06-08 22:32:03 +00:00
Vedant Kumar 32a9bfa42a [docs] Coverage: Flesh out instructions for avoiding static initializeres
llvm-svn: 272214
2016-06-08 22:24:52 +00:00
Chris Bieneman 98102e7447 [CMake] Cleanup uses of USES_TERMINAL
Now that we are on CMake 3.4.3 we no longer need a version check around this.

This is the clang side of r272211.

llvm-svn: 272213
2016-06-08 22:20:43 +00:00
Chris Bieneman 687f4df95e [CMake] Cleanup uses of USES_TERMINAL
Now that we are on CMake 3.4.3 we no longer need a version check around this.

This is the libcxx side of r272211.

llvm-svn: 272212
2016-06-08 22:20:28 +00:00
Chris Bieneman df04e79f35 [CMake] Cleanup uses of USES_TERMINAL
Now that we are on CMake 3.4.3 we no longer need a version check around this.

llvm-svn: 272211
2016-06-08 22:19:25 +00:00
Quentin Colombet 3340645771 [RegBankSelect] Print out the actual mapping of the operands.
This improves the debuggability of the pass.

llvm-svn: 272210
2016-06-08 21:55:30 +00:00
Quentin Colombet 9400bfbf42 [RegBankSelect] Remove a debug print of a potentially dead instruction.
For complex rewrittings, which do not occur currently, the related
machine instruction may have been deleted in the process. Therefore, do
not try to print it after the mapping is applied.

llvm-svn: 272209
2016-06-08 21:55:29 +00:00
Quentin Colombet 9f8e209c60 [RegisterBankInfo] Avoid code duplication in OperandsMapper for the computation of the end of range.
Refactor the code so that we do not compute in two different places the
end iterator for the range of new virtual registers for a given operand.
Although this refactoring was intended as NFC, this is not the case
because it actually fixes a bug where we were returning a range off by 1
(too long). Right now, this could not result in an actual bug because we
were accessing this range via the BreakDown size of the related operand.

llvm-svn: 272208
2016-06-08 21:55:26 +00:00
Quentin Colombet 9d26805f42 [RegisterBankInfo] Add dump/print methods for OperandsMapper.
Improve debuggability of the OperandsMapper helper class.

llvm-svn: 272207
2016-06-08 21:55:23 +00:00
Michael Zolotukhin 987ab631fa [SLPVectorizer] Handle GEP with differing constant index types
Summary:
This fixes PR27617.

Bug description: The SLPVectorizer asserts on encountering GEPs with different index types, such as i8 and i64.

The patch includes a simple relaxation of the assert to allow constants being of different types, along with a regression test that will provoke the unrelaxed assert.

Reviewers: nadav, mzolotukhin

Subscribers: JesperAntonsson, llvm-commits, mzolotukhin

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

Patch by Jesper Antonsson!

llvm-svn: 272206
2016-06-08 21:55:16 +00:00
Rafael Espindola a8777c2ef8 Handle gd tls relocs pointing to local symbols.
If the symbol is local we don't need to create a R_X86_64_DTPOFF64, we
can just write the correct value in the got.

Should fix pr28018.

llvm-svn: 272205
2016-06-08 21:31:59 +00:00
Davide Italiano 02861d8695 [PM] Add missing caching of GlobalsAA to EarlyCSE.
llvm-svn: 272204
2016-06-08 21:31:55 +00:00
Dehao Chen 769219b11a Revive http://reviews.llvm.org/D12778 to handle forward-hot-prob and backward-hot-prob consistently.
Summary:
Consider the following diamond CFG:

 A
/ \
B C
 \/
 D

Suppose A->B and A->C have probabilities 81% and 19%. In block-placement, A->B is called a hot edge and the final placement should be ABDC. However, the current implementation outputs ABCD. This is because when choosing the next block of B, it checks if Freq(C->D) > Freq(B->D) * 20%, which is true (if Freq(A) = 100, then Freq(B->D) = 81, Freq(C->D) = 19, and 19 > 81*20%=16.2). Actually, we should use 25% instead of 20% as the probability here, so that we have 19 < 81*25%=20.25, and the desired ABDC layout will be generated.

Reviewers: djasper, davidxl

Subscribers: llvm-commits

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

llvm-svn: 272203
2016-06-08 21:30:12 +00:00
Marshall Clow 96c63abad8 Mark 2441 as ready
llvm-svn: 272202
2016-06-08 21:25:38 +00:00
Chris Bieneman 120bdf84ab [CMake] Fixing a typo
This was called out on the list a long time ago and just got pointed out to me again. Need to fix it before I forget.

llvm-svn: 272201
2016-06-08 21:22:03 +00:00
Chris Bieneman 2724f145d9 [CMake] Support overriding binary install directory
This patch adds a new option LLVM_TOOLS_INSTALL_DIR which allows customizing the location executables and symlinks get installed to. This adds the functionality provided by autoconf's --bindir flag.

This patch is based on patches from and collaboration with Tony Kelman, and replaces http://reviews.llvm.org/D20934.

llvm-svn: 272200
2016-06-08 21:19:26 +00:00
Sanjay Patel 3929313811 [InstCombine] move fold of select of add/sub to helper function; NFCI
llvm-svn: 272199
2016-06-08 21:10:01 +00:00
Reid Kleckner f00f803294 [DebugInfo] Add calling conventions to DISubroutineType
Summary:
This should have been a very simple change, but it was greatly
complicated by the construction of new Decls during IR generation.

In particular, we reconstruct the AST function type in order to get the
implicit 'this' parameter into C++ method types.

We also have to worry about FunctionDecls whose types are not
FunctionTypes because CGBlocks.cpp constructs some dummy FunctionDecls
with 'void' type.

Depends on D21114

Reviewers: aprantl, dblaikie

Subscribers: cfe-commits

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

llvm-svn: 272198
2016-06-08 20:41:54 +00:00
Reid Kleckner de3d8b500f [DebugInfo] Add calling convention support for DWARF and CodeView
Summary:
Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum.  If
it is present and non-zero, the backend will emit it as a
DW_AT_calling_convention attribute. On the CodeView side, we translate
it to the appropriate enum for the LF_PROCEDURE record.

I added a new LLVM vendor specific enum to the list of DWARF calling
conventions. DWARF does not appear to attempt to standardize these, so I
assume it's OK to do this until we coordinate with GCC on how to emit
vectorcall convention functions.

Reviewers: dexonsmith, majnemer, aaboud, amccarth

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 272197
2016-06-08 20:34:29 +00:00
Sanjay Patel 384d0f219d [InstCombine] fix outdated comment, simplify logic; NFCI
llvm-svn: 272196
2016-06-08 20:31:52 +00:00
Evgeny Stupachenko 3e2f389a7e The patch set unroll disable pragma when unroll
with user specified count has been applied.

Summary:
Previously SetLoopAlreadyUnrolled() set the disable pragma only if
there was some loop metadata.
Now it set the pragma in all cases. This helps to prevent multiple
unroll when -unroll-count=N is given.

Reviewers: mzolotukhin

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

From: Evgeny Stupachenko <evstupac@gmail.com>
llvm-svn: 272195
2016-06-08 20:21:24 +00:00
Xinliang David Li 572135f717 [PM] Refector LoopAccessInfo analysis code
This is the preparation patch to port the analysis to new PM

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

llvm-svn: 272194
2016-06-08 20:15:37 +00:00
Sanjay Patel 10a2c38d83 [InstCombine] reduce indent; NFC
llvm-svn: 272193
2016-06-08 20:09:04 +00:00
Tim Shen 7aa0ad65ce [MemCpyOpt] Do not exchange llvm.lifetime.start and llvm.memcpy
Reviewers: iteratee

Subscribers: llvm-commits

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

llvm-svn: 272192
2016-06-08 19:42:32 +00:00
Sanjay Patel 916f8a0cdb [InstCombine] use copyIRFlags() ; NFCI
llvm-svn: 272191
2016-06-08 19:33:52 +00:00
Benjamin Kramer c321e53402 Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

llvm-svn: 272190
2016-06-08 19:09:22 +00:00
Jim Ingham 19e88c1ff6 Add a test for the failure described by pr28055. Mark it as xfail.
llvm-svn: 272189
2016-06-08 19:06:00 +00:00
Miklos Vajna 85b7b1c06a clang-rename: implement renaming of classes inside dynamic_cast
Refactor to do the same as what is done already for static_cast.

Reviewers: klimek

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

llvm-svn: 272188
2016-06-08 18:38:23 +00:00
Adrian McCarthy f3c3c13206 Generate codeview for array type metadata.
Differential Revision: http://reviews.llvm.org/D21107

llvm-svn: 272187
2016-06-08 18:22:59 +00:00
Benjamin Kramer 1b488eb881 [CodeView] Remove manual expansion of the default copy ctor.
It provides nothing over the default one but makes the class not
trivially copyable. No functionality change intended.

llvm-svn: 272186
2016-06-08 18:19:38 +00:00
Vitaly Buka 9d1b12c091 Specify target in lifetime-asan test.
Summary: Some target platforms -fsanitize=address.

Reviewers: pcc, eugenis

Subscribers: cfe-commits, christof, chapuni, kubabrecka

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

llvm-svn: 272185
2016-06-08 18:18:08 +00:00
George Burgess IV fd4e2f7cb2 Attempt #2 to appease the buildbots.
MSVC calls the copy ctor on StratifiedSets for some reason. So,
undelete it.

llvm-svn: 272184
2016-06-08 17:56:35 +00:00
Reid Kleckner ee641c20ca [codeview] Avoid emitting an empty file checksum table
Again, the Microsoft linker does not like empty substreams.

We still emit an empty string table if CodeView is enabled, but that
doesn't cause problems because it always contains at least one null
byte.

llvm-svn: 272183
2016-06-08 17:50:29 +00:00
Sanjoy Das 2401c98475 [SCEV] Break out of loop if there is no more work to do
This is NFC as far as externally visible behavior is concerned, but will
keep us from spinning in the worklist traversal algorithm unnecessarily.

llvm-svn: 272182
2016-06-08 17:48:46 +00:00
Sanjoy Das 8598412e24 [SCEV] Track no-abnormal-exits instead of no-throw calls
Absence of may-unwind calls is not enough to guarantee that a
UB-generating use of an add-rec poison in the loop latch will actually
cause UB.  We also need to guard against calls that terminate the thread
or infinite loop themselves.

This partially addresses PR28012.

llvm-svn: 272181
2016-06-08 17:48:42 +00:00
Sanjoy Das 9a65cd214d Teach isGuarantdToTransferExecToSuccessor about debug info intrinsics
Calls to `@llvm.dbg.*` can be assumed to terminate.

llvm-svn: 272180
2016-06-08 17:48:36 +00:00
Sanjoy Das a19edc4d15 Fix a bug in SCEV's poison value propagation
The worklist algorithm introduced in rL271151 didn't check to see if the
direct users of the post-inc add recurrence propagates poison.  This
change fixes the problem and makes the code structure more obvious.

Note for release managers: correctness wise, this bug wasn't a
regression introduced by rL271151 -- the behavior of SCEV around
post-inc add recurrences was strictly improved (in terms of correctness)
in rL271151.

llvm-svn: 272179
2016-06-08 17:48:31 +00:00
Quentin Colombet 86be3748a6 [RegBankSelect] Silence an unused variable warning in release mode.
llvm-svn: 272177
2016-06-08 17:39:47 +00:00
Quentin Colombet d6886bd22c [RegBankSelect] Comment on how we could improve repairing with copies.
When repairing with a copy, instead of accounting for the cost of that
copy and actually inserting it, we may be able to use an alternative
source for the register to repair and just use it.

Make sure this is documented, so that we consider that opportunity at
some point.

llvm-svn: 272176
2016-06-08 17:39:43 +00:00
Derek Bruening c45e51c891 [esan|wset] Reduce flakiness in samples test
Generalizes the workingset-samples test to pass when a sample has a
size of 0, which can happen on a loaded machine.

llvm-svn: 272175
2016-06-08 17:35:52 +00:00
Zachary Turner 3e65bcbe33 [pdb] Fix build errors in PDB unit tests.
llvm-svn: 272174
2016-06-08 17:32:25 +00:00
George Burgess IV 785f391131 Try to appease buildbots.
r272064 apparently made them angry. This undoes some changes made in
r272064 (defaulting move ctors) to make them happy again.

llvm-svn: 272173
2016-06-08 17:27:14 +00:00
Zachary Turner a1657a9e64 [pdb] Handle stream index errors better.
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21128

llvm-svn: 272172
2016-06-08 17:26:39 +00:00
Rui Ueyama ced0853b46 Remove a patch .rej file.
llvm-svn: 272171
2016-06-08 16:54:31 +00:00
Quentin Colombet d1cd30b218 [AArch64][RegisterBankInfo] G_OR are fine on either GPR or FPR.
Teach AArch64RegisterBankInfo that G_OR can be mapped on either GPR or
FPR for 64-bit or 32-bit values.

Add test cases demonstrating how this information is used to coalesce a
computation on a single register bank.

llvm-svn: 272170
2016-06-08 16:53:32 +00:00
Quentin Colombet ec5c93d3a0 [RegBankSelect] Use RegisterBankInfo applyMapping method.
The RegBankSelect pass can now rely on the target to do the remapping of
the instructions.

llvm-svn: 272169
2016-06-08 16:45:04 +00:00
Roman Gareev 827264de98 [NFC] "#include <ciso646>" is unnecessary, because "and", "or" were replaced
by "&&", "||".

llvm-svn: 272168
2016-06-08 16:44:11 +00:00
Vedant Kumar 17af892d6f [profile] Hide some external symbols in InstrProfData.inc
Differential Revision: http://reviews.llvm.org/D21116

llvm-svn: 272167
2016-06-08 16:39:43 +00:00