Amjad Aboud [Sun, 31 Jul 2016 14:41:50 +0000 (14:41 +0000)]
Fixed "copy-paste" mistake from revision 255245.
llvm-svn: 277290
Elena Demikhovsky [Sun, 31 Jul 2016 06:48:01 +0000 (06:48 +0000)]
AVX-512: Removed AssertZext node before TRUNCATE
Removed AssertZext node, which was inserted between X86ISD::SETCC and "truncate to i1".
Differential Revision: https://reviews.llvm.org/D22850
llvm-svn: 277289
Chandler Carruth [Sun, 31 Jul 2016 02:19:13 +0000 (02:19 +0000)]
[ADT] Add 'consume_front' and 'consume_back' methods to StringRef which
are very handy when parsing text.
They are essentially a combination of startswith and a self-modifying
drop_front, or endswith and drop_back respectively.
Differential Revision: https://reviews.llvm.org/D22723
llvm-svn: 277288
Faisal Vali [Sun, 31 Jul 2016 01:19:17 +0000 (01:19 +0000)]
[NFC] Rearrange an example-file so the c++14 specific example is on top.
This makes it easier to add C++1z examples to the bottom, just before the #endif.
llvm-svn: 277287
Hubert Tong [Sat, 30 Jul 2016 22:33:34 +0000 (22:33 +0000)]
Reapply r276069 with workaround for MSVC 2013
llvm-svn: 277286
Davide Italiano [Sat, 30 Jul 2016 22:07:21 +0000 (22:07 +0000)]
[HexagonConstPropagation] Remove dead code.
llvm-svn: 277285
Davide Italiano [Sat, 30 Jul 2016 22:07:18 +0000 (22:07 +0000)]
[HexagonBitSimplify] Remove dead code.
llvm-svn: 277284
Davide Italiano [Sat, 30 Jul 2016 22:07:15 +0000 (22:07 +0000)]
[ARMConstantIslandPass] Remove dead code.
llvm-svn: 277283
Lang Hames [Sat, 30 Jul 2016 21:34:04 +0000 (21:34 +0000)]
[Support] Add doxygen @code tags to example code in Error comments.
llvm-svn: 277282
Simon Pilgrim [Sat, 30 Jul 2016 21:01:34 +0000 (21:01 +0000)]
[SLPVectorizer][X86] Added vXi8/vXi16 sitofp/uitofp tests
Dropped useless 2i32-2f32 test
llvm-svn: 277281
Simon Pilgrim [Sat, 30 Jul 2016 20:53:21 +0000 (20:53 +0000)]
Strip trailing whitespace
llvm-svn: 277280
Simon Pilgrim [Sat, 30 Jul 2016 20:51:26 +0000 (20:51 +0000)]
[X86] Use peekThroughOneUseBitcasts helper function
llvm-svn: 277279
Simon Pilgrim [Sat, 30 Jul 2016 20:28:02 +0000 (20:28 +0000)]
[X86][SSE] Regenerate vshift tests
llvm-svn: 277278
Aaron Ballman [Sat, 30 Jul 2016 20:20:03 +0000 (20:20 +0000)]
Correcting some sphinx formatting issues so that the attribute documentation builds again.
llvm-svn: 277277
Xinliang David Li [Sat, 30 Jul 2016 20:12:00 +0000 (20:12 +0000)]
[Profile] Add a new test case
The end-end test checks that cs-profile counter update
is obtained as expected.
llvm-svn: 277276
Simon Pilgrim [Sat, 30 Jul 2016 18:43:30 +0000 (18:43 +0000)]
[SLPVectorizer][X86] Added SITOFP/UITOFP vectorization tests
llvm-svn: 277275
Simon Pilgrim [Sat, 30 Jul 2016 16:29:19 +0000 (16:29 +0000)]
[X86][AVX] Added signum example test functions from PR13248
These are good examples of missed combine opportunities with zero/all bit vector compare results
llvm-svn: 277274
Devin Coughlin [Sat, 30 Jul 2016 16:16:51 +0000 (16:16 +0000)]
[analyzer] Update APIs taking user-facing strings.
Add new APIs that require localized strings and remove two APIs that were
incorrectly marked as requiring a user-facing string.
A patch by Kulpreet Chilana!
Differential Revision: https://reviews.llvm.org/D22926
llvm-svn: 277273
Simon Pilgrim [Sat, 30 Jul 2016 16:01:30 +0000 (16:01 +0000)]
[X86][X87] Add vector arithmetic tests for targets with sse disabled
To make sure the X86_64 target isn't doing anything stupid
llvm-svn: 277272
Simon Pilgrim [Sat, 30 Jul 2016 14:06:59 +0000 (14:06 +0000)]
[X86][SSE] Let 64-bit targets use the fast 2i32-2f32 UINT_TO_FP conversion as well as 32-bit
The 2i32-2i64 legalization means that we can use the slightly quicker double bits + fptrunc approach for the same results
llvm-svn: 277271
Hubert Tong [Sat, 30 Jul 2016 14:01:00 +0000 (14:01 +0000)]
TrailingObjects::FixedSizeStorage constexpr fixes + tests
Summary:
This change fixes issues with `LLVM_CONSTEXPR` functions and
`TrailingObjects::FixedSizeStorage`. In particular, some of the
functions marked `LLVM_CONSTEXPR` used by `FixedSizeStorage` were not
implemented such that they evaluate successfully as part of a constant
expression despite constant arguments.
This change also implements a more traditional template-meta path to
accommodate MSVC, and adds unit tests for `FixedSizeStorage`.
Drive-by fix: the access control for members of `TrailingObjectsImpl` is
tightened.
Reviewers: faisalv, rsmith, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22668
llvm-svn: 277270
Hubert Tong [Sat, 30 Jul 2016 13:38:51 +0000 (13:38 +0000)]
MathExtras.h: add LLVM_CONSTEXPR where simple
Summary:
This change adds `LLVM_CONSTEXPR` to functions selected as follows:
- the body is already valid under C++11 for a `constexpr` function,
- the evaluation of the function, given constant arguments, will not
fail during the evaluation of a constant expression, and
- the above properties are easily verifiable at a glance.
Note: the evaluation of the function cannot fail if the instantiation
triggers a static assertion failure.
Reviewers: faisalv, rsmith, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22824
llvm-svn: 277269
Benjamin Kramer [Sat, 30 Jul 2016 13:25:37 +0000 (13:25 +0000)]
[Hexagon] Perform bit arithmetic on unsigned to avoid accidentally shifting negative values.
Found by ubsan.
llvm-svn: 277268
Benjamin Kramer [Sat, 30 Jul 2016 12:05:17 +0000 (12:05 +0000)]
Update modulemap for Msf -> MSF rename.
llvm-svn: 277267
Benjamin Kramer [Sat, 30 Jul 2016 11:31:24 +0000 (11:31 +0000)]
[X86] Fix lifetime of SMRange temporaries.
Found by asan -fsanitize-address-use-after-scope.
llvm-svn: 277266
Benjamin Kramer [Sat, 30 Jul 2016 11:31:16 +0000 (11:31 +0000)]
[AMDGPU] Fix lifetime of SmallVector temporaries.
Found by asan -fsanitize-address-use-after-scope.
llvm-svn: 277265
Roman Gareev [Sat, 30 Jul 2016 11:15:00 +0000 (11:15 +0000)]
Add missing prefixes.
llvm-svn: 277264
Roman Gareev [Sat, 30 Jul 2016 09:25:51 +0000 (09:25 +0000)]
Extend the jscop interface to allow the user to declare new arrays and to reference these arrays from access expressions
Extend the jscop interface to allow the user to export arrays. It is required
that already existing arrays of the list of arrays correspond to arrays
of the SCoP. Each array that is appended to the list will be newly created.
Furthermore, we allow the user to modify access expressions to reference
any array in case it has the same element type.
Reviewed-by: Tobias Grosser <tobias@grosser.es>
Differential Revision: https://reviews.llvm.org/D22828
llvm-svn: 277263
Jonathan Coe [Sat, 30 Jul 2016 08:58:54 +0000 (08:58 +0000)]
[clang-tidy] add check cppcoreguidelines-special-member-functions
Summary:
Check for classes that violate the rule of five and zero as specified in CppCoreGuidelines:
"If a class defines or deletes a default operation then it should define or delete them all."
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all.
Reviewers: alexfh, sbenza, aaron.ballman
Subscribers: Prazek, Eugene.Zelenko, cfe-commits, ericLemanissier, nemanjai
Projects: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D22513
llvm-svn: 277262
Argyrios Kyrtzidis [Sat, 30 Jul 2016 02:20:21 +0000 (02:20 +0000)]
[c-index-test] Make sure to check that clang_Cursor_getNumTemplateArguments did not return -1.
llvm-svn: 277261
Matt Arsenault [Sat, 30 Jul 2016 01:40:36 +0000 (01:40 +0000)]
AMDGPU: Fix shouldConvertConstantLoadToIntImm behavior
This should really be true for any immediate, not just
inline ones.
llvm-svn: 277260
Matt Arsenault [Sat, 30 Jul 2016 01:40:34 +0000 (01:40 +0000)]
AMDGPU: Set s_setpc_b64 as a terminator
llvm-svn: 277259
Matt Arsenault [Sat, 30 Jul 2016 01:40:30 +0000 (01:40 +0000)]
AMDGPU: Remove unused pattern
llvm-svn: 277258
Lang Hames [Sat, 30 Jul 2016 00:57:54 +0000 (00:57 +0000)]
[Orc] Add support for updating stub targets to CompileOnDemandLayer.
This makes it possible to implement re-optimization on top of the
CompileOnDemandLayer.
Test case to come in a future patch: This will need an execution test, and
execution tests require a full working stack. The best option is to plumb this
API up to the C Bindings stack and add a C bindings test for this.
Patch by Sean Ogden. Thanks Sean!
llvm-svn: 277257
Hans Wennborg [Sat, 30 Jul 2016 00:41:37 +0000 (00:41 +0000)]
Fix VS2013 build of CGOpenMPRuntime.cpp
It seems the compiler was getting confused by the in-class initializers
in local struct MapInfo, so moving those to a default constructor
instead.
llvm-svn: 277256
Rui Ueyama [Sat, 30 Jul 2016 00:13:30 +0000 (00:13 +0000)]
Remove dead ctor.
llvm-svn: 277255
Hans Wennborg [Sat, 30 Jul 2016 00:08:45 +0000 (00:08 +0000)]
Remove empty DebugInfo/Msf dirs. It seems these were left over from
the renaming from 'Msf' to 'MSF' in r277213.
llvm-svn: 277254
Rui Ueyama [Fri, 29 Jul 2016 23:48:09 +0000 (23:48 +0000)]
Remove trailing whitespace.
llvm-svn: 277253
Weiming Zhao [Fri, 29 Jul 2016 23:33:48 +0000 (23:33 +0000)]
DAG: avoid duplicated truncating for sign extended operand
Summary:
When performing cmp for EQ/NE and the operand is sign extended, we can
avoid the truncaton if the bits to be tested are no less than origianl
bits.
Reviewers: eli.friedman
Subscribers: eli.friedman, aemerson, nemanjai, t.p.northover, llvm-commits
Differential Revision: https://reviews.llvm.org/D22933
llvm-svn: 277252
Lang Hames [Fri, 29 Jul 2016 23:17:53 +0000 (23:17 +0000)]
[Support] Add storage specifier for MachO::NListType.
This should fix UB warnings from the sanitizer bots: LLD performs bit
manipulations on enums of this type, and these are UB if the underlying
storage type isn't specified.
llvm-svn: 277251
Chris Bieneman [Fri, 29 Jul 2016 22:48:17 +0000 (22:48 +0000)]
[Perf-Helper] Add logging for dtrace commands
Logging the dtrace command into the top of the dtrace log is useful when debugging why the order file generation is flaky.
llvm-svn: 277234
Tim Northover [Fri, 29 Jul 2016 22:41:55 +0000 (22:41 +0000)]
GlobalISel: translate "unreachable" (into nothing)
Easiest instruction ever!
llvm-svn: 277225
Tim Northover [Fri, 29 Jul 2016 22:32:36 +0000 (22:32 +0000)]
GlobalISel: support translation of intrinsic calls.
These come in two variants for now: G_INTRINSIC and G_INTRINSIC_W_SIDE_EFFECTS.
We may decide to split the latter up with finer-grained restrictions later, if
necessary.
llvm-svn: 277224
Kevin Enderby [Fri, 29 Jul 2016 22:32:02 +0000 (22:32 +0000)]
Think this will fix issues with the error messages generated for malformed-archives.test
in r277177 and added back this test which was deleted in r277196 while
I tracked down these problems.
Changed from constructing Twine's to std::string's as Twine's don't work
across statements. Also removed a few unneeded Twine() constructions.
Fix the write_escaped() calls to not pass the unintended second argument
fixing the warning on the ld-x86_64-win7 bot.
llvm-svn: 277223
Davide Italiano [Fri, 29 Jul 2016 22:21:28 +0000 (22:21 +0000)]
[LinkerScript] Filler can have a decimal value.
llvm-svn: 277222
Eric Christopher [Fri, 29 Jul 2016 22:11:11 +0000 (22:11 +0000)]
Remove unused variable.
Fixes PR28761.
llvm-svn: 277221
Krzysztof Parzyszek [Fri, 29 Jul 2016 21:49:42 +0000 (21:49 +0000)]
[Hexagon] Referencify MachineInstr in HexagonInstrInfo, NFC
llvm-svn: 277220
Michael Kuperstein [Fri, 29 Jul 2016 21:45:51 +0000 (21:45 +0000)]
[X86] Match PSADBW in straight-line code
Up until now, we only had code to match PSADBW patterns that look like what
comes out of the loop vectorizer - a partial reduction inside the loop body
that gets fed into a horizontal operation in a different basic block.
This adds support for straight-line patterns, like those generated by the
SLP vectorizer.
Differential Revision: https://reviews.llvm.org/D22889
llvm-svn: 277219
Michael Kuperstein [Fri, 29 Jul 2016 21:44:33 +0000 (21:44 +0000)]
[Hexagon] Fix test that uses -debug-only to require asserts.
llvm-svn: 277218
Aaron Ballman [Fri, 29 Jul 2016 21:41:18 +0000 (21:41 +0000)]
Sorting includes; NFC.
llvm-svn: 277217
Rui Ueyama [Fri, 29 Jul 2016 21:38:00 +0000 (21:38 +0000)]
pdbdump: Dump Free Page Map contents.
Differential Revision: https://reviews.llvm.org/D22974
llvm-svn: 277216
Ed Maste [Fri, 29 Jul 2016 21:24:19 +0000 (21:24 +0000)]
libunwind: correct return code in unwinding trace log message
llvm-svn: 277215
Simon Pilgrim [Fri, 29 Jul 2016 21:05:10 +0000 (21:05 +0000)]
[X86][AVX] Fix VBROADCASTF128 selection bug (PR28770)
Support for lowering to VBROADCASTF128 etc. in D22460 was not correctly ensuring that the only users of the 128-bit vector load were the insertions of the vector into the lower/upper subvectors.
llvm-svn: 277214
Zachary Turner [Fri, 29 Jul 2016 20:56:36 +0000 (20:56 +0000)]
[msf] Resubmit "Rename Msf -> MSF".
Previously this change was submitted from a Windows machine, so
changes made to the case of filenames and directory names did
not survive the commit, and as a result the CMake source file
names and the on-disk file names did not match on case-sensitive
file systems.
I'm resubmitting this patch from a Linux system, which hopefully
allows the case changes to make it through unfettered.
llvm-svn: 277213
Paul Osmialowski [Fri, 29 Jul 2016 20:55:03 +0000 (20:55 +0000)]
Make balanced affinity work on AArch64.
This patch enables balanced affinity on machines that do not have
hardware threads and have cores clustered into packages. In facts,
balacing algorithm could be generalized for any arrangement with
at least two levels of hierarchy (depth > 1).
Differential Revision: https://reviews.llvm.org/D22365
llvm-svn: 277212
Paul Robinson [Fri, 29 Jul 2016 20:46:16 +0000 (20:46 +0000)]
Fix CGOpenMPRuntime.cpp for VS2013. NFC.
I don't know why these changes work but they do.
llvm-svn: 277211
Jason Henline [Fri, 29 Jul 2016 20:45:52 +0000 (20:45 +0000)]
[StreamExecutor] Add error handling library
Summary:
Error handling in StreamExecutor is based on llvm::Error and
llvm::Expected. This CL sets up the StreamExecutor wrapper classes in
the streamexecutor namespace.
All the other StreamExecutor code makes use of this error handling code,
so this is the first CL for checking in StreamExecutor.
Reviewers: jlebar, tra
Subscribers: parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D22687
llvm-svn: 277210
Tim Northover [Fri, 29 Jul 2016 20:32:59 +0000 (20:32 +0000)]
CodeGen: add new "intrinsic" MachineOperand kind.
This will be used during GlobalISel, where we need a more robust and readable
way to write tests than a simple immediate ID.
llvm-svn: 277209
Lang Hames [Fri, 29 Jul 2016 20:04:18 +0000 (20:04 +0000)]
[lld][MachO] Replace some std::string with char* buffers to eliminate mem leaks.
The MachO debug support code (committed in r276935) occasionally needs to
allocate string copies, and was doing so by creating std::strings on a
BumpPtrAllocator. The strings were untracked, so the destructors weren't being
run and we were leaking the memory when the allocator was thrown away. Since
it's easier than tracking the strings, this patch switches the copies to char
buffers allocated directly in the bump-ptr allocator.
llvm-svn: 277208
David Majnemer [Fri, 29 Jul 2016 20:01:12 +0000 (20:01 +0000)]
Ensure Ident_GNU_final is properly initialized in the Parser Initialize function
The recent change implementing __final forgot to initialize a variable.
This was caught by the Memory Sanitizer.
Properly initialize the value to nullptr to ensure proper memory reads.
Patch by Erich Keane!
Differential Revision: https://reviews.llvm.org/D22970
llvm-svn: 277206
Reid Kleckner [Fri, 29 Jul 2016 19:43:28 +0000 (19:43 +0000)]
Fix naked.cpp test on 32-bit Windows
llvm-svn: 277205
Eli Bendersky [Fri, 29 Jul 2016 19:35:22 +0000 (19:35 +0000)]
Add a REQUIRES: assert on a Lanai test that uses a -debug-only flag
llvm-svn: 277204
Adam Nemet [Fri, 29 Jul 2016 19:29:47 +0000 (19:29 +0000)]
[LoopUnroll] Include hotness of region in opt remark
LoopUnroll is a loop pass, so the analysis of OptimizationRemarkEmitter
is added to the common function analysis passes that loop passes
depend on.
The BFI and indirectly BPI used in this pass is computed lazily so no
overhead should be observed unless -pass-remarks-with-hotness is used.
This is how the patch affects the O3 pipeline:
Dominator Tree Construction
Natural Loop Information
Canonicalize natural loops
Loop-Closed SSA Form Pass
Basic Alias Analysis (stateless AA impl)
Function Alias Analysis Results
Scalar Evolution Analysis
+ Lazy Branch Probability Analysis
+ Lazy Block Frequency Analysis
+ Optimization Remark Emitter
Loop Pass Manager
Rotate Loops
Loop Invariant Code Motion
Unswitch loops
Simplify the CFG
Dominator Tree Construction
Basic Alias Analysis (stateless AA impl)
Function Alias Analysis Results
Combine redundant instructions
Natural Loop Information
Canonicalize natural loops
Loop-Closed SSA Form Pass
Scalar Evolution Analysis
+ Lazy Branch Probability Analysis
+ Lazy Block Frequency Analysis
+ Optimization Remark Emitter
Loop Pass Manager
Induction Variable Simplification
Recognize loop idioms
Delete dead loops
Unroll loops
...
llvm-svn: 277203
Rafael Espindola [Fri, 29 Jul 2016 19:24:27 +0000 (19:24 +0000)]
Don't crash if PT_TLS is empty.
llvm-svn: 277202
Ahmed Bougacha [Fri, 29 Jul 2016 19:19:32 +0000 (19:19 +0000)]
[GlobalISel] Add missing link components to r277160 unittest. NFC.
It broke a shared builder:
http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/17320
llvm-svn: 277201
Saleem Abdulrasool [Fri, 29 Jul 2016 19:15:51 +0000 (19:15 +0000)]
CodeGen: try harder to make the CFString structure RW
The previous change was insufficient to mark the content as read-write as the
structure itself was marked constant. Adjust this and add tests to ensure that
the section is marked appropriately as being read-write.
llvm-svn: 277200
Simon Pilgrim [Fri, 29 Jul 2016 18:58:57 +0000 (18:58 +0000)]
Fixed line endings
llvm-svn: 277199
Simon Pilgrim [Fri, 29 Jul 2016 18:57:32 +0000 (18:57 +0000)]
Fixed (incorrectly firing) MSVC unused variable warning
llvm-svn: 277198
David Majnemer [Fri, 29 Jul 2016 18:48:27 +0000 (18:48 +0000)]
[ConstantFolding] Handle bitcasts of undef fp vector elements
We used the wrong type for constructing a zero vector element which led
to type mismatches.
This fixes PR28771.
llvm-svn: 277197
Kevin Enderby [Fri, 29 Jul 2016 18:46:24 +0000 (18:46 +0000)]
Remove the test/tools/llvm-objdump/malformed-archives.test for
now while I investagate the bot failures with this test.
llvm-svn: 277196
Simon Pilgrim [Fri, 29 Jul 2016 18:43:59 +0000 (18:43 +0000)]
Fixed MSVC out of range shift warning
llvm-svn: 277195
Zachary Turner [Fri, 29 Jul 2016 18:38:47 +0000 (18:38 +0000)]
Revert "[msf] Rename Msf to MSF."
This reverts commit
4d1557ffac41e079bcb1abbcf04f512474dcd6fe.
llvm-svn: 277194
Yunzhong Gao [Fri, 29 Jul 2016 18:34:21 +0000 (18:34 +0000)]
Improve documentation of the type safety attributes.
1. Add description of the arguments to these attributes.
2. Add missing declarations to some of the MPI code examples.
3. Made clarifications where possible.
Based on the write-up by: Craig Flores.
Differential Revision: https://reviews.llvm.org/D22717
llvm-svn: 277192
Piotr Padlewski [Fri, 29 Jul 2016 18:28:07 +0000 (18:28 +0000)]
Fixing broken MSVS builds
llvm-svn: 277191
Zachary Turner [Fri, 29 Jul 2016 18:24:26 +0000 (18:24 +0000)]
[msf] Rename Msf to MSF.
In a previous patch, it was suggested to use all caps instead of
rolling caps for initialisms, so this patch changes everything
to do this.
llvm-svn: 277190
Andrew Kaylor [Fri, 29 Jul 2016 18:23:18 +0000 (18:23 +0000)]
Recommitting r275284: add support to inline __builtin_mempcpy
Patch by Sunita Marathe
Third try, now following fixes to MSan to handle mempcy in such a way that this commit won't break the MSan buildbots. (Thanks, Evegenii!)
llvm-svn: 277189
Tim Northover [Fri, 29 Jul 2016 18:11:21 +0000 (18:11 +0000)]
GlobalISel: make translate* functions take the most specialized class possible.
NFC.
llvm-svn: 277188
Kyle Butt [Fri, 29 Jul 2016 18:09:28 +0000 (18:09 +0000)]
Codegen: MachineBlockPlacement Improve probability layout.
The following pattern was being layed out poorly:
A
/ \
B C
/ \ / \
D E ? (Doesn't matter)
Where A->B is far more likely than A->C, and prob(B->D) = prob(B->E)
The current algorithm gives:
A,B,C,E (D goes on worklist)
It does this even if C has a frequency count of 0. This patch
adjusts the layout calculation so that if freq(B->E) >> freq(C->E)
then we go ahead and layout E rather than C. Fallthrough half the time
is better than fallthrough never, or fallthrough very rarely. The
resulting layout is:
A,B,E, (C and D are in a worklist)
llvm-svn: 277187
Kyle Butt [Fri, 29 Jul 2016 18:09:25 +0000 (18:09 +0000)]
Tests: Add branch weights to non-layout tests.
Add branch weights to a few tests that aren't testing layout to make them less
sensitive to changes in the layout algorithm.
llvm-svn: 277186
Jim Ingham [Fri, 29 Jul 2016 18:09:12 +0000 (18:09 +0000)]
Some code that is sanity checking stepping out back out from one inlined
frame to another was triggering an early stop when stepping back out to a
real frame. Check that we're doing this only for inlined frames.
<rdar://problem/
26482931>
llvm-svn: 277185
Tim Northover [Fri, 29 Jul 2016 17:58:00 +0000 (17:58 +0000)]
GlobalISel: add generic conditional branch.
Just the basic equivalent to DAG's condbr for now, we'll get to things like
br_cc when we start doing more legalization.
llvm-svn: 277184
Kevin Enderby [Fri, 29 Jul 2016 17:56:00 +0000 (17:56 +0000)]
Matching change needed to lld for llvm trunk change r277177.
Where Archive::getMemoryBufferRef() was changed to return Expected<>
llvm-svn: 277183
Krzysztof Parzyszek [Fri, 29 Jul 2016 17:55:37 +0000 (17:55 +0000)]
[Hexagon] Testcase for not merging stores into a misaligned store
The DAG combiner will try to merge consecutive stores into a bigger
store, unless the resulting store is not fast. Misaligned vector stores
are allowed on Hexagon, but are not fast. Add a testcase to make sure
this type of merging does not occur.
Patch by Pranav Bhandarkar.
llvm-svn: 277182
Yaxun Liu [Fri, 29 Jul 2016 17:52:34 +0000 (17:52 +0000)]
[OpenCL] Add extension cl_khr_mipmap_image to clang
Adding extension cl_khr_mipmap_image to clang's OpenCL Extensions and initiated inside AMDGPU Target.
Patch by Aaron En Ye Shi.
Differential Revision: https://reviews.llvm.org/D22637
llvm-svn: 277181
Krzysztof Parzyszek [Fri, 29 Jul 2016 17:50:47 +0000 (17:50 +0000)]
Revert r277178, the actual change had already been applied
Will submit another patch with the testcase only.
llvm-svn: 277180
Yaxun Liu [Fri, 29 Jul 2016 17:50:10 +0000 (17:50 +0000)]
[OpenCL] Added CLK_ABGR definition for get_image_channel_order return value
Added CLK_ABGR definition for get_image_channel_order return value inside opencl-c.h file.
Patch by Aaron En Ye Shi.
Differential Revision: https://reviews.llvm.org/D22767
llvm-svn: 277179
Krzysztof Parzyszek [Fri, 29 Jul 2016 17:45:16 +0000 (17:45 +0000)]
[Hexagon] Misaligned loads and stores are not fast
The DAG combiner tries to merge stores to adjacent vector wide memory
locations by creating stores which are integral multiples of the vector
width. Discourage this by informing it that this is slow. This should
not affect legalization passes, because all of them ignore the "Fast"
argument.
Patch by Pranav Bhandarkar.
llvm-svn: 277178
Kevin Enderby [Fri, 29 Jul 2016 17:44:13 +0000 (17:44 +0000)]
The next step along the way to getting good error messages for bad archives.
As mentioned in commit log for r276686 this next step is adding a new
method in the ArchiveMemberHeader class to get the full name that
does proper error checking, and can be use for error messages.
To do this the name of ArchiveMemberHeader::getName() is changed to
ArchiveMemberHeader::getRawName() to be consistent with
Archive::Child::getRawName(). Then the “new” method is the addition
of a new implementation of ArchiveMemberHeader::getName() which gets
the full name and provides proper error checking. Which is mostly a rewrite
of what was Archive::Child::getName() and cleaning up incorrect uses of
llvm_unreachable() in the code which were actually just cases of errors
in the input Archives.
Then Archive::Child::getName() is changed to return Expected<> and use
the new implementation of ArchiveMemberHeader::getName() .
Also needed to change Archive::getMemoryBufferRef() with these
changes to return Expected<> as well to propagate Errors up.
As well as changing Archive::isThinMember() to return Expected<> .
llvm-svn: 277177
Tim Northover [Fri, 29 Jul 2016 17:43:52 +0000 (17:43 +0000)]
CodeGen: improve MachineInstrBuilder & MachineIRBuilder interface
For MachineInstrBuilder, having to manually use RegState::Define is ugly and
makes register definitions clunkier than they need to be, so this adds two
convenience functions: addDef and addUse.
For MachineIRBuilder, we want to avoid BuildMI's first-reg-is-def rule because
it's hidden away and causes bugs. So this patch switches buildInstr to
returning a MachineInstrBuilder and adding *all* operands via addDef/addUse.
NFC.
llvm-svn: 277176
Erik Pilkington [Fri, 29 Jul 2016 17:37:38 +0000 (17:37 +0000)]
Reapply r277058: "[ObjC] Consider availability of context when emitting availability warnings"
llvm-svn: 277175
Haojian Wu [Fri, 29 Jul 2016 17:30:13 +0000 (17:30 +0000)]
Fix a typo in document.
llvm-svn: 277174
Ahmed Bougacha [Fri, 29 Jul 2016 16:56:25 +0000 (16:56 +0000)]
[AArch64][GlobalISel] Select G_XOR.
llvm-svn: 277173
Ahmed Bougacha [Fri, 29 Jul 2016 16:56:20 +0000 (16:56 +0000)]
[GlobalISel] Add G_XOR.
llvm-svn: 277172
Ahmed Bougacha [Fri, 29 Jul 2016 16:56:16 +0000 (16:56 +0000)]
[AArch64][GlobalISel] Select G_LOAD/G_STORE.
Mostly straightforward as we ignore addressing modes and just
use the base + unsigned immediate offset (always 0) variants.
This currently fails to select extloads because we have yet to
agree on a representation.
llvm-svn: 277171
Ahmed Bougacha [Fri, 29 Jul 2016 16:56:12 +0000 (16:56 +0000)]
[GlobalISel] Add LLT raw_ostream operator<< overload.
Helpful when debugging; will be used in the following commit.
llvm-svn: 277170
Brendon Cahoon [Fri, 29 Jul 2016 16:44:44 +0000 (16:44 +0000)]
MachinePipeliner pass that implements Swing Modulo Scheduling
Software pipelining is an optimization for improving ILP by
overlapping loop iterations. Swing Modulo Scheduling (SMS) is
an implementation of software pipelining that attempts to
reduce register pressure and generate efficient pipelines with
a low compile-time cost.
This implementaion of SMS is a target-independent back-end pass.
When enabled, the pass should run just prior to the register
allocation pass, while the machine IR is in SSA form. If the pass
is successful, then the original loop is replaced by the optimized
loop. The optimized loop contains one or more prolog blocks, the
pipelined kernel, and one or more epilog blocks.
This pass is enabled for Hexagon only. To enable for other targets,
a couple of target specific hooks must be implemented, and the
pass needs to be called from the target's TargetMachine
implementation.
Differential Review: http://reviews.llvm.org/D16829
llvm-svn: 277169
Krzysztof Parzyszek [Fri, 29 Jul 2016 16:44:27 +0000 (16:44 +0000)]
[Hexagon] Custom lower VECTOR_SHUFFLE and EXTRACT_SUBVECTOR for HVX
If the mask of a vector shuffle has alternating odd or even numbers
starting with 1 or 0 respectively up to the largest possible index
for the given type in the given HVX mode (single of double) we can
generate vpacko or vpacke instruction respectively.
E.g.
%42 = shufflevector <32 x i16> %37, <32 x i16> %41,
<32 x i32> <i32 1, i32 3, ..., i32 63>
is %42.h = vpacko(%41.w, %37.w)
Patch by Pranav Bhandarkar.
llvm-svn: 277168
Matt Masten [Fri, 29 Jul 2016 16:44:24 +0000 (16:44 +0000)]
Initial vectorization support for svml calls (short vector math library).
Differential Revision: https://reviews.llvm.org/D19544
llvm-svn: 277167
Matt Masten [Fri, 29 Jul 2016 16:42:44 +0000 (16:42 +0000)]
Initial support for vectorization using svml (short vector math library).
Differential Revision: https://reviews.llvm.org/D19544
llvm-svn: 277166
George Rimar [Fri, 29 Jul 2016 16:18:47 +0000 (16:18 +0000)]
[ELF] - Linkerscript: implemented SIZEOF(section)
SIZEOF(section)
Return the size in bytes of the named section, if that section has been allocated.
SIZEOF(section) often used in scripts. Few examples from the wild:
https://github.com/chipKIT32/pic32-Arduino-USB-Bootloader-original/blob/master/boot-linkerscript.ld
https://github.com/devkitPro/buildscripts/blob/master/dkarm-eabi/crtls/gba_cart.ld
Patch implements it.
Differential revision: https://reviews.llvm.org/D22915
llvm-svn: 277165