OSDN Git Service
Hiroshi Inoue [Tue, 11 Jul 2017 05:28:26 +0000 (05:28 +0000)]
[PowerPC] avoid redundant analysis while lowering an immediate; NFC
This patch reduces compilation time by avoiding redundant analysis while selecting instructions to create an immediate.
If the instruction count required to create the input number without rotate is 2, we do not need further analysis to find a shorter instruction sequence with rotate; rotate + load constant cannot be done by 1 instruction (i.e. getInt64CountDirectnever return 0).
This patch should not change functionality.
Differential Revision: https://reviews.llvm.org/D34986
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307623
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Tue, 11 Jul 2017 05:14:40 +0000 (05:14 +0000)]
[AVR] Remove a few very old TODOs that don't have enough context to understand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307622
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 11 Jul 2017 05:12:52 +0000 (05:12 +0000)]
[InstCombine] Add test case for PR33721.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307621
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Tue, 11 Jul 2017 04:53:43 +0000 (04:53 +0000)]
[AVR] Rename 'ZREGS' to 'ZREG'
It will only ever contain one register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307620
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Tue, 11 Jul 2017 04:45:15 +0000 (04:45 +0000)]
[AVR] Rename 'AVRTiny' to 'Tiny'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307619
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Tue, 11 Jul 2017 04:17:13 +0000 (04:17 +0000)]
[AVR] Use the generic branch relaxer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307617
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 11 Jul 2017 02:31:54 +0000 (02:31 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307614
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 11 Jul 2017 02:31:51 +0000 (02:31 +0000)]
Revert r307581, "Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet."
It broke stage2 tests in selfhosting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307613
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 11 Jul 2017 02:21:57 +0000 (02:21 +0000)]
[WebAssembly] Fix use of cast vs dyn_cast
Differential Revision: https://reviews.llvm.org/D35233
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307612
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 11 Jul 2017 01:42:12 +0000 (01:42 +0000)]
[llvm-cov] Disable threading in a test. NFC.
PR30735 reports an issue where llvm-cov hangs with a worker thread
waiting on a condition, and the main thread waiting to join() the
workers. While this doesn't appear to be a bug in llvm-cov or the
ThreadPool implementation, it would be helpful to disable the use of
threading in the llvm-cov tests where no test coverage is added.
More context: https://bugs.llvm.org/show_bug.cgi?id=30735
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307610
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 11 Jul 2017 01:23:29 +0000 (01:23 +0000)]
[llvm-cov] Add a cl::opt to control the number of threads
When an output directory is specified, llvm-cov spawns some threads to
speed up the process of writing out file reports. Add an option which
allows users to control how many threads llvm-cov uses.
A CommandGuide.rst update + test is included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307609
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 11 Jul 2017 01:18:28 +0000 (01:18 +0000)]
llvm-profdata: Improve memory usage by tuning SmallDenseMap size
This takes memory usage from 5.1GB to 970MB - it could go further by
using a small size of 2 instead of the default of 4, but given the
rather high cost of going over this limit by much, I figured a little
slosh would be worth the ~130MB of memory usage.
& this'll might not be such a big deal if we use a custom slab allocator
for the DenseMaps here anyway
While the vast majority (99.9%) of records use only 1 entry, the tuning
parameter to SmallDenseMap is the the number of buckets, not the number
of entries - so a small size of 1 wasn't useful, even for 1 element, it
would tip over into allocating (much, 64 slots worth) more space - none
of them ended up small.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307608
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Tue, 11 Jul 2017 01:17:44 +0000 (01:17 +0000)]
[cmake] Check for Haiku when setting LIB_NAMES for GNU ld
Haiku uses GNU ld for linking, but is not captured in the
conditional when setting LIB_NAMES. This causes a shared
library with no symbols on Haiku. This patch simply adds
a check for whether the CMake system name is Haiku in
addition to the existing checks.
Patch by Jérôme Duval.
Differential Revision: https://reviews.llvm.org/D34998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307607
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Tue, 11 Jul 2017 00:48:00 +0000 (00:48 +0000)]
Remove circular dependency from runtimes/CMakeLists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307605
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Jul 2017 22:40:20 +0000 (22:40 +0000)]
[lld/pdb] Create an empty public symbol record stream.
This is part of the continuing effort to increase parity between
LLD and MSVC PDBs. link still doesn't like our PDBs, so the most
obvious thing to check was whether adding an empty publics stream
would get it to do something else. It still fails in the same way
but at least this removes one more variable from the equation.
The next logical step would be to try creating an empty globals
stream.
Differential Revision: https://reviews.llvm.org/D35224
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307598
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Mon, 10 Jul 2017 22:11:50 +0000 (22:11 +0000)]
Doxygen formatting. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307597
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 10 Jul 2017 21:44:43 +0000 (21:44 +0000)]
InstrProf: Fix unit test which accidentally used a duplicate name
This unit test constructed some profile records incorrectly. One of the
records had a duplicate name: adding that record into the writer caused
an error unrelated to what needed to be tested.
Reported by David Blaikie!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307596
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Jul 2017 21:01:37 +0000 (21:01 +0000)]
[lld/pdb] Add some basic linker module symbols.
Differential Revision: https://reviews.llvm.org/D35152
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307590
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 10 Jul 2017 20:51:30 +0000 (20:51 +0000)]
Revert "[DAG] Improve Aliasing of operations to static alloca"
Reverting as it breaks tramp3d-v4 in the llvm test-suite. I added some
comments to https://reviews.llvm.org/D33345 about it.
This reverts commit r307546.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307589
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 10 Jul 2017 20:47:12 +0000 (20:47 +0000)]
[WebAssembly] Add more details to llvm-readobj for wasm files
Differential Revision: https://reviews.llvm.org/D35208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307588
91177308-0d34-0410-b5e6-
96231b3b80d8
Leo Li [Mon, 10 Jul 2017 20:45:34 +0000 (20:45 +0000)]
[ConstantHoisting] Remove dupliate logic in constant hoisting
Summary:
As metioned in https://reviews.llvm.org/D34576, checkings in
`collectConstantCandidates` can be replaced by using
`llvm::canReplaceOperandWithVariable`.
The only special case is that `collectConstantCandidates` return false for
all `IntrinsicInst` but it is safe for us to collect constant candidates from
`IntrinsicInst`.
Reviewers: pirama, efriedma, srhines
Reviewed By: efriedma
Subscribers: llvm-commits, javed.absar
Differential Revision: https://reviews.llvm.org/D34921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307587
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 10 Jul 2017 20:45:00 +0000 (20:45 +0000)]
[NewGVN] Simplify a lambda a little bit. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307586
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 10 Jul 2017 20:43:26 +0000 (20:43 +0000)]
[WebAssembly] Be consistent in generating trivial test input files
For each checked-in wasm file, make sure the there is
corresponding .ll file that can be used to regenerate it
if needed.
Add test/Object/Inputs/trivial-object-test.wasm to match other
formats and add some new wasm tests in test/Object.
Differential Revision: https://reviews.llvm.org/D35213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307585
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Mon, 10 Jul 2017 20:25:54 +0000 (20:25 +0000)]
Add DAG argument to canMergeStoresTo NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307583
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 10 Jul 2017 20:16:44 +0000 (20:16 +0000)]
[Hexagon] Convert typed ISD opcodes to generic ones, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307582
91177308-0d34-0410-b5e6-
96231b3b80d8
Farhana Aleen [Mon, 10 Jul 2017 20:15:40 +0000 (20:15 +0000)]
Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet.
Reviewers: Daniel Berlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34478
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307581
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 10 Jul 2017 20:13:44 +0000 (20:13 +0000)]
[Hexagon] Remove unused ISD opcodes, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307580
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Mon, 10 Jul 2017 20:12:54 +0000 (20:12 +0000)]
Use DenseMap instead std::map for GVSummaryMapTy.
Summary: This speeds-up thin-link by ~47% for large programs.
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: sanjoy, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D35148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307578
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 10 Jul 2017 20:04:35 +0000 (20:04 +0000)]
AMDGPU: Allow SIShrinkInstructions to fold FrameIndexes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307576
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 10 Jul 2017 19:53:57 +0000 (19:53 +0000)]
AMDGPU: Allow SIShrinkInstructions to work in non-SSA
Immediates can be folded as long as the immediate is a vreg.
Also undo commuting instructions if it didn't fold an immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307575
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 10 Jul 2017 19:33:38 +0000 (19:33 +0000)]
AMDGPU: Remove unnecessary check for constant operands
An instruction that has an immediate operand can't reach
this point. This is only called for a freshly shrunk instruction,
which prevously couldn't have had a literal constant operand.
This was also not conservative enough since it woudl also have
had to filter other constant-like inputs like frame indexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307574
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Mon, 10 Jul 2017 19:24:05 +0000 (19:24 +0000)]
AMDGPU: Do not test for SI in getIsaVersion
SI is being tested by isa version in the first two if statements of the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307573
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Mon, 10 Jul 2017 19:23:28 +0000 (19:23 +0000)]
[CMake] Dependencies for tests in "runtimes"
Many of the test cases in the runtimes require LLVM's testing tools, to
facilitate this working as expected we need to have all the test targets
in the runtimes depend on all LLVM testing tools used in the runtimes.
Differential Revision: https://reviews.llvm.org/D33048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307572
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Jul 2017 19:16:49 +0000 (19:16 +0000)]
Resubmit "Add pdb-diff test."
This was originally reverted because of two issues.
1) Printing ANSI color escape codes even when outputting to
a file
2) Module name comparisons were failing when comparing a PDB
generated on one machine to a PDB generated on another
machine.
I attempted to fix #2 by adding command line options which let
you specify prefixes to strip from the beginning of embedded
paths, which effectively lets us specify a path to "base" each
PDB from and only compare the parts under the base. But this is
tricky because PDB paths always use Windows path syntax, even
when they are created on non-Windows hosts. A problem still
existed when constructing the prefix to strip, where we were
accidentally using a host-specific path separator instead of
a Windows path separator.
This resubmission fixes the issue on Linux (and I have verified
that the test now passes on Linux).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307571
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Mon, 10 Jul 2017 18:58:05 +0000 (18:58 +0000)]
[cmake] Remove obsolete unset in CMake.
Differential Revision: https://reviews.llvm.org/D35024
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307569
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Mon, 10 Jul 2017 18:56:51 +0000 (18:56 +0000)]
[docs] Remove obsolete section in CMake documentation.
Differential Revision: https://reviews.llvm.org/D35023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307568
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 10 Jul 2017 18:38:52 +0000 (18:38 +0000)]
[Hexagon] Fix check for HMOTF_ConstExtend operand flag
This fixes https://llvm.org/PR33718.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307566
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 10 Jul 2017 18:36:34 +0000 (18:36 +0000)]
[WebAssembly] Use the correct size for MCFillFragment
Summary: When implementing MCFillFragment, use the size of the fragment,
rather than the size of the section.
Patch by Dan Gohman
Differential Revision: https://reviews.llvm.org/D35090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307565
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 10 Jul 2017 18:31:02 +0000 (18:31 +0000)]
[Hexagon] Handle Hexagon-specific machine operand target flags in MIR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307564
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Jiang [Mon, 10 Jul 2017 18:11:23 +0000 (18:11 +0000)]
[PPC CodeGen] Expand the bitreverse.i64 intrinsic.
Differential Revision: https://reviews.llvm.org/D34908
Fix PR: https://bugs.llvm.org/show_bug.cgi?id=33093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307563
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Mon, 10 Jul 2017 17:37:36 +0000 (17:37 +0000)]
[Docs] Updating CMake docs to include LLVM_REVERSE_ITERATION
Reviewers: beanz, mehdi_amini
Reviewed By: beanz
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D35080
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307560
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Jul 2017 17:32:47 +0000 (17:32 +0000)]
Revert "Build fixes for pdb-diff test."
This reverts commit
180af3fdbdb17ec35b45ec1f925fd743b28d37e1.
This is still breaking due to linux-specific path differences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307559
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Jul 2017 17:01:28 +0000 (17:01 +0000)]
Build fixes for pdb-diff test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307556
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Jul 2017 16:52:15 +0000 (16:52 +0000)]
Fix pdb-diff test.
A test was checked in on Friday that worked by checking in an
object file and PDB generated locally by MSVC, and then having
the test run lld-link on the object file and diffing LLD's PDB
against the checked in PDB.
This failed because part of the diffing algorithm involves
determining if two modules are the same, and if so drilling into
the module and diffing individual fields of the module. The
only thing we can use to make this determination though is the
"name" of the module, which is a path to where the module (obj
file) was read from on the machine where it was linked. This
fails for obvious reasons when comparing a PDB generated on one
machine to a PDB on another machine.
The fix employed here is to add two command line options to the
diff subcommand, which allow the user to specify a "binary root
path". The bin root path, if specified, is stripped from the
beginning of any embedded PDB paths. The test is updated to
specify the user's local test output directory for the left
PDB, and is hardcoded to the location where the original PDB
was created for the right PDB. This way all the equivalence
comparisons should succeed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307555
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Guelton [Mon, 10 Jul 2017 16:51:40 +0000 (16:51 +0000)]
Fix invalid cast in instcombine UMul/ZExt idiom
Fixes https://bugs.llvm.org/show_bug.cgi?id=25454
Do not assume IRBuilder creates Instruction where it can create Value.
Do not assume idiom operands are constant, leave generalisation ot the IRBuilder.
Differential Revision: https://reviews.llvm.org/D35114
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307554
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Mon, 10 Jul 2017 16:44:45 +0000 (16:44 +0000)]
[PowerPC] Reduce register pressure by not materializing a constant just for use as an index register for X-Form loads/stores.
For this example:
float test (int *arr) {
return arr[2];
}
We currently generate the following code:
li r4, 8
lxsiwax f0, r3, r4
xscvsxdsp f1, f0
With this patch, we will now generate:
addi r3, r3, 8
lxsiwax f0, 0, r3
xscvsxdsp f1, f0
Originally reported in: https://bugs.llvm.org/show_bug.cgi?id=27204
Differential Revision: https://reviews.llvm.org/D35027
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307553
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Mon, 10 Jul 2017 16:36:03 +0000 (16:36 +0000)]
[X86] Model 256-bit AVX instructions in the AMD Jaguar scheduler Part-1 (PR28573).
The new version of the model is definitely faster.
Differential Revision:
https://reviews.llvm.org/D35198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307552
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Liu [Mon, 10 Jul 2017 16:05:18 +0000 (16:05 +0000)]
[LLVM] Get rid of white spaces in file names in a DebugInfo test. NFC
Summary: White spaces in file names are causing Phabricator/SVN to crash.
Reviewers: bkramer
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35206
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307550
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Mon, 10 Jul 2017 15:39:41 +0000 (15:39 +0000)]
[DAG] Improve Aliasing of operations to static alloca
Memory accesses offset from frame indices may alias, e.g., we
may merge write from function arguments passed on the stack when they
are contiguous. As a result, when checking aliasing, we consider the
underlying frame index's offset from the stack pointer.
Static allocs are realized as stack objects in SelectionDAG, but its
offset is not set until post-DAG causing DAGCombiner's alias check to
consider access to static allocas to frequently alias. Modify isAlias
to consider access between static allocas and access from other frame
objects to be considered aliasing.
Many test changes are included here. Most are fixes for tests which
indirectly relied on our aliasing ability and needed to be modified to
preserve their original intent.
The remaining tests have minor improvements due to relaxed
ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll
which has a minor degradation dispite though the pre-legalized DAG is
improved.
Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand
Reviewed By: rnk
Subscribers: sdardis, nemanjai, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33345
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307546
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Mon, 10 Jul 2017 15:31:53 +0000 (15:31 +0000)]
Use emplace_back to replace size() and resize().
Summary: This speeds-up thin-link for ~29% for large programs.
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: grandinj, sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D35145
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307543
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Mon, 10 Jul 2017 15:29:38 +0000 (15:29 +0000)]
[LoopUnrollRuntime] Remove strict assert about VMap requirement
When unrolling under multiple exits which is under off-by-default option,
the assert that checks for VMap entry in loop exit values is too strong.
(assert if VMap entry did not exist, the value should be a
constant). However, values derived from
constants or from values outside loop, does not have a VMap entry too.
Removed the assert and added a testcase showcasing the property for
non-constant values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307542
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Pfaffe [Mon, 10 Jul 2017 13:54:23 +0000 (13:54 +0000)]
[PM] Fix a warning.
The DebugLogging argument was unused in the EP callbacks registration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307536
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Pfaffe [Mon, 10 Jul 2017 12:48:51 +0000 (12:48 +0000)]
[PM] Fix r307532: Get rid of a dangling reference.
Escaping lambda by-reference capture of local variable caused a dangling
reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307534
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Mon, 10 Jul 2017 12:44:25 +0000 (12:44 +0000)]
fix typos in comments and error messages; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307533
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Pfaffe [Mon, 10 Jul 2017 10:57:55 +0000 (10:57 +0000)]
[PM] Enable registration of out-of-tree passes with PassBuilder
Summary:
This patch adds a callback registration API to the PassBuilder,
enabling registering out-of-tree passes with it.
Through the Callback API, callers may register callbacks with the
various stages at which passes are added into pass managers, including
parsing of a pass pipeline as well as at extension points within the
default -O pipelines.
Registering utilities like `require<>` and `invalidate<>` needs to be
handled manually by the caller, but a helper is provided.
Additionally, adding passes at pipeline extension points is exposed
through the opt tool. This patch adds a `-passes-ep-X` commandline
option for every extension point X, which opt parses into pipelines
inserted into that extension point.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: lksbhm, grosser, davide, mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307532
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Mon, 10 Jul 2017 10:42:55 +0000 (10:42 +0000)]
[ARM] Tidy up ARMBaseRegisterInfo implementation. NFC
Clean up ARMBaseRegisterInfo implementation a bit.
Differential Revision: https://reviews.llvm.org/D35116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307531
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 10 Jul 2017 10:04:51 +0000 (10:04 +0000)]
[DWARF] - Rename variable. NFC.
Variable was called 'Name' and contained text
name of relocation type. Problem was that
outside of this error handling scope we already
have different 'Name' variable that contains
section name.
Change helps to avoid confusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307530
91177308-0d34-0410-b5e6-
96231b3b80d8
Gadi Haber [Mon, 10 Jul 2017 09:53:16 +0000 (09:53 +0000)]
This patch completely replaces the scheduling information for the SandyBridge architecture target by modifying the file X86SchedSandyBridge.td located under the X86 Target.
The SandyBridge architects have provided us with a more accurate information about each instruction latency, number of uOPs and used ports and I used it to replace the existing estimated SNB instructions scheduling and to add missing scheduling information.
Please note that the patch extensively affects the X86 MC instr scheduling for SNB.
Also note that this patch will be followed by additional patches for the remaining target architectures HSW, IVB, BDW, SKL and SKX.
The updated and extended information about each instruction includes the following details:
•static latency of the instruction
•number of uOps from which the instruction consists of
•all ports used by the instruction's' uOPs
For example, the following code dictates that instructions, ADC64mr, ADC8mr, SBB64mr, SBB8mr have a static latency of 9 cycles. Each of these instructions is decoded into 6 micro operations which use ports 4, ports 2 or 3 and port 0 and ports 0 or 1 or 5:
def SBWriteResGroup94 : SchedWriteRes<[SBPort4,SBPort23,SBPort0,SBPort015]> {
let Latency = 9;
let NumMicroOps = 6;
let ResourceCycles = [1,2,2,1];
}
def: InstRW<[SBWriteResGroup94], (instregex "ADC64mr")>;
def: InstRW<[SBWriteResGroup94], (instregex "ADC8mr")>;
def: InstRW<[SBWriteResGroup94], (instregex "SBB64mr")>;
def: InstRW<[SBWriteResGroup94], (instregex "SBB8mr")>;
Note that apart for the header, most of the X86SchedSandyBridge.td file was generated by a script.
Reviewers: zvi, chandlerc, RKSimon, m_zuckerman, craig.topper, igorb
Differential Revision: https://reviews.llvm.org/D35019#inline-304691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307529
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 10 Jul 2017 09:36:44 +0000 (09:36 +0000)]
[DWARF] - Remove unused variables. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307528
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 10 Jul 2017 09:26:09 +0000 (09:26 +0000)]
[GlobalISel][X86] Support G_LOAD/G_STORE i1.
Summary: Support G_LOAD/G_STORE i1.
Reviewers: zvi, guyblank
Reviewed By: guyblank
Subscribers: rovka, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D35178
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307527
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 10 Jul 2017 09:07:34 +0000 (09:07 +0000)]
[GlobalISel][X86] extend G_ZEXT support.
Summary:
Mark G_ZEXT/G_SEXT i1 to i8/i16, i8 to i16 as legal.
Support G_ZEXT i1 to i8/i16 instruction selection ( C++ code).
This patch requred to support G_LOAD/G_STORE i1.
Reviewers: zvi, guyblank
Reviewed By: guyblank
Subscribers: rovka, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D35177
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307526
91177308-0d34-0410-b5e6-
96231b3b80d8
Kirill Bobyrev [Mon, 10 Jul 2017 09:07:23 +0000 (09:07 +0000)]
[docs] NFC: Fix links in the tutorial
r274441 introduced Chapter 10 of "Implementing a Language with LLVM" tutorial,
which caused all files in the tutorial to start using two digit numbering. But
many links were not changed and therefore appear to be broken. This patch
addresses described issue.
As a result, following command does not produce any output anymore:
$ grep -nR '<LangImpl[0-9].html>' ./docs/tutorial/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307525
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Mon, 10 Jul 2017 06:32:52 +0000 (06:32 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307523
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 10 Jul 2017 06:09:22 +0000 (06:09 +0000)]
[X86] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307522
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Mon, 10 Jul 2017 06:07:24 +0000 (06:07 +0000)]
[ArgumentPromotion] Change use of removed argument in llvm.dbg.value to undef
Summary:
This solves PR33641.
When removing a dead argument we must also handle possibly existing calls
to llvm.dbg.value that use the removed argument. Now we change the use
of the otherwise dead argument to an undef for some other pass to cleanup
later.
If the calls are left untouched, they will later on cause errors:
"function-local metadata used in wrong function"
since the ArgumentPromotion rewrites the code by creating a new function
with the wanted signature, but the metadata is not recreated so the new
function may then erroneously use metadata from the old function.
Reviewers: mstorsjo, rnk, arsenm
Reviewed By: rnk
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D34874
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307521
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 10 Jul 2017 06:04:11 +0000 (06:04 +0000)]
[X86] Remove asserts from getX86CpuIDAndInfo/getX86CpuIDAndInfoEx. Restore past behavior of returning an unsupported indication to the caller instead.
These asserts could only occur if we fail to properly detect the compiler, but an assert is not a good way to do that because it doesn't work in release builds.
I wonder if we could use #error?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307520
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 10 Jul 2017 05:41:14 +0000 (05:41 +0000)]
[ADT] Fix another "oops" spotted by eddyb and reported in IRC.
This test pretty clearly should be calling 'maxnum' here. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307519
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 10 Jul 2017 03:04:59 +0000 (03:04 +0000)]
llvm-profdata: Reduce memory usage by using Error callback rather than member
Reduces llvm-profdata memory usage on a large profile from 7.8GB to 5.1GB.
The ProfData API now supports reporting all the errors/warnings rather
than only the first, though llvm-profdata ignores everything after the
first for now to preserve existing behavior. (if there's a desire for
other behavior, happy to implement that - but might be as well left for
a separate patch)
Reviewers: davidxl
Differential Revision: https://reviews.llvm.org/D35149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307516
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 9 Jul 2017 23:06:05 +0000 (23:06 +0000)]
CGSCCPassManagerTest.cpp: Fix warnings. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307511
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 9 Jul 2017 19:22:48 +0000 (19:22 +0000)]
[X86] Relax an assertion when legalizing vector types.
WidenVSELECTAndMask can fold (and it folds in this case) so we
get a BUILD_VECTOR of constants as mask. convertMask() seems to
work fine when the input is a vector of constants, and we still
need to call it to extend/add elements at the end. but the current
code just asserts on anything but a SETCC or AND/OR/XOR of 2xSETCC.
This change was discussed briefly with Simon Pilgrim, who also
suggests we might consider dropping this assertion in the future.
Fixes PR33715.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307508
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 9 Jul 2017 16:57:10 +0000 (16:57 +0000)]
[X86] Allow GHC calling convention to use YMM and ZMM registers
GHC 8.4 will know how to use YMM and ZMM registers for calls.
Submitted on behalf of @bgamari (Ben Gamari)
Differential Revision: https://reviews.llvm.org/D34854
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307504
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sun, 9 Jul 2017 16:36:35 +0000 (16:36 +0000)]
[AVR] Fix test errors due to tied operands not matching
Broken due to r307259.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307503
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 9 Jul 2017 16:01:04 +0000 (16:01 +0000)]
Handle ConstantExpr correctly in SelectionDAGBuilder
This change fixes a bug in SelectionDAGBuilder::visitInsertValue and SelectionDAGBuilder::visitExtractValue where constant expressions (InsertValueConstantExpr and ExtractValueConstantExpr) would be treated as non-constant instructions (InsertValueInst and ExtractValueInst). This bug resulted in an incorrect memory access, which manifested as an assertion failure in SDValue::SDValue.
Fixes PR#33094.
Submitted on behalf of @Praetonus (Benoit Vey)
Differential Revision: https://reviews.llvm.org/D34538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307502
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 9 Jul 2017 15:47:43 +0000 (15:47 +0000)]
[X86][AVX512] Regenerate AVX512VL comparison tests.
Show poor codegen on KNL targets as mentioned on D35179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307500
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jul 2017 13:45:11 +0000 (13:45 +0000)]
[PM] Fix a nasty bug in the new PM where we failed to properly
invalidation of analyses when merging SCCs.
While I've added a bunch of testing of this, it takes something much
more like the inliner to really trigger this as you need to have
partially-analyzed SCCs with updates at just the right time. So I've
added a direct test for this using the inliner and verifying the
domtree. Without the changes here, this test ends up finding a stale
dominator tree.
However, to handle this properly, we need to invalidate analyses
*before* merging the SCCs. After talking to Philip and Sanjoy about this
they convinced me this was the right approach. To do this, we need
a callback mechanism when merging SCCs so we can observe the cycle that
will be merged before the merge happens. This API update ended up being
surprisingly easy.
With this commit, the new PM passes the test-suite again. It hadn't
since MemorySSA was enabled for EarlyCSE as that also will find this bug
very quickly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307498
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jul 2017 13:16:55 +0000 (13:16 +0000)]
[PM] Add unittesting of the call graph update logic with complex
dependencies between analyses.
This uncovers even more issues with the proxies and the splitting apart
of SCCs which are fixed in this patch. I discovered this while trying to
add more rigorous testing for a change I'm making to the call graph
update invalidation logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307497
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jul 2017 07:37:47 +0000 (07:37 +0000)]
[ADT] Fix a test case to use a correct escape for a null byte followed
by a valid octal digit.
The length argument shows that this was in fact the intent.
This was pointed out in IRC, thanks to eddyb!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307496
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Jul 2017 07:26:14 +0000 (07:26 +0000)]
[X86] Remove check for AVX512 support from skylake-avx512 detection in getHostCPUName.
Users of getHostCPUName should also use getHostCPUFeatures which will take care of making sure avx512 is disabled if the CPU doesn't support it. This is consistent with what we do for other CPUs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307495
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 9 Jul 2017 07:25:57 +0000 (07:25 +0000)]
[GlobalISel][X86] Add legalizer tests for G_LOAD/G_STORE operations. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jul 2017 07:23:27 +0000 (07:23 +0000)]
[PM] Teach PreservedAnalyses to have an `allInSet` static factory
function template to simplify building a quick object with a set marked
as preserved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307493
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Jul 2017 07:04:03 +0000 (07:04 +0000)]
[IR] Add Type::isIntOrIntVectorTy(unsigned) similar to the existing isIntegerTy(unsigned), but also works for vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307492
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Jul 2017 07:04:00 +0000 (07:04 +0000)]
[IR] Make use of Type::isPtrOrPtrVectorTy/isIntOrIntVectorTy/isFPOrFPVectorTy to shorten code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307491
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jul 2017 06:12:56 +0000 (06:12 +0000)]
[ADT] Add a default constructor and a bool conversion to function_ref.
The internal representation has a natural way to handle this and it
seems nicer than having to wrap this in an optional (with its own
separate flag).
This also matches how std::function works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307490
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 9 Jul 2017 05:55:20 +0000 (05:55 +0000)]
[FastISel] fix a fallback diagnostic.
Summary: FastISel was marked as failed in case instruction selection succeeded.
Reviewers: qcolombet, zvi, rovka, ab
Reviewed By: zvi
Subscribers: javed.absar, ab, qcolombet, bogner, llvm-commits
Differential Revision: https://reviews.llvm.org/D34438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307489
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Sun, 9 Jul 2017 05:54:44 +0000 (05:54 +0000)]
fix trivial typos; NFC
sucessor -> successor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jul 2017 03:59:31 +0000 (03:59 +0000)]
[PM] Finish implementing and fix a chain of bugs uncovered by testing
the invalidation propagation logic from an SCC to a Function.
I wrote the infrastructure to test this but didn't actually use it in
the unit test where it was designed to be used. =[ My bad. Once
I actually added it to the test case I discovered that it also hadn't
been properly implemented, so I've implemented it. The logic in the FAM
proxy for an SCC pass to propagate invalidation follows the same ideas
as the FAM proxy for a Module pass, but the implementation is a bit
different to reflect the fact that it is forwarding just for an SCC.
However, implementing this correctly uncovered a surprising "bug" (it
was conservatively correct but relatively very expensive) in how we
handle invalidation when splitting one SCC into multiple SCCs. We did an
eager invalidation when in reality we should be deferring invaliadtion
for the *current* SCC to the CGSCC pass manager and just invaliating the
newly constructed SCCs. Otherwise we end up invalidating too much too
soon. This was exposed by the inliner test case that I've updated. Now,
we invalidate *just* the split off '(test1_f)' SCC when doing the CG
update, and then the inliner finishes and invalidates the '(test1_g,
test1_h)' SCC's analyses. The first few attempts at fixing this hit
still more bugs, but all of those are covered by existing tests. For
example, the inliner should also preserve the FAM proxy to avoid
unnecesasry invalidation, and this is safe because the CG update
routines it uses handle any necessary adjustments to the FAM proxy.
Finally, the unittests for the CGSCC pass manager needed a bunch of
updates where we weren't correctly preserving the FAM proxy because it
hadn't been fully implemented and failing to preserve it didn't matter.
Note that this doesn't yet fix the current crasher due to MemSSA finding
a stale dominator tree, but without this the fix to that crasher doesn't
really make any sense when testing because it relies on the proxy
behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307487
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Jul 2017 03:25:17 +0000 (03:25 +0000)]
[InstCombine] Speculatively implement a fix for what might be the root cause of PR33721 by making sure that we have integer types before doing select C, -1, 0 -> sext C to int
I recently changed m_One and m_AllOnes to use Constant::isOneValue/isAllOnesValue which work on floating point values too. The original implementation looked specifically for ConstantInt scalars and splats. So I'm guessing we are accidentally trying to issue sext/zexts on floating point types now.
Hopefully I figure out how to reproduce the failure from the PR soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307486
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Jul 2017 19:50:03 +0000 (19:50 +0000)]
[AMDGPU] Fix -Wimplicit-fallthrough warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307485
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Jul 2017 19:28:24 +0000 (19:28 +0000)]
[AArch64] Fix -Wimplicit-fallthrough warnings. NFCI.
Add breaks - doesn't affect results as both GPR/FPU both check for 32/64 bit sizes. So will still default to GenericOps in the same way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307484
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Jul 2017 18:42:04 +0000 (18:42 +0000)]
[ARM] Fix -Wimplicit-fallthrough warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307480
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuka Takahashi [Sat, 8 Jul 2017 17:48:59 +0000 (17:48 +0000)]
[Bash-autocompletion] Auto complete cc1 options if -cc1 is specified
Summary:
We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`.
Another idea for this implementation is to make --autocomplete a cc1
option and handle it in clang Frontend, by porting --autocomplete
handler from Driver to Frontend, so that we can handle Driver options
and CC1 options in unified manner.
Differential Revision: https://reviews.llvm.org/D34770
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307479
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Sat, 8 Jul 2017 17:17:30 +0000 (17:17 +0000)]
Re-enable "[IndVars] Canonicalize comparisons between non-negative values and indvars"
The patch was reverted due to a bug. The bug was that if the IV is the 2nd operand of the icmp
instruction, then the "Pred" variable gets swapped and differs from the instruction's predicate.
In this patch we use the original predicate to do the transformation.
Also added a test case that exercises this situation.
Differentian Revision: https://reviews.llvm.org/D35107
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307477
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 8 Jul 2017 16:34:46 +0000 (16:34 +0000)]
[LoopVectorize] partly revert r307475
Bots are failing because of the additional checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307476
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 8 Jul 2017 16:10:42 +0000 (16:10 +0000)]
[LoopVectorize] auto-generate complete checks; NFC
I'm looking at a cmp transform in InstCombine that would affect these tests,
but it's hard to know if it makes things better or worse without seeing the
full IR. OTOH, maybe these tests shouldn't be running a bunch of transform
passes in the first place?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307475
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Jul 2017 15:26:26 +0000 (15:26 +0000)]
Fix -Wimplicit-fallthrough warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307473
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 8 Jul 2017 14:04:48 +0000 (14:04 +0000)]
[x86] add SBB optimization for SETBE (ule) condition code
x86 scalar select-of-constants (Cond ? C1 : C2) combining/lowering is a mess
with missing optimizations. We handle some patterns, but miss logical variants.
To clean that up, we should convert all select-of-constants to logic/math and
enhance the combining for the expected patterns from that. Selecting 0 or -1
needs extra attention to produce the optimal code as shown here.
Attempt to verify that all of these IR forms are logically equivalent:
http://rise4fun.com/Alive/plxs
Earlier steps in this series:
rL306040
rL306072
rL307404 (D34652)
As acknowledged in the earlier review, there's a possibility that some Intel
uarch would prefer to produce an xor to clear the fake register operand with
sbb %eax, %eax. This will likely need to be addressed in a separate pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307471
91177308-0d34-0410-b5e6-
96231b3b80d8
Kamil Rytarowski [Sat, 8 Jul 2017 11:27:56 +0000 (11:27 +0000)]
[Solaris] get rid of _RESTRICT_KYWD warning during the build
Summary:
(re)definition of _RESTRICT_KYWD rightfully causes a warning message during the Solaris build.
This hack is not needed if build compiler is properly configured (.e.g /usr/bin/gcc) so just remove it.
Reviewers: ro, mgorny, krytarowski, joerg
Reviewed By: joerg
Subscribers: quenelle, llvm-commits
Patch by Fedor Sergeev (Oracle).
Differential Revision: https://reviews.llvm.org/D35054
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307469
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Jul 2017 06:44:36 +0000 (06:44 +0000)]
[X86] In getHostCPUName, remove some code that changes some AMD CPU names based on features not being enabled.
The CPU name is really just used for scheduler and other microarchitectural optimizations. The feature flags should be determined by getHostCPUFeatures which should always be used with getHostCPUName. Trying to alter CPU name strings to control features just isn't practical.
Most of these types of things were removed from Intel CPUs a while ago.
This is part of my plan to bring compiler-rt's cpu_model.c file up to date with the equivalent functionality in libgcc. A lot of the code in that file is copied from Host.cpp and we want to keep them reasonably in sync.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307467
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Jul 2017 06:44:35 +0000 (06:44 +0000)]
[X86] Correct the BDVER4 model numbers to include 0x70-0x7f.
According to wikipedia and some other googling suggests these should also be considered as BDVER4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307466
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Jul 2017 06:44:34 +0000 (06:44 +0000)]
[X86] Minor formatting fix. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307465
91177308-0d34-0410-b5e6-
96231b3b80d8