summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NaryReassociate] SeenExprs records WeakVHJingyue Wu2015-10-012-6/+26
| | | | | | | | | | | | | | | | Summary: The instructions SeenExprs records may be deleted during rewriting. FindClosestMatchingDominator should ignore these deleted instructions. Fixes PR24301. Reviewers: grosser Subscribers: grosser, llvm-commits Differential Revision: http://reviews.llvm.org/D13315 llvm-svn: 248983
* Decorating virtual functions load with invariant.loadPiotr Padlewski2015-10-012-2/+16
| | | | | | http://reviews.llvm.org/D13279 llvm-svn: 248982
* Fix performance problem in long-running SectionMemoryManagersKeno Fischer2015-10-012-5/+31
| | | | | | | | | | | | | | | | | | | | | Summary: Without this patch, the memory manager would call `mprotect` on every memory region it ever allocated whenever it wanted to finalize memory (i.e. not just the ones it just allocated). This caused terrible performance problems for long running memory managers. In one particular compile heavy julia benchmark, we were spending 50% of time in `mprotect` if running under MCJIT. Fix this by splitting allocated memory blocks into those on which memory permissions have been set and those on which they haven't and only running `mprotect` on the latter. Reviewers: lhames Subscribers: reames, llvm-commits Differential Revision: http://reviews.llvm.org/D13156 llvm-svn: 248981
* Patch over a really horrible bug in our vector builtins that showed upChandler Carruth2015-10-012-3/+20
| | | | | | | | | | | | | | | | | | | | | | | recently when we started using direct conversion to model sign extension. The __v16qi type we use for SSE v16i8 vectors is defined in terms of 'char' which may or may not be signed! This causes us to generate pmovsx and pmovzx depending on the setting of -funsigned-char. This patch just forms an explicitly signed type and uses that to formulate the sign extension. While this gets the correct behavior (which we now verify with the enhanced test) this is just the tip of the ice berg. Now that I know what to look for, I have found errors of this sort *throughout* our vector code. Fortunately, this is the only specific place where I know of users actively having their code miscompiled by Clang due to this, so I'm keeping the fix for those users minimal and targeted. I'll be sending a proper email for discussion of how to fix these systematically, what the implications are, and just how widely broken this is... From what I can tell, we have never shipped a correct set of builtin headers for x86 when users rely on -funsigned-char. Oops. llvm-svn: 248980
* [compiler-rt] Fix build (again) by wrapping lines to 80 chars (NFC)Vedant Kumar2015-10-011-1/+2
| | | | llvm-svn: 248979
* AMDGPU/SI: Re-order PreloadedValue enum and number entries based on init orderTom Stellard2015-10-011-9/+12
| | | | | | | | | | Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D12451 llvm-svn: 248978
* createUniqueFile() is documented to create the file in the temporary ↵Cameron Esfahani2015-10-011-1/+6
| | | | | | | | | | | | | | | | directory unless it's supplied an absolute path. Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute. Summary: Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute. Reviewers: rsmith, akyrtzi Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12774 llvm-svn: 248977
* [llvm-objdump] Fix time of check to time of use bug.Davide Italiano2015-10-011-3/+0
| | | | | | | There's already a test that covers this situation, so we should be fine. llvm-svn: 248976
* Fix printing of parameterized Objective-C interfaces.Bob Wilson2015-10-012-1/+6
| | | | | | This change was accidentally omitted from Doug's change in r241541. llvm-svn: 248975
* Module debugging: Emit Objective-C interfaces in their module scope whenAdrian Prantl2015-10-012-3/+11
| | | | | | building a clang module. llvm-svn: 248974
* [compiler-rt] Fix build by wrapping lines to 80 chars (NFC)Vedant Kumar2015-10-013-3/+6
| | | | llvm-svn: 248973
* Revert "Enable -Wdeprecated in the cmake build now that LLVM (& Clang, ↵David Blaikie2015-10-011-1/+1
| | | | | | | | | | | Polly, and LLD) are -Wdeprecated clean" This reverts commit r248963. Seems there's some standard libraries (and libcxxabi implementations) that aren't -Wdeprecated clean... hrm. llvm-svn: 248972
* Use the preferred display language when making a persistent variable from aSean Callanan2015-10-011-1/+1
| | | | | | ValueObject. llvm-svn: 248971
* Changed PersistentExpressionState to allow symbol lookups. Clang doesn'tSean Callanan2015-10-012-0/+7
| | | | | | report any (yet). llvm-svn: 248970
* ELF2: Tidy up Options.td.Rui Ueyama2015-10-011-44/+31
| | | | | | Fix indentation and sort options alphabetically. llvm-svn: 248969
* Update sample profile propagation algorithm.Dehao Chen2015-10-016-139/+221
| | | | | | http://reviews.llvm.org/D13218 llvm-svn: 248968
* ELF2: Ignore some command line argument that clang passes to the linker.Rui Ueyama2015-10-011-0/+9
| | | | llvm-svn: 248967
* [compiler-rt] Apply modernize-use-nullptr fixes in sanitizersVedant Kumar2015-10-0124-138/+152
| | | | | | | | | | | | | | | | | | - Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. - Add blank lines to separate function definitions. - Add 'extern "C"' or 'namespace foo' comments after the appropriate closing brackets This is a continuation of work from 409b7b82. The focus here is on the various sanitizers (not sanitizer_common, as before). Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13225 llvm-svn: 248966
* [X86] Don't custom-lower vNi32 uint_to_fp when unsafe-fp-math.Ahmed Bougacha2015-10-012-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom code produces incorrect results if later reassociated. Since r221657, on x86, vNi32 uitofp is lowered using an optimized sequence: movdqa LCPI0_0(%rip), %xmm1 ## xmm1 = [65535, ...] pand %xmm0, %xmm1 por LCPI0_1(%rip), %xmm1 ## [0x4b000000, ...] psrld $16, %xmm0 por LCPI0_2(%rip), %xmm0 ## [0x53000000, ...] addps LCPI0_3(%rip), %xmm0 ## [float -5.497642e+11, ...] addps %xmm1, %xmm0 Since r240361, the machine combiner opportunistically reassociates 2-instruction sequences (with -ffast-math). In the new code sequence, the ADDPS' are eligible. In isolation, for simple examples (without reassociable users), this makes no performance difference (the goal being to enable reassociation of longer chains). In the trivial example (just one uitofp), the reassociation doesn't happen, because (I think) it would require the emission of a separate movaps for a constantpool load (instead of folding it into addps). However, when we have multiple uitofp sequences, and the constantpool loads are CSE'd earlier, the machine combiner can do the reassociation. When the ADDPS' are reassociated, the resulting sequence isn't correct anymore, as we'd be adding large (2**39) constants with comparatively smaller values (~2**23). Given that two of the three inputs are powers of 2 larger than 2**16, and that ulp(2**39) == 2**(39-24) == 2**15, the reassociated chain will produce 0 for any input in [0, 2**14[. In my testing, it also produces wrong results for 99.5% of [0, 2**32[. Avoid this by disabling the new lowering when -ffast-math. It does mean that we'll get slower code than without it, but at least we won't get egregiously incorrect code. One might argue that, considering -ffast-math is all but meaningless, uitofp producing wrong results isn't a compiler bug. But it really is. Fixes PR24512. ...though this is really more of a workaround. Ideally, we'd have some sort of Machine FMF, but that's a problem that's not worth tackling until we do more with machine IR. llvm-svn: 248965
* [sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar2015-09-3018-143/+153
| | | | | | | | | | | | - Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13310 llvm-svn: 248964
* Enable -Wdeprecated in the cmake build now that LLVM (& Clang, Polly, and ↵David Blaikie2015-09-301-1/+1
| | | | | | | | | | | | | | | | | | | LLD) are -Wdeprecated clean This particularly helps enforce the C++ Rule of 5 (for new move ops this is already an error, but for a type only using C++98 features (copy ctor/assign, dtor) it is only deprecated, not invalid) Applying the flag for any GCC compatible compiler - GCC doesn't warn on the Rule of 5 cases that C++11 deprecates, but it doesn't have other false positives so far as I could see (compiling with GCC 4.8 didn't produce any -Wdeprecated warnings I could spot). Reviewers: aaron.ballman Differential Revision: http://reviews.llvm.org/D13314 llvm-svn: 248963
* [asan] Fix asan_symbolize.py handling of non-existing pathsEvgeniy Stepanov2015-09-302-2/+6
| | | | llvm-svn: 248962
* ELF2: Move tests for linker script from basic.s to linkerscript.s.Rui Ueyama2015-09-303-16/+26
| | | | llvm-svn: 248961
* Introudce a IsTopLevelFunction() API on Language and FunctionEnrico Granata2015-09-305-0/+44
| | | | | | | | This is meant to support languages that have a scripting mode with top-level code that acts as global For now, this flag only controls whether 'frame variable' will attempt to treat globals as locals when within such a function llvm-svn: 248960
* [WinEH] Emit int3 after noreturn calls on Win64Reid Kleckner2015-09-308-24/+134
| | | | | | | | | | | | | | | | | | | | | | | The Win64 unwinder disassembles forwards from each PC to try to determine if this PC is in an epilogue. If so, it skips calling the EH personality function for that frame. Typically, this means you cannot catch an exception in the same frame that you threw it, because 'throw' calls a noreturn runtime function. Previously we avoided this problem with the TrapUnreachable TargetOption, but that's a much bigger hammer than we need. All we need is a 1 byte non-epilogue instruction right after the call. Instead, what we got was an unconditional branch to a shared block containing the ud2, potentially 7 bytes instead of 1. So, this reverts r206684, which added TrapUnreachable, and replaces it with something better. The new code pattern matches for invoke/call followed by unreachable and inserts an int3 into the DAG. To be 100% watertight, we would need to insert SEH_Epilogue instructions into all basic blocks ending in a call with no terminators or successors, but in practice this is unlikely to come up. llvm-svn: 248959
* CFI: add a test from base-to-derived cast from the base destructor.Ivan Krasin2015-09-301-0/+93
| | | | | | | | | | | | Summary: This adds an interesting bad cast case, originally found in https://crbug.com/537398. Reviewers: kcc Subscribers: pcc Differential Revision: http://reviews.llvm.org/D13307 llvm-svn: 248958
* [PowerPC] undef Relocation names in PowerPC*.defHal Finkel2015-09-302-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc's PowerPC /usr/include/asm/sigcontext.h, has this: #ifdef __powerpc64__ #include <asm/elf.h> #endif and that contains defines of all of the relocation symbols, like this: #define R_PPC_NONE 0 and if that file is included prior to including include/llvm/Support/ELFRelocs/PowerPC*.def, which we cannot in general prevent, the result will fail. As it turns out, this happens when compiling lld/unittests/DriverTests/GnuLdDriverTest.cpp under PPC64/Linux, because: lld/include/lld/ReaderWriter/ELFLinkingContext.h includes lld/unittests/DriverTests/DriverTest.h which includes utils/unittest/googletest/include/gtest/gtest.h which includes utils/unittest/googletest/include/gtest/internal/gtest-internal.h which includes /usr/include/sys/wait.h which includes /usr/include/signal.h which includes /usr/include/bits/sigcontext.h which includes /usr/include/asm/sigcontext.h which includes /usr/include/asm/elf.h the test could be fixed to include ReaderWriter/ELFLinkingContext.h before including unittests/DriverTests/DriverTest.h, but dealing with this in the *.def files is a more-general solution that localizes the fix to the headers instead of requiring changes to an unbounded number of other source files (both in-tree and external). llvm-svn: 248957
* Fix Linux build.Oleksiy Vyalov2015-09-301-1/+1
| | | | llvm-svn: 248956
* [x86] enable machine combiner reassociations for 256-bit vector logical ↵Sanjay Patel2015-09-302-2/+49
| | | | | | integer insts llvm-svn: 248955
* [libFuzzer] Marking exported symbols as visible. Patch by Mike AizatskyKostya Serebryany2015-09-301-1/+2
| | | | llvm-svn: 248954
* [Sema] Don't crash when friending an unqualified templated constructorDavid Majnemer2015-09-302-7/+29
| | | | | | | | | | Unqualified templated constructors cannot be friended and our lack of a diagnostic led to violated invariants. Instead, raise a diagnostic when processing the friend declaration. This fixes PR20251. llvm-svn: 248953
* ELF2: Add DT_REL{,A}ENT and DT_SYMENT.Rui Ueyama2015-09-304-1/+33
| | | | | | | | According to the ELF specification, these dynamic array entries are mandatory. http://reviews.llvm.org/D13303 llvm-svn: 248952
* [CUDA] fix codegen for __nvvm_atom_cas_*Jingyue Wu2015-09-302-1/+6
| | | | | | | | | | | | Summary: __nvvm_atom_cas_* returns the old value instead of whether the swap succeeds. Reviewers: eliben, tra Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D13306 llvm-svn: 248951
* Don't inherit the "unavailable" attribute from an overridden superclass method.Douglas Gregor2015-09-302-3/+17
| | | | | | Fixes rdar://problem/22922259. llvm-svn: 248950
* Don't inherit availability information when implementing a protocol requirement.Douglas Gregor2015-09-306-46/+149
| | | | | | | | | | When an Objective-C method implements a protocol requirement, do not inherit any availability information from the protocol requirement. Rather, check that the implementation is not less available than the protocol requirement, as we do when overriding a method that has availability. Fixes rdar://problem/22734745. llvm-svn: 248949
* [CMake] [Darwin] Add and populate PROFILE_SUPPORTED_OS to enable building ↵Chris Bieneman2015-09-302-3/+4
| | | | | | libclang_rt.profile for iOS. llvm-svn: 248948
* [FIX] Reintroduce an include needed to locally compile PollyJohannes Doerfert2015-09-301-0/+1
| | | | llvm-svn: 248947
* [FIX] Handle identity mappings in the ScopExpanderJohannes Doerfert2015-09-301-1/+2
| | | | | | | | If the VMap in the ScopExpander contains identity mappings we now ignore the mapping. Reported-by: Tobias Grosser <tobias@grosser.es> llvm-svn: 248946
* [AArch64] Remove an unnecessary run line and other cleanup. NFC.Chad Rosier2015-09-302-99/+95
| | | | | | | Unscaled load/store combining has been enabled since the initial ARM64 port. No need for a redundance run. Also, add CHECK-LABEL directives. llvm-svn: 248945
* [CMake] [Darwin] [macho_embedded] Specify the version min explicitly.Chris Bieneman2015-09-301-0/+1
| | | | | | We need to set the OS X deployment target on the macho_embedded libraries to match the outputs from the autoconf build system. llvm-svn: 248944
* [SLP] Don't vectorize loads of non-packed types (like i1, i2).Michael Zolotukhin2015-09-302-1/+44
| | | | | | | | | | | | | | | | | | Summary: Given an array of i2 elements, 4 consecutive scalar loads will be lowered to i8-sized loads and thus will access 4 consecutive bytes in memory. If we vectorize these loads into a single <4 x i2> load, it'll access only 1 byte in memory. Hence, we should prohibit vectorization in such cases. PS: Initial patch was proposed by Arnold. Reviewers: aschwaighofer, nadav, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13277 llvm-svn: 248943
* Fix -Wsign-compare warningDavid Blaikie2015-09-301-1/+1
| | | | llvm-svn: 248942
* [CMake] [Darwin] [builtins] Add support for building libclang_rt.10.4.aChris Bieneman2015-09-301-0/+11
| | | | | | This builtin library is used when setting the OS X deployment target to 10.4, which we still support. llvm-svn: 248940
* [CMake] [Darwin] [builtins] Change condition for skipping cc_kext to be ↵Chris Bieneman2015-09-302-1/+2
| | | | | | | | setting based. This is needed because we need to skip cc_kext generation for more than just the simulator builds. llvm-svn: 248939
* Move dw_op_minus test to DebugInfo/X86.Evgeniy Stepanov2015-09-301-0/+0
| | | | | | | | The test requires X86 target support, and checks the actual debug info contents, including register numbers which would be different on other platforms. llvm-svn: 248938
* Drop unneeded includesTobias Grosser2015-09-301-3/+0
| | | | llvm-svn: 248937
* Fixes a potential hang in test runner timeout logic.Todd Fiala2015-09-303-17/+86
| | | | | | | | | | | | | | | Part of https://llvm.org/bugs/show_bug.cgi?id=25002 In writing the new process_control test included here, I discovered that the scenario would hang indefinitely, bypassing the timeout logic. This fixes the indefinite hang, converting an error in the new test to a failure. I'll fix the failure next. This one was heinous enough to fix on its own, though. llvm-svn: 248936
* Revert "[DarwinDriver] Use -lto_library to specify the path for libLTO.dylib"Bruno Cardoso Lopes2015-09-303-44/+9
| | | | | | Revert r248932. Bots complaining about new warnings where they shouldn't. llvm-svn: 248935
* Now persistent expression data no longer lives with the Target, but rather withSean Callanan2015-09-3021-33/+129
| | | | | | | | | | the corresponding TypeSystem. This makes sense because what kind of data there is -- and how it can be looked up -- depends on the language. Functionality that is common to all type systems is factored out into PersistentExpressionState. llvm-svn: 248934
* Fix debug info with SafeStack.Evgeniy Stepanov2015-09-308-17/+198
| | | | llvm-svn: 248933
OpenPOWER on IntegriCloud