platform/upstream/llvm.git
8 years agoReplace usages of llvm::utostr_32 with just llvm::utostr. While this is less efficien...
Craig Topper [Sun, 31 Jan 2016 20:00:24 +0000 (20:00 +0000)]
Replace usages of llvm::utostr_32 with just llvm::utostr. While this is less efficient, its unclear the few places that were using the _32 version were doing so for efficiency.

llvm-svn: 259330

8 years agoMerge utohex_buffer into utohexstr, it's only caller. Also change utohexstr to use...
Craig Topper [Sun, 31 Jan 2016 20:00:22 +0000 (20:00 +0000)]
Merge utohex_buffer into utohexstr, it's only caller. Also change utohexstr to use the std::string constructor that takes a start and end pointer. This saves a call to strlen. NFC

llvm-svn: 259329

8 years agoadd helper function for minnum/maxnum ; NFC
Sanjay Patel [Sun, 31 Jan 2016 16:35:23 +0000 (16:35 +0000)]
add helper function for minnum/maxnum ; NFC

llvm-svn: 259326

8 years agouse range-based for loop; NFC
Sanjay Patel [Sun, 31 Jan 2016 16:34:48 +0000 (16:34 +0000)]
use range-based for loop; NFC

llvm-svn: 259325

8 years agofix formatting; NFC
Sanjay Patel [Sun, 31 Jan 2016 16:34:11 +0000 (16:34 +0000)]
fix formatting; NFC

llvm-svn: 259324

8 years agosimplify; NFC
Sanjay Patel [Sun, 31 Jan 2016 16:33:33 +0000 (16:33 +0000)]
simplify; NFC

llvm-svn: 259323

8 years agoclean up; NFC
Sanjay Patel [Sun, 31 Jan 2016 16:32:23 +0000 (16:32 +0000)]
clean up; NFC

function names, comments, formatting, typos

llvm-svn: 259322

8 years agoWebAssembly: more failures are gone
JF Bastien [Sun, 31 Jan 2016 08:19:40 +0000 (08:19 +0000)]
WebAssembly: more failures are gone

llvm-svn: 259321

8 years agoWebAssembly: update expected failures
JF Bastien [Sun, 31 Jan 2016 08:05:05 +0000 (08:05 +0000)]
WebAssembly: update expected failures

r259305 fixed a few assertions around FrameIndex, and I forgot to update these failures despite having run the torture tests.

llvm-svn: 259320

8 years ago[dsymutil] Fix FileCheck command.
Frederic Riss [Sun, 31 Jan 2016 04:39:16 +0000 (04:39 +0000)]
[dsymutil] Fix FileCheck command.

Damn case-insensitive filesystem...

llvm-svn: 259319

8 years ago[dsymutil] Fix handling of common symbols.
Frederic Riss [Sun, 31 Jan 2016 04:29:34 +0000 (04:29 +0000)]
[dsymutil] Fix handling of common symbols.

llvm-dsymutil was misinterpreting the value of common symbols as their
address when it actually contains their size. This didn't impact
llvm-dsymutil's ability to link the debug information for common symbols
because these are always found by name and not by address. Things could
however go wrong when the size of a common object matched the object
file address of another symbol. Depending on the link order of the symbols
the common object might incorrectly evict this other object from the
address to symbol mapping, and then link the evicted symbol with a wrong
binary address.

Use the new ability to have symbols without an object file address to fix
this.

llvm-svn: 259318

8 years ago[dsymutil] Allow debug map mappings with no object file address. NFC
Frederic Riss [Sun, 31 Jan 2016 04:29:22 +0000 (04:29 +0000)]
[dsymutil] Allow debug map mappings with no object file address. NFC

This change just changes the data structure that ties symbol names,
object file address and linked binary addresses to accept mappings
with no object file address. Such symbol mappings are not fed into
the debug map yet, so this patch is NFC.
A subsequent patch will make use of this functionality for common
symbols.

llvm-svn: 259317

8 years agoReplace usage of llvm::utostr_32 with just llvm::utostr. While this is less efficient...
Craig Topper [Sun, 31 Jan 2016 04:20:03 +0000 (04:20 +0000)]
Replace usage of llvm::utostr_32 with just llvm::utostr. While this is less efficient, its unclear that the one place using the _32 version was doing so for efficiency.

llvm-svn: 259316

8 years ago[SelectionDAG] Eliminate exponential behavior in WalkChainUsers
Tim Shen [Sun, 31 Jan 2016 03:59:34 +0000 (03:59 +0000)]
[SelectionDAG] Eliminate exponential behavior in WalkChainUsers

llvm-svn: 259315

8 years agoNo need to use utostr/utohexstr when writing into a raw_ostream. NFC
Craig Topper [Sun, 31 Jan 2016 01:55:15 +0000 (01:55 +0000)]
No need to use utostr/utohexstr when writing into a raw_ostream. NFC

llvm-svn: 259314

8 years agoShrink character buffer size in raw_ostream::write_hex to 16 characters intead of...
Craig Topper [Sun, 31 Jan 2016 01:12:38 +0000 (01:12 +0000)]
Shrink character buffer size in raw_ostream::write_hex to 16 characters intead of 20 as that's the largest string a 64-bit hex value can be.

llvm-svn: 259313

8 years agoUse std::end instead of repeating buffer sizes.
Craig Topper [Sun, 31 Jan 2016 01:12:35 +0000 (01:12 +0000)]
Use std::end instead of repeating buffer sizes.

llvm-svn: 259312

8 years ago[Parser] Update CachedTokens while parsing ObjectiveC template argument list
Bruno Cardoso Lopes [Sun, 31 Jan 2016 00:47:51 +0000 (00:47 +0000)]
[Parser] Update CachedTokens while parsing ObjectiveC template argument list

Consider the following ObjC++ snippet:

--
@protocol PA;
@protocol PB;

@class NSArray<ObjectType>;
typedef int some_t;

id<PA> FA(NSArray<id<PB>> *h, some_t group);
--

This would hit an assertion in the parser after generating an annotation token
while trying to update the token cache:

Assertion failed: (CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token")
...
7 clang::Preprocessor::AnnotatePreviousCachedTokens(clang::Token const&) + 494
8 clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, clang::CXXScopeSpec&, bool) + 1163
9 clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 361
10 clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) + 598
...

The cached preprocessor token in this case is:

greatergreater '>>' Loc=<testcase.mm:7:24>

while the annotation ("NSArray<id<PB>>") ends at "testcase.mm:7:25", hence the
assertion.

Properly update the CachedTokens during template parsing to contain
two greater tokens instead of a greatergreater.

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

rdar://problem/23494277

llvm-svn: 259311

8 years agoNo need to use utostr when putting integers into a raw_ostream. NFC
Craig Topper [Sun, 31 Jan 2016 00:20:26 +0000 (00:20 +0000)]
No need to use utostr when putting integers into a raw_ostream. NFC

llvm-svn: 259310

8 years agoConvert an unsigned to Twine instead of using utostr since we're already building...
Craig Topper [Sun, 31 Jan 2016 00:20:24 +0000 (00:20 +0000)]
Convert an unsigned to Twine instead of using utostr since we're already building a Twine. NFC

llvm-svn: 259309

8 years agoConvert int to Twine instead of using utostr since it was already being added to...
Craig Topper [Sun, 31 Jan 2016 00:15:35 +0000 (00:15 +0000)]
Convert int to Twine instead of using utostr since it was already being added to a Twine. NFC

llvm-svn: 259308

8 years ago[doc] improve the doc for CUDA
Jingyue Wu [Sat, 30 Jan 2016 23:48:47 +0000 (23:48 +0000)]
[doc] improve the doc for CUDA

1. Mentioned that CUDA support works best with trunk.
2. Simplified the example by removing its dependency on the CUDA samples.
3. Explain the --cuda-gpu-arch flag.

llvm-svn: 259307

8 years ago[WebAssembly] Fix uses of FrameIndex as store values
Derek Schuff [Sat, 30 Jan 2016 21:43:08 +0000 (21:43 +0000)]
[WebAssembly] Fix uses of FrameIndex as store values

Previously the code assumed all uses of FI on loads and stores were as
addresses. This checks whether the use is the address or a value and
handles the latter case as it does for non-memory instructions.

llvm-svn: 259306

8 years agoWebAssembly: don't optimize frameindex store
JF Bastien [Sat, 30 Jan 2016 14:11:26 +0000 (14:11 +0000)]
WebAssembly: don't optimize frameindex store

The previous code was incorrect (can't getReg a frameindex). We could instead optimize it to reduce tree height, but I'm not sure that's worthwhile yet because we then try to eliminate the frameindex.

This patch also fixes frame index elimination for operations which may load or store: it used to assume the base was operand 2 and immediate offset operand 1. That's not true for stores, where they're 4 and 3.

llvm-svn: 259305

8 years ago[AST] Pull simple method inline.
Benjamin Kramer [Sat, 30 Jan 2016 12:16:23 +0000 (12:16 +0000)]
[AST] Pull simple method inline.

llvm-svn: 259304

8 years agoWebAssembly NFC: fix build warning
JF Bastien [Sat, 30 Jan 2016 11:19:26 +0000 (11:19 +0000)]
WebAssembly NFC: fix build warning

WebAssemblyFrameLowering.cpp:158:44: warning: enumeral and non-enumeral type in conditional expression [enabled by default]

llvm-svn: 259303

8 years agoassert(false) -> llvm_unreachable().
Davide Italiano [Sat, 30 Jan 2016 08:03:54 +0000 (08:03 +0000)]
assert(false) -> llvm_unreachable().

llvm-svn: 259302

8 years agoFix build with VS2015
Ismail Donmez [Sat, 30 Jan 2016 07:14:31 +0000 (07:14 +0000)]
Fix build with VS2015

llvm-svn: 259301

8 years ago[BasicAA] NFC - revised comment for function adjustToPointerSize()
Gerolf Hoflehner [Sat, 30 Jan 2016 05:58:38 +0000 (05:58 +0000)]
[BasicAA] NFC - revised comment for function adjustToPointerSize()

llvm-svn: 259300

8 years ago[BasicAA] Fix for missing must alias (D16343)
Gerolf Hoflehner [Sat, 30 Jan 2016 05:52:53 +0000 (05:52 +0000)]
[BasicAA] Fix for missing must alias (D16343)

llvm-svn: 259299

8 years ago[BasicAA] Update on r259290 - added missing cast
Gerolf Hoflehner [Sat, 30 Jan 2016 05:35:09 +0000 (05:35 +0000)]
[BasicAA] Update on r259290 - added missing cast

llvm-svn: 259298

8 years agoAMDGPU: Fix emitting invalid workitem intrinsics for HSA
Matt Arsenault [Sat, 30 Jan 2016 05:19:45 +0000 (05:19 +0000)]
AMDGPU: Fix emitting invalid workitem intrinsics for HSA

The AMDGPUPromoteAlloca pass was emitting the read.local.size
calls, which with HSA was incorrectly selected to reading from
the offset mesa uses off of the kernarg pointer.

Error on intrinsics which aren't supported by HSA, and start
emitting the correct IR to read the workgroup size
out of the dispatch pointer.

Also initialize the pass so it can be tested with opt, and
start moving towards not depending on the subtarget as an
argument.

Start emitting errors for the intrinsics not handled with HSA.

llvm-svn: 259297

8 years agoAMDGPU: Stop checking intrinsics not used by HSA for dispatch-ptr
Matt Arsenault [Sat, 30 Jan 2016 05:10:59 +0000 (05:10 +0000)]
AMDGPU: Stop checking intrinsics not used by HSA for dispatch-ptr

Only the dispatch.ptr intrinsic is supposed to be used now to get
the workgroup size, and the read.local.size intrinsics do not
work correctly.

llvm-svn: 259296

8 years agoInstCombine: fabs(x) * fabs(x) -> x * x
Matt Arsenault [Sat, 30 Jan 2016 05:02:00 +0000 (05:02 +0000)]
InstCombine: fabs(x) * fabs(x) -> x * x

llvm-svn: 259295

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