Commit Graph

254763 Commits

Author SHA1 Message Date
Etienne Bergeron 0ce53e4b9f [compiler-rt][asan|win] Fix flaky unittest due to large allocations
Summary:
Coverage is using large arrays which requires large allocations.
These allocations are flaky and often failing on win64.

We are using the 32-bits size until this gets a better fix.

Reviewers: rnk

Reviewed By: rnk

Subscribers: llvm-commits, kubamracek, chrisha, dberris

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

llvm-svn: 295086
2017-02-14 18:57:17 +00:00
Vedant Kumar 4b5315f8ac [profiling] Update test case to deal with name variable change (NFC)
The 'profn' name variables shouldn't show up after we run the instrprof
pass, see https://reviews.llvm.org/D29921 for more details.

llvm-svn: 295085
2017-02-14 18:49:03 +00:00
Vedant Kumar bb10484662 [profiling] Remove dead profile name vars after emitting name data
The profile name variables passed to counter increment intrinsics are
dead after we emit the finalized name data in __llvm_prf_nm. However, we
neglect to erase these name variables. This causes huge size increases
in the __TEXT,__const section as well as slowdowns when linker dead
stripping is disabled. Some affected projects are so massive that they
fail to link on Darwin, because only the small code model is supported.

Fix the issue by throwing away the name constants as soon as we're done
with them.

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

llvm-svn: 295084
2017-02-14 18:48:48 +00:00
Reid Kleckner 273895bbc9 Remove unnecessary std::string construction
llvm-svn: 295083
2017-02-14 18:38:40 +00:00
Reid Kleckner 2a02c2e331 Fix some warnings in intrin.h
llvm-svn: 295082
2017-02-14 18:38:19 +00:00
Aditya Nandakumar bb0483bc8e [Tablegen] Instrumenting table gen DAGGenISelDAG
To help assist in debugging ISEL or to prioritize GlobalISel backend
work, this patch adds two more tables to <Target>GenISelDAGISel.inc -
one which contains the patterns that are used during selection and the
other containing include source location of the patterns
Enabled through CMake varialbe LLVM_ENABLE_DAGISEL_COV

llvm-svn: 295081
2017-02-14 18:32:41 +00:00
Adam Nemet 4f6decadc5 [opt-viewer] For single-process, fall back on map instead of Pool.map
This allows for nicer backtrace and debugging when -j1 is passed:

  $ opt-viewer.py CMakeFiles/LLVMScalarOpts.dir/LoopVersioningLICM.cpp.opt.yaml html
  Traceback (most recent call last):
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 405, in <module>
      generate_report(pmap, all_remarks, file_remarks, args.source_dir, args.output_dir)
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 362, in generate_report
      pmap(_render_file_bound, file_remarks.items())
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 251, in map
      return self.map_async(func, iterable, chunksize).get()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
      raise self._value
  Exception: blah

  $ opt-viewer.py -j 1 CMakeFiles/LLVMScalarOpts.dir/LoopVersioningLICM.cpp.opt.yaml html
  Traceback (most recent call last):
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 405, in <module>
      generate_report(pmap, all_remarks, file_remarks, args.source_dir, args.output_dir)
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 362, in generate_report
      pmap(_render_file_bound, file_remarks.items())
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 317, in _render_file
      SourceFileRenderer(source_dir, output_dir, filename).render(remarks)
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 168, in __init__
      raise Exception("blah")
  Exception: blah

llvm-svn: 295080
2017-02-14 18:18:58 +00:00
Krzysztof Parzyszek d3b5641586 [Hexagon] Remove leftover debugging code
llvm-svn: 295078
2017-02-14 17:37:44 +00:00
Rui Ueyama f9a45628a3 Remove stray semicolon.
llvm-svn: 295077
2017-02-14 17:36:23 +00:00
Taewook Oh f22fa72e4a Do not apply redundant LastCallToStaticBonus
Summary:
As written in the comments above, LastCallToStaticBonus is already applied to
the cost if Caller has only one user, so it is redundant to reapply the bonus
here.

If the only user is not a caller, TotalSecondaryCost will not be adjusted
anyway because callerWillBeRemoved is false. If there's no caller at all, we
don't need to care about TotalSecondaryCost because
inliningPreventsSomeOuterInline is false.

Reviewers: chandlerc, eraman

Reviewed By: eraman

Subscribers: haicheng, davidxl, davide, llvm-commits, mehdi_amini

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

llvm-svn: 295075
2017-02-14 17:30:05 +00:00
Adam Nemet 4c98023724 [LazyBFI] Fix typos
llvm-svn: 295073
2017-02-14 17:21:12 +00:00
Adam Nemet bbb141c734 Add new pass LazyMachineBlockFrequencyInfo
And use it in MachineOptimizationRemarkEmitter.  A test will follow on top of
Justin's changes to enable MachineORE in AsmPrinter.

The approach is similar to the IR-level pass.  It's a bit simpler because BPI
is immutable at the Machine level so we don't need to make that lazy.

Because of this, a new function mapping is introduced (BPIPassTrait::getBPI).
This function extracts BPI from the pass.  In case of the lazy pass, this is
when the calculation of the BFI occurs.  For Machine-level, this is the
identity function.

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

llvm-svn: 295072
2017-02-14 17:21:09 +00:00
Adam Nemet 24984e1238 [LazyBFI] Split out and templatize LazyBlockFrequencyInfo, NFC
This will be used by the LazyMachineBFI pass.

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

llvm-svn: 295071
2017-02-14 17:21:04 +00:00
Sanjay Patel a109dd1398 fix documentation comments for Argument; NFC
llvm-svn: 295068
2017-02-14 16:43:49 +00:00
George Rimar ee6f22ce0b [ELF] - Do not segfault when using -r and section groups.
If we had SHT_GROUP sections, then when -r was used we might crash.
This is PR31952.

Issue happened because we emited relocation section though its target was discared
because was a member of duplicated group. When we tried to get VA of target,
segfault happened.
Core cause is the bug that GNU as 2.27 (and probably later versions) has.
In compare with llvm-mc, it does not include relocation sections into the group, 
like shown in testcase. This patch covers that case.

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

llvm-svn: 295067
2017-02-14 16:42:38 +00:00
Brian Cain 6dedf65cc9 Correct a typo, s/hosting/hoisting/
llvm-svn: 295066
2017-02-14 16:41:10 +00:00
Diego Novillo 8adfc8ef3a Remove unused variable.
llvm-svn: 295065
2017-02-14 16:39:54 +00:00
Pavel Labath 41ec64999d [Support] Add formatv support for StringLiteral
Summary:
This is achieved by generalizing the expression selecting the StringRef
format_provider. Now, anything that can be converted to a StringRef will
use it's formatter.

Reviewers: zturner

Subscribers: llvm-commits

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

llvm-svn: 295064
2017-02-14 16:35:56 +00:00
Matthew Simpson f09d13e5cc Reapply "[LV] Extend trunc optimization to all IVs with constant integer steps"
This reapplies commit r294967 with a fix for the execution time regressions
caught by the clang-cmake-aarch64-quick bot. We now extend the truncate
optimization to non-primary induction variables only if the truncate isn't
already free.

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

llvm-svn: 295063
2017-02-14 16:28:32 +00:00
Rafael Espindola 17ba44519b Sign extend remaining implicit addends for consistency.
llvm-svn: 295062
2017-02-14 16:24:42 +00:00
Simon Pilgrim 6f732e026d [X86][SSE] Allow matchVectorShuffleWithUNPCK to recognise UNDEF inputs
Add support for specifying an UNPCK input as UNDEF

llvm-svn: 295061
2017-02-14 16:22:04 +00:00
Igor Laevsky c11c1ed909 [SCEV] Cache results during GetMinTrailingZeros query
Differential Revision: https://reviews.llvm.org/D29759

llvm-svn: 295060
2017-02-14 15:53:12 +00:00
Simon Pilgrim 5b281d9a5c [X86][SSE] Add shuffle combine tests showing missed opportunities to use UNPCK
Not correctly using UNDEF or ZERO inputs to combine to UNPCK shuffles

llvm-svn: 295059
2017-02-14 15:49:37 +00:00
Simon Pilgrim 8351cf1b6e [X86][SSE] Regenerate intrinsic upgrade tests
Remove excess semicolons

llvm-svn: 295058
2017-02-14 15:29:50 +00:00
Etienne Bergeron 60ce0f667c [compiler-rt][asan|win] Force tls_init test to use dynamic runtime
Summary:
There is no guarantee that the tls_init is executed on the static runtime
(/MT).

On windows 7, this unittest is failing.
On windows 10, I believe it's working because of the new CRT.

On ASAN side, it doesn't matter that the hook point is run or not.
It must be run only if there is other tls_initializer that are registered.

Reviewers: rnk, chrisha

Reviewed By: rnk

Subscribers: kubamracek, llvm-commits

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

llvm-svn: 295057
2017-02-14 15:21:53 +00:00
Alexey Bataev 2a2f35d59c [SLP] Fix for PR31879: vectorize repeated scalar ops that don't get put
back into a vector

Previously the cost of the existing ExtractElement/ExtractValue
instructions was considered as a dead cost only if it was detected that
they have only one use. But these instructions may be considered
dead also if users of the instructions are also going to be vectorized,
like:
```
%x0 = extractelement <2 x float> %x, i32 0
%x1 = extractelement <2 x float> %x, i32 1
%x0x0 = fmul float %x0, %x0
%x1x1 = fmul float %x1, %x1
%add = fadd float %x0x0, %x1x1
```
This can be transformed to
```
%1 = fmul <2 x float> %x, %x
%2 = extractelement <2 x float> %1, i32 0
%3 = extractelement <2 x float> %1, i32 1
%add = fadd float %2, %3
```
because though `%x0` and `%x1` have 2 users each other, these users are
part of the vectorized tree and we can consider these `extractelement`
instructions as dead.

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

llvm-svn: 295056
2017-02-14 15:20:48 +00:00
Artyom Skrobov dc66a82dc7 Removing a redundant assignment
llvm-svn: 295055
2017-02-14 14:44:01 +00:00
Alexander Timofeev 9f61feac4a Revert "[AMDGPU] Fix for SIMachineScheduler crash. SI Scheduler should track"
This reverts commit ce06d9cb99298eb844b66e117f5108a06747c907.

llvm-svn: 295054
2017-02-14 14:29:05 +00:00
Simon Pilgrim a0878dea9e [X86][SSE] Move unary inputs handling inside matchVectorShuffleWithUNPCK.
llvm-svn: 295053
2017-02-14 13:47:17 +00:00
George Rimar bdce4ad21d [ELF] - Do sign extend for addends of R_386_8, R_386_16 relocations
Patch makes addends for addends of R_386_8, R_386_16 relocations
be sign extended.

The same we did earlier for PC ones,
currenly LLD fails to link linux kernel, 
reporting relocation out of range because of this.

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

llvm-svn: 295052
2017-02-14 13:22:03 +00:00
Simon Pilgrim 3efdffcb27 [X86][SSE] Tidyup matchVectorShuffleWithUNPCK helper function call.
Don't bother setting the V1/V2 operands again for unary shuffles.

Don't bother legalizing the value type unless the match succeeds.

llvm-svn: 295051
2017-02-14 12:54:39 +00:00
Alexey Bataev 4ed47342ff [SLP] Additional tests for extractelement cost fix.
llvm-svn: 295050
2017-02-14 12:52:05 +00:00
Benjamin Kramer d1013b44e3 [clang-tidy] Add support for NOLINTNEXTLINE.
Reviewers: alexfh

Subscribers: JDevlieghere, cfe-commits

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

llvm-svn: 295049
2017-02-14 12:47:56 +00:00
Haojian Wu be2588fa7f [clang-tidy] Improve diagnostic message for misc-definitions-in-header.
Summary:
Users might get confused easily when they see the check's message on
full template function speciliations.

Add a note to the output message, which mentions these kind of function
specializations are treated as regular functions.

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: JDevlieghere, cfe-commits

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

llvm-svn: 295048
2017-02-14 12:39:22 +00:00
Pavel Labath 810b34ab8c XFAIL TestNameLookup for GCC
I think I have a fix for this, but it needs review. This should keep the
bots happy until then.

llvm-svn: 295047
2017-02-14 12:06:54 +00:00
Simon Pilgrim 75dda50ebe [X86][SSE] Test case showing missed PSHUFB target shuffle constant fold opportunity.
It also shows an unnecessary pshufb/broadcast being used - the original pshufb mask only requested the lowest byte.

llvm-svn: 295046
2017-02-14 11:20:11 +00:00
Laszlo Nagy 258ff25bbc [scan-build-py] move function report_directory from report module to analyze module
Differential Revision: https://reviews.llvm.org/D29255

llvm-svn: 295045
2017-02-14 10:43:38 +00:00
Krasimir Georgiev 93a8e9df44 [clang-format] Remove dead code in FormatTestComments, NFC
llvm-svn: 295044
2017-02-14 10:35:42 +00:00
Laszlo Nagy 52c1d7eb11 [scan-build-py] use subprocess wrapper to execute build
llvm-svn: 295043
2017-02-14 10:30:50 +00:00
Karl-Johan Karlsson ec21b769ec Revert "[LoopVectorize] Added address space check when analysing interleaved accesses"
This reverts r295038. The buildbot clang-with-thin-lto-ubuntu failed.
I'm reverting to investigate.

llvm-svn: 295042
2017-02-14 10:06:16 +00:00
Gabor Horvath e647bd59f6 [clang-tidy] Add readability-misleading-indentation check.
Differential Revision: https://reviews.llvm.org/D19586

llvm-svn: 295041
2017-02-14 10:03:27 +00:00
Simon Atanasyan 7a2a1ff37f [ELF][MIPS] Use `InputSectionBase::getOutputSection()` to access output sections from the `MipsGotSection`
Follow-up to r294005. This patch restores handling of MISP GOT
relocations against merge sections.

llvm-svn: 295040
2017-02-14 09:56:16 +00:00
Karl-Johan Karlsson 2ec409cca2 [LoopVectorize] Added address space check when analysing interleaved accesses
Prevent memory objects of different address spaces to be part of
the same load/store groups when analysing interleaved accesses.

This is fixing pr31900.

Reviewers: HaoLiu, mssimpso, mkuper

Reviewed By: mssimpso, mkuper

Subscribers: llvm-commits, efriedma, mzolotukhin

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

llvm-svn: 295038
2017-02-14 08:14:06 +00:00
Karl-Johan Karlsson 38cbf5869d Test commit permission
Removing whitespace.

llvm-svn: 295037
2017-02-14 07:31:36 +00:00
Daniel Jasper 29b46f74f7 Add initializer that was missed in r295009.
llvm-svn: 295036
2017-02-14 07:10:03 +00:00
Craig Topper d2d50cba2a [AVX-512] Add PAVGB/PAVGW to load folding tables.
llvm-svn: 295035
2017-02-14 06:54:57 +00:00
Akira Hatanaka f1b3fc7356 [CodeGen][ObjC] Use the type of the captured field of the enclosing
block or lambda.

This is a follow-up to r281682, which fixed a bug in computeBlockInfo
where the captured VarDecl's type, rather than the captured field type
of the enclosing lambda or block, was used to compute the layout of a
block.

This commit makes similar changes to enterBlockScope. This is necessary
to correctly determine whether a block capture requires cleanup.

rdar://problem/30388124

llvm-svn: 295034
2017-02-14 06:46:55 +00:00
Mikael Holmen ece84cd10c [LSR] Pointers with different address spaces are considered incompatible.
Summary:
Function isCompatibleIVType is already used as a guard before the call to

 SE.getMinusSCEV(OperExpr, PrevExpr);

in LSRInstance::ChainInstruction. getMinusSCEV requires the expressions
to be of the same type, so we now consider two pointers with different
address spaces to be incompatible, since it is possible that the pointers
in fact have different sizes.

Reviewers: qcolombet, eli.friedman

Reviewed By: qcolombet

Subscribers: nhaehnle, Ka-Ka, llvm-commits, mzolotukhin

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

llvm-svn: 295033
2017-02-14 06:37:42 +00:00
George Burgess IV 758cf9da37 Delete useless / in comment. NFC.
llvm-svn: 295032
2017-02-14 05:52:57 +00:00
Rui Ueyama 104e2357de Do not store a computable attributes to Config.
llvm-svn: 295031
2017-02-14 05:45:47 +00:00