133405 Commits

Author SHA1 Message Date
Rui Ueyama
115c4998df Fix CRLF -> LF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271960 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 23:35:52 +00:00
Reid Kleckner
2fce618270 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
2016-06-06 23:28:03 +00:00
Reid Kleckner
968f9915ac [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
2016-06-06 23:23:47 +00:00
Peter Collingbourne
052c9ee80b 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
2016-06-06 23:21:27 +00:00
Rui Ueyama
d97680dbf0 [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
2016-06-06 23:19:23 +00:00
Vedant Kumar
6039b79bbe 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
2016-06-06 23:17:22 +00:00
Vedant Kumar
acd5f5a519 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
2016-06-06 23:01:42 +00:00
Vedant Kumar
8771e1714b 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
2016-06-06 22:39:22 +00:00
Peter Collingbourne
6510b62554 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
2016-06-06 22:32:52 +00:00
Chris Bieneman
800064b2ac 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
2016-06-06 22:02:16 +00:00
Rui Ueyama
1895d4095b [pdbdump] Print section header flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 21:34:55 +00:00
Chris Bieneman
ce66300bb0 [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
2016-06-06 21:18:43 +00:00
Zachary Turner
4efa5e541f [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
2016-06-06 20:37:17 +00:00
Zachary Turner
61e0e2783c [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
2016-06-06 20:37:05 +00:00
Dan Liew
47f223bd24 [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
2016-06-06 20:27:09 +00:00
Matt Arsenault
f4135c634c AMDGPU: Add function for getting instruction size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 20:10:33 +00:00
Matt Arsenault
bc1b8d5b49 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
2016-06-06 20:03:31 +00:00
Davide Italiano
3ff92c7452 [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
2016-06-06 20:01:50 +00:00
Davide Italiano
d4b932e94b [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
2016-06-06 19:24:27 +00:00
Michael Zolotukhin
c711b13613 [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
2016-06-06 19:21:40 +00:00
Haicheng Wu
a6caf31dea Fix a test case. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271930 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 19:11:53 +00:00
Geoff Berry
5c724a4fef 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
2016-06-06 19:10:46 +00:00
Rui Ueyama
24ef682bfb [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
2016-06-06 18:39:21 +00:00
Haicheng Wu
84755987d0 [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
2016-06-06 18:36:07 +00:00
Lang Hames
eaf5ddfe77 [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
2016-06-06 18:35:44 +00:00
Haicheng Wu
f15d24533e [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
2016-06-06 18:35:41 +00:00
Alina Sbirlea
36f2326b3f [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
2016-06-06 18:29:59 +00:00
Lang Hames
5d3458a04a [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
2016-06-06 18:22:47 +00:00
Lang Hames
bae1eaf5d8 [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
2016-06-06 18:07:23 +00:00
Sanjay Patel
b17db4cf26 [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
2016-06-06 16:56:57 +00:00
Sanjay Patel
60107575fd regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 16:03:06 +00:00
Sanjay Patel
eec2d5322b regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 15:55:00 +00:00
Artem Tamazov
7049ac906c [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
2016-06-06 15:23:43 +00:00
Matthew Simpson
683b746f24 [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
2016-06-06 14:15:41 +00:00
Igor Breger
5238dbe213 [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
2016-06-06 12:24:52 +00:00
Benjamin Kramer
ad53d4da9e 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
2016-06-06 12:10:42 +00:00
Filipe Cabecinhas
67708909d0 [NFC] Silence gcc warning (-Wsign-compare)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 10:49:56 +00:00
Craig Topper
6dbfac925f [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
2016-06-06 06:12:54 +00:00
NAKAMURA Takumi
80d87f6ff3 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
2016-06-06 05:54:55 +00:00
Craig Topper
856b53e006 [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
2016-06-06 05:39:10 +00:00
Craig Topper
5cc4ee2898 [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
2016-06-06 05:39:07 +00:00
Lang Hames
30bfbc3566 [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
2016-06-06 05:07:52 +00:00
Lang Hames
01157841a3 [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
2016-06-06 04:53:59 +00:00
Lang Hames
608095db1c [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
2016-06-06 03:28:12 +00:00
Nick Lewycky
1947c7cca1 Fix spelling and capitalization in comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 01:51:23 +00:00
NAKAMURA Takumi
5aabe01ca5 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 00:31:45 +00:00
NAKAMURA Takumi
9b1606d5af Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 00:31:28 +00:00
Eli Friedman
196d83ecbd 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
2016-06-05 22:13:52 +00:00
Sanjoy Das
4c21dbd25b 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
2016-06-05 21:17:04 +00:00
Sanjoy Das
1416aa2004 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
2016-06-05 21:17:00 +00:00