summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU: Hack for VS_32 register pressureMatt Arsenault2015-11-064-15/+28
| | | | | | | | | | | | | For some reason VS_32 ends up factoring into the pressure heuristics even though we should never see a virtual register with this class. When SGPRs are reserved for register spilling, this for some reason triggers reg-crit scheduling. Setting isAllocatable = 0 may help with this since that seems to remove it from the default implementation's generated table. llvm-svn: 252321
* Restore "Move metadata linking after lazy global materialization/linking."Teresa Johnson2015-11-064-6/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit r251965. Restore "Move metadata linking after lazy global materialization/linking." This restores commit r251926, with fixes for the LTO bootstrapping bot failure. The bot failure was caused by references from debug metadata to otherwise unreferenced globals. Previously, this caused the lazy linking to link in their defs, which is unnecessary. With this patch, because lazy linking is complete when we encounter the metadata reference, the materializer created a declaration. For definitions such as aliases and comdats, it is illegal to have a declaration. Furthermore, metadata linking should not change code generation. Therefore, when linking of global value bodies is complete, the materializer will simply return nullptr as the new reference for the linked metadata. This change required fixing a different test to ensure there was a real reference to a linkonce global that was only being reference from metadata. Note that the new changes to the only-needed-named-metadata.ll test illustrate an issue with llvm-link -only-needed handling of comdat groups, whereby it may result in an incomplete comdat group. I note this in the test comments, but the issue is orthogonal to this patch (it can be reproduced without any metadata at head). Reviewers: dexonsmith, rafael, tra Subscribers: tobiasvk, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D14447 llvm-svn: 252320
* Restore "Move metadata linking after lazy global materialization/linking."Teresa Johnson2015-11-063-9/+34
| | | | | | This reverts commit r251965. llvm-svn: 252319
* [WinEH] Mark funclet entries and exits as clobbering all registersReid Kleckner2015-11-069-5/+223
| | | | | | | | | | | | | | | | | Summary: In this implementation, LiveIntervalAnalysis invents a few register masks on basic block boundaries that preserve no registers. The nice thing about this is that it prevents the prologue inserter from thinking it needs to spill all XMM CSRs, because it doesn't see any explicit physreg defs in the MI. Reviewers: MatzeB, qcolombet, JosephTremoulet, majnemer Subscribers: MatzeB, llvm-commits Differential Revision: http://reviews.llvm.org/D14407 llvm-svn: 252318
* [LIR] Simplify code by making DataLayout globally accessible. NFC.Chad Rosier2015-11-061-11/+10
| | | | llvm-svn: 252317
* [AArch64]Enable the narrow ld promotion only on profitable microarchitecturesJun Bum Lim2015-11-063-56/+69
| | | | | | | | | The benefit from converting narrow loads into a wider load (r251438) could be micro-architecturally dependent, as it assumes that a single load with two bitfield extracts is cheaper than two narrow loads. Currently, this conversion is enabled only in cortex-a57 on which performance benefits were verified. llvm-svn: 252316
* Allow the alias to be of a different type.Angel Garcia Gomez2015-11-062-13/+38
| | | | | | | | | | | | Summary: Consider a declaration an alias even if it doesn't have the same unqualified type than the container element, as long as one can be converted to the other using only implicit casts. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D14442 llvm-svn: 252315
* Fixing line endings; NFC.Aaron Ballman2015-11-061-3/+3
| | | | llvm-svn: 252314
* Bring r252305 back with a test fix.Rafael Espindola2015-11-064-35/+22
| | | | | | | | | | We now create the .eh_frame section early, just like every other special section. This means that the special flags are visible in code that explicitly asks for ".eh_frame". llvm-svn: 252313
* .eh_frame is not normally writable. Update the test to reflect that.Rafael Espindola2015-11-061-4/+4
| | | | llvm-svn: 252312
* Followup test failure fix for r252310 ("[tsan] Add Clang frontend support ↵Kuba Brecka2015-11-061-2/+1
| | | | | | for TSan on OS X"). llvm-svn: 252311
* [tsan] Add Clang frontend support for TSan on OS XKuba Brecka2015-11-061-0/+3
| | | | | | | | We're currently in process of porting TSan to OS X, and quite a few of the initial support in the runtime library has already landed in trunk. This patch actually enables "-fsanitize=thread" in the frontend. Differential Revision: http://reviews.llvm.org/D14440 llvm-svn: 252310
* [tsan] Add Darwin support for lit testsKuba Brecka2015-11-061-3/+9
| | | | | | | | | | | This patch enables running lit tests on OS X: 1) Simply enable tests for Darwin (they were restricted to Linux and FreeBSD). 2) Disable using instrumented libcxx (libcxx_tsan) on Darwin. 3) On Darwin, override abort_on_error=0, otherwise all tests would generate crash logs and take much longer to process. Differential Revision: http://reviews.llvm.org/D14439 llvm-svn: 252309
* Use the old index identifier by default, instead of 'elem'.Angel Garcia Gomez2015-11-067-484/+304
| | | | | | | | | | | | Summary: Use the old index name in the cases where the check would come up with an invented name. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14438 llvm-svn: 252308
* Fix __builtin_signbit for ppcf128 typePetar Jovanovic2015-11-062-3/+56
| | | | | | | | | | | Function__builtin_signbit returns wrong value for type ppcf128 on big endian machines. This patch fixes how value is generated in that case. Patch by Aleksandar Beserminji. Differential Revision: http://reviews.llvm.org/D14149 llvm-svn: 252307
* Revert "Simplify the creation of .eh_frame/.debug_frame sections."Rafael Espindola2015-11-062-18/+33
| | | | | | | | This reverts commit r252305. Investigating a test failure. llvm-svn: 252306
* Simplify the creation of .eh_frame/.debug_frame sections.Rafael Espindola2015-11-062-33/+18
| | | | llvm-svn: 252305
* git clang-format and fix variable names. NFC.Rafael Espindola2015-11-061-42/+34
| | | | llvm-svn: 252304
* Avoid naming conflicts with the old index in modernize-loop-convert.Angel Garcia Gomez2015-11-062-5/+23
| | | | | | | | | | | | Summary: The old index declaration is going to be removed anyway, so we can reuse its name if it is the best candidate for the new index. Reviewers: klimek Subscribers: cfe-commits, alexfh Differential Revision: http://reviews.llvm.org/D14437 llvm-svn: 252303
* Add missing '%loadPolly' to test caseTobias Grosser2015-11-061-1/+1
| | | | llvm-svn: 252302
* Fix reuse of non-dominating synthesized value in subregion exitMichael Kruse2015-11-062-1/+32
| | | | | | | | | | | | | | | | We were adding all generated values in non-affine subregions to be used for the subregions generated exit block. The thought was that only values that are dominating the original exit block can be used there. But it is possible for synthesizable values to be expanded in any block. If the same values is also used for implicit writes, it would try to reuse already synthesized values even if not dominating the exit block. The fix is to only add values to the list of values usable in the exit block only if it is dominating the exit block. This fixes llvm.org/PR25412. llvm-svn: 252301
* Use SHT_X86_64_UNWIND on every OS.Rafael Espindola2015-11-0620-26/+24
| | | | | | | That is the ABI required type. Linkers still check the section name, so everything should still work. llvm-svn: 252300
* Pass SectionStart directly to the one function that uses it.Rafael Espindola2015-11-061-8/+5
| | | | llvm-svn: 252299
* Fix for AArch64 watchpoint cache corruption in case of ptrace failureOmair Javaid2015-11-061-1/+49
| | | | | | | | | | Same fix has been submitted for Arm. Review can be found here: Differential revision: http://reviews.llvm.org/D14051 llvm-svn: 252298
* [mips][ias] Range check uimm4 operands and fixed a bug this revealed.Daniel Sanders2015-11-066-14/+56
| | | | | | | | | | | | | | | Summary: The bug was that the sldi instructions have immediate widths dependant on their element size. So sldi.d has a 1-bit immediate and sldi.b has a 4-bit immediate. All of these were using 4-bit immediates previously. Reviewers: vkalintiris Subscribers: llvm-commits, atanasyan, dsanders Differential Revision: http://reviews.llvm.org/D14018 llvm-svn: 252297
* [mips][ias] Range check uimm3 operands.Daniel Sanders2015-11-066-7/+28
| | | | | | | | | | | | Summary: Reviewers: vkalintiris Subscribers: atanasyan, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D14016 llvm-svn: 252296
* [mips][ias] Range check uimm2 operands and fix a bug this revealed.Daniel Sanders2015-11-0623-58/+100
| | | | | | | | | | | | | | | Summary: The bug was that the MIPS32R6/MIPS64R6/microMIPS32R6 versions of LSA and DLSA (unlike the MSA version) failed to account for the off-by-one encoding of the immediate. The range is actually 1..4 rather than 0..3. Reviewers: vkalintiris Subscribers: atanasyan, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D14015 llvm-svn: 252295
* [mips][ias] Range check uimmz operands.Daniel Sanders2015-11-064-2/+56
| | | | | | | | | | Reviewers: vkalintiris Subscribers: dsanders, atanasyan, llvm-commits Differential Revision: http://reviews.llvm.org/D14013 llvm-svn: 252294
* [mips] Define patterns for the atomic_{load,store}_{8,16,32,64} nodes.Vasileios Kalintiris2015-11-067-36/+136
| | | | | | | | | | | | | | | | Summary: Without these patterns we would generate a complete LL/SC sequence. This would be problematic for memory regions marked as WRITE-only or READ-only, as the instructions LL/SC would read/write to the protected memory regions correspondingly. Reviewers: dsanders Subscribers: llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D14397 llvm-svn: 252293
* tsan: make invisible test barrier portableDmitry Vyukov2015-11-062-21/+18
| | | | | | | | | | | The current implementation does not work on darwin and can have issues with other OSes in future. See http://reviews.llvm.org/D14427 Make it portable once and for all (minus usleep call). Reviewed in: http://reviews.llvm.org/D14434 llvm-svn: 252292
* AMDGPU/SI: Emit HSA kernels with symbol type STT_AMDGPU_HSA_KERNELTom Stellard2015-11-068-4/+84
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D13804 llvm-svn: 252291
* [analyzer] Add VforkChecker to find unsafe code in vforked process.Yury Gribov2015-11-068-9/+384
| | | | | | | | | | | | This checker looks for unsafe constructs in vforked process: function calls (excluding whitelist), memory write and returns. This was originally motivated by a vfork-related bug in xtables package. Patch by Yury Gribov. Differential revision: http://reviews.llvm.org/D14014 llvm-svn: 252285
* [tsan] Enable new/delete C++ interceptors for OS XKuba Brecka2015-11-062-1/+9
| | | | | | | | This patch adds `tsan_new_delete.cc` into the OS X build. Differential Revision: http://reviews.llvm.org/D14424 llvm-svn: 252284
* [tsan] Replace pthread_yield with sched_yield in lit testsKuba Brecka2015-11-063-3/+3
| | | | | | | | OS X doesn't have `pthread_yield`. Let's use `sched_yield` instead. Differential Revision: http://reviews.llvm.org/D14428 llvm-svn: 252283
* Add a new attribute: norecurseJames Molloy2015-11-0619-14/+49
| | | | | | This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals. llvm-svn: 252282
* DIBuilder.h: Prune \param(s) corresponding to r252219. [-Wdocumentation]NAKAMURA Takumi2015-11-061-2/+0
| | | | llvm-svn: 252280
* Revert r252249 (and r252255, r252258), "[WinEH] Clone funclets with multiple ↵NAKAMURA Takumi2015-11-066-2669/+25
| | | | | | | | parents" It behaved flaky due to iterating pointer key values on std::set and std::map. llvm-svn: 252279
* Fix another case where loop-convert wasn't handling correctly data members.Angel Garcia Gomez2015-11-062-3/+28
| | | | | | | | | | | | | | | Summary: If the container expression was obtained from the point where "size" (which usually is a const method) is invoked, then the topmost node in this expression may be an implicit cast to const. When the container is a data member, the check was trying to obtain the member expression directly and was failing in the case mentioned above. This is solved by ignoring implicit casts. Reviewers: klimek Subscribers: cfe-commits, alexfh Differential Revision: http://reviews.llvm.org/D14378 llvm-svn: 252278
* Trying to fix the FreeBSD build breakage due to r251916.Kuba Brecka2015-11-061-1/+1
| | | | | | http://lab.llvm.org:8011/builders/sanitizer_x86_64-freebsd/builds/6395 llvm-svn: 252277
* Code style fix (caused by wrongly default clang-format style) (NFC)Xinliang David Li2015-11-063-33/+42
| | | | llvm-svn: 252276
* [ELF2] Add GOT section for MIPS target.Igor Kudrin2015-11-0611-11/+213
| | | | | | | | | | | | | | | This patch implements R_MIPS_GOT16 relocation for global symbols in order to generate some entries in GOT. Only reserved and global entries are supported for now. For the detailed description about GOT in MIPS, see "Global Offset Table" in Chapter 5 in the followin document: ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf In addition, the platform specific symbol "_gp" is added, see "Global Data Symbols" in Chapter 6 in the aforementioned document. Differential revision: http://reviews.llvm.org/D14211 llvm-svn: 252275
* Cleanup foo.h headers and __config to work in CEric Fiselier2015-11-066-3/+24
| | | | llvm-svn: 252274
* Adjust debug metadata to LLVM changes in 252219Tobias Grosser2015-11-0611-26/+26
| | | | llvm-svn: 252273
* Change the way we read data from the ObjC runtimeEnrico Granata2015-11-061-18/+20
| | | | llvm-svn: 252272
* Simplify the alignment handling in FDE emission.Rafael Espindola2015-11-061-16/+15
| | | | llvm-svn: 252271
* Delete dead store. NFC.Rafael Espindola2015-11-061-1/+0
| | | | llvm-svn: 252270
* Add data formatters for NSError and NSExceptionEnrico Granata2015-11-067-0/+626
| | | | llvm-svn: 252269
* docs: Document function-attached metadata and IR changes from r252219.Peter Collingbourne2015-11-062-22/+37
| | | | llvm-svn: 252268
* Range-for some LiveIntervals code under reviewReid Kleckner2015-11-061-9/+7
| | | | llvm-svn: 252267
* [WinEH] Split EH_RESTORE out of CATCHRET for 32-bit EHReid Kleckner2015-11-066-52/+90
| | | | | | | | | | | | | | | | | | | | | | | This adds the EH_RESTORE x86 pseudo instr, which is responsible for restoring the stack pointers: EBP and ESP, and ESI if stack realignment is involved. We only need this on 32-bit x86, because on x64 the runtime restores CSRs for us. Previously we had to keep the CATCHRET instruction around during SEH so that we could convince X86FrameLowering to restore our frame pointers. Now we can split these instructions earlier. This was confusing, because we had a return instruction which wasn't really a return and was ultimately going to be removed by X86FrameLowering. This change also simplifies X86FrameLowering, which really shouldn't be building new MBBs. No observable functional change currently, but with the new register mask stuff in D14407, CATCHRET will become a register allocator barrier, and our existing tests rely on us having reasonable register allocation around SEH. llvm-svn: 252266
OpenPOWER on IntegriCloud