summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* OpenCL: Assume inline asm is convergentMatt Arsenault2017-11-132-4/+12
| | | | | | Already done for CUDA. llvm-svn: 318098
* [MIPS] Set STO_MIPS_MICROMIPS flag and less-significant bit for microMIPS ↵Simon Atanasyan2017-11-135-4/+60
| | | | | | | | | | | | symbols microMIPS symbols including microMIPS PLT records created for regular symbols needs to be marked by STO_MIPS_MICROMIPS flag in a symbol table. Additionally microMIPS entries in a dynamic symbol table should have configured less-significant bit. That allows to escape teaching a dynamic linker about microMIPS symbols. llvm-svn: 318097
* [tablegen] Handle atomic predicates for memory type inside tablegen. NFC.Daniel Sanders2017-11-133-48/+83
| | | | | | | | | | | | | | | | Similar to r315841, GlobalISel and SelectionDAG require different code for the common atomic predicates due to differences in the representation. Even without that, differences in the IR (SDNode vs MachineInstr) require differences in the C++ predicate. This patch moves the implementation of the common atomic predicates related to memory type into tablegen so that it can handle these differences. It's NFC for SelectionDAG since it emits equivalent code and it's NFC for GlobalISel since the rules involving the relevant predicates are still rejected by the importer. llvm-svn: 318095
* [llvm-objcopy] Add --strip-debugJake Ehrlich2017-11-132-0/+62
| | | | | | | | | | | | | | | | Many projects use this option. There are two ways to use it. You can either a) Just use --strip-debug and keep the old file with debug content or b) you can use --strip-debug, --only-keep-debug, and --add-gnu-debuglink all in conjunction to create two separate files, the stripped file and the debug file. --only-keep-debug is more complicated than --strip-debug because it keeps the section headers without keeping section contents. That's not really supported by llvm-objcopy at the moment but I plan on adding it. So this change just supports a) and options to support b) will come soon. Differential Revision: https://reviews.llvm.org/D39919 llvm-svn: 318094
* [CodeGen] fix const-ness of cbrt and fmaSanjay Patel2017-11-136-45/+87
| | | | | | | | | | | cbrt() is always constant because it can't overflow or underflow. Therefore, it can't set errno. fma() is not always constant because it can overflow or underflow. Therefore, it can set errno. But we know that it never sets errno on GNU / MSVC, so make it constant in those environments. Differential Revision: https://reviews.llvm.org/D39641 llvm-svn: 318093
* [llvm-objcopy] Add --strip-all option to llvm-objcopyJake Ehrlich2017-11-132-0/+74
| | | | | | | | | | | | | | This change adds a slightly less extreme form of stripping. It should remove any section that starts with ".debug" and should remove any symbol table or relocations. In general this strips out most of the stuff you don't need to execute but leaves a number of things around. This behavior has been designed to be compatible with GNU strip/objcopy --strip-all so that anywhere you currently use --strip-all you should be able to use llvm-objcopy as a drop in replacement. Differential Revision: https://reviews.llvm.org/D39769 llvm-svn: 318092
* Fix -Werror when compiling rL318083 (ter)Serge Guelton2017-11-131-1/+2
| | | | | | Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083. llvm-svn: 318091
* Fix -Werror when compiling rL318083 (bis)Serge Guelton2017-11-131-2/+2
| | | | | | Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083. llvm-svn: 318090
* [sanitizer] Relax stack check in assert.cc even moreVitaly Buka2017-11-131-1/+0
| | | | | | assert implementations can be very different llvm-svn: 318089
* Fix -Werror when compiling rL318083Serge Guelton2017-11-131-2/+2
| | | | | | Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083. llvm-svn: 318087
* Fix an assertion in SelectionDAG::transferDbgValues()Adrian Prantl2017-11-132-11/+44
| | | | | | | | when transferring debug info describing the lower bits of an extended SDNode. rdar://problem/35504722 llvm-svn: 318086
* [lsan] Remove semicolon after do {} while (0)Tom de Vries2017-11-131-2/+2
| | | | | | | | Remove semicolon after "do {} while (0)" in LOG_POINTERS and LOG_THREADS. Reviewed by: kcc llvm-svn: 318085
* [asan] Remove semicolon after do {} while (0)Tom de Vries2017-11-131-1/+1
| | | | | | Remove semicolon after "do {} while (0)" in in CHECK_SMALL_REGION llvm-svn: 318084
* Reorder Value.def to optimize code sizeSerge Guelton2017-11-131-16/+21
| | | | | | | | | | | | If the first values in Value.def is the range of constant, then the code generated by `isa<Constant>` is smaller by one operation (basically, an add is removed). It turns out this small optimization reduces the size of the statically linked clang binary by 400ko on my laptop. The theoritical performance gain is non visible from my benchmarks, but the size dropdown is. Differential Revision: https://reviews.llvm.org/D39373 llvm-svn: 318083
* [tsan] Fix signal chainingVitaly Buka2017-11-132-6/+9
| | | | | | | | | | | | Summary: Return saved values only if installed sigaction is our wrapper. Reviewers: eugenis, dvyukov Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39935 llvm-svn: 318082
* [arm] Fix Unnecessary reloads from GOT.Evgeniy Stepanov2017-11-1312-43/+78
| | | | | | | | | | | | Summary: This fixes PR35221. Use pseudo-instructions to let MachineCSE hoist global address computation. Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39871 llvm-svn: 318081
* [sanitizer] Update scudo to use new APIKostya Kortchinsky2017-11-134-32/+45
| | | | | | | | | | | | | | | | | | | Summary: The ScudoAllocator uses a SecondaryHeader to keep track of the size and base address of each mmap'd chunk. This aligns well with what the ReservedAddressRange is trying to do. This changeset converts the scudo allocator from using the MmapNoAccess/MmapFixed APIs to the ReservedAddressRange::Init and ::Map APIs. In doing so, it replaces the SecondayHeader struct with the ReservedAddressRange object. This is part 3 of a 4 part changeset; part 1 https://reviews.llvm.org/D39072 and part 2 https://reviews.llvm.org/D38592 Reviewers: alekseyshl, mcgrathr, cryptoad, phosek Reviewed By: cryptoad Subscribers: llvm-commits, cryptoad, kubamracek Differential Revision: https://reviews.llvm.org/D38593 llvm-svn: 318080
* Reformat a comment. NFC.Stephane Sezer2017-11-131-2/+1
| | | | llvm-svn: 318079
* [tsan] Deadly signal handler for tsanVitaly Buka2017-11-138-36/+32
| | | | | | | | | | | | Summary: https://github.com/google/sanitizers/issues/637 Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39929 llvm-svn: 318078
* [sanitizer] Relax stack checkVitaly Buka2017-11-131-1/+1
| | | | | | -NEXT sometimes does not work as LLVMSymbolizer warning can appear there. llvm-svn: 318077
* [Reassociation] regenerate test checks; NFCSanjay Patel2017-11-131-54/+55
| | | | llvm-svn: 318076
* [clang] Remove redundant return [NFC]Mandeep Singh Grang2017-11-133-5/+0
| | | | | | | | | | | | | | Reviewers: rsmith, sfantao, mcrosier Reviewed By: mcrosier Subscribers: jholewinski, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D39915 llvm-svn: 318074
* Fix clang -Wsometimes-uninitialized warning in SCEV codeReid Kleckner2017-11-131-1/+1
| | | | | | | I don't believe this was a problem in practice, as it's likely that the boolean wasn't checked unless the backend condition was non-null. llvm-svn: 318073
* Remove a std::map and std::set that show up in LLD profilesReid Kleckner2017-11-133-3/+10
| | | | | | | | | | | | | | | | | | For GC roots, add a bit to SymbolBody to ensure that we don't add the same root twice, and switch to a vector. In addition to being faster, this may also fix some latent non-determinism. We iterate the GCRoot list later and it the order should be deterministic. For fixupExports, we can just use DenseMap. This is a simple string uniquing task, and we don't iterate the map. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39609 llvm-svn: 318072
* Disable GC and ICF when /debug is presentReid Kleckner2017-11-135-28/+54
| | | | | | | | | | | | | | | | | | | | | ICF and GC impair debugging, so MSVC disables these optimizations when /debug is passed. They are still on by default when no PDB is produced. This change also makes /opt:ref enable ICF, which is consistent with MSVC: https://msdn.microsoft.com/en-us/library/bxwfs976.aspx We should consider making /opt:icf fold readonly data in the near future. LLD used to do this, but we disabled it because it breaks too many programs. MSVC only does this if the user explicitly passes /opt:icf. Reviewers: ruiu, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39885 llvm-svn: 318071
* NFC, Allow SystemZ SLP tests only when SystemZ is supported.Dinar Temirbulatov2017-11-131-0/+3
| | | | llvm-svn: 318070
* Create a TempFile class.Rafael Espindola2017-11-133-20/+107
| | | | | | | | | | | | | | | This just adds a TempFile class and replaces the use in FileOutputBuffer with it. The only difference for now is better error handling. Followup work includes: - Convert other user of temporary files to it. - Add support for automatically deleting on windows. - Add a createUnnamed method that returns a potentially unnamed file. It would be actually unnamed on modern linux and have a unknown name on windows. llvm-svn: 318069
* [globalisel][tablegen] Add support for extload.Daniel Sanders2017-11-132-14/+36
| | | | llvm-svn: 318068
* native_divide: provide function implementation instead of macroJan Vesely2017-11-135-1/+17
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318067
* native_recip: provide function implementation instead of macroJan Vesely2017-11-134-1/+18
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318066
* native_rsqrt: Switch implementation to 1 / native_sqrtJan Vesely2017-11-134-1/+18
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318065
* native_tan: Switch implementation to use native_sin/native_cosJan Vesely2017-11-134-9/+17
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318064
* math: Use precomputed constant for log2(10.0)Jan Vesely2017-11-133-3/+11
| | | | | | | | exp10 CTS fails with or without this change Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318063
* Try harder to delete the temporary file.Rafael Espindola2017-11-131-1/+2
| | | | | | | This changes COFF to use the output buffer that is reset by the error handler. llvm-svn: 318062
* Remove dead include.Rafael Espindola2017-11-131-1/+0
| | | | llvm-svn: 318061
* Try harder to delete the temporary file.Rafael Espindola2017-11-133-2/+8
| | | | | | | | | | | | | | | | | It is really hard to cover restarts in a debugger, SIGKILL or power failures. I will try to handle them in a followup patch, but it will not support all the systems lld has to run on. RemoveFileOnSignal takes care of crashes. So what is left is making sure all regular exits delete the file. This patch does that by moving the buffer to error handling. That is a bit of a hack, but seemed better than to generalize it to take a callback on construction. I will implement this on COFF on the next patch. llvm-svn: 318060
* fix printing of alias instructions by removing redundant spacingPetar Jovanovic2017-11-131-1/+3
| | | | | | | | | | | | Some alias instructions are printed with an extra space after the tab character. Fix this by skipping that space when the tab character is printed so that the instructions are aligned with the rest of the code. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D35946 llvm-svn: 318059
* [ValueTracking] use 'auto' with 'dyn_cast'; NFCSanjay Patel2017-11-131-11/+13
| | | | llvm-svn: 318058
* [X86] Allow X86ISD::Wrapper to be folded into the base of gather/scatter addressCraig Topper2017-11-132-58/+110
| | | | | | | | | | | | If the base of our gather corresponds to something contained in X86ISD::Wrapper we should be able to fold it into the address. This patch refactors some of the address matching to more fully use the X86ISelAddressMode struct and the getAddressOperands helper. A new helper function matchVectorAddress is added to call matchWrapper or fall back to matchAddressBase. We should also be able to support constant offsets from a wrapper, but I'll look into that in a future patch. We may even be able to completely reuse matchAddress here, but I wanted to start simple and work up to it. Differential Revision: https://reviews.llvm.org/D39927 llvm-svn: 318057
* [OpenMP] Remove the unused testsuite/ directoryJonathan Peyton2017-11-13161-15270/+0
| | | | | | | | | | The testsuite directory is not used or updated and confuses new users to the OpenMP project. These tests were rewritten using the lit format and put under the runtime/test directory. This patch removes the entire testsuite/ directory. Differential Revision: https://reviews.llvm.org/D39767 llvm-svn: 318056
* [ValueTracking] simplify code in CannotBeNegativeZero() with match(); NFCISanjay Patel2017-11-131-5/+3
| | | | llvm-svn: 318055
* [analyzer] ObjCGenerics: Don't warn on cast conversions involving explicit castDevin Coughlin2017-11-132-613/+580
| | | | | | | | | | | | | | | | | | | | | | The ObjCGenerics checker warns on a cast when there is no subtyping relationship between the tracked type of the value and the destination type of the cast. It does this even if the cast was explicitly written. This means the user can't write an explicit cast to silence the diagnostic. This commit treats explicit casts involving generic types as an indication from the programmer that the Objective-C type system is not rich enough to express the needed invariant. On explicit casts, the checker now removes any existing information inferred about the type arguments. Further, it no longer assumes the casted-to specialized type because the invariant the programmer specifies in the cast may only hold at a particular program point and not later ones. This prevents a suppressing cast from requiring a cascade of casts down the line. rdar://problem/33603303 Differential Revision: https://reviews.llvm.org/D39711 llvm-svn: 318054
* [Reassociate] add tests with 'reassoc' FMF; NFCSanjay Patel2017-11-135-3/+311
| | | | llvm-svn: 318053
* Fix netbsd, freebsd and osx builds for ArchSpec movePavel Labath2017-11-1314-19/+15
| | | | llvm-svn: 318052
* AMDGPU: Drop duplicate setOperationActionJan Vesely2017-11-131-2/+0
| | | | | | | | These are set with other scalar int ops few lines up Differential Revision: https://reviews.llvm.org/D39928 llvm-svn: 318051
* [SCEV] Handling for ICmp occuring in the evolution chain.Jatin Bhateja2017-11-133-8/+127
| | | | | | | | | | | | | | | | | | | | Summary: If a compare instruction is same or inverse of the compare in the branch of the loop latch, then return a constant evolution node. This shall facilitate computations of loop exit counts in cases where compare appears in the evolution chain of induction variables. Will fix PR 34538 Reviewers: sanjoy, hfinkel, junryoungju Reviewed By: sanjoy, junryoungju Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D38494 llvm-svn: 318050
* Revert "[CodeGenPrepare] Check that erased sunken address are not reused"Simon Dardis2017-11-133-72/+1
| | | | | | This reverts commit r318032. The test broke some sanitizer bots. llvm-svn: 318049
* Move ArchSpec to the Utility modulePavel Labath2017-11-1393-204/+104
| | | | | | | | | | | | | The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module. This commit touches many files, but most of it is just renaming of #include lines. In a couple of cases, I removed the #include ArchSpec line altogether, as the file was not using it. In one or two places, this necessitated adding other #includes like lldb-private-defines.h. llvm-svn: 318048
* [ARM GlobalISel] Update legalizer testDiana Picus2017-11-131-130/+162
| | | | | | | | | | | | Make one of the legalizer tests a bit more robust by making sure all values we're interested in are used (either in a store or a return) and by using loads instead of constants for obtaining values on fewer than 32 bits. This should make the test less fragile to changes in the legalize combiner, since those loads are legal (as opposed to the constants, which were being widened and thus produced opportunities for the legalize combiner). llvm-svn: 318047
* Remove last Host usage from ArchSpecPavel Labath2017-11-135-13/+23
| | | | | | | | | | | | | | | | | | | | | | | Summary: In D39387, I was quick to jump to conclusion that ArchSpec has no external dependencies. It turns there still was one call to HostInfo::GetArchitecture left -- for implementing the "systemArch32" architecture and friends. Since GetAugmentedArchSpec is the place we handle these "incomplete" triples that don't specify os or vendor and "systemArch" looks very much like an incomplete triple, I move its handling there. After this ArchSpec *really* does not have external dependencies, and I'll move it to the Utility module as a follow-up. Reviewers: zturner, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39896 llvm-svn: 318046
OpenPOWER on IntegriCloud