platform/upstream/llvm.git
8 years ago[WebAssembly] Refine block placement to insert blocks between trees.
Dan Gohman [Sat, 30 Jan 2016 05:01:06 +0000 (05:01 +0000)]
[WebAssembly] Refine block placement to insert blocks between trees.

Refine the test for whether an instruction is in an expression tree so that
it detects when one tree ends and another begins, so we can place a block
at that point, rather than continuing to find the first instruction not in
a tree at all.

llvm-svn: 259294

8 years agoAMDGPU: Add new amdgcn workitem intrinsics
Matt Arsenault [Sat, 30 Jan 2016 04:25:19 +0000 (04:25 +0000)]
AMDGPU: Add new amdgcn workitem intrinsics

These use the correct prefix and follow the HSA naming convention
rather than the config register option names.

llvm-svn: 259293

8 years agoRemove references to *.h.in files and some autoconf hackery
Justin Bogner [Sat, 30 Jan 2016 04:15:33 +0000 (04:15 +0000)]
Remove references to *.h.in files and some autoconf hackery

Missed this stuff in r259291.

llvm-svn: 259292

8 years agoRemove *.h.in - these were only used by the autoconf build system
Justin Bogner [Sat, 30 Jan 2016 04:05:45 +0000 (04:05 +0000)]
Remove *.h.in - these were only used by the autoconf build system

llvm-svn: 259291

8 years ago[BasicAA] NFC - utility function for two's complement wrap-around
Gerolf Hoflehner [Sat, 30 Jan 2016 02:42:11 +0000 (02:42 +0000)]
[BasicAA] NFC - utility function for two's complement wrap-around

llvm-svn: 259290

8 years agotest/clang-tidy/performance-for-range-copy.cpp: Appease for targeting ms mode.
NAKAMURA Takumi [Sat, 30 Jan 2016 02:15:19 +0000 (02:15 +0000)]
test/clang-tidy/performance-for-range-copy.cpp: Appease for targeting ms mode.

llvm-svn: 259289

8 years ago[analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly...
Devin Coughlin [Sat, 30 Jan 2016 01:59:33 +0000 (01:59 +0000)]
[analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly-assume.

This is the default for the analyzer but the flag is added by the driver so
our suppression tests didn't cover this case.

llvm-svn: 259288

8 years ago[SemaCXX] Fix crash-on-invalid while trying to deduce return type of a lambda.
Argyrios Kyrtzidis [Sat, 30 Jan 2016 01:51:20 +0000 (01:51 +0000)]
[SemaCXX] Fix crash-on-invalid while trying to deduce return type of a lambda.

rdar://22032373

llvm-svn: 259287

8 years agoFurther reduce test time
Xinliang David Li [Sat, 30 Jan 2016 01:37:32 +0000 (01:37 +0000)]
Further reduce test time

llvm-svn: 259285

8 years agoAvoid overly large SmallPtrSet/SmallSet
Matthias Braun [Sat, 30 Jan 2016 01:27:06 +0000 (01:27 +0000)]
Avoid overly large SmallPtrSet/SmallSet

These sets perform linear searching in small mode so it is never a good
idea to use SmallSize/N bigger than 32.

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

llvm-svn: 259284

8 years agoAvoid overly large SmallPtrSet/SmallSet
Matthias Braun [Sat, 30 Jan 2016 01:24:31 +0000 (01:24 +0000)]
Avoid overly large SmallPtrSet/SmallSet

These sets perform linear searching in small mode so it is never a good
idea to use SmallSize/N bigger than 32.

llvm-svn: 259283

8 years agoUse Support/DataTypes.h instead of cstdint
Matthias Braun [Sat, 30 Jan 2016 01:14:01 +0000 (01:14 +0000)]
Use Support/DataTypes.h instead of cstdint

llvm-svn: 259282

8 years ago[docs] Remove references to autoconf build.
Alexey Samsonov [Sat, 30 Jan 2016 01:11:42 +0000 (01:11 +0000)]
[docs] Remove references to autoconf build.

llvm-svn: 259281

8 years ago[docs] Remove references to autotools build.
Alexey Samsonov [Sat, 30 Jan 2016 01:10:15 +0000 (01:10 +0000)]
[docs] Remove references to autotools build.

llvm-svn: 259280

8 years ago[CUDA] Die if we ask the NVPTX backend to emit a global ctor/dtor.
Justin Lebar [Sat, 30 Jan 2016 01:07:38 +0000 (01:07 +0000)]
[CUDA] Die if we ask the NVPTX backend to emit a global ctor/dtor.

Summary: Previously we'd just silently skip these.

Reviewers: tra, jholewinski

Subscribers: llvm-commits, jhen, echristo,

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

llvm-svn: 259279

8 years agoRemove references to autotools build.
Alexey Samsonov [Sat, 30 Jan 2016 00:54:42 +0000 (00:54 +0000)]
Remove references to autotools build.

llvm-svn: 259278

8 years ago[CodeView] Properly handle empty line tables
David Majnemer [Sat, 30 Jan 2016 00:36:09 +0000 (00:36 +0000)]
[CodeView] Properly handle empty line tables

Don't crash when there are no appropriate line table entries for a given
function.

llvm-svn: 259277

8 years agoMove template instantiations to end of the file.
Rui Ueyama [Fri, 29 Jan 2016 23:59:15 +0000 (23:59 +0000)]
Move template instantiations to end of the file.

llvm-svn: 259276

8 years agoThis patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_a...
Ekaterina Romanova [Fri, 29 Jan 2016 23:59:00 +0000 (23:59 +0000)]
This patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_aes.h.
The doxygen comments are automatically generated based on Sony's intrinsics document.

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

llvm-svn: 259275

8 years agoUpdate comments about the entries in .got.plt.
Rui Ueyama [Fri, 29 Jan 2016 23:58:03 +0000 (23:58 +0000)]
Update comments about the entries in .got.plt.

The original comments were a bit inaccurate because there was no 4 addends.

llvm-svn: 259274

8 years ago[profile] Support hostname expansion in LLVM_PROFILE_FILE
Vedant Kumar [Fri, 29 Jan 2016 23:52:11 +0000 (23:52 +0000)]
[profile] Support hostname expansion in LLVM_PROFILE_FILE

This patch adds support for expanding "%h" out to the machine hostname
in the LLVM_PROFILE_FILE environment variable.

Patch by Daniel Waters!

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

llvm-svn: 259272

8 years agoImprove -Wconstant-conversion
Richard Trieu [Fri, 29 Jan 2016 23:51:16 +0000 (23:51 +0000)]
Improve -Wconstant-conversion

Switch the evaluation from isIntegerConstantExpr to EvaluateAsInt.
EvaluateAsInt will evaluate more types of expressions than
isIntegerConstantExpr.

Move one case from -Wsign-conversion to -Wconstant-conversion.  The case is:
1) Source and target types are signed
2) Source type is wider than the target type
3) The source constant value is positive
4) The conversion will store the value as negative in the target.

llvm-svn: 259271

8 years ago[Objective-C] Support a new special module flag.
Manman Ren [Fri, 29 Jan 2016 23:51:00 +0000 (23:51 +0000)]
[Objective-C] Support a new special module flag.

"Objective-C Class Properties" will be put into the objc_imageinfo struct.

rdar://23891898

llvm-svn: 259270

8 years agoClass Property: generate metadata for class properties in protocols.
Manman Ren [Fri, 29 Jan 2016 23:46:55 +0000 (23:46 +0000)]
Class Property: generate metadata for class properties in protocols.

The list of class properties is saved in
Old ABI: protocol->ext->class_properties (protocol->ext->size will be updated)
New ABI: protocol->class_properties (protocol->size will be updated)

rdar://23891898

llvm-svn: 259268

8 years agoClass Property: generate metadata for class properties in categories.
Manman Ren [Fri, 29 Jan 2016 23:45:01 +0000 (23:45 +0000)]
Class Property: generate metadata for class properties in categories.

The list of class properties is saved in
Old ABI: category->class_properties (category->size will be updated as well)
New ABI: category->class_properties (a flag in objc_image_info to indicate
         whether or not the list of class properties is present)

rdar://23891898

llvm-svn: 259267

8 years ago[llvm-nm] Add a comment to explain why we initialize MC.
Davide Italiano [Fri, 29 Jan 2016 23:38:05 +0000 (23:38 +0000)]
[llvm-nm] Add a comment to explain why we initialize MC.

llvm-svn: 259266

8 years ago[libFuzzer] add -timeout_exitcode option
Kostya Serebryany [Fri, 29 Jan 2016 23:30:07 +0000 (23:30 +0000)]
[libFuzzer] add -timeout_exitcode option

llvm-svn: 259265

8 years agofunction names start with a lower case letter ; NFC
Sanjay Patel [Fri, 29 Jan 2016 23:27:03 +0000 (23:27 +0000)]
function names start with a lower case letter ; NFC

llvm-svn: 259264

8 years ago[libFuzzer] re-enable test for -abort_on_timeout=1, this time protecting from ASAN_O...
Kostya Serebryany [Fri, 29 Jan 2016 23:19:00 +0000 (23:19 +0000)]
[libFuzzer] re-enable  test for -abort_on_timeout=1, this time protecting from ASAN_OPTIONS set outside

llvm-svn: 259263

8 years agofix formatting; NFC
Sanjay Patel [Fri, 29 Jan 2016 23:14:58 +0000 (23:14 +0000)]
fix formatting; NFC

llvm-svn: 259262

8 years agoFix typo in LoopSimplifyCFG
Fiona Glaser [Fri, 29 Jan 2016 23:12:52 +0000 (23:12 +0000)]
Fix typo in LoopSimplifyCFG

llvm-svn: 259261

8 years ago[UBSan] Add documentation for runtime issue suppression.
Alexey Samsonov [Fri, 29 Jan 2016 23:07:14 +0000 (23:07 +0000)]
[UBSan] Add documentation for runtime issue suppression.

llvm-svn: 259260

8 years agoAdd comments on a mysterious value in MIPS GOT[1].
Rui Ueyama [Fri, 29 Jan 2016 22:55:38 +0000 (22:55 +0000)]
Add comments on a mysterious value in MIPS GOT[1].

Thanks to Simon Atanasyan and Igor Kudrin for describing the code!

llvm-svn: 259259

8 years ago[Profiling] Add a -sparse mode to llvm-profdata merge
Vedant Kumar [Fri, 29 Jan 2016 22:54:45 +0000 (22:54 +0000)]
[Profiling] Add a -sparse mode to llvm-profdata merge

Add an option to llvm-profdata merge for writing out sparse indexed
profiles. These profiles omit InstrProfRecords for functions which are
never executed.

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

llvm-svn: 259258

8 years agoFix the MSVC build by moving static asserts into constructors
Reid Kleckner [Fri, 29 Jan 2016 22:40:22 +0000 (22:40 +0000)]
Fix the MSVC build by moving static asserts into constructors

Apparently MSVC won't allow you to ask for the sizeof() a data member at
class scope.

llvm-svn: 259257

8 years agoAdd LoopSimplifyCFG pass
Fiona Glaser [Fri, 29 Jan 2016 22:35:36 +0000 (22:35 +0000)]
Add LoopSimplifyCFG pass

Loop transformations can sometimes fail because the loop, while in
valid rotated LCSSA form, is not in a canonical CFG form. This is
an extremely simple pass that just merges obviously redundant
blocks, which can be used to fix some known failure cases. In the
future, it may be enhanced with more cases (and have code shared with
SimplifyCFG).

This allows us to run LoopSimplifyCFG -> LoopRotate -> LoopUnroll,
so that SimplifyCFG cleans up the loop before Rotate tries to run.

Not currently used in the pass manager, since this pass doesn't do
anything unless you can hook it up in an LPM with other loop passes.
It'll be added once Chandler cleans up things to allow this.

Tested in a custom pipeline out of tree to confirm it works in
practice (in addition to the included trivial test).

llvm-svn: 259256

8 years agoNeed #include <cstdint> for uint64_t
Matthias Braun [Fri, 29 Jan 2016 22:35:29 +0000 (22:35 +0000)]
Need #include <cstdint> for uint64_t

llvm-svn: 259255

8 years agoNeed #include <climit> for CHAR_BIT
Matthias Braun [Fri, 29 Jan 2016 22:30:30 +0000 (22:30 +0000)]
Need #include <climit> for CHAR_BIT

llvm-svn: 259254

8 years agoImprove test speed/trial 2
Xinliang David Li [Fri, 29 Jan 2016 22:29:15 +0000 (22:29 +0000)]
Improve test speed/trial 2

llvm-svn: 259253

8 years agoAttributeSetImpl: Summarize existing function attributes in a bitset.
Matthias Braun [Fri, 29 Jan 2016 22:25:19 +0000 (22:25 +0000)]
AttributeSetImpl: Summarize existing function attributes in a bitset.

The majority of attribute queries checks for the existence of an enum
attribute in the FunctionIndex slot. We only have 48 of those and can
therefore summarize them in an uint64_t bitset which measurably improves
compile time.

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

llvm-svn: 259252

8 years agoAttributeSetNode: Summarize existing attributes in a bitset.
Matthias Braun [Fri, 29 Jan 2016 22:25:13 +0000 (22:25 +0000)]
AttributeSetNode: Summarize existing attributes in a bitset.

The majority of queries just checks for the existince of an enum
attribute.  We only have 48 of those and can summaryiz them in an
uint64_t bitfield so we can avoid searching the list. This improves
"opt" compile time by 1-4% in my measurements.

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

llvm-svn: 259251

8 years agoConsistenly use sizeof(uintX_t) instead of ELFT::Is64Bits ? 8 : 4.
Rui Ueyama [Fri, 29 Jan 2016 22:18:57 +0000 (22:18 +0000)]
Consistenly use sizeof(uintX_t) instead of ELFT::Is64Bits ? 8 : 4.

llvm-svn: 259250

8 years agoAdd comments.
Rui Ueyama [Fri, 29 Jan 2016 22:18:55 +0000 (22:18 +0000)]
Add comments.

llvm-svn: 259249

8 years agoRevert 259242, 259243 -- irrelvante changes pulled in
Xinliang David Li [Fri, 29 Jan 2016 21:26:31 +0000 (21:26 +0000)]
Revert 259242, 259243 -- irrelvante changes pulled in

llvm-svn: 259244

8 years agoUse range for loop
Xinliang David Li [Fri, 29 Jan 2016 21:23:47 +0000 (21:23 +0000)]
Use range for loop

llvm-svn: 259243

8 years agoImprove test speed (interchange loop, reducing padding)
Xinliang David Li [Fri, 29 Jan 2016 21:13:55 +0000 (21:13 +0000)]
Improve test speed (interchange loop, reducing padding)

llvm-svn: 259242

8 years agoAnnotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post...
Yaron Keren [Fri, 29 Jan 2016 20:50:44 +0000 (20:50 +0000)]
Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.
clang part in r259232, this is the LLVM part of the patch.

llvm-svn: 259240

8 years agoThis patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_p...
Ekaterina Romanova [Fri, 29 Jan 2016 20:37:14 +0000 (20:37 +0000)]
This patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_pclmul.h. The doxygen comments are automatically generated based on Sony's intrinsics document.

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

llvm-svn: 259239

8 years agoReplace code duplications with function calls.
Rui Ueyama [Fri, 29 Jan 2016 20:31:05 +0000 (20:31 +0000)]
Replace code duplications with function calls.

llvm-svn: 259238

8 years agoFixed a couple of places where we were getting the module from a
Jim Ingham [Fri, 29 Jan 2016 20:21:33 +0000 (20:21 +0000)]
Fixed a couple of places where we were getting the module from a
section and using it w/o checking that it was valid.  This can
cause crashes - usually when tearing down a target.

llvm-svn: 259237

8 years ago[InstCombine] avoid an insertelement transformation that induces the opposite extract...
Sanjay Patel [Fri, 29 Jan 2016 20:21:02 +0000 (20:21 +0000)]
[InstCombine] avoid an insertelement transformation that induces the opposite extractelement fold (PR26354)

We would infinite loop because we created a shufflevector that was wider than
needed and then failed to combine that with the insertelement. When subsequently
visiting the extractelement from that shuffle, we see that it's unnecessary,
delete it, and trigger another visit to the insertelement.

llvm-svn: 259236

8 years agoFix this test for the the switch in default for IgnoreBreakpoints in SBFrame.Evaluate...
Jim Ingham [Fri, 29 Jan 2016 20:09:30 +0000 (20:09 +0000)]
Fix this test for the the switch in default for IgnoreBreakpoints in SBFrame.EvaluateExpression.

llvm-svn: 259234

8 years agoELF: Report duplicate symbols as many as possible instead of the first one.
Rui Ueyama [Fri, 29 Jan 2016 19:41:13 +0000 (19:41 +0000)]
ELF: Report duplicate symbols as many as possible instead of the first one.

http://reviews.llvm.org/D16647

llvm-svn: 259233

8 years agoAnnotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post...
Yaron Keren [Fri, 29 Jan 2016 19:38:18 +0000 (19:38 +0000)]
Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.

llvm-svn: 259232

8 years agoUnbreak windows buildbots
David Majnemer [Fri, 29 Jan 2016 19:38:03 +0000 (19:38 +0000)]
Unbreak windows buildbots

llvm-svn: 259231

8 years ago[CodeView] Implement .cv_inline_linetable
David Majnemer [Fri, 29 Jan 2016 19:24:12 +0000 (19:24 +0000)]
[CodeView] Implement .cv_inline_linetable

This support is _very_ rudimentary, just enough to get some basic data
into the CodeView debug section.

Left to do is:
- Use the combined opcodes to save space.
- Do something about code offsets.

llvm-svn: 259230

8 years agoClass Property: generate metadata for class properties in classes.
Manman Ren [Fri, 29 Jan 2016 19:22:54 +0000 (19:22 +0000)]
Class Property: generate metadata for class properties in classes.

The list of class properties is saved in
Old ABI: cls->isa->ext->properties
New ABI: cls->isa->ro->properties

rdar://23891898

llvm-svn: 259229

8 years agoARM: don't mangle DAG constant if it has more than one use
Tim Northover [Fri, 29 Jan 2016 19:18:46 +0000 (19:18 +0000)]
ARM: don't mangle DAG constant if it has more than one use

The basic optimisation was to convert (mul $LHS, $complex_constant) into
roughly "(shl (mul $LHS, $simple_constant), $simple_amt)" when it was expected
to be cheaper. The original logic checks that the mul only has one use (since
we're mangling $complex_constant), but when used in even more complex
addressing modes there may be an outer addition that can pick up the wrong
value too.

I *think* the ARM addressing-mode problem is actually unreachable at the
moment, but that depends on complex assessments of the profitability of
pre-increment addressing modes so I've put a real check in there instead of an
assertion.

llvm-svn: 259228

8 years agoClass Property: warn for synthesize on a class property.
Manman Ren [Fri, 29 Jan 2016 19:16:39 +0000 (19:16 +0000)]
Class Property: warn for synthesize on a class property.

rdar://23891898

llvm-svn: 259226

8 years agoClass Property: parse @dynamic (class).
Manman Ren [Fri, 29 Jan 2016 19:05:57 +0000 (19:05 +0000)]
Class Property: parse @dynamic (class).

rdar://23891898

llvm-svn: 259224

8 years ago[WebAssembly] Update test expectations
Derek Schuff [Fri, 29 Jan 2016 18:54:38 +0000 (18:54 +0000)]
[WebAssembly] Update test expectations

llvm-svn: 259223

8 years ago[analyzer] Suppress null reports from defensive checks in function-like macros.
Devin Coughlin [Fri, 29 Jan 2016 18:47:13 +0000 (18:47 +0000)]
[analyzer] Suppress null reports from defensive checks in function-like macros.

We already do this for case splits introduced as a result of defensive null
checks in functions and methods, so do the same for function-like macros.

rdar://problem/19640441

llvm-svn: 259222

8 years ago[analyzer] Improve Nullability checker diagnostics
Anna Zaks [Fri, 29 Jan 2016 18:43:15 +0000 (18:43 +0000)]
[analyzer] Improve Nullability checker diagnostics

- Include the position of the argument on which the nullability is violated
- Differentiate between a 'method' and a 'function' in the message wording
- Test for the error message text in the tests
- Fix a bug with setting 'IsDirectDereference' which resulted in regular dereferences assumed to have call context.

llvm-svn: 259221

8 years ago[WebAssembly] Support frame pointer
Derek Schuff [Fri, 29 Jan 2016 18:37:49 +0000 (18:37 +0000)]
[WebAssembly] Support frame pointer

Add support for frame pointer use in prolog/epilog.
Supports dynamic allocas but not yet over-aligned locals.
Target-independend CG generates SP updates, but we still need to write
back the SP value to memory when necessary.

llvm-svn: 259220

8 years ago[X86] Add missing "CHECK" colon in r259065 test.
Ahmed Bougacha [Fri, 29 Jan 2016 18:25:33 +0000 (18:25 +0000)]
[X86] Add missing "CHECK" colon in r259065 test.

llvm-svn: 259219

8 years agoRevert r259210 "Extend hasType narrowing matcher for TypedefDecls, add functionProtoT...
Hans Wennborg [Fri, 29 Jan 2016 18:24:34 +0000 (18:24 +0000)]
Revert r259210 "Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes."

It didn't pass check-clang.

llvm-svn: 259218

8 years ago[codeview] Begin to add support for inlined call sites
Reid Kleckner [Fri, 29 Jan 2016 18:16:43 +0000 (18:16 +0000)]
[codeview] Begin to add support for inlined call sites

Summary:
There are three parts to inlined call frames:
1. The inlinee line subsection
2. The inline site symbol record
3. The function ids referenced by both

This change starts by emitting function ids (3) for all subprograms and
emitting the base inline site symbol record (2). The actual line numbers
in (2) use an encoded format that will come next, along with the inlinee
line subsection.

Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 259217

8 years agoRevert "fix up missing header from change r259084."
Todd Fiala [Fri, 29 Jan 2016 18:13:30 +0000 (18:13 +0000)]
Revert "fix up missing header from change r259084."

This change was made based on a bad signal from the
Green Dragon LLDB builder.  This change was not needed.
Reverting out r259114.

llvm-svn: 259216

8 years agoFix the build
David Majnemer [Fri, 29 Jan 2016 17:46:57 +0000 (17:46 +0000)]
Fix the build

llvm-svn: 259215

8 years ago[clang-tidy] Don't use delegating constructors, since they are not supported by MSVC...
Alexander Kornienko [Fri, 29 Jan 2016 17:35:53 +0000 (17:35 +0000)]
[clang-tidy] Don't use delegating constructors, since they are not supported by MSVC 2013

llvm-svn: 259214

8 years agoTemporarily revert "[ScheduleDAGInstrs::buildSchedGraph()] Handling of memory depende...
Jonas Paulsson [Fri, 29 Jan 2016 17:22:43 +0000 (17:22 +0000)]
Temporarily revert "[ScheduleDAGInstrs::buildSchedGraph()] Handling of memory dependecies rewritten."

Some buildbot failures needs to be debugged.

llvm-svn: 259213

8 years ago[SLP] Fix printing of debug statement (NFC)
Matthew Simpson [Fri, 29 Jan 2016 17:21:38 +0000 (17:21 +0000)]
[SLP] Fix printing of debug statement (NFC)

llvm-svn: 259212

8 years ago[RS4GC] Address post-commit review on r259208 from David
Sanjoy Das [Fri, 29 Jan 2016 17:20:49 +0000 (17:20 +0000)]
[RS4GC] Address post-commit review on r259208 from David

NFC

llvm-svn: 259211

8 years agoExtend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher...
Aaron Ballman [Fri, 29 Jan 2016 17:03:11 +0000 (17:03 +0000)]
Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes.

Patch by Richard Thomson

llvm-svn: 259210

8 years ago[RS4GC] Remove unnecessary const_cast; NFC
Sanjoy Das [Fri, 29 Jan 2016 16:54:49 +0000 (16:54 +0000)]
[RS4GC] Remove unnecessary const_cast; NFC

GCRelocateInst::getDerivedPtr already returns a non-const llvm::Value
pointer.

llvm-svn: 259209

8 years ago[RS4GC] Minor local cleanup to StabilizeOrder; NFC
Sanjoy Das [Fri, 29 Jan 2016 16:50:34 +0000 (16:50 +0000)]
[RS4GC] Minor local cleanup to StabilizeOrder; NFC

 - Locally declare struct, and call it BaseDerivedPair
 - Use a lambda to compare, instead of a singleton with uninitialized
   fields
 - Add a constructor to BaseDerivedPair and use SmallVector::emplace_back

llvm-svn: 259208

8 years ago[CodeView] Fix dumping the is_stmt bit from the line table
Reid Kleckner [Fri, 29 Jan 2016 16:39:04 +0000 (16:39 +0000)]
[CodeView] Fix dumping the is_stmt bit from the line table

Bug pointed out by George Rimar.

llvm-svn: 259205

8 years ago[RS4GC] Remove unnecessary redirections from tests; NFC
Sanjoy Das [Fri, 29 Jan 2016 16:32:30 +0000 (16:32 +0000)]
[RS4GC] Remove unnecessary redirections from tests; NFC

llvm-svn: 259204

8 years ago[RS4GC] Add some missing tests and CHECK: lines
Sanjoy Das [Fri, 29 Jan 2016 16:32:25 +0000 (16:32 +0000)]
[RS4GC] Add some missing tests and CHECK: lines

I missed porting these in rL259129.

llvm-svn: 259203

8 years ago[mips] Absolute value macro expansion
Zoran Jovanovic [Fri, 29 Jan 2016 16:18:34 +0000 (16:18 +0000)]
[mips] Absolute value macro expansion

Author: obucina
Reviewers: dsanders
Differential Revision: http://reviews.llvm.org/D16323

llvm-svn: 259202

8 years ago[ScheduleDAGInstrs::buildSchedGraph()] Handling of memory dependecies rewritten.
Jonas Paulsson [Fri, 29 Jan 2016 16:11:18 +0000 (16:11 +0000)]
[ScheduleDAGInstrs::buildSchedGraph()] Handling of memory dependecies rewritten.

The buildSchedGraph() was in need of reworking as the AA features had been
added on top of earlier code. It was very difficult to understand, and buggy.
There had been found cases where scheduling dependencies had actually been
missed (see r228686).

AliasChain, RejectMemNodes, adjustChainDeps() and iterateChainSucc() have
been removed. There are instead now just the four maps from Value to SUs, which
have been renamed to Stores, Loads, NonAliasStores and NonAliasLoads.

An unknown store used to become the AliasChain, but now becomes a store mapped
to 'unknownValue' (in Stores). What used to be PendingLoads is instead the
list of SUs mapped to 'unknownValue' in Loads.

RejectMemNodes and adjustChainDeps() used to be a safety-net for everything.
The SU maps were sometimes cleared and SUs were put in RejectMemNodes, where
adjustChainDeps() would look. Instead of this, a more straight forward approach
is used in maintaining the SU maps without clearing them and simply letting
them grow over time. Instead of the cutt-off in adjustChainDeps() search, a
reduction of maps will be done if needed (see below).

Each SUnit either becomes the BarrierChain, or is put into one of the maps. For
each SUnit encountered, all the information about previous ones are still
available until a new BarrierChain is set, at which point the maps are cleared.

For huge regions, the algorithm becomes slow, therefore the maps will get
reduced at a threshold (current default is 1000 nodes), by a fraction (default 1/2).
These values can be tuned by use of CL options in case some test case shows that
they need to be changed (-dag-maps-huge-region and -dag-maps-reduction-size).

There has not been any considerable change observed in output quality or compile
time. There may now be more DAG edges inserted than before (i.e. if A->B->C,
then A->C is not needed). However, in a comparison run there were fewer total
calls to AA, and a somewhat improved compile time, which means this seems to
be not a problem.

http://reviews.llvm.org/D8705
Reviewers: Hal Finkel, Andy Trick.

llvm-svn: 259201

8 years ago[clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop...
Alexander Kornienko [Fri, 29 Jan 2016 15:54:26 +0000 (15:54 +0000)]
[clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables.

Patch by Felix Berger!

Differential revision: http://reviews.llvm.org/D13849

llvm-svn: 259199

8 years ago[clang-tidy] Fix minor style issues. NFC
Alexander Kornienko [Fri, 29 Jan 2016 15:22:20 +0000 (15:22 +0000)]
[clang-tidy] Fix minor style issues. NFC

llvm-svn: 259198

8 years agoFixed function params comparison. Updated docs and tests.
Alexander Kornienko [Fri, 29 Jan 2016 15:22:10 +0000 (15:22 +0000)]
Fixed function params comparison. Updated docs and tests.

Summary: "checkParamTypes" may fail if the the type of some parameter is not canonical. Fixed it by comparing canonical types. And added "getCanonicalType()" and "getCanonicalDecl()" on more places to prevent potential fail.

Reviewers: alexfh

Subscribers: cfe-commits

Patch by Cong Liu!

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

llvm-svn: 259197

8 years ago[clang-tidy] Fix style issues. NFC
Alexander Kornienko [Fri, 29 Jan 2016 15:21:43 +0000 (15:21 +0000)]
[clang-tidy] Fix style issues. NFC

llvm-svn: 259196

8 years ago[clang-tidy] Move implicit-cast-in-loop check to upstream.
Alexander Kornienko [Fri, 29 Jan 2016 15:21:32 +0000 (15:21 +0000)]
[clang-tidy] Move implicit-cast-in-loop check to upstream.

Summary: This is implemented originally by Alex Pilkiewicz (pilki@google.com).

Reviewers: alexfh

Subscribers: cfe-commits

Patch by Haojian Wu!

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

llvm-svn: 259195

8 years agoRemoving unnecessary casts; NFC.
Aaron Ballman [Fri, 29 Jan 2016 13:53:26 +0000 (13:53 +0000)]
Removing unnecessary casts; NFC.

llvm-svn: 259194

8 years ago[libcxx] Whitelist inclusion of sysctl.h instead of blacklisting
Ben Craig [Fri, 29 Jan 2016 13:53:23 +0000 (13:53 +0000)]
[libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

Instead of excluding all known operating systems that are not derived from BSD,
I now include all operating systems that claim to be derived from BSD.
Hopefully, that will make it so that this check doesn't need to change for
every new operating system that comes along.

http://reviews.llvm.org/D16634

llvm-svn: 259193

8 years agoImplement TemplateArgument::dump() method for debugging, patterned after TemplateName...
Yaron Keren [Fri, 29 Jan 2016 13:46:15 +0000 (13:46 +0000)]
Implement TemplateArgument::dump() method for debugging, patterned after TemplateName::dump().

llvm-svn: 259192

8 years ago[IR] Move definitions of users of Use::set to Value.h
Benjamin Kramer [Fri, 29 Jan 2016 12:47:05 +0000 (12:47 +0000)]
[IR] Move definitions of users of Use::set to Value.h

Still ugly, but at least Use.h is self-contained again.

llvm-svn: 259191

8 years ago[IR] Shuffle the code for getSequentialElementType to type.h to avoid circular header...
Benjamin Kramer [Fri, 29 Jan 2016 12:47:01 +0000 (12:47 +0000)]
[IR] Shuffle the code for getSequentialElementType to type.h to avoid circular header dependencies.

llvm-svn: 259190

8 years agoFix crash in lldb-mi when stack variable name is nullptr. This always happens when...
Eugene Leviant [Fri, 29 Jan 2016 12:17:09 +0000 (12:17 +0000)]
Fix crash in lldb-mi when stack variable name is nullptr. This always happens when execution stops in try scope with unnamed catch clause

llvm-svn: 259189

8 years agoFix linking of lldb-server with BUILD_SHARED_LIBS
Pavel Labath [Fri, 29 Jan 2016 11:59:57 +0000 (11:59 +0000)]
Fix linking of lldb-server with BUILD_SHARED_LIBS

Summary:
The BUILD_SHARED_LIBS branch of lldb-server link flags was hopelessly broken, at least since we
started restricting the symbols exported by liblldb. lldb-server depends on symbols from the
lldb_private namespace, so it cannot link to the public interface of liblldb. Instead I make it
link to the individual libraries constituting liblldb, just like it does in the
!BUILD_SHARED_LIBS case.

This does not make the BUILD_SHARED_LIBS build of lldb fully functional yet, due to the way
liblldb dependencies are managed, but it's a step in that direction.

Reviewers: zturner, tfiala

Subscribers: lldb-commits

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

llvm-svn: 259188

8 years agoAdd an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.
Benjamin Kramer [Fri, 29 Jan 2016 11:29:02 +0000 (11:29 +0000)]
Add an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.

This can be used as a way to modify argv[0] for a clang tool.

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

llvm-svn: 259187

8 years agoReplace StringRef with std::string in LinkerDriver::addLibrary(StringRef Name) becaus...
George Rimar [Fri, 29 Jan 2016 10:52:52 +0000 (10:52 +0000)]
Replace StringRef with std::string in LinkerDriver::addLibrary(StringRef Name) because std::string is destroyed after assigning what fills the buffer with garbage and StringRef is no more valid.
That fixes few failing tests under windows+msvs2015(debug).

llvm-svn: 259186

8 years agoIgnore breakpoints by default in SBFrame::EvaluateExpression
Eugene Leviant [Fri, 29 Jan 2016 10:48:11 +0000 (10:48 +0000)]
Ignore breakpoints by default in SBFrame::EvaluateExpression

llvm-svn: 259185

8 years agoAdd target triple to CodeGenOpenCL/pipe_types.cl test case
Ulrich Weigand [Fri, 29 Jan 2016 10:45:23 +0000 (10:45 +0000)]
Add target triple to CodeGenOpenCL/pipe_types.cl test case

The test is failing on SystemZ since different IR is being
generated due to platform ABI differences.  Add a target triple.

Fix suggested by Anastasia Stulova.

llvm-svn: 259183

8 years ago[ARM] Emit trap instruction using .inst directive
Alexandros Lamprineas [Fri, 29 Jan 2016 10:23:32 +0000 (10:23 +0000)]
[ARM] Emit trap instruction using .inst directive

The trap instruction is emitted as a data-in-text rather
than an instruction. This patch uses the .inst directive
for emitting trap.

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

llvm-svn: 259182

8 years ago[RenderScript] Remove unused RS command
Ewan Crawford [Fri, 29 Jan 2016 10:11:03 +0000 (10:11 +0000)]
[RenderScript] Remove unused RS command

Patch deletes the 'language renderscript module probe' command.
This command was present in the initial commit to help debug the plugin.
However we haven't used it recently and it's functionality is unclear, so can be removed entirely.

Also add back 'kernel coordinate' command, removed by accident in clang format patch r259056.

llvm-svn: 259181

8 years agoAMDGPU: Remove 24-bit intrinsics
Matt Arsenault [Fri, 29 Jan 2016 10:05:16 +0000 (10:05 +0000)]
AMDGPU: Remove 24-bit intrinsics

The known bit matching code seems to work reasonably well,
so these shouldn't really be needed.

llvm-svn: 259180