Commit Graph

115152 Commits

Author SHA1 Message Date
Kevin Enderby
ba5a585242 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
2015-03-17 22:26:11 +00:00
Simon Pilgrim
de0ccb2104 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
2015-03-17 22:19:08 +00:00
Krzysztof Parzyszek
d65f223529 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
2015-03-17 21:47:16 +00:00
Yaron Keren
7fa3dea12d 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
2015-03-17 21:33:38 +00:00
Duncan P. N. Exon Smith
887a867862 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
2015-03-17 21:32:46 +00:00
Rafael Espindola
7e4820c1a6 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
2015-03-17 21:30:21 +00:00
Kevin Enderby
17913067f5 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
2015-03-17 21:07:39 +00:00
Sean Silva
b04877cae9 [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
2015-03-17 21:02:37 +00:00
David Majnemer
76d3a99d10 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
2015-03-17 20:41:11 +00:00
Benjamin Kramer
e3154fb22d 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
2015-03-17 20:40:24 +00:00
David Majnemer
6129538ade 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
2015-03-17 20:40:21 +00:00
David Majnemer
468fbb3c2b Address review comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232540 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 20:39:40 +00:00
David Majnemer
6526150f82 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
2015-03-17 20:39:25 +00:00
Michael Zolotukhin
5ea1773441 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
2015-03-17 20:31:56 +00:00
Rafael Espindola
b415e6b2f2 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
2015-03-17 20:07:06 +00:00
Benjamin Kramer
93920f0bcd 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
2015-03-17 19:53:41 +00:00
Michael Zolotukhin
5850602050 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
2015-03-17 19:50:55 +00:00
Michael Zolotukhin
0f311db8aa 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
2015-03-17 19:46:50 +00:00
Michael Zolotukhin
6e046d3810 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
2015-03-17 19:37:28 +00:00
Samuel Antao
3a660c933a 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
2015-03-17 19:31:19 +00:00
Michael Zolotukhin
51b4d85c62 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
2015-03-17 19:26:23 +00:00
Michael Zolotukhin
06aab08788 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
2015-03-17 19:22:30 +00:00
Michael Zolotukhin
eb9ccd375b 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
2015-03-17 19:17:18 +00:00
Kostya Serebryany
0e5ec02e1e [asan] remove redundant ifndefs. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232521 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 19:13:23 +00:00
Yaron Keren
6279aae989 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
2015-03-17 18:55:30 +00:00
Richard Barton
b59aee170f [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
2015-03-17 18:20:47 +00:00
Michael Liao
de3983775e [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
2015-03-17 18:03:10 +00:00
Adam Nemet
5a6068638e [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
2015-03-17 17:51:58 +00:00
David Blaikie
25e7243eda 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
2015-03-17 17:48:24 +00:00
Duncan P. N. Exon Smith
2f5bc29926 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
2015-03-17 17:28:41 +00:00
Kevin Enderby
73cd697dec 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
2015-03-17 17:10:57 +00:00
Dmitry Vyukov
6e4a97dfce 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
2015-03-17 16:59:19 +00:00
Reid Kleckner
78158ce3a4 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
2015-03-17 16:50:20 +00:00
Daniel Sanders
4bb6aeb874 [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
2015-03-17 16:16:14 +00:00
Shankar Easwaran
abc795d1f6 [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
2015-03-17 15:44:20 +00:00
Rafael Espindola
0bea785427 Remove the error prone GetTempSymbol API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232487 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 15:02:17 +00:00
Samuel Antao
7684e7d987 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
2015-03-17 15:00:57 +00:00
Rafael Espindola
6fe99b7d5c 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
2015-03-17 14:58:47 +00:00
Rafael Espindola
2e59282624 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
2015-03-17 14:54:43 +00:00
Rafael Espindola
cebed4aaf1 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
2015-03-17 14:50:32 +00:00
Rafael Espindola
b80d90e9d0 Make EmitFunctionHeader a private helper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232481 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 14:38:30 +00:00
Daniel Sanders
42c951a74c 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
2015-03-17 14:37:39 +00:00
Rafael Espindola
99739705ac 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
2015-03-17 14:34:42 +00:00
Rafael Espindola
e9141ce303 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
2015-03-17 14:22:31 +00:00
Rafael Espindola
e503379196 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
2015-03-17 14:06:24 +00:00
Rafael Espindola
a480f88b3c 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
2015-03-17 13:57:48 +00:00
Toma Tabacu
f28b151b52 [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
2015-03-17 13:17:44 +00:00
Rafael Espindola
03b47b8e5b Remove dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232472 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 13:09:01 +00:00
Rafael Espindola
4d3df54336 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
2015-03-17 12:54:04 +00:00
Daniel Sanders
06c5d245a2 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
2015-03-17 12:00:04 +00:00