Igor Breger [Mon, 1 Feb 2016 09:57:15 +0000 (09:57 +0000)]
AVX512: fix mask handling for gather/scatter/prefetch intrinsics.
Differential Revision: http://reviews.llvm.org/D16755
llvm-svn: 259346
Artem Dergachev [Mon, 1 Feb 2016 09:29:17 +0000 (09:29 +0000)]
[analyzer] Use a wider integer type for an array index.
Avoids unexpected overflows while performing pointer arithmetics in 64-bit code.
Moreover, neither PointerDiffType nor 'int' can be used as a common array index
type because arrays may have size (and indexes) more than PTRDIFF_MAX but less
than SIZE_MAX.
Patch by Aleksei Sidorin!
Differential Revision: http://reviews.llvm.org/D16063
llvm-svn: 259345
Abhishek Aggarwal [Mon, 1 Feb 2016 09:01:42 +0000 (09:01 +0000)]
Set correct ThreadStopInfo in case of trace event
Summary:
- The patch solves Bug 23478 and Bug 19311. Resolving
Bug 23478 also resolves Bug 23039.
Correct ThreadStopInfo is set for Linux and FreeBSD
platforms.
- Summary:
When a trace event is reported, we need to check
whether the trace event lands at a breakpoint site.
If it lands at a breakpoint site then set the thread's
StopInfo with the reason 'breakpoint'. Else, set the reason
to be 'Trace'.
Change-Id: I0af9765e782fd74bc0cead41548486009f8abb87
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>
Reviewers: jingham, emaste, lldb-commits, clayborg, ovyalov
Subscribers: emaste
Differential Revision: http://reviews.llvm.org/D16720
llvm-svn: 259344
Simon Pilgrim [Mon, 1 Feb 2016 08:59:30 +0000 (08:59 +0000)]
[X86][SSE] Find source of the inserted element of INSERTPS
Minor patch to trace back through target shuffles to the source of the inserted element in a (V)INSERTPS shuffle.
Differential Revision: http://reviews.llvm.org/D16652
llvm-svn: 259343
Igor Breger [Mon, 1 Feb 2016 07:56:09 +0000 (07:56 +0000)]
AVX512 : Fix SETCCE lowering for KNL 32 bit.
Differential Revision: http://reviews.llvm.org/D16752
llvm-svn: 259342
Frederic Riss [Mon, 1 Feb 2016 04:43:14 +0000 (04:43 +0000)]
[dsymutil] Skip mach-o paired relocations
Noticed while working on scattered relocations.
I do not think these relocs can actually happen in the debug_info section,
but if they happen the code would mishandle them. Explicitely skip them
and warn if we encounter one.
llvm-svn: 259341
David Majnemer [Mon, 1 Feb 2016 04:28:59 +0000 (04:28 +0000)]
[X86] Cleanup the WinEHState pass
Remove unnecessary includes and class state.
No functional change intended.
llvm-svn: 259340
Frederic Riss [Mon, 1 Feb 2016 03:44:22 +0000 (03:44 +0000)]
[dsymutil] Support scattered relocs.
Although it seems like clang will never emit scattered relocations in
the debug information (at least I couldn't find a way), we have too
support them for the benefit of other compilers.
As clang doesn't generate them, the included testcase was produced
from hacked up assembly.
llvm-svn: 259339
David Majnemer [Mon, 1 Feb 2016 03:29:38 +0000 (03:29 +0000)]
Revert r258580 and r258581.
Those commits created an artificial edge from a cleanup to a synthesized
catchswitch in order to get the MSVC personality routine to execute
cleanups which don't cleanupret and are not wrapped by a catchswitch.
This worked well enough but is not a complete solution in situations
where there the cleanup infinite loops.
However, the real deal breaker behind this approach comes about from a
degenerate case where the cleanup is post-dominated by unreachable *and*
throws an exception. This ends poorly because the catchswitch will
inadvertently catch the exception.
Because of this we should go back to our previous behavior of not
executing certain cleanups (identical behavior with the Itanium ABI
implementation in clang, GCC and ICC).
N.B. I think this could be salvaged by making the catchpad rethrow the
exception and properly transforming throwing calls in the cleanup into
invokes.
llvm-svn: 259338
Tobias Grosser [Mon, 1 Feb 2016 01:55:08 +0000 (01:55 +0000)]
ScopInfo: use std::distance to shorten code [NFC]
llvm-svn: 259337
Craig Topper [Mon, 1 Feb 2016 01:33:42 +0000 (01:33 +0000)]
[TableGen] Store result of getInstructionsByEnumValue in an ArrayRef instead of accidentally copying to a vector.
llvm-svn: 259336
David Majnemer [Mon, 1 Feb 2016 01:33:17 +0000 (01:33 +0000)]
Mark DR1250 as implemented
We implemented this DR back in r258768 but forgot to mark it as
implemented.
llvm-svn: 259335
Frederic Riss [Sun, 31 Jan 2016 22:06:35 +0000 (22:06 +0000)]
[MCDwarf] Fix encoding of line tables with weird custom parameters
With poorly chosen custom parameters, the line table encoding logic would
sometimes end up generating a special opcode bigger than 255, which is wrong.
The set of default parameters that LLVM uses isn't subject to this bug.
When carefully chosing the line table parameters, it's impossible to fall into the
corner case that this patch fixes. The standard however doesn't require that these
parameters be carefully chosen. And even if it did, we shouldn't generate broken
encoding.
Add a unittest for this specific encoding bug, and while at it, create some unit
tests for the encoding logic using different sets of parameters.
llvm-svn: 259334
Craig Topper [Sun, 31 Jan 2016 20:36:20 +0000 (20:36 +0000)]
Replace utostr_32 use with utostr to match removal from llvm.
llvm-svn: 259333
Tobias Grosser [Sun, 31 Jan 2016 20:25:46 +0000 (20:25 +0000)]
cmake: Add additional libraries to fix the darwin shared library build
darwin requires the additional linkages of...
LLVMBitReader
LLVMMCParser
LLVMObject
LLVMProfileData
LLVMTarget
LLVMVectorize
as the darwin requires all of the weak undefined symbols in a library to be
resolved when linking it against an executable (unless
-Wl,-undefined,dynamic_lookup is used to override the default behavior of
-Wl,-undefined,error).
Contributed-by: Jack Howarth
llvm-svn: 259332
Craig Topper [Sun, 31 Jan 2016 20:00:26 +0000 (20:00 +0000)]
Remove utostr_32 as it has no uses anymore.
llvm-svn: 259331
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
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
Sanjay Patel [Sun, 31 Jan 2016 16:35:23 +0000 (16:35 +0000)]
add helper function for minnum/maxnum ; NFC
llvm-svn: 259326
Sanjay Patel [Sun, 31 Jan 2016 16:34:48 +0000 (16:34 +0000)]
use range-based for loop; NFC
llvm-svn: 259325
Sanjay Patel [Sun, 31 Jan 2016 16:34:11 +0000 (16:34 +0000)]
fix formatting; NFC
llvm-svn: 259324
Sanjay Patel [Sun, 31 Jan 2016 16:33:33 +0000 (16:33 +0000)]
simplify; NFC
llvm-svn: 259323
Sanjay Patel [Sun, 31 Jan 2016 16:32:23 +0000 (16:32 +0000)]
clean up; NFC
function names, comments, formatting, typos
llvm-svn: 259322
JF Bastien [Sun, 31 Jan 2016 08:19:40 +0000 (08:19 +0000)]
WebAssembly: more failures are gone
llvm-svn: 259321
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
Frederic Riss [Sun, 31 Jan 2016 04:39:16 +0000 (04:39 +0000)]
[dsymutil] Fix FileCheck command.
Damn case-insensitive filesystem...
llvm-svn: 259319
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
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
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
Tim Shen [Sun, 31 Jan 2016 03:59:34 +0000 (03:59 +0000)]
[SelectionDAG] Eliminate exponential behavior in WalkChainUsers
llvm-svn: 259315
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
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
Craig Topper [Sun, 31 Jan 2016 01:12:35 +0000 (01:12 +0000)]
Use std::end instead of repeating buffer sizes.
llvm-svn: 259312
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
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
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
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
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
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
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
Benjamin Kramer [Sat, 30 Jan 2016 12:16:23 +0000 (12:16 +0000)]
[AST] Pull simple method inline.
llvm-svn: 259304
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
Davide Italiano [Sat, 30 Jan 2016 08:03:54 +0000 (08:03 +0000)]
assert(false) -> llvm_unreachable().
llvm-svn: 259302
Ismail Donmez [Sat, 30 Jan 2016 07:14:31 +0000 (07:14 +0000)]
Fix build with VS2015
llvm-svn: 259301
Gerolf Hoflehner [Sat, 30 Jan 2016 05:58:38 +0000 (05:58 +0000)]
[BasicAA] NFC - revised comment for function adjustToPointerSize()
llvm-svn: 259300
Gerolf Hoflehner [Sat, 30 Jan 2016 05:52:53 +0000 (05:52 +0000)]
[BasicAA] Fix for missing must alias (D16343)
llvm-svn: 259299
Gerolf Hoflehner [Sat, 30 Jan 2016 05:35:09 +0000 (05:35 +0000)]
[BasicAA] Update on r259290 - added missing cast
llvm-svn: 259298
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
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
Matt Arsenault [Sat, 30 Jan 2016 05:02:00 +0000 (05:02 +0000)]
InstCombine: fabs(x) * fabs(x) -> x * x
llvm-svn: 259295
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
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
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
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
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
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
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
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
Xinliang David Li [Sat, 30 Jan 2016 01:37:32 +0000 (01:37 +0000)]
Further reduce test time
llvm-svn: 259285
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
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
Matthias Braun [Sat, 30 Jan 2016 01:14:01 +0000 (01:14 +0000)]
Use Support/DataTypes.h instead of cstdint
llvm-svn: 259282
Alexey Samsonov [Sat, 30 Jan 2016 01:11:42 +0000 (01:11 +0000)]
[docs] Remove references to autoconf build.
llvm-svn: 259281
Alexey Samsonov [Sat, 30 Jan 2016 01:10:15 +0000 (01:10 +0000)]
[docs] Remove references to autotools build.
llvm-svn: 259280
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
Alexey Samsonov [Sat, 30 Jan 2016 00:54:42 +0000 (00:54 +0000)]
Remove references to autotools build.
llvm-svn: 259278
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
Rui Ueyama [Fri, 29 Jan 2016 23:59:15 +0000 (23:59 +0000)]
Move template instantiations to end of the file.
llvm-svn: 259276
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
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
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
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
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
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
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
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
Kostya Serebryany [Fri, 29 Jan 2016 23:30:07 +0000 (23:30 +0000)]
[libFuzzer] add -timeout_exitcode option
llvm-svn: 259265
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
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
Sanjay Patel [Fri, 29 Jan 2016 23:14:58 +0000 (23:14 +0000)]
fix formatting; NFC
llvm-svn: 259262
Fiona Glaser [Fri, 29 Jan 2016 23:12:52 +0000 (23:12 +0000)]
Fix typo in LoopSimplifyCFG
llvm-svn: 259261
Alexey Samsonov [Fri, 29 Jan 2016 23:07:14 +0000 (23:07 +0000)]
[UBSan] Add documentation for runtime issue suppression.
llvm-svn: 259260
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
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
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
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
Matthias Braun [Fri, 29 Jan 2016 22:35:29 +0000 (22:35 +0000)]
Need #include <cstdint> for uint64_t
llvm-svn: 259255
Matthias Braun [Fri, 29 Jan 2016 22:30:30 +0000 (22:30 +0000)]
Need #include <climit> for CHAR_BIT
llvm-svn: 259254
Xinliang David Li [Fri, 29 Jan 2016 22:29:15 +0000 (22:29 +0000)]
Improve test speed/trial 2
llvm-svn: 259253
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
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
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
Rui Ueyama [Fri, 29 Jan 2016 22:18:55 +0000 (22:18 +0000)]
Add comments.
llvm-svn: 259249
Xinliang David Li [Fri, 29 Jan 2016 21:26:31 +0000 (21:26 +0000)]
Revert 259242, 259243 -- irrelvante changes pulled in
llvm-svn: 259244
Xinliang David Li [Fri, 29 Jan 2016 21:23:47 +0000 (21:23 +0000)]
Use range for loop
llvm-svn: 259243
Xinliang David Li [Fri, 29 Jan 2016 21:13:55 +0000 (21:13 +0000)]
Improve test speed (interchange loop, reducing padding)
llvm-svn: 259242
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
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
Rui Ueyama [Fri, 29 Jan 2016 20:31:05 +0000 (20:31 +0000)]
Replace code duplications with function calls.
llvm-svn: 259238
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