summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Optimize the creation of mapping symbols.Rafael Espindola2015-06-262-19/+2
| | | | | | No need to create two symbols just to assign one to the other. llvm-svn: 240773
* Do not ignore projects/LLVMBuild.txt in git repoSergey Dmitrouk2015-06-261-0/+1
| | | | | | Without explicit exception for the path, it matches projects/* rule. llvm-svn: 240771
* [X86] Cleanup X86WindowsTargetObjectFile::getSectionForConstantDavid Majnemer2015-06-261-37/+25
| | | | | | No functionality changed, just keeping things clean. llvm-svn: 240762
* [InterleavedAccess] Fix failures "undefined type 'llvm::raw_ostream'" on ↵Hao Liu2015-06-261-0/+1
| | | | | | windows. llvm-svn: 240760
* [ARM] Lower interleaved memory accesses to vldN/vstN intrinsics.Hao Liu2015-06-266-0/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch also adds a function to calculate the cost of interleaved memory accesses. E.g. Lower an interleaved load: %wide.vec = load <8 x i32>, <8 x i32>* %ptr, align 4 %v0 = shuffle %wide.vec, undef, <0, 2, 4, 6> %v1 = shuffle %wide.vec, undef, <1, 3, 5, 7> into: %vld2 = { <4 x i32>, <4 x i32> } call llvm.arm.neon.vld2(%ptr, 4) %vec0 = extractelement { <4 x i32>, <4 x i32> } %vld2, i32 0 %vec1 = extractelement { <4 x i32>, <4 x i32> } %vld2, i32 1 E.g. Lower an interleaved store: %i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11> store <12 x i32> %i.vec, <12 x i32>* %ptr, align 4 into: %sub.v0 = shuffle <8 x i32> %v0, <8 x i32> v1, <0, 1, 2, 3> %sub.v1 = shuffle <8 x i32> %v0, <8 x i32> v1, <4, 5, 6, 7> %sub.v2 = shuffle <8 x i32> %v0, <8 x i32> v1, <8, 9, 10, 11> call void llvm.arm.neon.vst3(%ptr, %sub.v0, %sub.v1, %sub.v2, 4) Differential Revision: http://reviews.llvm.org/D10533 llvm-svn: 240755
* [AArch64] Lower interleaved memory accesses to ldN/stN intrinsics. This ↵Hao Liu2015-06-266-0/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | patch also adds a function to calculate the cost of interleaved memory accesses. E.g. Lower an interleaved load: %wide.vec = load <8 x i32>, <8 x i32>* %ptr %v0 = shuffle %wide.vec, undef, <0, 2, 4, 6> %v1 = shuffle %wide.vec, undef, <1, 3, 5, 7> into: %ld2 = { <4 x i32>, <4 x i32> } call llvm.aarch64.neon.ld2(%ptr) %vec0 = extractelement { <4 x i32>, <4 x i32> } %ld2, i32 0 %vec1 = extractelement { <4 x i32>, <4 x i32> } %ld2, i32 1 E.g. Lower an interleaved store: %i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11> store <12 x i32> %i.vec, <12 x i32>* %ptr into: %sub.v0 = shuffle <8 x i32> %v0, <8 x i32> v1, <0, 1, 2, 3> %sub.v1 = shuffle <8 x i32> %v0, <8 x i32> v1, <4, 5, 6, 7> %sub.v2 = shuffle <8 x i32> %v0, <8 x i32> v1, <8, 9, 10, 11> call void llvm.aarch64.neon.st3(%sub.v0, %sub.v1, %sub.v2, %ptr) Differential Revision: http://reviews.llvm.org/D10533 llvm-svn: 240754
* [InterleavedAccess] Add a pass InterleavedAccess to identify interleaved ↵Hao Liu2015-06-264-0/+320
| | | | | | | | | | | | | | | | | | | memory accesses and transform into target specific intrinsics. E.g. An interleaved load (Factor = 2): %wide.vec = load <8 x i32>, <8 x i32>* %ptr %v0 = shuffle <8 x i32> %wide.vec, <8 x i32> undef, <0, 2, 4, 6> %v1 = shuffle <8 x i32> %wide.vec, <8 x i32> undef, <1, 3, 5, 7> It can be transformed into a ld2 intrinsic in AArch64 backend or a vld2 intrinsic in ARM backend. E.g. An interleaved store (Factor = 3): %i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11> store <12 x i32> %i.vec, <12 x i32>* %ptr It can be transformed into a st3 intrinsic in AArch64 backend or a vst3 intrinsic in ARM backend. Differential Revision: http://reviews.llvm.org/D10533 llvm-svn: 240751
* AsmPrinter: More explicitly scope iterator for MSVCDuncan P. N. Exon Smith2015-06-261-1/+1
| | | | | | | | r240748 seems to be on the right path. Be more explicit. http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/1961/ llvm-svn: 240750
* AsmPrinter: Explicitly scope iterator for MSVCDuncan P. N. Exon Smith2015-06-261-1/+2
| | | | | | | | | 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
* Revert "X86: Reject register operands with obvious type mismatches."Matthias Braun2015-06-262-23/+0
| | | | | | | | Revert until http://llvm.org/PR23955 is investigated. This reverts commit r239309. llvm-svn: 240746
* Fix mismatched architectures in testMatthias Braun2015-06-261-1/+1
| | | | llvm-svn: 240745
* aad/fix labels in test/CodeGen/X86/StackColoring.llMatthias Braun2015-06-261-15/+18
| | | | llvm-svn: 240744
* [ASan] Use llvm::getDISubprogram() to get function entry debug location.Alexey Samsonov2015-06-261-7/+3
| | | | | | | | 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
* AsmPrinter: Use an intrusively linked list for DIE::ChildrenDuncan P. N. Exon Smith2015-06-2511-144/+140
| | | | | | | | | | | | | | 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
* AsmPrinter: Convert DIE::Values to a linked listDuncan P. N. Exon Smith2015-06-2511-268/+463
| | | | | | | | | | | | | | | | 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
* [ELF] Move ELF{32,64}{L,B}E typedefs to llvm.Michael J. Spencer2015-06-251-0/+5
| | | | llvm-svn: 240731
* [ELF] Add some accessors for lld.Michael J. Spencer2015-06-252-0/+15
| | | | llvm-svn: 240730
* Make llvm-dwarfdump exit with non-zero exit code if error was occured.Alexey Samsonov2015-06-253-13/+18
| | | | llvm-svn: 240729
* PPCISelLowering.cpp: Appease PR23956. [-Wdocumentation]NAKAMURA Takumi2015-06-251-6/+6
| | | | llvm-svn: 240727
* Split test up into two target-spcific directories.Adrian Prantl2015-06-253-104/+148
| | | | llvm-svn: 240726
* [asan] Do not instrument special purpose LLVM sections.Anna Zaks2015-06-253-2/+10
| | | | | | | | | | | | | | 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
* [asan] Don't run stack malloc on functions containing inline assembly.Anna Zaks2015-06-252-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Debug Info: Add basic test coverage for the DWARF encoding of bitfields.Adrian Prantl2015-06-251-0/+104
| | | | | | | | 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
* DAGCombiner: Use pop_back_val()Matt Arsenault2015-06-251-2/+1
| | | | llvm-svn: 240709
* Add an ELFSymbolRef type.Rafael Espindola2015-06-255-20/+63
| | | | | | | This allows user code to say Sym.getSize() instead of having to manually fetch the object. llvm-svn: 240708
* IAS: Use the root macro instanciation for locationFrederic Riss2015-06-252-2/+16
| | | | | | | | | | | | | | 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
* [Object][ELF] Add support for dumping dynamic relocations when sections are ↵Michael J. Spencer2015-06-256-4/+104
| | | | | | stripped. llvm-svn: 240703
* dsymutil: Split out patchStmtList(), NFCDuncan P. N. Exon Smith2015-06-251-12/+13
| | | | | | | | | | | | | | | | 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
* fix typos; NFCSanjay Patel2015-06-251-4/+4
| | | | llvm-svn: 240699
* llvm-nm: Don't print mapping symbols.Rafael Espindola2015-06-252-0/+20
| | | | | | This matches the behavior of gnu nm. Fixes pr23930. llvm-svn: 240695
* Use foreach loop over constant operands. NFC.Pete Cooper2015-06-255-14/+9
| | | | | | | A number of places had explicit loops over Constant::operands(). Just use foreach loops where possible. llvm-svn: 240694
* We don't need the targets to read objects.Rafael Espindola2015-06-252-4/+0
| | | | llvm-svn: 240684
* [InstCombine] call SimplifyICmpInst with correct contextJingyue Wu2015-06-252-2/+26
| | | | | | | | | | | | | | | | | | | | | 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
* Diagnose undefined temporary symbols.Rafael Espindola2015-06-255-31/+12
| | | | | | | | | | | | We already disallowed .global .Lfoo so this is reasonable. This is a small cherry pick from r240130. llvm-svn: 240681
* Make this test verify .debug_pubnames is actually missing.Paul Robinson2015-06-251-2/+2
| | | | | | It was matching at EOF regardless of whether the section was present. llvm-svn: 240679
* Rangify for loop in Inliner.cpp. NFC.Yaron Keren2015-06-251-8/+5
| | | | llvm-svn: 240678
* Add Arg::getValues method with const 'this' and const resultDouglas Katzman2015-06-251-3/+2
| | | | llvm-svn: 240673
* DAGCombiner: Remove redundant checkMatt Arsenault2015-06-251-1/+1
| | | | | | | MemIntrinsicSDNode is already a subclass of MemSDNode, so the MemSDNode check is sufficient. llvm-svn: 240672
* GVN: If a branch has two identical successors, we cannot declare either dead.Peter Collingbourne2015-06-252-0/+42
| | | | | | | | | 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
* Add a test for a recent regression.Rafael Espindola2015-06-251-0/+13
| | | | llvm-svn: 240656
* llvm-nm: print 'n' instead of '?'Rafael Espindola2015-06-252-2/+7
| | | | | | This matches gnu nm and has the advantage that there is a upper case N. llvm-svn: 240655
* [PPC] Implement vmrgew and vmrgow instructionsKit Barton2015-06-256-4/+269
| | | | | | | | | 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
* [AsmPrinter] Fix crash in handleIndirectSymViaGOTPCRelBruno Cardoso Lopes2015-06-252-2/+18
| | | | | | | | | | | 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
* Doxygen-ify a few comments. NFCJonathan Roelofs2015-06-251-39/+36
| | | | llvm-svn: 240647
* Use computeSymbolSizes in llvm-symbolize.Rafael Espindola2015-06-253-22/+12
| | | | llvm-svn: 240646
* Use range loop. NFC.Rafael Espindola2015-06-252-20/+21
| | | | llvm-svn: 240645
* Modernize getELFDynamicSymbolIterators.Rafael Espindola2015-06-253-21/+13
| | | | | | | | * Have it return a iterator_range. * Remove the global function. * Rename to getDynamicSymbolIterators. llvm-svn: 240644
* Don't use std::make_unique.Benjamin Kramer2015-06-251-8/+9
| | | | | | | We still have to support C++11 standard libraries, make_unique is a C++14 feature. llvm-svn: 240642
* [PPC] Replace debug value skipping with getLastNonDebugInstr.Benjamin Kramer2015-06-251-16/+7
| | | | | | No functionality change intended. llvm-svn: 240641
* [ORC] Add ObjectTransformLayerJoseph Tremoulet2015-06-253-0/+414
| | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud