Commit Graph

238923 Commits

Author SHA1 Message Date
Enrico Granata 85449e8517 Remove CFData from the xcodeproj as well
llvm-svn: 278158
2016-08-09 20:32:42 +00:00
Tim Shen 75c1656afb [ADT] Change iterator_adaptor_base's default template arguments to forward more underlying typedefs
Reviewers: chandlerc

Subscribers: llvm-commits

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

llvm-svn: 278157
2016-08-09 20:23:13 +00:00
Tim Shen 0c74967186 [ADT] Change iterator_adaptor_base's default template arguments to forward more underlying typedefs
Summary:
The corresponding LLVM change: D23217.

LazyVector::iterator breaks, because int isn't an iterator type.
Since iterator_adaptor_base shouldn't be blamed to break at the call to
iterator_traits<int>::xxx, I'd rather "fix" LazyVector::iterator.

The perfect solution is to model "relative pointer", but it's beyond the goal of this patch.

Reviewers: chandlerc, bkramer

Subscribers: cfe-commits

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

llvm-svn: 278156
2016-08-09 20:22:55 +00:00
Yaxun Liu ffb60901fe [OpenCL] Handle -cl-fp32-correctly-rounded-divide-sqrt
Let the driver pass the option to frontend. Do not set precision metadata for division instructions when this option is set. Set function attribute "correctly-rounded-divide-sqrt-fp-math" based on this option.

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

llvm-svn: 278155
2016-08-09 20:10:18 +00:00
Sanjay Patel b61346b8b0 regenerate checks and remove 'opt' run dependency
llvm-svn: 278154
2016-08-09 20:09:16 +00:00
Anna Thomas b2d12b81c3 [EarlyCSE] Teach about CSE'ing over invariant.start intrinsics
Summary:
Teach EarlyCSE about invariant.start intrinsic. Specifically, we can perform
store-load, load-load forwarding over this call.

Reviewers: majnemer, reames, dberlin, sanjoy

Subscribers: llvm-commits

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

llvm-svn: 278153
2016-08-09 20:00:47 +00:00
Ying Yi 6b1f5f891f [llvm-cov] Swapped the line and count columns.
In the coverage report, the line and count columns have been swapped to make it more readable.
A follow-up commit in compiler-rt is needed

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

llvm-svn: 278152
2016-08-09 19:53:35 +00:00
Yaxun Liu 2c17e82bc7 [OpenCL][AMDGPU] Add support for -cl-denorms-are-zero
Adjust target features for amdgcn target when -cl-denorms-are-zero is set.

Denormal support is controlled by feature strings fp32-denormals fp64-denormals in amdgcn target. If -cl-denorms-are-zero is not set and the command line does not set fp32/64-denormals feature string, +fp32-denormals +fp64-denormals will be on for GPU's supporting them.

A new virtual function virtual void TargetInfo::adjustTargetOptions(const CodeGenOptions &CGOpts, TargetOptions &TargetOpts) const is introduced to allow adjusting target option by codegen option.

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

llvm-svn: 278151
2016-08-09 19:43:38 +00:00
Sanjay Patel a814d89b61 update to use FileCheck and auto-generate checks
llvm-svn: 278150
2016-08-09 19:42:52 +00:00
Lang Hames bb9431acda Re-apply r278065 (Weak symbol support in RuntimeDyld) with a fix for ELF.
llvm-svn: 278149
2016-08-09 19:27:17 +00:00
Benjamin Kramer a203c41dd9 Add a missing -no-canonical-prefixes.
llvm-svn: 278148
2016-08-09 19:20:25 +00:00
Eric Fiselier f6e09e537b Update in-tree Google Benchmark to current ToT.
I've put some work into the Google Benchmark library in order to make it easier
to benchmark libc++. These changes have already been upstreamed into
Google Benchmark and this patch applies the changes to the in-tree version.

The main improvement in the addition of a 'compare_bench.py' script which
makes it very easy to compare benchmarks. For example to compare the native
STL to libc++ you would run:

`$ compare_bench.py ./util_smartptr.native.out ./util_smartptr.libcxx.out`

And the output would look like:

RUNNING: ./util_smartptr.native.out
Benchmark                          Time           CPU Iterations
----------------------------------------------------------------
BM_SharedPtrCreateDestroy         62 ns         62 ns   10937500
BM_SharedPtrIncDecRef             31 ns         31 ns   23972603
BM_WeakPtrIncDecRef               28 ns         28 ns   23648649
RUNNING: ./util_smartptr.libcxx.out
Benchmark                          Time           CPU Iterations
----------------------------------------------------------------
BM_SharedPtrCreateDestroy         46 ns         46 ns   14957265
BM_SharedPtrIncDecRef             31 ns         31 ns   22435897
BM_WeakPtrIncDecRef               34 ns         34 ns   21084337
Comparing ./util_smartptr.native.out to ./util_smartptr.libcxx.out
Benchmark                          Time           CPU
-----------------------------------------------------
BM_SharedPtrCreateDestroy         -0.26         -0.26
BM_SharedPtrIncDecRef             +0.00         +0.00
BM_WeakPtrIncDecRef               +0.21         +0.21

llvm-svn: 278147
2016-08-09 18:56:48 +00:00
David Majnemer 982ab5dbd8 [vim] Update the llvm.vim syntax file
We never updated this file to contain the WinEH instructions.
Also, add the dereferenceable attribute.

llvm-svn: 278146
2016-08-09 18:34:19 +00:00
Miklos Vajna 3d71b51bc5 clang-rename rename-all: support reading old/newname pairs from a YAML file
This is handy in case by the time clang-rename is invoked, an external
tool already genereated a list of oldname -> newname pairs to handle.

Reviewers: omtcyfz

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

llvm-svn: 278145
2016-08-09 18:20:41 +00:00
David Majnemer adc688ce9c [X86] Don't model UD2/UD2B as a terminator
A UD2 might make its way into the program via a call to @llvm.trap.
Obviously, calls are not terminators.  However, we modeled the X86
instruction, UD2, as a terminator.  Later on, this confuses the epilogue
insertion machinery which results in the epilogue getting inserted
before the UD2.  For some platforms, like x64, the result is a
violation of the ABI.

Instead, model UD2/UD2B as a side effecting instruction which may
observe memory.

llvm-svn: 278144
2016-08-09 17:55:12 +00:00
Mandeep Singh Grang 8c5314479e Fix spacing around variable initializations and for-loops. NFC.
Reviewers: grosser, _jdoerfert, zinob

Projects: #polly

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

llvm-svn: 278143
2016-08-09 17:49:24 +00:00
Vedant Kumar 08b1dce670 [debugserver] Delete CFData.{h,cpp}, since they appear to be dead (NFCI)
Differential Revision: https://reviews.llvm.org/D23070

llvm-svn: 278142
2016-08-09 17:42:11 +00:00
Simon Pilgrim 76964e3140 [DAGCombiner] Better support for shifting large value type by constants
As detailed on D22726, much of the shift combining code assume constant values will fit into a uint64_t value and calls ConstantSDNode::getZExtValue where it probably shouldn't (leading to asserts). Using APInt directly avoids this problem but we encounter other assertions if we attempt to compare/operate on 2 APInt of different bitwidths.

This patch adds a helper function to ensure that 2 APInt values are zero extended as required so that they can be safely used together. I've only added an initial example use for this to the '(SHIFT (SHIFT x, c1), c2) --> (SHIFT x, (ADD c1, c2))' combines. Further cases can easily be added as required.

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

llvm-svn: 278141
2016-08-09 17:39:11 +00:00
Samuel Antao 3be88013c6 [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.
Summary: Add test to detect the C++ include paths are passed to both CUDA host and device frontends.

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 278140
2016-08-09 17:27:24 +00:00
Reid Kleckner bab5a5d704 [clang-cl] Make -gline-tables-only imply -gcodeview
It's surprising that you have to pass /Z7 in addition to -gcodeview to
get debug info. The sanitizer runtime, for example, expects that if the
compiler supports the -gline-tables-only flag, then it will emit debug
info.

llvm-svn: 278139
2016-08-09 17:23:56 +00:00
Anna Thomas 037e540f08 [AliasAnalysis] Treat invariant.start as read-memory
Summary:
We teach alias analysis that invariant.start is readonly.
This helps with GVN and memcopy optimizations that currently treat.
invariant.start as a clobber.
We need to treat this as readonly, so that DSE does not incorrectly
remove stores prior to the invariant.start

Reviewers: sanjoy, reames, majnemer, dberlin

Subscribers: llvm-commits

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

llvm-svn: 278138
2016-08-09 17:18:05 +00:00
Sanjay Patel 4ee824a88d auto-generate checks
llvm-svn: 278137
2016-08-09 17:03:51 +00:00
Sanjay Patel 25af7444df auto-generate checks
llvm-svn: 278136
2016-08-09 17:02:17 +00:00
Sanjay Patel 52958dc111 auto-generate checks
llvm-svn: 278135
2016-08-09 16:59:54 +00:00
Hans Wennborg 9012baa769 test-release.sh: Drop autoconf support
The autoconf build was deleted some time ago.

llvm-svn: 278133
2016-08-09 16:46:02 +00:00
Sanjay Patel 9f36a2d54b add tests for missing vector icmp folds
llvm-svn: 278132
2016-08-09 16:39:05 +00:00
Sanjay Patel f36a29199f update to use FileCheck and auto-generate checks
llvm-svn: 278131
2016-08-09 16:19:57 +00:00
Sanjay Patel a6090256d5 regenerate checks
llvm-svn: 278130
2016-08-09 16:17:46 +00:00
Sanjay Patel e466865f67 add tests for missing vector icmp folds
llvm-svn: 278129
2016-08-09 16:05:57 +00:00
Xinliang David Li 9035cfceef [Profile] turn off verbose warnings by default
no prof data for func warning is turned off by default
due to its high verbosity and minimal usefulness.

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

llvm-svn: 278127
2016-08-09 15:35:28 +00:00
Tobias Grosser b06ff4574e [GPGPU] Support PHI nodes used in GPU kernel
Ensure the right scalar allocations are used as the host location of data
transfers. For the device code, we clear the allocation cache before device
code generation to be able to generate new device-specific allocation and
we need to make sure to add back the old host allocations as soon as the
device code generation is finished.

llvm-svn: 278126
2016-08-09 15:35:06 +00:00
Tobias Grosser 750160e260 [GPGPU] Use separate basic block for GPU initialization code
This increases the readability of the IR and also clarifies that the GPU
inititialization is executed _after_ the scalar initialization which needs
to before the code of the transformed scop is executed.

Besides increased readability, the IR should not change. Specifically, I
do not expect any changes in program semantics due to this patch.

llvm-svn: 278125
2016-08-09 15:35:03 +00:00
Tobias Grosser 776700d0b7 [BlockGenerator] Insert initializations at beginning of start block
In case some code -- not guarded by control flow -- would be emitted directly in
the start block, it may happen that this code would use uninitalized scalar
values if the scalar initialization is only emitted at the end of the start
block. This is not a problem today in normal Polly, as all statements are
emitted in their own basic blocks, but Polly-ACC emits host-to-device copy
statements into the start block.

Additional Polly-ACC test coverage will be added in subsequent changes that
improve the handling of PHI nodes in Polly-ACC.

llvm-svn: 278124
2016-08-09 15:34:59 +00:00
Martin Bohme 8cef2c2f2d [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()
Summary: Required for D22220

Reviewers: sbenza, klimek, aaron.ballman, alexfh

Subscribers: alexfh, klimek, cfe-commits

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

llvm-svn: 278123
2016-08-09 15:07:52 +00:00
Artur Pilipenko c710a461b5 [LVI] Make LVI smarter about comparisons with non-constants
Make LVI smarter about comparisons with a non-constant. For example, a s< b constraints a to be in [INT_MIN, INT_MAX) range. This is a part of https://llvm.org/bugs/show_bug.cgi?id=28620 fix.

Reviewed By: sanjoy

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

llvm-svn: 278122
2016-08-09 14:50:08 +00:00
Sylvestre Ledru 83bbd5731b clang-format: Add SpaceAfterTemplate
Summary:
This is required for compliance with the Mozilla style guide.

This is a rebase+minor change of Birunthan Mohanathas's patch


Reviewers: djasper

Subscribers: klimek, cfe-commits, opilarium

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

llvm-svn: 278121
2016-08-09 14:24:40 +00:00
Simon Pilgrim 27740d038c [X86][XOP] Add support for combining target shuffles to VPERMIL2PD/VPERMIL2PS
llvm-svn: 278120
2016-08-09 12:56:15 +00:00
Kuba Brecka 65966c8bde Add `#ifdef __cplusplus` around `extern "C"` in Compiler.h. NFC.
llvm-svn: 278119
2016-08-09 12:12:15 +00:00
Pavel Labath 8c1b6bd7d2 Reapply "Rewrite gdb-remote's SendContinuePacketAndWaitForResponse"
Resumbitting the commit after fixing the following problems:
- broken unit tests on windows: incorrect gtest usage on my part (TEST vs. TEST_F)
- the new code did not correctly handle the case where we went to interrupt the process, but it
  stopped due to a different reason - the interrupt request would remain queued and would
  interfere with the following "continue". I also added a unit test for this case.

This reapplies r277156 and r277139.

llvm-svn: 278118
2016-08-09 12:04:46 +00:00
Elena Demikhovsky 0e0e07f436 AVX-512: A new test for FMA intrinsic
A new test that explores sub-optimal sequence of FMA intrinsic and FNEG operation.
An upcoming patch will fix it.

llvm-svn: 278117
2016-08-09 11:54:14 +00:00
Daniel Sanders dc213305e9 [sanitizers] Make it possible to XFAIL on the effective target, not just the default.
Summary:
The triple is not the right thing to XFAIL on since LIT only sees the default
triple and not the effective triple chosen by any -target option in the RUN
directives. This discrepancy is shown in the table below:

  Default Triple   | Options                           | XFAIL  | LIT's expected result | Desired expectation
  =================+===================================+========+=======================+====================
  mips-linux-gnu   | -target mips-linux-gnu            |        | Pass                  | Pass  
  mips-linux-gnu   | -target mips64-linux-gnu -mabi=64 |        | Pass                  | Pass  
  mips-linux-gnu   | -target mips-linux-gnu            | mips   | Fail                  | Fail  
  mips-linux-gnu   | -target mips64-linux-gnu -mabi=64 | mips   | Fail                  | Fail/Pass* (debatable**)
  mips-linux-gnu   | -target mips-linux-gnu            | mips-  | Fail                  | Fail  
  mips-linux-gnu   | -target mips64-linux-gnu -mabi=64 | mips-  | Fail                  | Pass* 
  mips-linux-gnu   | -target mips-linux-gnu            | mips64 | Pass                  | Pass  
  mips-linux-gnu   | -target mips64-linux-gnu -mabi=64 | mips64 | Pass                  | Fail* 
  mips64-linux-gnu | -target mips-linux-gnu            |        | Pass                  | Pass  
  mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 |        | Pass                  | Pass  
  mips64-linux-gnu | -target mips-linux-gnu            | mips   | Fail                  | Fail* 
  mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips   | Fail                  | Fail/Pass (debatable**)
  mips64-linux-gnu | -target mips-linux-gnu            | mips-  | Pass                  | Fail* 
  mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips-  | Pass                  | Pass  
  mips64-linux-gnu | -target mips-linux-gnu            | mips64 | Fail                  | Pass* 
  mips64-linux-gnu | -target mips64-linux-gnu -mabi=64 | mips64 | Fail                  | Fail  
  x64_64-linux-gnu | -target i386-linux-gnu            |        | Pass                  | Pass
  x64_64-linux-gnu | -target x86_64-linux-gnu          |        | Pass                  | Pass
  x64_64-linux-gnu | -target i386-linux-gnu            | i386   | Pass                  | Fail*
  x64_64-linux-gnu | -target x86_64-linux-gnu          | i386   | Pass                  | Pass
  x64_64-linux-gnu | -target i386-linux-gnu            | x86_64 | Fail                  | Pass
  x64_64-linux-gnu | -target x86_64-linux-gnu          | x86_64 | Fail                  | Fail*
  * These all differ from LIT's current behaviour.
  ** People's expectations vary depending on whether they know that LIT does a
   substring match on the default triple or think it's an exact match on an
   architecture.

This patch adds "target-is-${target_arch}" to the available features list and
updates the mips XFAIL's to use them. XFAIL'ing on these features will
correctly account for the target being tested. Making the table:

  Options                           | XFAIL            | LIT's expected result
  ==================================+==================+======================
  -target mips-linux-gnu            |                  | Pass
  -target mips64-linux-gnu -mabi=64 |                  | Pass
  -target mips-linux-gnu            | target-is-mips   | Fail
  -target mips64-linux-gnu -mabi=64 | target-is-mips   | Pass
  -target mips-linux-gnu            | target-is-mips64 | Pass
  -target mips64-linux-gnu -mabi=64 | target-is-mips64 | Fail
  -target i386-linux-gnu            |                  | Pass
  -target x86_64-linux-gnu          |                  | Pass
  -target i386-linux-gnu            | target-is-i386   | Fail
  -target x86_64-linux-gnu          | target-is-i386   | Pass
  -target i386-linux-gnu            | target-is-x86_64 | Pass
  -target x86_64-linux-gnu          | target-is-x86_64 | Fail

Reviewers: probinson

Subscribers: probinson, kubabrecka, llvm-commits, samsonov

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

llvm-svn: 278116
2016-08-09 11:50:53 +00:00
George Rimar 16a5930803 [ELF] - Removed dead code. NFC.
llvm-svn: 278115
2016-08-09 10:57:42 +00:00
Simon Pilgrim aae7d4a1b6 [X86][XOP] Add support for combining target shuffles to VPPERM
llvm-svn: 278114
2016-08-09 10:56:29 +00:00
Dean Michael Berris 3a25d84a51 [XRay] Test for xray_instr_map in object file. (NFC)
This makes a trivial change in the emission of the per-function XRay
tables, and makes sure that the xray_instr_map section does show up in
the object file.

llvm-svn: 278113
2016-08-09 10:42:11 +00:00
Kirill Bobyrev 7fa3395364 [clang-rename] cleanup: use isWritten
nit: use isWritten and const auto *Initializer in
NamedDeclFindingASTVisitor::VisitCXXConstructorDecl method.
Test plan: make -j8 check-clang-tools (passed)

Patch by Alexander Shaposhnikov!

Reviewers: omtcyfz

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

llvm-svn: 278112
2016-08-09 10:03:33 +00:00
Simon Pilgrim 6cfad71fd7 Fix Wdocumentation unknown parameter warning
llvm-svn: 278111
2016-08-09 10:02:11 +00:00
Vassil Vassilev 5721e0f37a [analyzer] Try to fix coverity CID 1360469.
Patch by Raphael Isemann!

llvm-svn: 278110
2016-08-09 10:00:23 +00:00
Artur Pilipenko d97eedff40 Revert 278107 which causes buildbot failures and in addition has wrong commit message
llvm-svn: 278109
2016-08-09 10:00:22 +00:00
Vassil Vassilev e01ffee570 [modules]Add missing include.
llvm-svn: 278108
2016-08-09 09:46:11 +00:00
Artur Pilipenko a410d81f64 Teach CorrelatedValuePropagation to mark adds as no wrap
Use LVI to prove that adds do not wrap. The change is motivated by https://llvm.org/bugs/show_bug.cgi?id=28620 bug and it's the first step to fix that problem.

Reviewed By: sanjoy

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

llvm-svn: 278107
2016-08-09 09:41:34 +00:00