Duncan P. N. Exon Smith [Wed, 17 Aug 2016 00:06:43 +0000 (00:06 +0000)]
AMDGPU: Avoid looking for the DebugLoc in end()
The end() iterator isn't a safe thing to dereference. Pass the DebugLoc
into EmitFetchClause and EmitALUClause to avoid it.
llvm-svn: 278873
Duncan P. N. Exon Smith [Tue, 16 Aug 2016 23:57:56 +0000 (23:57 +0000)]
SimplifyCFG: Avoid dereferencing end()
When comparing a User* to a BasicBlock::iterator in
passingValueIsAlwaysUndefined, don't dereference the iterator in case it
is end().
llvm-svn: 278872
Justin Bogner [Tue, 16 Aug 2016 23:37:10 +0000 (23:37 +0000)]
Revert "Write the TPI stream from a PDB to Yaml."
This is hitting a "use of undeclared identifier 'skipPadding' error
locally and on some bots.
This reverts r278869.
llvm-svn: 278871
Duncan P. N. Exon Smith [Tue, 16 Aug 2016 23:34:07 +0000 (23:34 +0000)]
CodeGen: Avoid dereferencing end() when unconstifying iterators
Rather than doing a funny dance that relies on dereferencing end() not
crashing, add some API to MachineInstrBundleIterator to get a non-const
version of the iterator.
llvm-svn: 278870
Zachary Turner [Tue, 16 Aug 2016 23:28:54 +0000 (23:28 +0000)]
Write the TPI stream from a PDB to Yaml.
Reviewed By: ruiu, rnk
Differential Revision: https://reviews.llvm.org/D23226
llvm-svn: 278869
Justin Bogner [Tue, 16 Aug 2016 23:24:13 +0000 (23:24 +0000)]
Introduce LLVM_FALLTHROUGH, which expands to the C++17 attribute.
This allows you to annotate switch case fallthrough in a better way
than a "// FALLTHROUGH" comment. Eventually it would be nice to turn
on -Wimplicit-fallthrough, if we can get the code base clean.
llvm-svn: 278868
Sanjay Patel [Tue, 16 Aug 2016 23:18:42 +0000 (23:18 +0000)]
[InstCombine] add tests for fold with no coverage and missing vector fold
llvm-svn: 278867
Kyle Butt [Tue, 16 Aug 2016 22:56:14 +0000 (22:56 +0000)]
Codegen: Don't tail-duplicate blocks with un-analyzable fallthrough.
If AnalyzeBranch can't analyze a block and it is possible to
fallthrough, then duplicating the block doesn't make sense, as only one
block can be the layout predecessor for the un-analyzable fallthrough.
Submitted wit a test case, but NOTE: the test case doesn't currently
fail. However, the test case fails with D20505 and would have saved me
some time debugging.
llvm-svn: 278866
Sanjay Patel [Tue, 16 Aug 2016 22:34:42 +0000 (22:34 +0000)]
[InstCombine] clean up foldICmpAddConstant(); NFCI
1. Fix variable names
2. Add local variables to reduce code
3. Fix code comments
4. Add early exit to reduce indentation
5. Remove 'else' after if -> return
6. Hoist common predicate
llvm-svn: 278864
Konstantin Zhuravlyov [Tue, 16 Aug 2016 22:30:11 +0000 (22:30 +0000)]
[AMDGPU] Remove duplicate initialization of SIDebuggerInsertNops pass
Differential Revision: https://reviews.llvm.org/D23556
llvm-svn: 278863
Chris Bieneman [Tue, 16 Aug 2016 22:16:29 +0000 (22:16 +0000)]
[CMake] Workflow improvements to PGO generation
This patch adds a few new convenience options used by the PGO CMake cache to setup options on bootstrap stages. The new options are:
PGO_INSTRUMENT_LTO - Builds the instrumented and final builds with LTO
PGO_BUILD_CONFIGURATION - Accepts a CMake cache script that can be used for complex configuration of the stage2-instrumented and stage2 builds.
The patch also includes a fix for bootstrap dependencies so that the instrumented LTO tools don't get used when building the final stage, and it adds distribution targets to the passthrough.
llvm-svn: 278862
Adrian McCarthy [Tue, 16 Aug 2016 22:11:18 +0000 (22:11 +0000)]
Emit debug info for dynamic classes if they are imported from a DLL.
With -debug-info-kind=limited, we omit debug info for dynamic classes that live in other TUs. This reduces duplicate type information. When statically linked, the type information comes together. But if your binary has a class derived from a base in a DLL, the base class info is not available to the debugger.
The decision is made in shouldOmitDefinition (CGDebugInfo.cpp). Per a suggestion from rnk, I've tweaked the decision so that we do include definitions for classes marked as DLL imports. This should be a relatively small number of classes, so we don't pay a large price for duplication of the type info, yet it should cover most cases on Windows.
Essentially this makes debug info for DLLs independent, but we still assume that all TUs within the same DLL will be consistently built with (or without) debug info and the debugger will be able to search across the debug info within that scope to resolve any declarations into definitions, etc.
llvm-svn: 278861
David Majnemer [Tue, 16 Aug 2016 22:07:32 +0000 (22:07 +0000)]
Preserve the assumption cache more often
We were clearing it out in LoopUnswitch and InlineFunction instead of
attempting to preserve it.
llvm-svn: 278860
Sanjay Patel [Tue, 16 Aug 2016 21:53:19 +0000 (21:53 +0000)]
[InstCombine] use m_APInt to allow icmp (sub X, Y), C folds for splat constant vectors
llvm-svn: 278859
Duncan P. N. Exon Smith [Tue, 16 Aug 2016 21:46:03 +0000 (21:46 +0000)]
CodeGen: Don't dereference end() in MachineBasicBlock::CorrectExtraCFGEdges
The current MachineBasicBlock might be the last block, so FallThru may
be past the end(). Use getNextNode(), which will convert to nullptr,
rather than &*++, which is invalid if we reach the end().
llvm-svn: 278858
Sanjay Patel [Tue, 16 Aug 2016 21:35:16 +0000 (21:35 +0000)]
[x86] Allow merging multiple instances of an immediate within a basic block for code size savings, for 64-bit constants.
This patch handles 64-bit constants which can be encoded as 32-bit immediates.
It extends the functionality added by https://reviews.llvm.org/D11363 for 32-bit constants to 64-bit constants.
Patch by Sunita Marathe!
Differential Revision: https://reviews.llvm.org/D23391
llvm-svn: 278857
Kostya Serebryany [Tue, 16 Aug 2016 21:28:05 +0000 (21:28 +0000)]
[libFuzzer] minor speed improvement
llvm-svn: 278856
Sanjay Patel [Tue, 16 Aug 2016 21:26:10 +0000 (21:26 +0000)]
[InstCombine] fix variable names to match formula comments; NFC
llvm-svn: 278855
David Majnemer [Tue, 16 Aug 2016 21:09:46 +0000 (21:09 +0000)]
[LoopUnroll] Don't clear out the AssumptionCache on each loop
Clearing out the AssumptionCache can cause us to rescan the entire
function for assumes. If there are many loops, then we are scanning
over the entire function many times.
Instead of clearing out the AssumptionCache, register all cloned
assumes.
llvm-svn: 278854
Reid Kleckner [Tue, 16 Aug 2016 21:02:04 +0000 (21:02 +0000)]
Revert "Enhance SCEV to compute the trip count for some loops with unknown stride."
This reverts commit r278731. It caused http://crbug.com/638314
llvm-svn: 278853
Francis Ricci [Tue, 16 Aug 2016 20:52:22 +0000 (20:52 +0000)]
Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration"
This reverts commit
dbb6e905684e2e9488887b26c02ee8881849f09f.
llvm-svn: 278852
Yaxun Liu [Tue, 16 Aug 2016 20:49:49 +0000 (20:49 +0000)]
[OpenCL] AMDGPU: Add extensions cl_amd_media_ops and cl_amd_media_ops2
Differential Revision: https://reviews.llvm.org/D23322
llvm-svn: 278851
Chris Bieneman [Tue, 16 Aug 2016 20:49:49 +0000 (20:49 +0000)]
[CMake] Fixing typo in Info.plist generation
This is causing an error in the generation of the clang info plist.
llvm-svn: 278850
Chris Bieneman [Tue, 16 Aug 2016 20:44:58 +0000 (20:44 +0000)]
[CMake] [Apple Cache] Set CLANG_VENDOR_UTI for Apple builds
This is just a minor update to the Apple packaging configuration.
llvm-svn: 278849
Francis Ricci [Tue, 16 Aug 2016 20:39:10 +0000 (20:39 +0000)]
[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration
Summary: This will allow for the sanitizers to be used when c++ abi is unavailable.
Reviewers: samsonov, beanz, pcc, rnk
Subscribers: llvm-commits, kubabrecka, compnerd, dberris
Differential Revision: https://reviews.llvm.org/D23376
llvm-svn: 278848
Matt Arsenault [Tue, 16 Aug 2016 20:38:05 +0000 (20:38 +0000)]
TailDuplicator: Use range loops
llvm-svn: 278847
Evandro Menezes [Tue, 16 Aug 2016 20:35:01 +0000 (20:35 +0000)]
[AArch64] Adjust the scheduling model for Exynos M1.
Refine the model for the FP division unit.
llvm-svn: 278846
Evandro Menezes [Tue, 16 Aug 2016 20:34:58 +0000 (20:34 +0000)]
[AArch64] Adjust the scheduling model for Exynos M1.
Refine the model for the integer division unit.
llvm-svn: 278845
Matt Arsenault [Tue, 16 Aug 2016 20:28:06 +0000 (20:28 +0000)]
AMDGPU: Remove excessive padding from ImmOp and RegOp.
The structs ImmOp and RegOp are in AArch64AsmParser.cpp (inside
anonymous namespace).
This diff changes the order of fields and removes the excessive padding
(8 bytes).
Patch by Alexander Shaposhnikov
llvm-svn: 278844
Reid Kleckner [Tue, 16 Aug 2016 20:22:49 +0000 (20:22 +0000)]
Fix an instance of -Wmicrosoft-enum-value by making the enum unsigned
llvm-svn: 278843
Reid Kleckner [Tue, 16 Aug 2016 20:20:56 +0000 (20:20 +0000)]
Try to work around an MSVC 2013 bug around defaulted default ctors
An UnresolvedSetIterator() is supposed to be zeroed out, but MSVC 2013
does not do that.
llvm-svn: 278842
Haicheng Wu [Tue, 16 Aug 2016 20:06:25 +0000 (20:06 +0000)]
[BranchFolding] Change a test case of r278575.
Rename the operands to make the test less brittle.
llvm-svn: 278841
Sjoerd Meijer [Tue, 16 Aug 2016 19:50:33 +0000 (19:50 +0000)]
[MBP] do not reorder and move up loop latch block
Do not reorder and move up a loop latch block before a loop header
when optimising for size because this will generate an extra
unconditional branch.
Differential Revision: https://reviews.llvm.org/D22521
llvm-svn: 278840
Kostya Serebryany [Tue, 16 Aug 2016 19:33:51 +0000 (19:33 +0000)]
[libFuzzer] new experimental feature: value profiling. Profiles values that affect control flow and treats new values as new coverage.
llvm-svn: 278839
Benjamin Kramer [Tue, 16 Aug 2016 19:20:10 +0000 (19:20 +0000)]
Remove excessive padding from LineNoCacheTy
The struct LineNoCacheTy is in SourceMgr.cpp inside anonymous namespace.
This diff changes the order of fields and removes the excessive padding
(8 bytes).
Patch by Alexander Shaposhnikov!
Differential revision: https://reviews.llvm.org/D23546
llvm-svn: 278838
David Majnemer [Tue, 16 Aug 2016 18:48:37 +0000 (18:48 +0000)]
Make MDNode::intersect faster than O(n * m)
It is pretty easy to get it down to O(nlogn + mlogm). This
implementation has the added benefit of automatically deduplicating
entries between the two sets.
llvm-svn: 278837
David Majnemer [Tue, 16 Aug 2016 18:48:34 +0000 (18:48 +0000)]
Don't passively concatenate MDNodes
I have audited all the callers of concatenate and none require duplicate
entries to service concatenation.
These duplicates serve no purpose but to needlessly embiggen the IR.
N.B. Layering getMostGenericAliasScope on top of concatenate makes it
O(nlogn + mlogm) instead of O(n*m).
llvm-svn: 278836
Matthias Braun [Tue, 16 Aug 2016 18:28:55 +0000 (18:28 +0000)]
sanitizer_common: Fix warning
Clang added warning that taking the address of a packed struct member
possibly yields an unaligned pointer. This case is benign because
the pointer gets casted to an uptr and not used for unaligned accesses.
Add an intermediate cast to char* until this warning is improved (see
also https://reviews.llvm.org/D20561)
llvm-svn: 278835
Davide Italiano [Tue, 16 Aug 2016 18:23:44 +0000 (18:23 +0000)]
[Driver] Remove break after return. NFCI.
llvm-svn: 278834
Jason Henline [Tue, 16 Aug 2016 18:18:32 +0000 (18:18 +0000)]
[StreamExecutor] Rename StreamExecutor to Executor
Summary: No functional changes just renaming this class for better readability.
Reviewers: jlebar
Subscribers: jprice, parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D23574
llvm-svn: 278833
Krzysztof Parzyszek [Tue, 16 Aug 2016 18:08:40 +0000 (18:08 +0000)]
[Hexagon] Standardize next batch of pseudo instructions
ALIGNA PS_aligna
ALLOCA PS_alloca
TFR_FI PS_fi
TFR_FIA PS_fia
TFR_PdFalse PS_false
TFR_PdTrue PS_true
VMULW PS_vmulw
VMULW_ACC PS_vmulw_acc
llvm-svn: 278832
Gor Nishanov [Tue, 16 Aug 2016 18:04:14 +0000 (18:04 +0000)]
[Coroutines] Part 7: Split coroutine into subfunctions
Summary:
This patch adds simple coroutine splitting logic to CoroSplit pass.
Documentation and overview is here: http://llvm.org/docs/Coroutines.html.
Upstreaming sequence (rough plan)
1.Add documentation. (https://reviews.llvm.org/D22603)
2.Add coroutine intrinsics. (https://reviews.llvm.org/D22659)
...
7. Split coroutine into subfunctions <= we are here
8. Coroutine Frame Building algorithm
9. Handle coroutine with unwinds
10+. The rest of the logic
Reviewers: majnemer
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23461
llvm-svn: 278830
Jason Henline [Tue, 16 Aug 2016 17:58:31 +0000 (17:58 +0000)]
[StreamExecutor] Add basic Stream operations
Summary: Add the Stream class and a few of the operations it supports.
Reviewers: jlebar, tra
Subscribers: jprice, parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D23333
llvm-svn: 278829
Sanjay Patel [Tue, 16 Aug 2016 17:54:36 +0000 (17:54 +0000)]
[InstCombine] add helper functions for foldICmpWithConstant; NFCI
Besides breaking up a 700 line function to improve readability,
this sinks the 'FIXME: ConstantInt' check into each helper. So
now we can independently break that restriction within any of the
helper functions.
As much as possible, the code was only {cut/paste/clang-format}'ed
to minimize risk (no functional changes intended), so several more
readability improvements are still possible.
llvm-svn: 278828
Erik Pilkington [Tue, 16 Aug 2016 17:44:11 +0000 (17:44 +0000)]
[ObjC] Warn on unguarded use of partial declaration
This commit adds a traversal of the AST after Sema of a function that diagnoses
unguarded references to declarations that are partially available (based on
availability attributes). This traversal is only done when we would otherwise
emit -Wpartial-availability.
This commit is part of a feature I proposed here:
http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html
Differential revision: https://reviews.llvm.org/D23003
llvm-svn: 278826
Kostya Serebryany [Tue, 16 Aug 2016 17:37:13 +0000 (17:37 +0000)]
[libFuzzer] refactoring around PCMap, NFC
llvm-svn: 278825
Simon Dardis [Tue, 16 Aug 2016 17:16:11 +0000 (17:16 +0000)]
[mips] Enforce compact branch restrictions
Check both operands for use of the $zero register which cannot be used with
a compact branch instruction.
Reviewers: dsanders, vkalintris
Differential Review: https://reviews.llvm.org/D23547
llvm-svn: 278824
Krzysztof Parzyszek [Tue, 16 Aug 2016 17:14:44 +0000 (17:14 +0000)]
[Hexagon] Clean up some miscellaneous V60 intrinsics a bit
llvm-svn: 278823
Wolfgang Pieb [Tue, 16 Aug 2016 17:12:50 +0000 (17:12 +0000)]
When the inline spiller rematerializes an instruction, take the debug location from the instruction
that immediately follows the rematerialization point.
Patch by Andrea DiBiagio.
Differential Revision: http://reviews.llvm.org/D23539
llvm-svn: 278822
Wei Mi [Tue, 16 Aug 2016 16:57:15 +0000 (16:57 +0000)]
Remove a stale comment from the test, NFC.
llvm-svn: 278821
Filipe Cabecinhas [Tue, 16 Aug 2016 16:38:46 +0000 (16:38 +0000)]
Move the Decorator, ThreadNameWithParenthesis, and DescribeThread to asan_descriptions.{h,cc}
Summary:
Replacement for part of D23518
Code refactoring to allow us to move some more DescribeAddressIf* functions to work by getting the structured information, and then printing it.
Reviewers: kcc, samsonov
Subscribers: kubabrecka, llvm-commits
Differential Revision: https://reviews.llvm.org/D23520
llvm-svn: 278820
Ed Maste [Tue, 16 Aug 2016 16:26:46 +0000 (16:26 +0000)]
ELF: ignored option -G may be joined with its argument
llvm-svn: 278819
Vitaly Buka [Tue, 16 Aug 2016 16:24:10 +0000 (16:24 +0000)]
[Asan] Unpoison red zones even if use-after-scope was disabled with runtime flag
Summary: PR27453
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23481
llvm-svn: 278818
Sanjay Patel [Tue, 16 Aug 2016 16:08:11 +0000 (16:08 +0000)]
[InstCombine] use m_APInt in foldICmpWithConstant; NFCI
There's some formatting and pointer deref ugliness here that I intend to fix in
subsequent patches. The overall goal is to refactor the obnoxiously long switch
and incrementally remove the restriction to scalar types (allow folds for vector
splats). This patch introduces the use of m_APInt which means the RHSV reference
is now a pointer (and may have matched a vector splat), but the check of 'RHS'
remains, so vector folds are disallowed and no functional change is intended.
llvm-svn: 278816
Reid Kleckner [Tue, 16 Aug 2016 16:07:46 +0000 (16:07 +0000)]
Remove most instances of REQUIRES: shell from the tools/extra tests
None of these tests actually require bash, they just have quoting bugs
when paths contain backslashes and colons. Fix them with the "%/T" lit
substitution variants.
llvm-svn: 278815
Reid Kleckner [Tue, 16 Aug 2016 16:04:14 +0000 (16:04 +0000)]
Revert "[X86] Add xgetbv/x[X86] Add xgetbv xsetbv intrinsics to non-windows platforms"
This reverts commit r278783. It breaks usage of _xgetbv on Windows.
llvm-svn: 278814
Krzysztof Parzyszek [Tue, 16 Aug 2016 15:43:54 +0000 (15:43 +0000)]
[Hexagon] Standardize vector predicate load/store pseudo instructions
- Remove unused instructions: LDriq_pred_vec_V6, STriq_pred_vec_V6, and
the 128B counterparts.
- Rename:
LDriq_pred_V6 PS_vloadrq_ai
LDriq_pred_V6_128B PS_vloadrq_ai_128B
STriq_pred_V6 PS_vstorerq_ai
STriq_pred_V6_128B PS_vstorerq_ai_128B
llvm-svn: 278813
Aaron Ballman [Tue, 16 Aug 2016 14:48:39 +0000 (14:48 +0000)]
Reduce the number of allocations required for AST attributes. In test cases, the max resident memory changed from 65760k to 64476k which is 1.9% improvement. Allocations in grow_pod changed from 8847 to 4872 according to tcmalloc heap profiler. Overall running time remained the same.
Patch by Eugene Kosov
llvm-svn: 278812
Samuel Antao [Tue, 16 Aug 2016 14:38:39 +0000 (14:38 +0000)]
Reorder stderr redirection in test command.
llvm-svn: 278811
Ahmed Bougacha [Tue, 16 Aug 2016 14:37:46 +0000 (14:37 +0000)]
[AArch64][GlobalISel] Select G_MUL.
llvm-svn: 278810
Ahmed Bougacha [Tue, 16 Aug 2016 14:37:43 +0000 (14:37 +0000)]
[GlobalISel] Fix G_MUL comment. NFC.
llvm-svn: 278809
Ahmed Bougacha [Tue, 16 Aug 2016 14:37:40 +0000 (14:37 +0000)]
[AArch64][GlobalISel] Factor out unsupported binop check. NFC.
We're going to need it for G_MUL, and, if other targets end up using
something similar, we can easily put it in the generic selector.
llvm-svn: 278808
David Callahan [Tue, 16 Aug 2016 14:31:51 +0000 (14:31 +0000)]
[ADCE] Modify data structures to support removing control flow
Summary:
This is part of a serious of patches to evolve ADCE.cpp to support
removing of unnecessary control flow.
This patch changes the data structures to hold liveness information to
support the additional information we will eventually need. In
particular we now have a notion of basic blocks being live because
they contain a live operations. This will eventually feed into control
dependence analysis of which branches are live. We cater to getting
from instructions to associated block information and from blocks to
information about their terminators.
This patch also changes the structure of the main loop of the
algorithm so that it alternates propagating liveness between
instructions and usign control dependence information to mark branches
live.
We force all terminators live for now until we add code to handlinge
removing control flow in a later patch.
No changes to effective behavior with this patch
Previous patches:
D23065 [ADCE] Refactor anticipating new functionality (NFC)
D23102 [ADCE] Refactoring for new functionality (NFC)
Reviewers: nadav, majnemer, mehdi_amini
Subscribers: freik, twoh, llvm-commits
Differential Revision: https://reviews.llvm.org/D23225
llvm-svn: 278807
Samuel Antao [Tue, 16 Aug 2016 14:31:39 +0000 (14:31 +0000)]
Add empty --gcc-toolchain empty to cuda-detect test.
Unless we overload the default gcc toolchain with an empty string
the system root used in the tests will be ignored if the user builds
clang with a custom gcc toolchain.
llvm-svn: 278806
Brendon Cahoon [Tue, 16 Aug 2016 14:29:24 +0000 (14:29 +0000)]
[Pipeliner] Fix an asssert due to invalid Phi in the epilog
The pipeliner was generating an invalid Phi name for an operand
in the epilog block, which caused an assert in the live variable
analysis pass. The fix is to the code that generates new Phis
in the epilog block. In this case, there is an existing Phi that
needs to be reused rather than creating a new Phi instruction.
Differential Revision: https://reviews.llvm.org/D23513
llvm-svn: 278805
Ahmed Bougacha [Tue, 16 Aug 2016 14:02:47 +0000 (14:02 +0000)]
[AArch64][GlobalISel] Select (variable) shifts.
For now, no support for immediates.
llvm-svn: 278804
Ahmed Bougacha [Tue, 16 Aug 2016 14:02:44 +0000 (14:02 +0000)]
[AArch64][GlobalISel] Robustize select tests. NFC.
Using the same register means nothing was checking for operand order.
llvm-svn: 278803
Ahmed Bougacha [Tue, 16 Aug 2016 14:02:42 +0000 (14:02 +0000)]
[AArch64][GlobalISel] Select p0 G_FRAME_INDEX.
And mark it as legal.
llvm-svn: 278802
Ahmed Bougacha [Tue, 16 Aug 2016 14:02:36 +0000 (14:02 +0000)]
[GlobalISel] Mention pointers in LowLevelType.h. NFC.
llvm-svn: 278801
Francis Ricci [Tue, 16 Aug 2016 13:58:56 +0000 (13:58 +0000)]
Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration"
This reverts commit
cd5fa595648378f38cdad8b07e18433639c28a9c.
llvm-svn: 278800
Pierre Gousseau [Tue, 16 Aug 2016 13:53:53 +0000 (13:53 +0000)]
[x86] Refactor a PowerPC specific ctlz/srl transformation (NFC).
Following the discussion on D22038, this refactors a PowerPC specific setcc -> srl(ctlz) transformation so it can be used by other targets.
Differential Revision: https://reviews.llvm.org/D23445
llvm-svn: 278799
Simon Pilgrim [Tue, 16 Aug 2016 13:33:33 +0000 (13:33 +0000)]
[X86][AVX] Fixed typo in zero element insertion
llvm-svn: 278798
George Rimar [Tue, 16 Aug 2016 13:25:53 +0000 (13:25 +0000)]
[ELF] - Do not exit if -v is specified.
Previously lld showed version number and returned,
that is different from ld and PR28999.
Patch fixed that.
llvm-svn: 278797
Ron Lieberman [Tue, 16 Aug 2016 13:10:09 +0000 (13:10 +0000)]
[Hexagon] Improve test to check for @PCREL, only run llc, not opt -> llc.
llvm-svn: 278796
Sagar Thakur [Tue, 16 Aug 2016 12:55:38 +0000 (12:55 +0000)]
[MemorySanitizer] [MIPS] Changed memory mapping to support pie executable.
Reviewed by eugenis
Differential: D22994
llvm-svn: 278795
Simon Pilgrim [Tue, 16 Aug 2016 12:52:06 +0000 (12:52 +0000)]
[X86][SSE] Add support for combining v2f64 target shuffles to VZEXT_MOVL byte rotations
The combine was only matching v2i64 as it assumed lowering to MOVQ - but we have v2f64 patterns that match in a similar fashion
llvm-svn: 278794
Sagar Thakur [Tue, 16 Aug 2016 12:49:54 +0000 (12:49 +0000)]
[MSAN][MIPS] Changed memory mapping to support pie executable.
Reviewed by eugenis
Differential: D22993
llvm-svn: 278793
Tobias Grosser [Tue, 16 Aug 2016 11:44:48 +0000 (11:44 +0000)]
[ScopInfo] Make scalars used by PHIs in non-affine regions available
Normally this is ensured when adding PHI nodes, but as PHI node dependences
do not need to be added in case all incoming blocks are within the same
non-affine region, this was missed.
This corrects an issue visible in LNT's sqlite3, in case invariant load hoisting
was disabled.
llvm-svn: 278792
Haojian Wu [Tue, 16 Aug 2016 11:15:05 +0000 (11:15 +0000)]
[clang-tidy] readability-implicit-bool-cast forgets to store its options.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23544
llvm-svn: 278791
Simon Pilgrim [Tue, 16 Aug 2016 11:05:47 +0000 (11:05 +0000)]
[X86][AVX512BW] Updated tests to demonstrate AVX512BW's inability to vectorize v64i8 shifts
llvm-svn: 278790
Prakhar Bahuguna [Tue, 16 Aug 2016 10:41:56 +0000 (10:41 +0000)]
Correct the upper bound for a CBZ/CBNZ branch target.
Summary:
Fix for the upper bound check that was causing a build failure.
Reviewers: olista01, rengolin, t.p.northover
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23501
llvm-svn: 278789
Prakhar Bahuguna [Tue, 16 Aug 2016 10:41:52 +0000 (10:41 +0000)]
[Thumb] Validate branch target for CBZ/CBNZ instructions.
Summary:
The assembler currently does not check the branch target for CBZ/CBNZ
instructions, which only permit branching forwards with a positive offset. This
adds validation for the branch target to ensure negative PC-relative offsets are
not encoded into the instruction, whether specified as a literal or as an
assembler symbol.
Reviewers: rengolin, t.p.northover
Subscribers: llvm-commits, rengolin
Differential Revision: https://reviews.llvm.org/D23312
llvm-svn: 278788
Simon Pilgrim [Tue, 16 Aug 2016 10:03:23 +0000 (10:03 +0000)]
[X86][SSE] Add support for combining target shuffles to PALIGNR byte rotations
llvm-svn: 278787
James Molloy [Tue, 16 Aug 2016 09:45:36 +0000 (09:45 +0000)]
Left shifts of negative values are defined if -fwrapv is set
This means we shouldn't emit ubsan detection code or warn.
Fixes PR25552.
llvm-svn: 278786
Pavel Labath [Tue, 16 Aug 2016 09:36:29 +0000 (09:36 +0000)]
Remove GetThreadSuffixSupported from GDBRemoteCommunication **base** class
Despite its comment, the function is only used in the Client class, and its presence was merely
complicating mock implementation in unit tests.
llvm-svn: 278785
Job Noorman [Tue, 16 Aug 2016 08:41:35 +0000 (08:41 +0000)]
[AVR] Fix compile errors
Differential Revision: https://reviews.llvm.org/D23450
llvm-svn: 278784
Marina Yatsina [Tue, 16 Aug 2016 08:13:36 +0000 (08:13 +0000)]
[X86] Add xgetbv/x[X86] Add xgetbv xsetbv intrinsics to non-windows platforms
commit on behalf of guyblank
Differential Revision: https://reviews.llvm.org/D21959
llvm-svn: 278783
Guy Blank [Tue, 16 Aug 2016 06:41:00 +0000 (06:41 +0000)]
[X86] Add xgetbv/xsetbv intrinsics to non-windows platforms
Differential Revision: https://reviews.llvm.org/D21958
llvm-svn: 278782
Eugene Leviant [Tue, 16 Aug 2016 06:40:58 +0000 (06:40 +0000)]
[ELF] Ignore .interp section in case linker script specifies PHDRS without PT_INTERP
llvm-svn: 278781
Kirill Bobyrev [Tue, 16 Aug 2016 06:19:06 +0000 (06:19 +0000)]
[clang-rename] fix broken build
As Eric Fiselier pointed out, r278760 breaks build, because RecursiveASTVisitor
doesn't have a const overload. This patch is a quick fix.
llvm-svn: 278780
David Majnemer [Tue, 16 Aug 2016 06:13:46 +0000 (06:13 +0000)]
[InstSimplify] Fold gep (gep V, C), (xor V, -1) to C-1
llvm-svn: 278779
Mehdi Amini [Tue, 16 Aug 2016 05:49:12 +0000 (05:49 +0000)]
FunctionImport: missed one occurence of ImportListForModule to rename (NFC)
llvm-svn: 278778
Mehdi Amini [Tue, 16 Aug 2016 05:47:12 +0000 (05:47 +0000)]
FunctionImport: rename ImportsForModule to ImportList for consistency (NFC)
llvm-svn: 278777
Mehdi Amini [Tue, 16 Aug 2016 05:46:05 +0000 (05:46 +0000)]
[LTO] Simplify APIs and constify (NFC)
Summary:
Multiple APIs were taking a StringMap for the ImportLists containing
the entries for for all the modules while operating on a single entry
for the current module. Instead we can pass the desired ModuleImport
directly. Also some of the APIs were not const, I believe just to be
able to use operator[] on the StringMap.
Reviewers: tejohnson
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23537
llvm-svn: 278776
Sagar Thakur [Tue, 16 Aug 2016 05:06:56 +0000 (05:06 +0000)]
[TSan][MIPS] Implements setjmp assembly for MIPS64
Reviewed by dvyukov
Differential: https://reviews.llvm.org/D23494
llvm-svn: 278775
Saleem Abdulrasool [Tue, 16 Aug 2016 04:12:36 +0000 (04:12 +0000)]
Symbol: add missing item in covered switch
RenderScript was missing from the covered switch. Add it to avoid a warning of
the missing entry. NFC.
llvm-svn: 278774
Eric Fiselier [Tue, 16 Aug 2016 03:44:55 +0000 (03:44 +0000)]
Default LIBCXXABI_LIBDIR_SUFFIX to LLVM_LIBDIR_SUFFIX
llvm-svn: 278773
Francis Ricci [Tue, 16 Aug 2016 02:15:51 +0000 (02:15 +0000)]
[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration
Summary: This will allow for the sanitizers to be used when c++ abi is unavailable.
Reviewers: samsonov, beanz, pcc, rnk
Subscribers: llvm-commits, kubabrecka, compnerd, dberris
Differential Revision: https://reviews.llvm.org/D23376
llvm-svn: 278772
Petr Hosek [Tue, 16 Aug 2016 01:11:16 +0000 (01:11 +0000)]
[ELF] Linkerscript: support hidden symbols assignments
This add support for HIDDEN command which can be used to define
a symbol that will be hidden and won't be exported.
Differential Revision: https://reviews.llvm.org/D23534
llvm-svn: 278770
Francis Ricci [Tue, 16 Aug 2016 01:11:07 +0000 (01:11 +0000)]
Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration"
This reverts commit
9528d86531b1289600e18c407b8e992d7fedb94f.
llvm-svn: 278769