Daniel Jasper [Wed, 18 Mar 2015 12:45:45 +0000 (12:45 +0000)]
Change test to accept an additional critical edge split.
The two hot blocks are right next to each other and I verified that
there is no performance regression by compressing/uncompressing some
files with a minigzip built with the different options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232629
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Wed, 18 Mar 2015 12:01:59 +0000 (12:01 +0000)]
[ARM] Align stack objects passed to memory intrinsics
Memcpy, and other memory intrinsics, typically tries to use LDM/STM if
the source and target addresses are 4-byte aligned. In CodeGenPrepare
look for calls to memory intrinsics and, if the object is on the
stack, 4-byte align it if it's large enough that we expect that memcpy
would want to use LDM/STM to copy it.
Differential Revision: http://reviews.llvm.org/D7908
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232627
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Wed, 18 Mar 2015 10:45:12 +0000 (10:45 +0000)]
Add missing newline to end of test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232626
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Wed, 18 Mar 2015 10:17:07 +0000 (10:17 +0000)]
Remove many superfluous SmallString::str() calls.
Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.
There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232622
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Wed, 18 Mar 2015 06:28:38 +0000 (06:28 +0000)]
[mips] Add itineraries for ext and ins instructions.
Currently, there are no itineraries defined for ext and ins instructions.
This patch adds these itineraries and uses them in the instruction definitions.
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D7209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232613
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 18 Mar 2015 02:09:25 +0000 (02:09 +0000)]
Split comma-separated \param(s). [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232584
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Wed, 18 Mar 2015 01:39:40 +0000 (01:39 +0000)]
[bpf] fix build
fix BPF backend build broken by r232429
Patch by Brenden Blanco
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232581
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Wed, 18 Mar 2015 01:34:06 +0000 (01:34 +0000)]
Add testcases for BEXTR.
These BEXTR cases are a check for the 64-bit load form and two negative cases where the bitrange is non-contiguous. From a private patch equivalent to r189742/PR17028.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232580
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 18 Mar 2015 00:44:46 +0000 (00:44 +0000)]
Missed testcase for r232577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232578
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 18 Mar 2015 00:43:46 +0000 (00:43 +0000)]
Generate bit manipulation instructions on Hexagon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232577
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 18 Mar 2015 00:41:29 +0000 (00:41 +0000)]
[SCEV] Make isImpliedCond smarter.
Summary:
This change teaches isImpliedCond to infer things like "X sgt 0" => "X -
1 sgt -1". The `ConstantRange` class has the logic to do the heavy
lifting, this change simply gets ScalarEvolution to exploit that when
reasonable.
Depends on D8345
Reviewers: atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232576
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 18 Mar 2015 00:41:24 +0000 (00:41 +0000)]
[ConstantRange] Split makeICmpRegion in two.
Summary:
This change splits `makeICmpRegion` into `makeAllowedICmpRegion` and
`makeSatisfyingICmpRegion` with slightly different contracts. The first
one is useful for determining what values some expression //may// take,
given that a certain `icmp` evaluates to true. The second one is useful
for determining what values are guaranteed to //satisfy// a given
`icmp`.
Reviewers: nlewycky
Reviewed By: nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8345
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232575
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 18 Mar 2015 00:03:36 +0000 (00:03 +0000)]
DAGCombiner: fold (xor (shl 1, x), -1) -> (rotl ~1, x)
Targets which provide a rotate make it possible to replace a sequence of
(XOR (SHL 1, x), -1) with (ROTL ~1, x). This saves an instruction on
architectures like X86 and POWER(64).
Differential Revision: http://reviews.llvm.org/D8350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232572
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 17 Mar 2015 23:54:51 +0000 (23:54 +0000)]
COFF: Let globals with private linkage reside in their own section
COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.
Differential Revision: http://reviews.llvm.org/D8394
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232570
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 17 Mar 2015 23:54:48 +0000 (23:54 +0000)]
Remove unneeded selection functions from HexagonISelDAGToDAG
- SelectSelect, and
- SelectTruncate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232569
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 23:41:05 +0000 (23:41 +0000)]
docs: Update LangRef and SourceLevelDebugging
Cleanup some bitrot in SourceLevelDebugging.rst.
- Pull the still-relevant details about individual descriptors into
LangRef.rst. Cut a lot of it to avoid over-describing the fields,
as the C++ classes and assembly format are mostly self-describing
now. If there's anything specific that I shouldn't have cut, let me
know and I'll add it back.
- Rewrite the remaining sections to refer to the new debug info
hierarchy in LangRef.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232566
91177308-0d34-0410-b5e6-
96231b3b80d8
Pirama Arumuga Nainar [Tue, 17 Mar 2015 23:10:29 +0000 (23:10 +0000)]
Fix bug while building FP16 constant vectors for AArch64
Summary: Building FP16 constant vectors caused the FP16 data to be bitcast to i64. This patch creates a BITCAST node with the correct value, and adds a test to verify correct handling.
Reviewers: mcrosier
Reviewed By: mcrosier
Subscribers: mcrosier, jmolloy, ab, srhines, llvm-commits, rengolin, aemerson
Differential Revision: http://reviews.llvm.org/D8369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232562
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 17 Mar 2015 22:55:01 +0000 (22:55 +0000)]
Appease AArch64ISelLowering.cpp miscompiled by g++-4.7.2.
I will revert this when 4.7.3 is ready.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232561
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 17 Mar 2015 22:26:11 +0000 (22:26 +0000)]
Add the option -no-symbolic-operands to llvm-objdump used with -macho and
-disassemble to not symbolic operands when disassembling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232558
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 17 Mar 2015 22:19:08 +0000 (22:19 +0000)]
XformToShuffleWithZero - Added clearer early outs and general tidy up. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232557
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 17 Mar 2015 21:47:16 +0000 (21:47 +0000)]
Selection DAG preprocessing on Hexagon
Simplify: (or (select c x 0) z) -> (select c (or x z) z)
(or (select c 0 y) z) -> (select c z (or y z))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232553
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 17 Mar 2015 21:33:38 +0000 (21:33 +0000)]
Remove StringRef->std::string->StringRef conversions.
As StringInit::get() accepts StringRef there is no need
to construct a std::string out of the StringRef input and
then construct a new StringRef from the std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232551
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 21:32:46 +0000 (21:32 +0000)]
DebugInfo: Drop fake DW_TAG_expression
Break MDExpression off of DebugNode (inherit directly from `MDNode`) and
drop the fake `DW_TAG_expression` tag in the process.
AFAICT, there's no real functionality change here. The tag was
originally used by `DIDescriptor::isExpression()` to discriminate
between `MDNode`s, but in the new hierarchy we don't need that.
Fixes PR22780.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232550
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 21:30:21 +0000 (21:30 +0000)]
Emit the offset directly instead of creating a dummy expression.
We were creating an expression of the form (S+C)-S which is just C.
Patch by Frédéric Riss. I just added the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232549
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 17 Mar 2015 21:07:39 +0000 (21:07 +0000)]
Add the option, -no-leading-addr llvm-objdump used with -macho and
-disassemble or -section to not print the leading addresses on each line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232547
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 17 Mar 2015 21:02:37 +0000 (21:02 +0000)]
[docs] Fix some malformed links.
Patch by Stanislav Manilov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232546
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 17 Mar 2015 20:41:11 +0000 (20:41 +0000)]
Revert "COFF: Let globals with private linkage reside in their own section"
This reverts commit r232539. This was committed accidently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232543
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 17 Mar 2015 20:40:24 +0000 (20:40 +0000)]
Internalize BitcodeReader. Not used outside of BitcodeReader.cpp.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232542
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 17 Mar 2015 20:40:21 +0000 (20:40 +0000)]
Revert "Address review comments"
This reverts commit r232540. This was committed accidently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232541
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 17 Mar 2015 20:39:40 +0000 (20:39 +0000)]
Address review comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232540
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 17 Mar 2015 20:39:25 +0000 (20:39 +0000)]
COFF: Let globals with private linkage reside in their own section
Summary:
COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232539
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 20:31:56 +0000 (20:31 +0000)]
Try to fix a test broken by one of my previous commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232536
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 20:07:06 +0000 (20:07 +0000)]
Centralize the handling of unique ids for temporary labels.
Before this patch code wanting to create temporary labels for a given entity
(function, cu, exception range, etc) had to keep its own counter to have stable
symbol names.
createTempSymbol would still add a suffix to make sure a new symbol was always
returned, but it kept a single counter. Because of that, if we were to use
just createTempSymbol("cu_begin"), the label could change from cu_begin42 to
cu_begin43 because some other code started using temporary labels.
Simplify this by just keeping one counter per prefix and removing the various
specialized counters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232535
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 17 Mar 2015 19:53:41 +0000 (19:53 +0000)]
Internalize llvm::AssemblyWriter. It's not used outside of AsmWriter.cpp.
This is an artifact of an implementation detail of DebugIR that has been
long refactored away. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232532
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 19:50:55 +0000 (19:50 +0000)]
TLI: Add addVectorizableFunctionsFromVecLib.
Also, add several entries to vectorizable functions table, and
corresponding tests. The table isn't complete, it'll be populated later.
Review: http://reviews.llvm.org/D8131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232531
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 19:46:50 +0000 (19:46 +0000)]
LoopVectorize: teach loop vectorizer to vectorize calls.
The tests would be committed in a commit for http://reviews.llvm.org/D8131
Review: http://reviews.llvm.org/D8095
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232530
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 19:37:28 +0000 (19:37 +0000)]
TTI: Honour cost model for estimating cost of vector-intrinsic and calls.
Review: http://reviews.llvm.org/D8096
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232528
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Antao [Tue, 17 Mar 2015 19:31:19 +0000 (19:31 +0000)]
Add assertion to detect invalid registers in the PowerPC MC instruction lowering.
We have observed that noreg was being generated due to a bug in FastIsel and was not being detected during emission. It happens that in the Asm emission there is an assertion that detects this in getRegisterName() from the tbl-generated file PPCGenAsmWriter.inc. However, when emitting an Obj file, invalid registers can be emitted given that no check are made in getBinaryCodeFromInstr() from PPCGenMCCodeEmitter.inc. In order to cover all cases this adds an assertion for reg operands in LowerPPCMachineInstrToMCInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232525
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 19:26:23 +0000 (19:26 +0000)]
TTI: Add getCallInstrCost.
Review: http://reviews.llvm.org/D8094
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232524
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 19:22:30 +0000 (19:22 +0000)]
TLI: Add interface for querying whether a function is vectorizable.
Review: http://reviews.llvm.org/D8093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232523
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Tue, 17 Mar 2015 19:17:18 +0000 (19:17 +0000)]
LoopVectorizer: Add TargetTransformInfo.
Review: http://reviews.llvm.org/D8092
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232522
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 17 Mar 2015 19:13:23 +0000 (19:13 +0000)]
[asan] remove redundant ifndefs. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232521
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 17 Mar 2015 18:55:30 +0000 (18:55 +0000)]
Remove LookupSymbol(StringRef) and optimize LookupSymbol(Twine).
Same as MakeArgString in r232465, keep only LookupSymbol(Twine)
while making sure it handles the StringRef like cases efficiently
using twine::toStringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232517
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Tue, 17 Mar 2015 18:20:47 +0000 (18:20 +0000)]
[ARM] Fix offset calculation in ARMBaseRegisterInfo::needsFrameBaseReg
The input offset to needsFrameBaseReg is a negative value below the top of the
stack frame, but when converting to a positive offset from the bottom of the
stack frame this value was negated, causing the final offset to be too large
by twice the input offset's magnitude. Fix that by not negating the offset.
Patch by John Brawn
Differential Revision: http://reviews.llvm.org/D8316
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232513
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 17 Mar 2015 18:03:10 +0000 (18:03 +0000)]
[SwitchLowering] Remove incoming values in the reverse order
- To prevent invalidating *successive* indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232510
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 17 Mar 2015 17:51:58 +0000 (17:51 +0000)]
[docs] Fix copy-and-paste bug in def-use example
This appeared when the example was converted to use range-based loop in
r207755.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232509
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 17 Mar 2015 17:48:24 +0000 (17:48 +0000)]
Fix GCC -Wparentheses warning (& reformat now that the precedence is fixed)
Benign warning (clang deliberately suppresses this case) but does
regularly produce bad formatting, so it's nice to fix/reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232508
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 17:28:41 +0000 (17:28 +0000)]
Verifier: Set --verify-debug-info=true by default
r186634 started verifying debug info, and r194986 disabled it by default
because it was too expensive to run the checks on every function (since
most of the graph was reachable from each function).
r206300 moved the checks to module-level to make it cheaper, but there
was already quite a bit of testcase bitrot (and the verifier would only
print `<badref>`) so I guess no one had time to turn it back on.
This does just that. Upgrade scripts this past autumn and winter
probably fixed some of the bitrot, and this weekend I fixed the verifier
output (r232275, r232417, r232418) and thusly the remaining failing
testcases (r232290, r232415).
This is part of PR22777.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232505
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 17 Mar 2015 17:10:57 +0000 (17:10 +0000)]
Add the option, -dis-symname to llvm-objdump used with -macho and
-disassemble to disassemble just one symbol’s instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232503
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Vyukov [Tue, 17 Mar 2015 16:59:19 +0000 (16:59 +0000)]
asan: optimization experiments
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232502
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 17 Mar 2015 16:50:20 +0000 (16:50 +0000)]
Use an underlying enum type of unsigned to silence a -Wmicrosoft warning about being unable to put (unsigned)-1 into the default underyling type of int
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232498
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 17 Mar 2015 16:16:14 +0000 (16:16 +0000)]
[systemz] Distinguish the 'Q', 'R', 'S', and 'T' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: uweigand
Reviewed By: uweigand
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8251
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232495
91177308-0d34-0410-b5e6-
96231b3b80d8
Shankar Easwaran [Tue, 17 Mar 2015 15:44:20 +0000 (15:44 +0000)]
[Object][ELF] ELFEntityIterator : Add operators for random access
Fix review comments from djasper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232494
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 15:02:17 +0000 (15:02 +0000)]
Remove the error prone GetTempSymbol API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232487
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Antao [Tue, 17 Mar 2015 15:00:57 +0000 (15:00 +0000)]
Fix R0 use in PowerPC VSX store for FastIsel.
The VSX stores are sometimes generated with a undefined index register, causing %noreg to be used and R0 to be emitted later on. The semantics of the VSX store (e.g. stdsdx) requires R0 to be used as base if we want zero to be used in the computation of the effective address instead of the content of R0. This patch checks if no index register was generated and forces R0 to be used as base address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:58:47 +0000 (14:58 +0000)]
Convert the last 4 users of GetTempSymbol to createTempSymbol.
Despite using the same name these are unrelated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232485
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:54:43 +0000 (14:54 +0000)]
Switch two simple uses of GetTempSymbol to createTempSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232484
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:50:32 +0000 (14:50 +0000)]
Use createTempSymbol to avoid collisions instead of an ad hoc method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232483
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:38:30 +0000 (14:38 +0000)]
Make EmitFunctionHeader a private helper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232481
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 17 Mar 2015 14:37:39 +0000 (14:37 +0000)]
Re-commit: [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: kparzysz, adasgupt
Reviewed By: kparzysz, adasgupt
Subscribers: colinl, llvm-commits
Differential Revision: http://reviews.llvm.org/D8204
Like for the PowerPC target, I've had to add 'i' to the constraint mappings in
order to pass 2007-12-17-InvokeAsm.ll. It's not clear why 'i' has historically
been treated as a memory constraint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232480
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:34:42 +0000 (14:34 +0000)]
Call EmitFunctionHeader just before EmitFunctionBody.
This avoids switching to .AMDGPU.config and back and hardcoding the
section it switches back to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232479
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:22:31 +0000 (14:22 +0000)]
Convert the easy cases of GetTempSymbol to createTempSymbol.
In these cases no code was depending on GetTempSymbol finding an existing
symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232478
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 14:06:24 +0000 (14:06 +0000)]
Don't duplicate comment from the .h. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232476
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 13:57:48 +0000 (13:57 +0000)]
Move the EH symbol to the asm printer and use it for the SJLJ case too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232475
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 17 Mar 2015 13:17:44 +0000 (13:17 +0000)]
[mips] [IAS] Add support for the XOR $reg,imm pseudo-instruction.
Summary:
This adds a MipsInstAlias which expands to XORi $reg,$reg,imm. For example, "xor $6, 0x3A" should be expanded to "xori $6, $6, 58".
This should work for all MIPS ISAs.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8284
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232473
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 13:09:01 +0000 (13:09 +0000)]
Remove dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232472
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Mar 2015 12:54:04 +0000 (12:54 +0000)]
Replace a use of GetTempSymbol with createTempSymbol.
This is cleaner and avoids a crash in a corner case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232471
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 17 Mar 2015 12:00:04 +0000 (12:00 +0000)]
Fix r232466 by adding 'i' to the mappings for inline assembly memory constraints.
It's not completely clear why 'i' has historically been treated as a memory
constraint. According to the documentation, it represents a constant immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232470
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 17 Mar 2015 11:55:28 +0000 (11:55 +0000)]
[ARM] Add support for ARMV6K subtarget (LLVM)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the LLVM
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232468
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 17 Mar 2015 11:09:13 +0000 (11:09 +0000)]
[ppc] Distinguish the 'es', 'o', 'm', 'Q', 'Z', and 'Zy' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
Of these, 'es', and 'Q' do not have backend tests but are accepted by
clang.
No functional change intended. Depends on D8173.
Reviewers: hfinkel
Reviewed By: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232466
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 17 Mar 2015 09:51:17 +0000 (09:51 +0000)]
Teach Twine to support SmallString.
Enable removing .str() member calls for these frequent cases.
http://reviews.llvm.org/D6372
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232465
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 17 Mar 2015 05:49:45 +0000 (05:49 +0000)]
Recommit simplification first attempted in r232309 (fixed a bit in r232312, with fixes in r232314)
Messed it up because I didn't realize there were two different iterators
here (& clearly didn't build any of this... ) - still seems easier to
just use the injected class name than introduce a self typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232462
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 17 Mar 2015 03:23:09 +0000 (03:23 +0000)]
[AArch64] Use intermediate step for concat_vectors of illegal truncs.
Optimize concat_vectors of truncated vectors, where the intermediate
type is illegal, to avoid said illegality, e.g.,
(v4i16 (concat_vectors (v2i16 (truncate (v2i64))),
(v2i16 (truncate (v2i64)))))
->
(v4i16 (truncate (v4i32 (concat_vectors (v2i32 (truncate (v2i64))),
(v2i32 (truncate (v2i64)))))))
This isn't really target-specific, and, as such, would best go in the
DAGCombiner. However, ISD::TRUNCATE legality isn't keyed on both input
and result type, so we might generate worse code when we don't know
better. On AArch64 we know it's fine for v2i64->v4i16 and v4i32->v8i8.
rdar://
20022387
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232459
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 17 Mar 2015 03:19:18 +0000 (03:19 +0000)]
[AArch64] Factor out N->getOperand()s; format. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232458
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 17 Mar 2015 02:36:51 +0000 (02:36 +0000)]
Fix ODR violations caused by putting anonymous namespaces in header files (and
then using the symbols from those anonymous namespaces from outside the
anonymous namespace).
This was "detected" by causing the modules selfhost to fail in some cases.
The corresponding Clang bug was fixed in r232455.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232457
91177308-0d34-0410-b5e6-
96231b3b80d8
Shankar Easwaran [Tue, 17 Mar 2015 02:12:35 +0000 (02:12 +0000)]
[Object][ELF] ELFEntityIterator : Add operators for random access
Add operators add/subtract for random access. This is essentially used by
lld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232453
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 17 Mar 2015 01:40:24 +0000 (01:40 +0000)]
[IRCE] Re-commit tests cases.
Re-commit the test cases added in r232444. These now use
-irce-print-changed-loops and -irce-print-range-checks so they run
correctly on a without asserts build of llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232452
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 17 Mar 2015 01:40:22 +0000 (01:40 +0000)]
[IRCE] Add a -irce-print-range-checks option.
-irce-print-range-checks prints out the set of range checks recognized
by IRCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232451
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 01:14:40 +0000 (01:14 +0000)]
MapMetadata: Allow unresolved metadata if it won't change
Allow unresolved nodes through the `MapMetadata()` if
`RF_NoModuleLevelChanges`, since there's no remapping to do anyway.
This fixes PR22929. I'll add a clang test as a follow-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232449
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 17 Mar 2015 00:54:50 +0000 (00:54 +0000)]
[IRCE] Delete two tests.
I accidentally checked in two tests that used -debug-only -- these fail
on a release LLVM build. Temporarily delete these from the repo to keep
the bots green while I fix this locally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232446
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 17 Mar 2015 00:42:16 +0000 (00:42 +0000)]
[IRCE] Add comments, NFC.
This change adds some comments that justify why a potentially
overflowing operation is safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232445
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 17 Mar 2015 00:42:13 +0000 (00:42 +0000)]
[IRCE] Support half-range checks.
This change to IRCE gets it to recognize "half" range checks. Half
range checks are range checks that only either check if the index is
`slt` some positive integer ("length") or if the index is `sge` `0`.
The range solver does not try to be clever / aggressive about solving
half-range checks -- it transforms "I < L" to "0 <= I < L" and "0 <= I"
to "0 <= I < INT_SMAX". This is safe, but not always optimal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232444
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 17 Mar 2015 00:18:51 +0000 (00:18 +0000)]
llvm-cov: Warn instead of error if a .gcda has arcs from an exit block
Patch by Vanderson M. Rosario. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232443
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 00:16:35 +0000 (00:16 +0000)]
AsmWriter: Assert on unresolved metadata nodes
Assert that `MDNode::isResolved()`. While in theory the `Verifier`
should catch this, it doesn't descend into all debug info, and the
`DebugInfoVerifier` doesn't call into the `Verifier`. Besides, this
helps to catch bugs when `-disable-verify=true`.
Note that I haven't come across a place where this fails with clang
today, so no testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232442
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 16 Mar 2015 23:52:03 +0000 (23:52 +0000)]
GCOV: Make the exit block placement from r223193 optional
By default we want our gcov emission to stay 4.2 compatible, which
means we need to continue emit the exit block last by default. We add
an option to emit it before the body for users that need it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232438
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 16 Mar 2015 23:36:24 +0000 (23:36 +0000)]
LowerBitSets: do not use private aliases at all on Darwin.
LLVM currently turns these into linker-private symbols, which can be dead
stripped by the Darwin linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232435
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Mar 2015 22:29:29 +0000 (22:29 +0000)]
Pass in a "const Triple &T" instead of a raw StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232429
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Mar 2015 22:06:15 +0000 (22:06 +0000)]
Remove unused argument. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232428
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 16 Mar 2015 22:03:50 +0000 (22:03 +0000)]
Add testing for mismatched explicit type on a gep operator when loading from bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232427
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 16 Mar 2015 21:48:46 +0000 (21:48 +0000)]
Add testing for mismatched explicit type on a load instruction when loading from bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232424
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Mar 2015 21:43:42 +0000 (21:43 +0000)]
There is only one Asm streamer, there is no need for targets to register it.
Instead, have the targets register a TargetStreamer to be use with the
asm streamer (if any).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232423
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 16 Mar 2015 21:40:18 +0000 (21:40 +0000)]
InstrProf: Fix CoverageMappingReader on big endian
This makes the reader check the endianness of the object file its
given and behave appropriately. For the test I dug up a really old
linker and created a ppc-apple-darwin file for llvm-cov to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232422
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Mar 2015 21:36:38 +0000 (21:36 +0000)]
CodeGen: @llvm.eh.typeid.for replaced @llvm.eh.typeid.for.i32
We removed @llvm.eh.typeid.for.i32 and replaced it with
@llvm.eh.typeid.for quite some time ago. Fix up some test cases which
never got updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232421
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 16 Mar 2015 21:35:48 +0000 (21:35 +0000)]
Test bitcode parsing error-handling for incorrect explicit type
(turns out I had regressed this when sinking handling of this type down
into GetElementPtrInst::Create - since that asserted before the error
handling was performed)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232420
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:23:56 +0000 (21:23 +0000)]
Verifier: Don't call debug info verifier if the module is broken
If `Verifier` has already found a failure, don't call
`DebugInfoVerifier`. The latter sometimes crashes in `DebugInfoFinder`
when the former would give a nice message. The only two cases I found
it crashing are explicit verifier tests I've added:
- test/Verifier/llvm.dbg.declare-expression.ll
- test/Verifier/llvm.dbg.value-expression.ll
However, I assume frontends with bugs will create invalid IR as well.
IMO, the `DebugInfoVerifier` should never crash (instead, it should fail
to verify), but subtleties like that will be easier to work out once
it's enabled again.
This is part of PR22777.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232418
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:21:10 +0000 (21:21 +0000)]
AsmWriter: Handle broken metadata nodes
Print out temporary `MDNode`s so we don't crash in the verifier (or
during `dump()` output).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232417
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:10:12 +0000 (21:10 +0000)]
DebugInfo: Fix testcases that fail -verify-debug-info=true
As part of PR22777, fix testcases that fail the debug info verifier.
The changes fall into the following categories:
- Empty `filename:` fields in `MDFile`s. Compile units and some types
require non-empty filenames. A number of testcases have empty
filenames, probably due to hand-reduction of testcases.
- Not-quite empty arrays: `!{i32 0}`. This used to be equivalent in
the debug info schema to `!{}`. They cause problems for
`!MDSubroutineType`'s `types:` array, since it requires all operands
to be valid types. (Note that `!{null}` is the correct type array
for functions that take no arguments and return `void`.)
- Significantly bitrotted testcases. Nodes got left behind a few
upgrades ago because of missing or invalid tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232415
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:05:33 +0000 (21:05 +0000)]
Verifier: Simplify logic in processCallInst(), NFC
No need for local variables here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232413
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:03:55 +0000 (21:03 +0000)]
IR: Take advantage of -verify checks for MDExpression
Now that we check `MDExpression` during `-verify` (r232299), make
the `DIExpression` wrapper more strict:
- remove redundant checks in `DebugInfoVerifier`,
- overload `get()` to `cast_or_null<MDExpression>` (superseding
`getRaw()`),
- stop checking for null in any accessor, and
- remove `DIExpression::Verify()` entirely in favour of
`MDExpression::isValid()`.
There is still some logic in this class, mostly to do with high-level
iterators; I'll defer cleaning up those until the rest of the wrappers
are similarly strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232412
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 20:46:27 +0000 (20:46 +0000)]
DebugInfo: Simplify logic in DIType::Verify(), NFC
Clarify the logic in `DIType::Verify()` by checking `isBasicType()`
earlier, by skipping `else` after `return`s, and by documenting an
otherwise opaque check.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232410
91177308-0d34-0410-b5e6-
96231b3b80d8