OSDN Git Service
James Molloy [Tue, 7 Jun 2016 11:47:24 +0000 (11:47 +0000)]
[ARM] Transform LDMs into writeback form to save code size
If we have an LDM that uses only low registers and doesn't write to its base register:
ldm.w r0, {r1, r2, r3}
And that base register is dead after the LDM, then we can convert it to writeback form and use a narrow encoding:
ldm.n r0!, {r1, r2, r3}
Obviously, this introduces a new register write and so can cause WAW hazards, so I've enabled it only in minsize mode. This is a code size trick that ARM Compiler 5 ("armcc") does that we don't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272000
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 7 Jun 2016 11:04:49 +0000 (11:04 +0000)]
[llvm-readobj] - Teach llvm-readobj to dump .gnu.version_r sections
SHT_GNU_verneed (.gnu.version_r) is a version dependency section.
It was the last symbol versioning relative section that was not dumped,
now it is.
Differential revision: http://reviews.llvm.org/D21024
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271998
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Smith [Tue, 7 Jun 2016 10:34:33 +0000 (10:34 +0000)]
[ARM] Incorrect relocation type for Thumb2 B<cond>.w
The Thumb2 conditional branch B<cond>.W has a different encoding (T3)
to the unconditional branch B.W (T4) as it needs to record <cond>.
As the encoding is different the B<cond>.W is given a different
relocation type.
ELF for the ARM Architecture 4.6.1.6 (Table-13) states that
R_ARM_THM_JUMP19 should be used for B<cond>.W. At present the
MC layer is using the R_ARM_THM_JUMP24 from B.W.
This change makes B<cond>.W use R_ARM_THM_JUMP19 and alters the
existing test that checks for R_ARM_THM_JUMP24 to expect
R_ARM_THM_JUMP19.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271997
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 10:27:15 +0000 (10:27 +0000)]
[InstCombine][AVX2] Add support for simplifying AVX2 per-element shifts to native shifts
Unlike native shifts, the AVX2 per-element shift instructions VPSRAV/VPSRLV/VPSLLV handle out of range shift values (logical shifts set the result to zero, arithmetic shifts splat the sign bit).
If the shift amount is constant we can sometimes convert these instructions to native shifts:
1 - if all shift amounts are in range then the conversion is trivial.
2 - out of range arithmetic shifts can be clamped to the (bitwidth - 1) (a legal shift amount) before conversion.
3 - logical shifts just return zero if all elements have out of range shift amounts.
In addition, UNDEF shift amounts are handled - either as an UNDEF shift amount in a native shift or as an UNDEF in the logical 'all out of range' zero constant special case for logical shifts.
Differential Revision: http://reviews.llvm.org/D19675
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271996
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 7 Jun 2016 08:18:35 +0000 (08:18 +0000)]
[InstCombine][SSE] Add MOVMSK constant folding (PR27982)
This patch adds support for folding undef/zero/constant inputs to MOVMSK instructions.
The SSE/AVX versions can be fully folded, but the MMX version can only handle undef inputs.
Differential Revision: http://reviews.llvm.org/D20998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271990
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 7 Jun 2016 07:27:57 +0000 (07:27 +0000)]
[AVX512] Allow avx2 and sse41 nontemporal load intrinsics to select EVEX encoded instructions when VLX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271988
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 7 Jun 2016 07:27:54 +0000 (07:27 +0000)]
[AVX512] Remove unnecessary mayLoad, mayStore, hasSidEffects flags from instructions that have patterns that imply them. Add the same set of flags to instructions that don't have patterns to imply them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271987
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 7 Jun 2016 07:27:51 +0000 (07:27 +0000)]
[AVX512] Add NoVLX to a couple patterns that have VLX equivalents. Ordering of the patterns in the .td file protects this, but its better to be explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271986
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 7 Jun 2016 05:40:08 +0000 (05:40 +0000)]
[Kaleidoscope] Update Chapter 3 of the "Implementing a Language" tutorial to
take into account modernizations in r246002 and r270381.
Patch based on http://reviews.llvm.org/D20954 by Miroslav Hrncir.
Thanks Miroslav!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271985
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 05:32:48 +0000 (05:32 +0000)]
[pdb] Fix broken unit tests after r271982.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271983
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 7 Jun 2016 05:28:55 +0000 (05:28 +0000)]
[pdb] Use MappedBlockStream to parse the PDB directory.
In order to efficiently write PDBs, we need to be able to make a
StreamWriter class similar to a StreamReader, which can transparently deal
with writing to discontiguous streams, and we need to use this for all
writing, similar to how we use StreamReader for all reading.
Most discontiguous streams are the typical numbered streams that appear in
a PDB file and are described by the directory, but the exception to this,
that until now has been parsed by hand, is the directory itself.
MappedBlockStream works by querying the directory to find out which blocks
a stream occupies and various other things, so naturally the same logic
could not possibly work to describe the blocks that the directory itself
resided on.
To solve this, I've introduced an abstraction IPDBStreamData, which allows
the client to query for the list of blocks occupied by the stream, as well
as the stream length. I provide two implementations of this: one which
queries the directory (for indexed streams), and one which queries the
super block (for the directory stream).
This has the side benefit of vastly simplifying the code to parse the
directory. Whereas before a mini state machine was rolled by hand, now we
simply use FixedStreamArray to read out the stream sizes, then build a
vector of FixedStreamArrays for the stream map, all in just a few lines of
code.
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21046
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271982
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 7 Jun 2016 04:44:49 +0000 (04:44 +0000)]
[LibFuzzer] s/dataflow sanitizer/DataflowSanitizer/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271980
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 7 Jun 2016 04:44:39 +0000 (04:44 +0000)]
[LibFuzzer] Disable building and running LSan tests on Apple platforms because LSan is not currently supported.
Differential Revision: http://reviews.llvm.org/D20947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271979
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 7 Jun 2016 03:15:07 +0000 (03:15 +0000)]
ARM: correct TLS access on WoA
TLS access requires an offset from the TLS index. The index itself is the
section-relative distance of the symbol. For ARM, the relevant relocation
(IMAGE_REL_ARM_SECREL) is applied as a constant. This means that the value may
not be an immediate and must be lowered into a constant pool. This offset will
not be base relocated. We were previously emitting the actual address of the
symbol which would be base relocated and would therefore be the vaue offset by
the ImageBase + TLS Offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271974
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 7 Jun 2016 03:15:01 +0000 (03:15 +0000)]
ARM: clang-format a couple of switches, add comments
clang-format a couple of switches in preparation for a future change. Add some
enumeration comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271973
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 7 Jun 2016 03:14:57 +0000 (03:14 +0000)]
ARM: normalise space in the patterns
Just adjust the whitespace for the selection patterns. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271972
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 7 Jun 2016 01:20:26 +0000 (01:20 +0000)]
[sanitizer] Initial implementation of a Hardened Allocator
Summary:
This is an initial implementation of a Hardened Allocator based on Sanitizer Common's CombinedAllocator.
It aims at mitigating heap based vulnerabilities by adding several features to the base allocator, while staying relatively fast.
The following were implemented:
- additional consistency checks on the allocation function parameters and on the heap chunks;
- use of checksum protected chunk header, to detect corruption;
- randomness to the allocator base;
- delayed freelist (quarantine), to mitigate use after free and overall determinism.
Additional mitigations are in the works.
Reviewers: eugenis, aizatsky, pcc, krasin, vitalybuka, glider, dvyukov, kcc
Subscribers: kubabrecka, filcab, llvm-commits
Differential Revision: http://reviews.llvm.org/D20084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271968
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 7 Jun 2016 00:59:04 +0000 (00:59 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271967
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 7 Jun 2016 00:02:03 +0000 (00:02 +0000)]
Re-land "[codeview] Emit information about global variables"
This reverts commit r271962 and reinstantes r271957.
MSVC's linker doesn't appear to like it if you have an empty symbol
substream, so only open a symbol substream if we're going to emit
something about globals into it.
Makes check-asan pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271965
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:46:14 +0000 (23:46 +0000)]
Try one more time to pacify -Wpessimizing-move, MSVC, libstdc++4.7, and the world without a named variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271964
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 23:43:56 +0000 (23:43 +0000)]
Revert "Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file""
This reverts commit r271953. It's still breaking on Windows, though the
list initialization issue is fixed:
http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/3751
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271963
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:41:38 +0000 (23:41 +0000)]
Revert "[codeview] Emit information about global variables"
This reverts commit r271957, it broke check-asan on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271962
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Mon, 6 Jun 2016 23:38:33 +0000 (23:38 +0000)]
[InstCombine] scalarizePHI should not assume the code it sees has been CSE'd
scalarizePHI only looked for phis that have exactly two uses - the "latch"
use, and an extract. Unfortunately, we can not assume all equivalent extracts
are CSE'd, since InstCombine itself may create an extract which is a duplicate
of an existing one. This extends it to handle several distinct extracts from
the same index.
This should fix at least some of the performance regressions from PR27988.
Differential Revision: http://reviews.llvm.org/D20983
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271961
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 23:35:52 +0000 (23:35 +0000)]
Fix CRLF -> LF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271960
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:28:03 +0000 (23:28 +0000)]
Attempt to work around lack of std::map::emplace in libstdc++4.7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271958
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 6 Jun 2016 23:23:47 +0000 (23:23 +0000)]
[codeview] Emit information about global variables
This currently emits everything as S_GDATA32, which isn't right for
things like thread locals, but it's a start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271957
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 6 Jun 2016 23:21:27 +0000 (23:21 +0000)]
Verifier: Simplify and fix issue where we were not verifying unmaterialized functions.
Arrange to call verify(Function &) on each function, followed by
verify(Module &), whether the verifier is being used from the pass or
from verifyModule(). As a side effect, this fixes an issue that caused
us not to call verify(Function &) on unmaterialized functions from
verifyModule().
Differential Revision: http://reviews.llvm.org/D21042
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271956
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 23:19:23 +0000 (23:19 +0000)]
[pdbdump] Verify the size of TPI hash records.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271954
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 23:17:22 +0000 (23:17 +0000)]
Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file"
Changes since the initial commit:
- Normalize file paths read from the file to prevent Windows path
separators from escaping parts of the path.
- Since we need to store the normalized file paths in WeightedFile,
don't do tricky things to keep the source MemoryBuffer alive.
- Don't use list-initialization for a std::string in WeightedFile.
Differential Revision: http://reviews.llvm.org/D20980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271953
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 23:01:42 +0000 (23:01 +0000)]
Revert "Retry "[llvm-profdata] Add option to ingest filepaths from a file"
This reverts commit r271949. It breaks the Windows build:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271952
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 6 Jun 2016 22:39:22 +0000 (22:39 +0000)]
Retry "[llvm-profdata] Add option to ingest filepaths from a file"
Changes since the initial commit:
- Normalize file paths read from the file to prevent Windows path
separators from escaping parts of the path.
- Since we need to store the normalized file paths in WeightedFile,
don't do tricky things to keep the source MemoryBuffer alive.
Differential Revision: http://reviews.llvm.org/D20980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271949
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 6 Jun 2016 22:32:52 +0000 (22:32 +0000)]
Verifier: Remove dead code.
Remove previously unreachable code that verifies that a function definition has
an entry block. By definition, a function definition has at least one block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271948
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 6 Jun 2016 22:02:16 +0000 (22:02 +0000)]
Updating release notes for CMake version bump
CMake 3.4.3 is now required for building LLVM-based projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271945
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 21:34:55 +0000 (21:34 +0000)]
[pdbdump] Print section header flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271943
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 6 Jun 2016 21:18:43 +0000 (21:18 +0000)]
[yaml2obj] Get rid of MachO header union
This is based on post-commit feedback from Sean Silva.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271942
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 6 Jun 2016 20:37:17 +0000 (20:37 +0000)]
[llvm-pdbdump] Dump stream sizes and stream blocks to yaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271940
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 6 Jun 2016 20:37:05 +0000 (20:37 +0000)]
[llvm-pdbdump] Dump MSF headers to YAML.
This is the simplest possible patch to get some kind of YAML
output. All it dumps is the MSF header fields so that in
theory an empty MSF file could be reconstructed.
Reviewed By: ruiu, majnemer
Differential Revision: http://reviews.llvm.org/D20971
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271939
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 6 Jun 2016 20:27:09 +0000 (20:27 +0000)]
[LibFuzzer] Provide stub implementation of __sanitizer_cov_trace_pc_indir
Calls to this function are currently injected by the
``SanitizerCoverageModule`` pass when the both the ``indirect-calls``
and ``trace-pc`` sanitizer coverage options are enabled and the code
being instrumented has indirect calls. Previously because LibFuzzer did
not define this function this would lead to link errors when building
some of the tests on OSX.
Differential Revision: http://reviews.llvm.org/D20946
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271938
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 6 Jun 2016 20:10:33 +0000 (20:10 +0000)]
AMDGPU: Add function for getting instruction size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271936
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 6 Jun 2016 20:03:31 +0000 (20:03 +0000)]
AMDGPU: Fix constantexpr addrspacecasts
If we had a constant group address space cast the queue pointer
wasn't enabled for the function, resulting in a crash on noreg
later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271935
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 6 Jun 2016 20:01:50 +0000 (20:01 +0000)]
[PM] Preserve the correct set of analyses for GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271934
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 6 Jun 2016 19:24:27 +0000 (19:24 +0000)]
[GVN] Switch dump() definition over to LLVM_DUMP_METHOD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271932
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Mon, 6 Jun 2016 19:21:40 +0000 (19:21 +0000)]
[LoopUnrollAnalyzer] Fix a crash in analyzeLoopUnrollCost.
In some cases, when simplifying with SCEV, we might consider pointer values as
just usual integer values. Thus, we might get a different type from what we
had originally in the map of simplified values, and hence we need to check
types before operating on the values.
This fixes PR28015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271931
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 6 Jun 2016 19:11:53 +0000 (19:11 +0000)]
Fix a test case. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271930
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Mon, 6 Jun 2016 19:10:46 +0000 (19:10 +0000)]
Reapply [LSR] Create fewer redundant instructions.
Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs. This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.
Originally reviewed in http://reviews.llvm.org/D18001
Reviewers: atrick
Subscribers: llvm-commits, mzolotukhin, mcrosier
Differential Revision: http://reviews.llvm.org/D18480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271929
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 6 Jun 2016 18:39:21 +0000 (18:39 +0000)]
[pdbdump] Print out New FPO stream contents.
The data strucutre in the new FPO stream is described in the
PE/COFF spec. There is one record per function if frame pointer
is omitted.
Differential Revision: http://reviews.llvm.org/D20999
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271926
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 6 Jun 2016 18:36:07 +0000 (18:36 +0000)]
[MBP] Reduce code size by running tail merging in MBP.
The code layout that TailMerging (inside BranchFolding) works on is not the
final layout optimized based on the branch probability. Generally, after
BlockPlacement, many new merging opportunities emerge.
This patch calls Tail Merging after MBP and calls MBP again if Tail Merging
merges anything.
Differential Revision: http://reviews.llvm.org/D20276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271925
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 18:35:44 +0000 (18:35 +0000)]
[Kaleidoscope][BuildingAJIT] Fix hyphenation in chapter 2 title.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271924
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 6 Jun 2016 18:35:41 +0000 (18:35 +0000)]
[BranchFolding] Replace MachineBlockFrequencyInfo with MBFIWrapper. NFC.
Differential Revision: http://reviews.llvm.org/D20184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271923
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Mon, 6 Jun 2016 18:29:59 +0000 (18:29 +0000)]
[cpu-detection] Substantial refactor of Host CPU detection code (x86)
Summary:
Following D20970 (committed as r271726).
This is a substantial refactoring of the host CPU detection code.
There is no functionality change intended, but the changes are extensive.
Definitions of architecture types and subtypes are by no means exhaustive or
perfectly defined, but a fair starting point.
Suggestions for futher improvements are welcome.
Reviewers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20988
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271921
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 18:22:47 +0000 (18:22 +0000)]
[Kaleidoscope][BuildingAJIT] More cleanup of Chapter 2.
Streamline some wording, fix a bug in the markup for the layer interface table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271917
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 18:07:23 +0000 (18:07 +0000)]
[Kaleidoscope][BuildingAJIT] Clean up sentence, remove comments from code block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271913
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 6 Jun 2016 16:56:57 +0000 (16:56 +0000)]
[InstCombine] limit icmp transform to ConstantInt (PR28011)
In r271810 ( http://reviews.llvm.org/rL271810 ), I loosened the check
above this to work for any Constant rather than ConstantInt. AFAICT,
that part makes sense if we can determine that the shrunken/extended
constant remained equal. But it doesn't make sense for this later
transform where we assume that the constant DID change.
This could assert for a ConstantExpr:
https://llvm.org/bugs/show_bug.cgi?id=28011
And it could be wrong for a vector as shown in the added regression test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271908
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 6 Jun 2016 16:03:06 +0000 (16:03 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271904
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 6 Jun 2016 15:55:00 +0000 (15:55 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271903
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Mon, 6 Jun 2016 15:23:43 +0000 (15:23 +0000)]
[AMDGPU][llvm-mc] v_cndmask_b32: src2 is mandatory; do not enforce VOP2 when src2 == VCC.
Another step for unification llvm assembler/disassembler with sp3.
Besides, CodeGen output is a bit improved, thus changes in CodeGen tests.
Assembler/Disassembler tests updated/added.
Differential Revision: http://reviews.llvm.org/D20796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271900
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 6 Jun 2016 14:15:41 +0000 (14:15 +0000)]
[LAA] Use load and store vectors (NFC)
Contributed-by: Aditya Kumar <hiraditya@msn.com>
Differential Revision: http://reviews.llvm.org/D20953
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271895
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 6 Jun 2016 12:24:52 +0000 (12:24 +0000)]
[KNL] Fix UMULO lowering.
Differential Revision: http://reviews.llvm.org/D21013
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271891
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 6 Jun 2016 12:10:42 +0000 (12:10 +0000)]
Remove dead function with incredibly broken assert.
Found by clang-tidy's misc-assert-side-effect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271887
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Mon, 6 Jun 2016 10:49:56 +0000 (10:49 +0000)]
[NFC] Silence gcc warning (-Wsign-compare)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271882
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Jun 2016 06:12:54 +0000 (06:12 +0000)]
[AVX512] Remove masked palignr intrinsics and auto-upgrade them to native IR of vector shuffle and select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271872
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 6 Jun 2016 05:54:55 +0000 (05:54 +0000)]
LLVM_BUILD_32_BITS: Add -m32 with CMAKE_C*_FLAGS. [CMP0056]
With CMP0056, try_compile() uses also CMAKE_EXE_LINKER_FLAG.
It caused mismatch between CMAKE_CXX_FLAGS and CMAKE_EXE_LINKER_FLAGS, to fail to examine CXX_SUPPORTS_CXX11 with -m32.
FYI, before this, try_compile() tries without -m32 regardless of LLVM_BUILD_32_BITS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271871
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Jun 2016 05:39:10 +0000 (05:39 +0000)]
[AVX512] Add PALIGNR shuffle lowering for v32i16 and v16i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271870
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Jun 2016 05:39:07 +0000 (05:39 +0000)]
[AVX512] Update tests to show shuffle decoding for vpshuflw/vpshufhw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271869
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 05:07:52 +0000 (05:07 +0000)]
[Kaleidoscope][BuildingAJIT] Split up the code-block describing the substitution
of OptimizeLayer for CompileLayer in Chapter 2.
Hopefully this will read a little more clearly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271868
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 04:53:59 +0000 (04:53 +0000)]
[Kaleidoscope][BuildingAJIT] Fix code-blocks in Chapter 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271867
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 6 Jun 2016 03:28:12 +0000 (03:28 +0000)]
[Kaleidoscope][BuildingAJIT] Add tutorial text for Chapter 2.
This chapter discusses IR optimizations, the ORC IRTransformLayer, and the ORC
layer concept itself.
The text is still pretty rough, but I think the main ideas are there. Feedback
is very welcome, as always.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271865
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 6 Jun 2016 01:51:23 +0000 (01:51 +0000)]
Fix spelling and capitalization in comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271862
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 6 Jun 2016 00:31:45 +0000 (00:31 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271861
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 6 Jun 2016 00:31:28 +0000 (00:31 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271860
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 5 Jun 2016 22:13:52 +0000 (22:13 +0000)]
LICM: Don't sink stores out of loops that may throw.
Summary:
This hasn't been caught before because it requires noalias or similarly
strong alias analysis to actually reproduce.
Fixes http://llvm.org/PR27952 .
Reviewers: hfinkel, sanjoy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20944
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271858
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 5 Jun 2016 21:17:04 +0000 (21:17 +0000)]
Add safety check to InstCombiner::commonIRemTransforms
Since FoldOpIntoPhi speculates the binary operation to potentially each
of the predecessors of the PHI node (pulling it out of arbitrary control
dependence in the process), we can FoldOpIntoPhi only if we know the
operation doesn't have UB.
This also brings up an interesting profitability question -- the way it
is written today, commonIRemTransforms will hoist out work from
dynamically dead code into code that will execute at runtime. Perhaps
that isn't the best canonicalization?
Fixes PR27968.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271857
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 5 Jun 2016 21:17:00 +0000 (21:17 +0000)]
Add test case for InstCombiner::commonIRemTransforms; NFC
The PHI case in commonIRemTransforms was untested; add a trivial test
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271856
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 5 Jun 2016 21:15:46 +0000 (21:15 +0000)]
Fix deadlock in ThreadPool unittest.
(Yes, this only deadlocks on a computer with a single core; I'm using
a virtual machine.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271855
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 5 Jun 2016 19:08:54 +0000 (19:08 +0000)]
[Internalize] Test that __stack_chk_{guard, fail} are not internalized.
r154645 introduced this feature without test. This should have better
coverage now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271853
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:40 +0000 (18:43 +0000)]
[BitCode] Make sure atomicrmw's argument is an actual PointerType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271851
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:33 +0000 (18:43 +0000)]
[BitCode] Make sure storeatomic's argument is an actual PointerType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271850
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:26 +0000 (18:43 +0000)]
[BitCode] Diagnose GEPs with no indices
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271849
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Sun, 5 Jun 2016 18:43:17 +0000 (18:43 +0000)]
[BitCode] Don't allow constants of void type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271848
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Spertus [Sun, 5 Jun 2016 18:34:02 +0000 (18:34 +0000)]
Add Visual Studio Visualizer for ArrayRef
Modeled after visualization of llvm::SmallVec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271847
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 5 Jun 2016 18:01:19 +0000 (18:01 +0000)]
[PM] Port IndVarSimplify to the new pass manager
Summary:
There are some rough corners, since the new pass manager doesn't have
(as far as I can tell) LoopSimplify and LCSSA, so I've updated the
tests to run them separately in the old pass manager in the lit tests.
We also don't have an equivalent for AU.setPreservesCFG() in the new
pass manager, so I've left a FIXME.
Reviewers: bogner, chandlerc, davide
Subscribers: sanjoy, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D20783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271846
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 5 Jun 2016 18:01:12 +0000 (18:01 +0000)]
[IndVars] Remove -liv-reduce
It is an off-by-default option that no one seems to use[0], and given
that SCEV directly understands the overflow instrinsics there is no real
need for it anymore.
[0]: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098181.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271845
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:54:56 +0000 (17:54 +0000)]
fix checks
update_test_checks.py got confused matching the variable names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271844
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:49:45 +0000 (17:49 +0000)]
[InstCombine] allow vector icmp bool transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271843
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:32:58 +0000 (17:32 +0000)]
add tests to show missing vector transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271842
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:29:45 +0000 (17:29 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 17:13:09 +0000 (17:13 +0000)]
update test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271840
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 16:46:18 +0000 (16:46 +0000)]
fix documentation comments and other clean-ups; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271839
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 16:41:20 +0000 (16:41 +0000)]
update test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271838
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Jun 2016 16:29:15 +0000 (16:29 +0000)]
update test to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Jun 2016 15:21:30 +0000 (15:21 +0000)]
[X86][XOP] Added VPERMIL2PD/VPERMIL2PS raw mask decoding for target shuffle combines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271834
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Jun 2016 15:01:45 +0000 (15:01 +0000)]
[X86][XOP] Added VPERMIL2PD/VPERMIL2PS as a target shuffle type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271831
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Jun 2016 14:33:43 +0000 (14:33 +0000)]
[X86][XOP] Tidied up DecodeVPERMIL2PMask to more closely match DecodeVPERMILPMask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271830
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Jun 2016 06:29:12 +0000 (06:29 +0000)]
[AVX512] Add support for lowering PALIGNR for v64i8.
Could do this for other types to, but this is what's needed to replace the instrinsic with native IR in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271828
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Jun 2016 06:29:08 +0000 (06:29 +0000)]
[AVX512] Split command lines and regenerate a test to prepare for a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271827
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Jun 2016 05:35:11 +0000 (05:35 +0000)]
[AVX512] Fix PANDN combining for v4i32/v8i32 when VLX is enabled.
v4i32/v8i32 ANDs aren't promoted to v2i64/v4i64 when VLX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271826
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 05:18:20 +0000 (05:18 +0000)]
Fix wrong comment in header /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271825
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 05:15:45 +0000 (05:15 +0000)]
Fix pass declaration order /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271824
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 05:12:23 +0000 (05:12 +0000)]
[PM] Port GCOVProfiler pass to the new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271823
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sun, 5 Jun 2016 03:40:03 +0000 (03:40 +0000)]
[PM] code refactoring /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271822
91177308-0d34-0410-b5e6-
96231b3b80d8