1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

118638 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
6f5f78b174 AsmPrinter: Explicitly scope iterator for MSVC
Try to placate bots by explicitly scoping a conversion constructor from
`iterator` to `const_iterator`.

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/5931/

llvm-svn: 240748
2015-06-26 00:41:53 +00:00
Matthias Braun
917f1e4a7f Revert "X86: Reject register operands with obvious type mismatches."
Revert until http://llvm.org/PR23955 is investigated.

This reverts commit r239309.

llvm-svn: 240746
2015-06-26 00:26:49 +00:00
Matthias Braun
9fff5d5c61 Fix mismatched architectures in test
llvm-svn: 240745
2015-06-26 00:26:46 +00:00
Matthias Braun
d4a6e1c29f aad/fix labels in test/CodeGen/X86/StackColoring.ll
llvm-svn: 240744
2015-06-26 00:26:44 +00:00
Alexey Samsonov
4c3b8a043f [ASan] Use llvm::getDISubprogram() to get function entry debug location.
It can be more robust than copying debug info from first non-alloca
instruction in the entry basic block. We use the same strategy in
coverage instrumentation.

llvm-svn: 240738
2015-06-26 00:00:47 +00:00
Duncan P. N. Exon Smith
b8e0101e11 AsmPrinter: Use an intrusively linked list for DIE::Children
Replace the `std::vector<>` for `DIE::Children` with an intrusively
linked list.  This is a strict memory improvement: it requires no
auxiliary storage, and reduces `sizeof(DIE)` by one pointer.  It also
factors out the DIE-related malloc traffic.

This drops llc memory usage from 735 MB down to 718 MB, or ~2.3%.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

llvm-svn: 240736
2015-06-25 23:52:10 +00:00
Duncan P. N. Exon Smith
249d680189 AsmPrinter: Convert DIE::Values to a linked list
Change `DIE::Values` to a singly linked list, where each node is
allocated on a `BumpPtrAllocator`.  In order to support `push_back()`,
the list is circular, and points at the tail element instead of the
head.  I abstracted the core list logic out to `IntrusiveBackList` so
that it can be reused for `DIE::Children`, which also cares about
`push_back()`.

This drops llc memory usage from 799 MB down to 735 MB, about 8%.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

llvm-svn: 240733
2015-06-25 23:46:41 +00:00
Michael J. Spencer
d9fc5d4945 [ELF] Move ELF{32,64}{L,B}E typedefs to llvm.
llvm-svn: 240731
2015-06-25 23:41:23 +00:00
Michael J. Spencer
ee3a17187e [ELF] Add some accessors for lld.
llvm-svn: 240730
2015-06-25 23:40:41 +00:00
Alexey Samsonov
c200b66742 Make llvm-dwarfdump exit with non-zero exit code if error was occured.
llvm-svn: 240729
2015-06-25 23:40:15 +00:00
NAKAMURA Takumi
a5b2580063 PPCISelLowering.cpp: Appease PR23956. [-Wdocumentation]
llvm-svn: 240727
2015-06-25 23:38:44 +00:00
Adrian Prantl
f20b24ae65 Split test up into two target-spcific directories.
llvm-svn: 240726
2015-06-25 23:38:22 +00:00
Anna Zaks
faa9b1561e [asan] Do not instrument special purpose LLVM sections.
Do not instrument globals that are placed in sections containing "__llvm"
in their name.

This fixes a bug in ASan / PGO interoperability. ASan interferes with LLVM's
PGO, which places its globals into a special section, which is memcpy-ed by
the linker as a whole. When those goals are instrumented, ASan's memcpy wrapper
reports an issue.

http://reviews.llvm.org/D10541

llvm-svn: 240723
2015-06-25 23:35:48 +00:00
Anna Zaks
494d337bdd [asan] Don't run stack malloc on functions containing inline assembly.
It makes LLVM run out of registers even on 64-bit platforms. For example, the
following test case fails on darwin.

clang -cc1 -O0 -triple x86_64-apple-macosx10.10.0 -emit-obj -fsanitize=address -mstackrealign -o ~/tmp/ex.o -x c ex.c
error: inline assembly requires more registers than available

void TestInlineAssembly(const unsigned char *S, unsigned int pS, unsigned char *D, unsigned int pD, unsigned int h) {

unsigned int sr = 4, pDiffD = pD - 5;
unsigned int pDiffS = (pS << 1) - 5;
char flagSA = ((pS & 15) == 0),
flagDA = ((pD & 15) == 0);
asm volatile (
  "mov %0,  %%"PTR_REG("si")"\n"
  "mov %2,  %%"PTR_REG("cx")"\n"
  "mov %1,  %%"PTR_REG("di")"\n"
  "mov %8,  %%"PTR_REG("ax")"\n"
  :
  : "m" (S), "m" (D), "m" (pS), "m" (pDiffS), "m" (pDiffD), "m" (sr), "m" (flagSA), "m" (flagDA), "m" (h)
  : "%"PTR_REG("si"), "%"PTR_REG("di"), "%"PTR_REG("ax"), "%"PTR_REG("cx"), "%"PTR_REG("dx"), "memory"
);
}

http://reviews.llvm.org/D10719

llvm-svn: 240722
2015-06-25 23:35:45 +00:00
Adrian Prantl
4d6e5ab0b9 Debug Info: Add basic test coverage for the DWARF encoding of bitfields.
While looking at a couple of bugs in the debug info output for bitfields
I noticed that there wasn't a single regression test to test my changes
against, so here's a start.

llvm-svn: 240717
2015-06-25 23:19:19 +00:00
Matt Arsenault
f547928c2c DAGCombiner: Use pop_back_val()
llvm-svn: 240709
2015-06-25 22:15:05 +00:00
Rafael Espindola
9195b6922c Add an ELFSymbolRef type.
This allows user code to say Sym.getSize() instead of having to manually fetch
the object.

llvm-svn: 240708
2015-06-25 22:10:04 +00:00
Frederic Riss
a084fef0e8 IAS: Use the root macro instanciation for location
r224810 fixed the handling of macro debug locations in AsmParser. This patch
fixes the logic to actually do what was intended: it uses the first macro of
the macro stack instead of the last one. The updated testcase shows that the
current scheme doesn't work when macro instanciations are nested and multiple
files are used.

Reviewers: compnerd

Differential Revision: http://reviews.llvm.org/D10463

llvm-svn: 240705
2015-06-25 21:57:33 +00:00
Michael J. Spencer
3370428756 [Object][ELF] Add support for dumping dynamic relocations when sections are stripped.
llvm-svn: 240703
2015-06-25 21:47:32 +00:00
Duncan P. N. Exon Smith
5bbb9d7150 dsymutil: Split out patchStmtList(), NFC
Split out code to patch up the `DW_AT_stmt_list` for the cloned DIE, and
reorganize it so that it doesn't depend on `DIE::values_begin()` and
`DIE::values_end()` (which I'm trying to kill off).

David Blaikie and I talked about adding a range-algorithm version of
`std::find_if()`, but the assertion *still* required getting at the end
iterator.  IMO, a separate helper function with an early return is
easier to reason about here.

A follow-up commit that removes `DIE::setValue()` and mutates the
`DIEValue` directly is coming shortly.

llvm-svn: 240701
2015-06-25 21:42:46 +00:00
Sanjay Patel
9c692291d3 fix typos; NFC
llvm-svn: 240699
2015-06-25 21:11:08 +00:00
Rafael Espindola
b298fbcfdd llvm-nm: Don't print mapping symbols.
This matches the behavior of gnu nm. Fixes pr23930.

llvm-svn: 240695
2015-06-25 21:00:51 +00:00
Pete Cooper
c2ffa0891f Use foreach loop over constant operands. NFC.
A number of places had explicit loops over Constant::operands().
Just use foreach loops where possible.

llvm-svn: 240694
2015-06-25 20:51:38 +00:00
Rafael Espindola
e6fd0df168 We don't need the targets to read objects.
llvm-svn: 240684
2015-06-25 20:20:19 +00:00
Jingyue Wu
35a6e27706 [InstCombine] call SimplifyICmpInst with correct context
Summary:
Fixes PR23809. Without passing the context to SimplifyICmpInst, we would
use the assume to prove that the condition feeding the assume is
trivially true (see isValidAssumeForContext in ValueTracking.cpp),
causing the removal of the assume which may be useful for later
optimizations.

Test Plan: pr23800.ll

Reviewers: hfinkel, majnemer

Reviewed By: hfinkel

Subscribers: henryhu, llvm-commits, wengxt, broune, meheff, eliben

Differential Revision: http://reviews.llvm.org/D10695

llvm-svn: 240683
2015-06-25 20:14:47 +00:00
Rafael Espindola
c53c13d76f Diagnose undefined temporary symbols.
We already disallowed

.global .Lfoo

so this is reasonable.

This is a small cherry pick from r240130.

llvm-svn: 240681
2015-06-25 20:10:45 +00:00
Paul Robinson
45b7074442 Make this test verify .debug_pubnames is actually missing.
It was matching at EOF regardless of whether the section was present.

llvm-svn: 240679
2015-06-25 19:37:13 +00:00
Yaron Keren
dce18afe3b Rangify for loop in Inliner.cpp. NFC.
llvm-svn: 240678
2015-06-25 19:28:24 +00:00
Douglas Katzman
c6d8bcc603 Add Arg::getValues method with const 'this' and const result
llvm-svn: 240673
2015-06-25 18:48:26 +00:00
Matt Arsenault
33b322c0c3 DAGCombiner: Remove redundant check
MemIntrinsicSDNode is already a subclass of MemSDNode,
so the MemSDNode check is sufficient.

llvm-svn: 240672
2015-06-25 18:47:02 +00:00
Peter Collingbourne
3b0fac198c GVN: If a branch has two identical successors, we cannot declare either dead.
This previously caused miscompilations as a result of phi nodes receiving
undef incoming values from blocks dominated by such successors.

Differential Revision: http://reviews.llvm.org/D10726

llvm-svn: 240670
2015-06-25 18:32:02 +00:00
Rafael Espindola
393725d952 Add a test for a recent regression.
llvm-svn: 240656
2015-06-25 16:16:08 +00:00
Rafael Espindola
f037880978 llvm-nm: print 'n' instead of '?'
This matches gnu nm and has the advantage that there is a upper case N.

llvm-svn: 240655
2015-06-25 16:01:53 +00:00
Kit Barton
230223268c [PPC] Implement vmrgew and vmrgow instructions
This patch adds support for the vector merge even word and vector merge odd word
instructions introduced in POWER8.

Phabricator review: http://reviews.llvm.org/D10704

llvm-svn: 240650
2015-06-25 15:17:40 +00:00
Bruno Cardoso Lopes
43fa3a4dea [AsmPrinter] Fix crash in handleIndirectSymViaGOTPCRel
Check for symbols in MCValue before using them. Bail out early in case
they are null. This fixes PR23779.

Differential Revision: http://reviews.llvm.org/D10712

rdar://problem/21532830

llvm-svn: 240649
2015-06-25 15:17:23 +00:00
Jonathan Roelofs
cfaba2da23 Doxygen-ify a few comments. NFC
llvm-svn: 240647
2015-06-25 15:06:47 +00:00
Rafael Espindola
2c1319e668 Use computeSymbolSizes in llvm-symbolize.
llvm-svn: 240646
2015-06-25 15:06:38 +00:00
Rafael Espindola
4ac7c5844a Use range loop. NFC.
llvm-svn: 240645
2015-06-25 15:00:38 +00:00
Rafael Espindola
1fbc4b86c4 Modernize getELFDynamicSymbolIterators.
* Have it return a iterator_range.
* Remove the global function.
* Rename to getDynamicSymbolIterators.

llvm-svn: 240644
2015-06-25 14:39:35 +00:00
Benjamin Kramer
c5f28c35c8 Don't use std::make_unique.
We still have to support C++11 standard libraries, make_unique is a C++14
feature.

llvm-svn: 240642
2015-06-25 13:47:36 +00:00
Benjamin Kramer
6586644fa4 [PPC] Replace debug value skipping with getLastNonDebugInstr.
No functionality change intended.

llvm-svn: 240641
2015-06-25 13:39:03 +00:00
Joseph Tremoulet
8fc5afb15f [ORC] Add ObjectTransformLayer
Summary:
This is a utility for clients that want to insert a layer that modifies
each ObjectFile and then passes it along to the next layer.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10456

llvm-svn: 240640
2015-06-25 13:35:22 +00:00
Benjamin Kramer
4ed07455af Replace copy-pasted debug value skipping with MBB::getLastNonDebugInstr
No functional change intended.

llvm-svn: 240639
2015-06-25 13:28:24 +00:00
Toma Tabacu
f1219360be [mips] [IAS] Refactor the emitDirectiveModuleFP() functions. NFC.
Summary:
Simplify emitDirectiveModuleFP() by having it just print the current information
from MipsABIFlagsSection and doing an updateABIInfo() before such calls.

This prevents us from forgetting to update the STI.FeatureBits,
because updateABIInfo() uses those to update the MipsABIFlagsSection object,
and also makes sure we use the update mechanism from MipsABIFlagsSection.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits, mpf

Differential Revision: http://reviews.llvm.org/D10642

llvm-svn: 240637
2015-06-25 12:44:38 +00:00
Artur Pilipenko
ccbbd4db82 Take alignment into account in isSafeToLoadUnconditionally
Reviewed By: hfinkel

Differential Revision: http://reviews.llvm.org/D10475

llvm-svn: 240636
2015-06-25 12:18:43 +00:00
Ulrich Weigand
580894b7f9 [SystemZ] Only attempt RxSBG optimization for integer types
As pointed out by Justin Bogner (see r240520), SystemZDAGToDAGISel::Select
currently attempts to convert boolean operations into RxSBG even on some
non-integer types (in particular, vector types).  This would not work in
any case, and it happened to trigger undefined behaviour in allOnes.

This patch verifies that we have a (<= 64-bit) integer type before
attempting to perform this optimization.

llvm-svn: 240634
2015-06-25 11:52:36 +00:00
Toma Tabacu
b5146d10c2 [mips] [IAS] Refactor the emitDirectiveModuleOddSPReg() functions. NFC.
Summary:
We can simplify emitDirectiveModuleOddSPReg() by having it print the current OddSPReg information
from MipsABIFlagsSection and doing an updateABIInfo() before such calls.

This prevents us from forgetting to update the STI.FeatureBits, because updateABIInfo() uses those to update the MipsABIFlagsSection object,
and also makes sure we use the update mechanism from MipsABIFlagsSection.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits, mpf

Differential Revision: http://reviews.llvm.org/D10641

llvm-svn: 240630
2015-06-25 10:56:57 +00:00
Pawel Bylica
8b05f5ba5d Add missing <array> include.
llvm-svn: 240629
2015-06-25 10:47:08 +00:00
Jay Foad
ccb29917f1 Teach LLVM about the PPC64 memory sanitizer implementation.
Summary:
This is the LLVM part of the PPC memory sanitizer implementation in
D10648.

Reviewers: kcc, samsonov, willschm, wschmidt, eugenis

Reviewed By: eugenis

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10649

llvm-svn: 240627
2015-06-25 10:34:29 +00:00
Pawel Bylica
91ca53a942 Express APInt::{s,u}{l,g}e(uint64_t) in terms of APInt::{s,u}{l,g}t(uint64_t). NFC.
This is preparation for http://reviews.llvm.org/D10655: Change APInt comparison with uint64_t.
Some unit tests added also.

llvm-svn: 240626
2015-06-25 10:23:52 +00:00