OSDN Git Service
Rafael Espindola [Thu, 21 May 2015 21:02:35 +0000 (21:02 +0000)]
Stop forwarding (get|set)Aligment from MCSectionData to MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237956
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 21 May 2015 21:00:30 +0000 (21:00 +0000)]
[MachineInstr] Add mayLoadOrStore API. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237955
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Thu, 21 May 2015 20:54:45 +0000 (20:54 +0000)]
Resubmit r237708 (MIR Serialization: print and parse LLVM IR using MIR format).
This commit is a 2nd attempt at committing the initial MIR serialization patch.
The first commit (r237708) made the incremental buildbots unstable and was
reverted in r237730. The original commit didn't add a terminating null
character to the LLVM IR source which was passed to LLParser, and this
sometimes caused the test 'llvmIR.mir' to fail with a parsing error because
the LLVM IR source didn't have a null character immediately after the end
and thus LLLexer encountered some garbage characters that ultimately caused
the error.
This commit also includes the other test fixes I committed in
r237712 (llc path fix) and r237723 (remove target triple) which
also got reverted in r237730.
--Original Commit Message--
MIR Serialization: print and parse LLVM IR using MIR format.
This commit is the initial commit for the MIR serialization project.
It creates a new library under CodeGen called 'MIR'. This new
library adds a new machine function pass that prints out the LLVM IR
using the MIR format. This pass is then added as a last pass when a
'stop-after' option is used in llc. The new library adds the initial
functionality for parsing of MIR files as well. This commit also
extends the llc tool so that it can recognize and parse MIR input files.
Reviewers: Duncan P. N. Exon Smith, Matthias Braun, Philip Reames
Differential Revision: http://reviews.llvm.org/D9616
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237954
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 May 2015 20:48:49 +0000 (20:48 +0000)]
[PPC64] Handle vpkudum mask pattern correctly when vpkudum isn't available
My recent patch to add support for ISA 2.07 vector pack/unpack
instructions didn't properly check for availability of the vpkudum
instruction when recognizing it as a special vector shuffle case.
This causes us to leave the vector shuffle in place (rather than
converting it to a vector permute) so that it can be recognized later
as a vpkudum, but that pattern is invalid for processors prior to
POWER8. Thus LLVM crashes with an "unable to select" message. We
observed this since one of our buildbots is configured to generate
code for a POWER7.
This patch fixes the problem by checking for availability of the
vpkudum instruction during custom lowering of vector shuffles.
I've added a test case variant for the vpkudum pattern when the
instruction isn't available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237952
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 20:43:13 +0000 (20:43 +0000)]
Stop creating MCSectionData is the ELF writer.
Now is is just its use of MCSymbolData that requires it to take a non const
MCAssembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237951
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 21 May 2015 20:39:13 +0000 (20:39 +0000)]
[lib/Fuzzer] ignore flags that start with --; use git pull --rebase instead of just git pull
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237950
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 21 May 2015 20:37:30 +0000 (20:37 +0000)]
IR / debug info: Add a DWOId field to DICompileUnit,
so DWARF skeleton CUs can be expression in IR. A skeleton CU is a
(typically empty) DW_TAG_compile_unit that has a DW_AT_(GNU)_dwo_name and
a DW_AT_(GNU)_dwo_id attribute. It is used to refer to external debug info.
This is a prerequisite for clang module debugging as discussed in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-November/040076.html.
In order to refer to external types stored in split DWARF (dwo) objects,
such as clang modules, we need to emit skeleton CUs, which identify the
dwarf object (i.e., the clang module) by filename (the SplitDebugFilename)
and a hash value, the dwo_id.
This patch only contains the IR changes. The idea is that a CUs with a
non-zero dwo_id field will be emitted together with a DW_AT_GNU_dwo_name
and DW_AT_GNU_dwo_id attribute.
http://reviews.llvm.org/D9488
rdar://problem/
20091852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237949
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 21 May 2015 20:30:23 +0000 (20:30 +0000)]
[PPC/LoopUnrollRuntime] Don't avoid high-cost trip count computation on the PPC/A2
On X86 (and similar OOO cores) unrolling is very limited, and even if the
runtime unrolling is otherwise profitable, the expense of a division to compute
the trip count could greatly outweigh the benefits. On the A2, we unroll a lot,
and the benefits of unrolling are more significant (seeing a 5x or 6x speedup
is not uncommon), so we're more able to tolerate the expense, on average, of a
division to compute the trip count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237947
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 19:54:44 +0000 (19:54 +0000)]
writeSymbolTable now only needs a MCContext.
It used to use an MCAssembler just to record the alignment of the sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237944
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 19:46:39 +0000 (19:46 +0000)]
Pass a const MCAssembler to writeSectionHeader.
It never creates sections, so it can use Asm.getSectionData instead of
Asm.getOrCreateSectionData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237943
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Thu, 21 May 2015 19:45:02 +0000 (19:45 +0000)]
YAML: Null terminate block scalar's value.
The commit null terminates the string value in the `yaml::BlockScalarNode`
class.
This change is motivated by the initial MIR serialization commit (r237708)
that I reverted in r237730 because the LLVM IR source from the block
scalar node wasn't terminated by a null character and thus the buildbots
failed on one testcase sometimes. This change enables me to recommit
the reverted commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237942
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 21 May 2015 19:44:44 +0000 (19:44 +0000)]
Revert r237766, "Support: Introduce LLVM_FALLTHROUGH macro."
The value of this macro seems to be very low unless we actually start
using it everywhere, and I don't have immediate plans to make that
happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237941
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 19:42:35 +0000 (19:42 +0000)]
Remove unused argument. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237940
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 21 May 2015 19:40:19 +0000 (19:40 +0000)]
Fix StreamingMemoryObject to respect known object size.
The existing code for method StreamingMemoryObject.fetchToPos does not respect
the corresonding call to setKnownObjectSize(). As a result, it allows the
StreamingMemoryObject to read bytes past the object size.
This patch provides a test case, and code to fix the problem.
Patch by Karl Schimpf
Differential Revision: http://reviews.llvm.org/D8931
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237939
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 19:36:43 +0000 (19:36 +0000)]
Fetch alignment directly out of MCSection. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237938
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Thu, 21 May 2015 19:32:49 +0000 (19:32 +0000)]
Add support for VSX scalar single-precision arithmetic in the PPC target
http://reviews.llvm.org/D9891
Following up on the VSX single precision loads and stores added earlier, this
adds support for elementary arithmetic operations on single precision values
in VSX registers. These instructions utilize the new VSSRC register class.
Instructions added:
xsaddsp
xsdivsp
xsmulsp
xsresp
xsrsqrtesp
xssqrtsp
xssubsp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237937
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 19:20:38 +0000 (19:20 +0000)]
Move alignment from MCSectionData to MCSection.
This starts merging MCSection and MCSectionData.
There are a few issues with the current split between MCSection and
MCSectionData.
* It optimizes the the not as important case. We want the production
of .o files to be really fast, but the split puts the information used
for .o emission in a separate data structure.
* The ELF/COFF/MachO hierarchy is not represented in MCSectionData,
leading to some ad-hoc ways to represent the various flags.
* It makes it harder to remember where each item is.
The attached patch starts merging the two by moving the alignment from
MCSectionData to MCSection.
Most of the patch is actually just dropping 'const', since
MCSectionData is mutable, but MCSection was not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237936
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 21 May 2015 18:32:07 +0000 (18:32 +0000)]
[LoopDistribute] Remove a layer of pointer indirection.
Just store InstPartitions directly into the std::list. No functional change
intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237930
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 May 2015 17:43:26 +0000 (17:43 +0000)]
use range-based for-loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237918
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 May 2015 17:22:45 +0000 (17:22 +0000)]
use range-based for-loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237917
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 17:09:22 +0000 (17:09 +0000)]
Fix warning on builds without asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237915
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 May 2015 17:04:17 +0000 (17:04 +0000)]
use range-based for-loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237914
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 17:00:40 +0000 (17:00 +0000)]
Avoid unnecessary section switching. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237913
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 16:52:32 +0000 (16:52 +0000)]
Remove yet another method of creating begin and end symbol for sections.
I missed this one when first unifying how we handle begin and end symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237912
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 May 2015 16:42:22 +0000 (16:42 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237911
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 21 May 2015 16:40:18 +0000 (16:40 +0000)]
Size enum so we can store it as 16-bits and avoid casts. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237910
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 May 2015 16:19:32 +0000 (16:19 +0000)]
Use existing helper for adding a section. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237909
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 May 2015 16:00:50 +0000 (16:00 +0000)]
use range-based for-loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237908
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Thu, 21 May 2015 15:38:25 +0000 (15:38 +0000)]
std::sort must be called with a strict weak ordering.
Found by a debug enabled stl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237906
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 21 May 2015 14:01:32 +0000 (14:01 +0000)]
AVX-512: Enabled SSE intrinsics on AVX-512.
Predicate UseAVX depricates pattern selection on AVX-512.
This predicate is necessary for DAG selection to select EVEX form.
But mapping SSE intrinsics to AVX-512 instructions is not ready yet.
So I replaced UseAVX with HasAVX for intrinsics patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237903
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 21 May 2015 13:52:20 +0000 (13:52 +0000)]
Make Triple::parseARMArch use ARMTargetParser
Simplifying Triple::parseARMArch, leaving all the parsing to ARMTargetParser.
This commit also adds AArch64 detection to ARMTargetParser canonicalization,
and a two RedHat arch names (v{6,7}hl, meaning hard-float / little-endian).
Adding enough unit tests to cover the basics. Clang checks fine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237902
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Thu, 21 May 2015 13:02:14 +0000 (13:02 +0000)]
[RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization
Correct assertion would be that there is no other uses from chain we are currently cloning. It is ok to have other uses of values not from this chain.
Differential Revision: http://reviews.llvm.org/D9882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237899
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Thu, 21 May 2015 12:51:38 +0000 (12:51 +0000)]
Fix memory-dereferenceable.ll test
One of the testcases introduced by D9365 had incorrect !dereferenceable metadata on load. It must fail but it doesn't due to incorrect order of CHECK/CHECK-NOT commands in test. Fixed both.
Reviewed By: sanjoy
Differential Revision: http://reviews.llvm.org/D9877
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237897
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Thu, 21 May 2015 11:57:38 +0000 (11:57 +0000)]
Test commit. Fix typo in MemDerefPrinter.cpp comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237893
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 21 May 2015 10:47:56 +0000 (10:47 +0000)]
Remove unnecessary FIXME comment
It has been fixed by commit r237797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237890
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 21 May 2015 10:22:10 +0000 (10:22 +0000)]
Fixed unused variable warning in non-assert builds from rL237885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237889
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 21 May 2015 10:05:03 +0000 (10:05 +0000)]
[X86][SSE] Improve support for 128-bit vector sign extension
This patch improves support for sign extension of the lower lanes of vectors of integers by making use of the SSE41 pmovsx* sign extension instructions where possible, and optimizing the sign extension by shifts on pre-SSE41 targets (avoiding the use of i64 arithmetic shifts which require scalarization).
It converts SIGN_EXTEND nodes to SIGN_EXTEND_VECTOR_INREG where necessary, that more closely matches the pmovsx* instruction than the default approach of using SIGN_EXTEND_INREG which splits the operation (into an ANY_EXTEND lowered to a shuffle followed by shifts) making instruction matching difficult during lowering. Necessary support for SIGN_EXTEND_VECTOR_INREG has been added to the DAGCombiner.
Differential Revision: http://reviews.llvm.org/D9848
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237885
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Thu, 21 May 2015 10:04:39 +0000 (10:04 +0000)]
[mips] [IAS] Add 2 missing CHECK directives for fixups in mips-expansions.s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237884
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 21 May 2015 04:32:56 +0000 (04:32 +0000)]
[TableGen] Resolve complex def names inside multiclasses
We had not been trying hard enough to resolve def names inside multiclasses
that had complex concatenations, etc. Now we'll try harder.
Patch by Amaury Sechet!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237877
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 May 2015 02:41:23 +0000 (02:41 +0000)]
AsmPrinter: Compute absolute label difference directly
Create a low-overhead path for `EmitLabelDifference()` that emits a
emits an absolute number when (1) the output is an object stream and (2)
the two symbols are in the same data fragment.
This drops memory usage on Mach-O from 975 MB down to 919 MB (5.8%).
The only call is when `!doesDwarfUseRelocationsAcrossSections()` --
i.e., on Mach-O -- since otherwise an absolute offset from the start of
the section needs a relocation. (`EmitLabelDifference()` is cheaper on
ELF anyway, since it creates 1 fewer temp symbol, and it gets called far
less often. It's not clear to me if this is even a bottleneck there.)
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237876
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 May 2015 01:59:58 +0000 (01:59 +0000)]
MC: Initialize MCSymbolData::Offset directly
Try to fix miscompile after r237873. Looks like this union
initialization isn't legal (or at least not supported).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237875
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 21 May 2015 01:43:39 +0000 (01:43 +0000)]
[MemCpyOpt] Do move the memset, but look at its dest's dependencies.
In effect a partial revert of r237858, which was a dumb shortcut.
Looking at the dependencies of the destination should be the proper
fix: if the new memset would depend on anything other than itself,
the transformation isn't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237874
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 May 2015 01:33:03 +0000 (01:33 +0000)]
MC: Simplify MCSymbolData initialization and remove MCSymbol pointer
Finally remove the `MCSymbolData::Symbol` pointer. It was still being
used to track whether `MCSymbolData` had been initialized, but this is
better tracked by the bitfield in `MCSymbol`.
The only caller of `MCSymbolData::initialize()` was `MCAssembler`, which
(other than `Symbol`) passed in all-0 values. Replace all that
indirection with a default constructor.
The main point is a cleanup (and there's more cleanup to do), but there
are also some small memory savings. I measured ~989 MB down to ~975 MB,
cutting a little over 1% off the top of `llc`.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237873
91177308-0d34-0410-b5e6-
96231b3b80d8
Swaroop Sridhar [Thu, 21 May 2015 00:50:10 +0000 (00:50 +0000)]
Document the CoreCLR GC Strategy
Add notead about the CoreCLR GC Strategy to the
Garbage Collection document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237869
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 May 2015 00:49:09 +0000 (00:49 +0000)]
MC: Make MCSymbolData::Symbol private
Make the back-pointer from `MCSymbolData` to `MCSymbol` private,
preparing to remove the back pointer entirely. I've already updated all
the users, although for now it's still used to indicate whether
`MCSymbol::Data` has been initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237868
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 May 2015 00:39:24 +0000 (00:39 +0000)]
MC: Remove last use of MCSymbolData::getSymbol(), NFC
Remove the last use of `MCSymbolData::getSymbol()`. There's some
*really* hairy stuff going on in `MachObjectWriter::WriteNList()` that I
want to come back to. In particular, it updates `Symbol` to point at
its aliasee (if any), but leaves `Data` behind, and it's not clear
whether everything makes sense there.
For now I've left the logic unchanged by adding `OrigSymbol` and moving
the FIXME from r237750 up a bit higher. I've filed PR23598 to track
looking into this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237867
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 21 May 2015 00:08:35 +0000 (00:08 +0000)]
[MemCpyOpt] Pass Instruction to IRBuilder, no need for NextNode. NFC.
We're erasing the instructions anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237861
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 May 2015 00:06:38 +0000 (00:06 +0000)]
[opaque pointer type] Pass explicit pointee type in another case of GEP constant folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237860
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 May 2015 23:58:44 +0000 (23:58 +0000)]
Fix build error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237859
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 20 May 2015 23:55:16 +0000 (23:55 +0000)]
[MemCpyOpt] Don't move the memset when optimizing memset+memcpy.
Fixes PR23599, another miscompile introduced by r235232: when there is
another dependency on the destination of the created memset (i.e., the
part of the original destination that the memcpy doesn't depend on)
between the memcpy and the original memset, we would insert the created
memset after the memcpy, and thus after the other dependency.
Instead, insert the created memset right after the old one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237858
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 May 2015 23:28:03 +0000 (23:28 +0000)]
Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237855
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 May 2015 23:22:24 +0000 (23:22 +0000)]
[WinEH] C++ EH state numbering fixes
Differential Revision: http://reviews.llvm.org/D9787
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237854
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 May 2015 23:08:04 +0000 (23:08 +0000)]
[WinEH] Store pointers to the LSDA in the exception registration object
We aren't yet emitting the LSDA yet, so this will still fail to
assemble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237852
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 22:51:27 +0000 (22:51 +0000)]
Don't generate comments in the DebugLocStream unless required. NFC.
The ByteStreamer here wasn't taking account of whether the asm streamer was text based and verbose. Only with that combination should we emit comments.
This change makes sure that we only actually convert a Twine to a string using Twine::str() if we need the comment. This saves about 10000 small allocations on a test case involving the verify-use_list-order bitcode going through llc with debug info.
Note, this is NFC as the comments would ultimately never be emitted unless required.
Reviewed by Duncan Exon Smith and David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237851
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 22:37:48 +0000 (22:37 +0000)]
Revert "Add bool to DebugLocDwarfExpression to control emitting comments."
This reverts commit
0037b6bcbc874aa1b93d7ce3ad8dba3753ee2d9d (r237827).
David Blaikie suggested some alternatives to this which are better. Reverting to apply a better solution later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237849
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 20 May 2015 22:31:55 +0000 (22:31 +0000)]
Revert r237828 "[X86] Remove unused node after morphing it from shr to and."
This caused assertions during DAG combine: PR23601.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237843
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Wed, 20 May 2015 22:04:06 +0000 (22:04 +0000)]
[doc] Update Lexicon with C++ unwinder acronyms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237840
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 May 2015 21:46:30 +0000 (21:46 +0000)]
[opaque pointer type] Pass explicit type to Load instruction creation in AutoUpgrade
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237838
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 20 May 2015 21:40:38 +0000 (21:40 +0000)]
[Target/ARM] Only enable OptimizeBarrierPass at -O1 and above.
Ideally this is going to be and LLVM IR pass (shared, among others
with AArch64), but for the time being just enable it if consumers
ask us for optimization and not unconditionally.
Discussed with Tim Northover on IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237837
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 20 May 2015 21:03:03 +0000 (21:03 +0000)]
[lib/Fuzzer] more docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237836
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Wed, 20 May 2015 20:41:27 +0000 (20:41 +0000)]
AsmParser: Require a terminating null character when creating memory buffer.
This commit modifies the memory buffer creation in the AsmParser library so
that it requires a terminating null character. The LLLexer in the AsmParser
library checks for EOF only when it sees a null character, thus it would
be best to require it when creating a memory buffer so that the memory
buffer constructor can verify that a terminating null character is indeed
present.
Reviewers: Duncan P. N. Exon Smith, Matthias Braun
Differential Revision: http://reviews.llvm.org/D9883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237833
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 May 2015 20:22:31 +0000 (20:22 +0000)]
[opaque pointer type] LoadInst: assert that the explicit type matches the implicit one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237830
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 20:18:16 +0000 (20:18 +0000)]
MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC
Remove most remaining calls to `MCSymbolData::getSymbol()`, instead
using the already available `MCSymbol` directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237829
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 20 May 2015 20:10:26 +0000 (20:10 +0000)]
[X86] Remove unused node after morphing it from shr to and.
In some cases it won't get cleaned up properly leading to crashes
downstream. PR23353.
Based on a patch by Davide Italiano.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237828
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 19:50:03 +0000 (19:50 +0000)]
Add bool to DebugLocDwarfExpression to control emitting comments.
DebugLocDwarfExpression::EmitOp was creating temporary strings by concatenating Twine's.
When emitting to object files, these comments are thrown away.
This commit adds a boolean to the constructor of the DwarfExpression to control whether it will actually emit
any comments. This prevents it from even generating the temporary comments which would have been thrown away anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237827
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 19:34:08 +0000 (19:34 +0000)]
MC: Stop using MCSymbolData::getSymbol() in WinCOFF, NFC
Move APIs over from `MCSymbolData` to `MCSymbol`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237826
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 19:12:14 +0000 (19:12 +0000)]
Use a SmallString buffer instead of a std::string for debug info path lookup. NFC.
This code appends the filename to the directory then looks that up in a StringMap. We should be using the existing Twine::toStringRef method instead of Twine::str() as most times we'll succeed in the lookup.
Its possible that we should also consider allowing StringMap to lookup a key using a Twine in addition to a StringRef but that would complicate the code with little known benefit above and beyond this change.
This saves 170k temporary allocations when running llc on the verify_use_list_order bitcode with debug info for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237823
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 May 2015 18:54:02 +0000 (18:54 +0000)]
DAGCombiner: Continue combining if FoldConstantArithmetic() fails.
DAG.FoldConstantArithmetic() can fail even though both operands are
Constants if OpaqueConstants are involved. Continue trying other combine
possibilities in tis case.
Differential Revision: http://reviews.llvm.org/D6946
Somewhat related to PR21801 / rdar://
19211454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237822
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 20 May 2015 18:41:25 +0000 (18:41 +0000)]
Reapply r237539 with a fix for the Chromium build.
Make sure if we're truncating a constant that would then be sign extended
that the sign extension of the truncated constant is the same as the
original constant.
> Canonicalize min/max expressions correctly.
>
> This patch introduces a canonical form for min/max idioms where one operand
> is extended or truncated. This often happens when the other operand is a
> constant. For example:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = sext i32 %a to i64
> %3 = select i1 %1, i64 %2, i64 0
>
> Would now be canonicalized into:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = select i1 %1, i32 %a, i32 0
> %3 = sext i32 %2 to i64
>
> This builds upon a patch posted by David Majenemer
> (https://www.marc.info/?l=llvm-commits&m=
143008038714141&w=2). That pass
> passively stopped instcombine from ruining canonical patterns. This
> patch additionally actively makes instcombine canonicalize too.
>
> Canonicalization of expressions involving a change in type from int->fp
> or fp->int are not yet implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237821
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 May 2015 18:40:06 +0000 (18:40 +0000)]
ARM: Fix comment and make it slightly more readable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237820
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 18:25:40 +0000 (18:25 +0000)]
MC: Use MCSymbol in LocalCommon, NFC
Switch from MCSymbolData to MCSymbol in LocalCommon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237816
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Wed, 20 May 2015 17:21:09 +0000 (17:21 +0000)]
Fix icmp lowering
Summary:
During icmp lowering it can happen that a constant value can be larger than expected (see the code around the change).
APInt::getMinSignedBits() must be checked again as the shift before can change the constant sign to positive.
I'm not sure it is the best fix possible though.
Test Plan: Regression test included.
Reviewers: resistor, chandlerc, spatel, hfinkel
Reviewed By: hfinkel
Subscribers: hfinkel, llvm-commits
Differential Revision: http://reviews.llvm.org/D9147
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237812
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 17:16:39 +0000 (17:16 +0000)]
Change Function::getIntrinsicID() to return an Intrinsic::ID. NFC.
Now that Intrinsic::ID is a typed enum, we can forward declare it and so return it from this method.
This updates all users which were either using an unsigned to store it, or had a now unnecessary cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237810
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 20 May 2015 17:01:06 +0000 (17:01 +0000)]
Temporary delete the test while we're investigating crashes in LLVMObject it causes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237809
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 16:34:36 +0000 (16:34 +0000)]
MC: Add MCSymbolData back to MCAssembler dump
r237490 accidentally dropped MCSymbolData from the MCAssembler dump.
Add it back underneath the MCSymbol dump. Remove the MCSymbol dump from
MCSymbolData, since this would cause an infinite co-recursion, and
besides, that back pointer is going away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237807
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 16:02:11 +0000 (16:02 +0000)]
MC: Update MCAssembler to use MCSymbol, NFC
Use `MCSymbol` over `MCSymbolData` where both are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237803
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 20 May 2015 15:38:29 +0000 (15:38 +0000)]
[YAML] Make Node's destructor non-virtual.
Nodes aren't supposed to be destroyed polymorphically. Also make all subclasses
final to avoid non-virtual dtor warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237801
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 15:16:14 +0000 (15:16 +0000)]
MC: Use MCSymbol in MachObjectWriter, NFC
Replace uses of `MCSymbolData` with `MCSymbol` where both are needed, so
we can remove the backpointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237799
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 15:10:03 +0000 (15:10 +0000)]
MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC
Continue to prefer `MCSymbol` when we need both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237798
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 20 May 2015 15:05:07 +0000 (15:05 +0000)]
Get Triple::getARMCPUForArch() to use TargetParser
First ARMTargetParser FIXME, conservatively changing the way we parse CPUs
in the back-end. Still not perfect, with a lot of special cases, but moving
towards a more generic solution.
Moving all logic to the target parser made some unwritten assumptions
about architectures in Clang to break. I've added a lot of architectures
required by Clang, and default to CPUs that Clang believes it should
(and I agree).
I've also added a lot of unit tests, with the correct CPU for each
architecture, and Clang seems to be working correctly, too.
It also became clear that using "unsigned ID" as the argument for the get
methods makes it hard to know what ID, so I also changed the argument names
to match the enum type names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237797
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Wed, 20 May 2015 14:57:43 +0000 (14:57 +0000)]
Unit tests for the getSwappedBytes(double) fix from r237673.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237795
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 20 May 2015 14:53:50 +0000 (14:53 +0000)]
Silencing a -Wsign-compare warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237794
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 20 May 2015 14:32:03 +0000 (14:32 +0000)]
AVX-512: fixed algorithm of building vectors of i1 elements
fixed extract-insert i1 element,
load i1, zextload i1 should be with "and $1, %reg" to prevent loading garbage.
added a bunch of new tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237793
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 20 May 2015 14:18:59 +0000 (14:18 +0000)]
Revert r237789 - [mips] The naming convention for private labels is ABI dependant.
It works, but I've noticed that I missed several callers of createMCAsmInfo()
and many don't have a TargetMachine to provide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237792
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 20 May 2015 13:19:19 +0000 (13:19 +0000)]
[mips] Fix ehframe-indirect.ll test.
Summary:
-check-prefix replaces the default CHECK prefix rather than adding to it and
must be explicitly re-added.
Also added the N32 cases.
Reviewers: petarj
Reviewed By: petarj
Subscribers: tberghammer, llvm-commits
Differential Revision: http://reviews.llvm.org/D9668
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237790
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 20 May 2015 13:16:42 +0000 (13:16 +0000)]
[mips] The naming convention for private labels is ABI dependant.
Summary:
For N32/N64, private labels begin with '.L' but for O32 they begin with '$'.
MCAsmInfo now has an initializer function which can be used to provide information from the TargetMachine to control the assembly syntax.
Reviewers: vkalintiris
Reviewed By: vkalintiris
Subscribers: jfb, sandeep, llvm-commits, rafael
Differential Revision: http://reviews.llvm.org/D9821
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237789
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 20 May 2015 11:37:25 +0000 (11:37 +0000)]
[StatepointLowering] Support of the gc.relocates for invoke statepoints.
This change implements support for lowering of the gc.relocates tied to the invoke statepoint.
This is acomplished by storing frame indices of the lowered values in "StatepointRelocatedValues" map inside FunctionLoweringInfo instead of storing them in per-basic block structure StatepointLowering.
After this change StatepointLowering is used only during "LowerStatepoint" call and it is not necessary to store it as a field in SelectionDAGBuilder anymore.
Differential Revision: http://reviews.llvm.org/D7798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237786
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 20 May 2015 08:54:45 +0000 (08:54 +0000)]
[mips] [IAS] Factor out .set nomacro warning. NFC.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237780
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 May 2015 05:40:13 +0000 (05:40 +0000)]
[TableGen] Make some variable names consistent with their type names and just generally consistent across all of the overloads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237775
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 May 2015 05:40:09 +0000 (05:40 +0000)]
[TableGen] Fix a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237774
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 May 2015 05:40:06 +0000 (05:40 +0000)]
[TableGen] Don't override convertValue for some of the Init types when it does the same thing as the base class implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237773
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 20 May 2015 04:45:26 +0000 (04:45 +0000)]
[X86] Implement the local-exec TLS model for Windows targets
We know that _tls_index is zero for local-exec TLS variables because
they are always defined in the executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237772
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 04:39:01 +0000 (04:39 +0000)]
MC: Use MCSymbol in most of ELFObjectWriter, NFC
Stop using MCSymbolData where we also need MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237770
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 20 May 2015 02:44:14 +0000 (02:44 +0000)]
Support: Introduce LLVM_FALLTHROUGH macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237766
91177308-0d34-0410-b5e6-
96231b3b80d8
Swaroop Sridhar [Wed, 20 May 2015 01:07:23 +0000 (01:07 +0000)]
Add a GCStrategy for CoreCLR
This change adds a new GC strategy for supporting the CoreCLR runtime.
This strategy is currently identical to Statepoint-example GC,
but is necessary for several upcoming changes specific to CoreCLR, such as:
1. Base-pointers not explicitly reported for interior pointers
2. Different format for stack-map encoding
3. Location of Safe-point polls: polls are only needed before loop-back edges and before tail-calls (not needed at function-entry)
4. Runtime specific handshake between calls to managed/unmanaged functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237753
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Wed, 20 May 2015 00:20:26 +0000 (00:20 +0000)]
[bpf] fix build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237751
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 00:02:39 +0000 (00:02 +0000)]
MC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC
Pass through an `MCSymbol` instead of an `MCSymbolData` so we can get
rid of the back pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237750
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 May 2015 23:53:20 +0000 (23:53 +0000)]
MC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFC
Continue to canonicalize on MCSymbol instead of MCSymbolData when both
are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237749
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 May 2015 23:40:11 +0000 (23:40 +0000)]
[PlaceSafepoints] Stop special casing some intrinsics
We were special casing a handful of intrinsics as not needing a safepoint before them. After running into another valid case - memset - I took a closer look and realized that almost no intrinsics need to have a safepoint poll before them. Restructure the code to make that apparent so that we stop hitting these bugs. The only intrinsics which need a safepoint poll before them are ones which can run arbitrary code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237744
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 19 May 2015 23:28:23 +0000 (23:28 +0000)]
Try to fix the build with MSVC 2015 by disabling sized deallocation
I can't actually test this properly because uninstalling MSVC 2015 CTP 6
and reinstalling the 2015 RC takes hours. I can only verify that this
doesn't mess up MSVC 2013 and 2015 CTP 6 builds, which is what I've
done.
Should fix PR23513.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237743
91177308-0d34-0410-b5e6-
96231b3b80d8