summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Disable transforms that introduce calls to exp10*() on Linux due toChandler Carruth2013-12-282-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | widespread glibc bugs. The glibc implementation of exp10 has a very serious precision bug in version 2.15 (and older versions). This is still very widely used (the current Ubuntu LTS for example uses it) and so it isn't reasonable to make transforms that produce these functions. This fixes many miscompiles introduced when we started transforming pow(10.0, ...) into exp10, and it may have fixed other latent miscompiles where exp10 provided sufficient precision but exp10f did not. This is all really horrible. The primary bug has been fixed for over a year and glibc 2.18 works correctly for the test cases I have, but it will be 2017 before the LTS using 2.15 is no longer supported by Ubuntu (and thus reasonable for folks to be relying on). =[ We're either going to need to live without these optimizations, or find a way to switch behavior more dynamically than using simply the fact that the OS is "Linux". To make matters worse, there appears to be significant testing and fixing of numerous other bugs in the exp10 family of functions right now in glibc. While those haven't been causing problems I've seen in the wild, it gives me concerns that we may need to wait until an even later release of glibc before we can reliably transform code into exp10. llvm-svn: 198093
* Remove AsmPrinter::needsRelocationsForDwarfStringPool() since it'sEric Christopher2013-12-283-11/+3
| | | | | | | just calling into MAI and is only abstracting for a single interface that we actually need to check in multiple places. llvm-svn: 198092
* Attempt to fix JIT unit tests after r198087.Nico Weber2013-12-271-0/+3
| | | | llvm-svn: 198089
* Strip dead code when linking by default with BFD ld (linux, ...) and ld64 ↵Nico Weber2013-12-276-6/+25
| | | | | | | | | | | | | (os x). This reduces the size of clang-format from 22 MB to 1.8 MB, diagtool goes from 21 MB to 2.8 MB, libclang.so goes from 29 MB to 20 MB, etc. The size of the bin/ folder shrinks from 270 MB to 200 MB. Targets that support plugins and don't already use EXPORTED_SYMBOL_FILE (which libclang and libLTO already do) can set NO_DEAD_STRIP to opt out. llvm-svn: 198087
* Teach DAGCombiner how to fold a SIGN_EXTEND_INREG of a BUILD_VECTOR ofAndrea Di Biagio2013-12-277-17/+202
| | | | | | | | | | | | | | | | | | | | ConstantSDNodes (or UNDEFs) into a simple BUILD_VECTOR. For example, given the following sequence of dag nodes: i32 C = Constant<1> v4i32 V = BUILD_VECTOR C, C, C, C v4i32 Result = SIGN_EXTEND_INREG V, ValueType:v4i1 The SIGN_EXTEND_INREG node can be folded into a build_vector since the vector in input is a BUILD_VECTOR of constants. The optimized sequence is: i32 C = Constant<-1> v4i32 Result = BUILD_VECTOR C, C, C, C llvm-svn: 198084
* DebugInfo: Remove dead code, DICompositeType::addMember(DIDescriptor D)David Blaikie2013-12-272-14/+0
| | | | | | | | | | | | | | It's no longer necessary to lazily add members to the DICompositeType member list. Instead any lazy members (special member functions and member template instantiations) are added to the parent late based on their context link, the same way that nested types have always been handled (never being in the member list - just added to the parent DIE lazily based on context). Clang's been updated not to use this function anymore as it improves type unit consistency by never emitting lazy members in type units. llvm-svn: 198079
* Use two variables here rather than reusing (and abusing) one. This isChandler Carruth2013-12-271-6/+6
| | | | | | | much more clear to me. I meant to make this change before committing the original patch, but forgot to merge it in. Sorry. llvm-svn: 198069
* Introduce a simple line-by-line iterator type into the Support library.Chandler Carruth2013-12-275-0/+258
| | | | | | | | | | | | | | | | | | | This is an iterator which you can build around a MemoryBuffer. It will iterate through the non-empty, non-comment lines of the buffer as a forward iterator. It should be small and reasonably fast (although it could be made much faster if anyone cares, I don't really...). This will be used to more simply support the text-based sample profile file format, and is largely based on the original patch by Diego. I've re-worked the style of it and separated it from the work of producing a MemoryBuffer from a file which both simplifies the interface and makes it easier to test. The style of the API follows the C++ standard naming conventions to fit in better with iterators in general, much like the Path and FileSystem interfaces follow standard-based naming conventions. llvm-svn: 198068
* TLI: Make exp10* avaiable on Linux/Mac/iOS and unavailable elsewhereReid Kleckner2013-12-261-34/+33
| | | | | | | | This makes it unavailable on NetBSD, Android, etc. Patch by Brad Smith! llvm-svn: 198056
* Fix a typo.Roman Divacky2013-12-261-1/+1
| | | | llvm-svn: 198045
* Recognize armv7a and friends as aliases for armv7-a etc. for the purposeJoerg Sonnenberger2013-12-268-0/+132
| | | | | | of architecture naming. llvm-svn: 198043
* ARM IAS: support .even directiveSaleem Abdulrasool2013-12-262-0/+95
| | | | | | | The .even directive aligns content to an evan-numbered address. This is an ARM specific directive applicable to any section. llvm-svn: 198031
* [Sparc] Lower and MachineInstr to MC and print assembly using MCInstPrinter.Venkatraman Govindaraju2013-12-2612-71/+417
| | | | llvm-svn: 198030
* [Sparc] Add target specific MCExpr class to handle sparc specific modifiers ↵Venkatraman Govindaraju2013-12-263-0/+183
| | | | | | like %hi, %lo, etc., llvm-svn: 198029
* [Sparc] Add MCInstPrinter implementation for SPARC.Venkatraman Govindaraju2013-12-258-4/+188
| | | | llvm-svn: 198028
* [ASan] Fix the tests broken by r198018 to check for private linkage of ↵Alexander Potapenko2013-12-252-5/+5
| | | | | | ASan-generated globals. llvm-svn: 198020
* [Mips] Does not take in account 'use-soft-float' attribute's value whenSimon Atanasyan2013-12-252-2/+46
| | | | | | | | consider to generate stubs for mips16 hard-float mode. The patch reviewed by Reed Kotler. llvm-svn: 198019
* [ASan] Fix the test for __asan_gen_ globals and actually fix ↵Alexander Potapenko2013-12-251-2/+2
| | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=17976 by setting the correct linkage (as stated in the bug). llvm-svn: 198018
* [ASan] Make sure none of the __asan_gen_ global strings end up in the symbol ↵Alexander Potapenko2013-12-251-10/+21
| | | | | | | | | table, add a test. This should fix http://llvm.org/bugs/show_bug.cgi?id=17976 Another test checking for the global variables' locations and prefixes on Darwin will be committed separately. llvm-svn: 198017
* AVX-512: decoder for AVX-512, made by Alexey Bader.Elena Demikhovsky2013-12-257-126/+400
| | | | llvm-svn: 198013
* unittests/Support/ProcessTest.cpp: Don't use "windows.h". Use <windows.h> ↵NAKAMURA Takumi2013-12-251-1/+1
| | | | | | instead. llvm-svn: 198011
* Support for microMIPS load effective address.Zoran Jovanovic2013-12-253-2/+35
| | | | llvm-svn: 198010
* Support for microMIPS FPU instructions 2.Zoran Jovanovic2013-12-256-39/+209
| | | | llvm-svn: 198009
* AVX-512: Result type of scalar SETCC is MVT::i1 for AVX-512.Elena Demikhovsky2013-12-252-8/+10
| | | | llvm-svn: 198008
* [AArch64]Fix a problem that the register order of fmls/fmla by element is ↵Hao Liu2013-12-252-1/+261
| | | | | | | | | | | incorrect. E.g. the codegen result is fmls v1.2s, v0.2s, v2.s[3] which is expected to be fmls v0.2s, v1.2s, v2.s[3] llvm-svn: 198001
* gold-plugin.cpp: Use form of <plugin-api.h>, since it is external header.NAKAMURA Takumi2013-12-251-1/+1
| | | | llvm-svn: 197997
* llvm-config: Fix typo in help message introduced with r197664.NAKAMURA Takumi2013-12-251-1/+1
| | | | | | Thanks, Vinson Lee! llvm-svn: 197996
* Add missing pattern matches to support ACLE intrinsics of AArch64 NEON.Jiangning Liu2013-12-253-1/+322
| | | | llvm-svn: 197993
* Fix the MSVC 2010 buildAlp Toker2013-12-251-2/+9
| | | | | | C++11-style forward declared enums weren't supported until MSVC 2012. llvm-svn: 197992
* Remove link to unexisting llvm-prof docsAlexey Samsonov2013-12-241-1/+0
| | | | llvm-svn: 197989
* llvm-symbolizer: add --obj flag to specify a single object file that should ↵Alexey Samsonov2013-12-243-18/+48
| | | | | | be symbolized. llvm-svn: 197988
* Fix typo.Richard Sandiford2013-12-241-1/+1
| | | | llvm-svn: 197986
* [SystemZ] Use interlocked-access 1 instructions for CodeGenRichard Sandiford2013-12-2415-69/+768
| | | | | | | | | ...namely LOAD AND ADD, LOAD AND AND, LOAD AND OR and LOAD AND EXCLUSIVE OR. LOAD AND ADD LOGICAL isn't really separately useful for LLVM. I'll look at adding reusing the CC results in new year. llvm-svn: 197985
* [SystemZ] Add MC support for interlocked-access 1 instructionsRichard Sandiford2013-12-249-3/+761
| | | | llvm-svn: 197984
* AVX-512: fixed some patterns for MVT::i1Elena Demikhovsky2013-12-244-19/+65
| | | | llvm-svn: 197981
* [AArch64]Add patterns to match normal shift nodes: shl, sra and srl.Hao Liu2013-12-242-0/+240
| | | | llvm-svn: 197969
* [AArch64 NEON] Fix a bug when lowering BUILD_VECTOR.Kevin Qin2013-12-242-2/+27
| | | | | | | | | DAG.getVectorShuffle() doesn't always return a vector_shuffle node. If mask is the exact sequence of it's operand(For example, operand_0 is v8i8, and the mask is 0, 1, 2, 3, 4, 5, 6, 7), it will directly return that operand. So a check is added here. llvm-svn: 197967
* [AArch64 NEON] Fix a pattern match failure with NEON_VDUP.Kevin Qin2013-12-243-6/+33
| | | | | | | | This failure caused by improper condition when lowering shuffle_vector to scalar_to_vector. After this patch NEON_VDUP with v1i64 will not be generated. llvm-svn: 197966
* LangRef documentation for the stackmap and patchpoint intrinsics.Andrew Trick2013-12-243-0/+503
| | | | | | | | | These still have "experimental" status, meaning we don't guarantee backward compatibility. However, they are already actively used by the open source WebKit project, and have started to be adopted by other projects. llvm-svn: 197930
* [AArch64] Check fmul node single use in fused multiply patternsAna Pazos2013-12-244-10/+64
| | | | | | | | | | Check for single use of fmul node in fused multiply patterns to allow generation of fused multiply add/sub instructions. Otherwise fmul operation ends up being repeated more than once which does not help peformance on targets with only one MAC unit, as for example cortex-a53. llvm-svn: 197929
* [AArch64 NEON] Fixed fused multiply negate add/sub patternsAna Pazos2013-12-243-20/+21
| | | | | | | | | | | | | | | | | | The correct pattern matching should be: - fnmadd is (-Ra) + (-Rn)*Rm which should be matched as: fma (fneg node:$Rn), node:$Rm, (fneg node:$Ra) and as (f32 (fsub (f32 (fneg FPR32:$Ra)), (f32 (fmul FPR32:$Rn, FPR32:$Rm)))) - fnmsub is (-Ra) + Rn*Rm which should be matched as fma node:$Rn, node:$Rm, (fneg node:$Ra) and as (f32 (fsub (f32 (fmul FPR32:$Rn, FPR32:$Rm)), FPR32:$Ra)))) llvm-svn: 197928
* Debug info: Add enumerators to the __apple_names accelerator table.Adrian Prantl2013-12-232-0/+14
| | | | | | rdar://problem/11516681. llvm-svn: 197927
* Add support to indvars for optimizing sadd.with.overflow.Andrew Trick2013-12-234-4/+165
| | | | | | | | | | | | | | | | Split sadd.with.overflow into add + sadd.with.overflow to allow analysis and optimization. This should ideally be done after InstCombine, which can perform code motion (eventually indvars should run after all canonical instcombines). We want ISEL to recombine the add and the check, at least on x86. This is currently under an option for reducing live induction variables: -liv-reduce. The next step is reducing liveness of IVs that are live out of the overflow check paths. Once the related optimizations are fully developed, reviewed and tested, I do expect this to become default. llvm-svn: 197926
* Debug info: On ARM ensure that the data sections come before theAdrian Prantl2013-12-232-0/+39
| | | | | | | | | (optional) DWARF sections, so compiling with -g does not result in different code being generated. rdar://problem/15623193 llvm-svn: 197922
* ARM: bkpt has an implicit immediate constant 0Saleem Abdulrasool2013-12-233-0/+36
| | | | | | | | | The bkpt mnemonic has an implicit immediate constant of 0 unless otherwise specified. Add an instruction alias for the unvalued breakpoint mnemonic to treat it as a 0. This improves compatibility with GNU AS. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 197913
* Fix Scalarizer insertion point when replacing PHIs with insertelementsRichard Sandiford2013-12-232-1/+33
| | | | | | | | | | If the Scalarizer scalarized a vector PHI but could not scalarize all uses of it, it would insert a series of insertelements to reconstruct the vector PHI value from the scalar ones. The problem was that it would emit these insertelements immediately after the PHI, even if there were other PHIs after it. llvm-svn: 197909
* Fix Scalarizer handling of vector GEPs with multiple index operandsRichard Sandiford2013-12-232-11/+64
| | | | | | The old code only worked for one index operand. Also handle "inbounds". llvm-svn: 197908
* [asan] don't unpoison redzones on function exit in use-after-return mode.Kostya Serebryany2013-12-234-15/+120
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change the instrumented code before Ret instructions looked like: <Unpoison Frame Redzones> if (Frame != OriginalFrame) // I.e. Frame is fake <Poison Complete Frame> Now the instrumented code looks like: if (Frame != OriginalFrame) // I.e. Frame is fake <Poison Complete Frame> else <Unpoison Frame Redzones> Reviewers: eugenis Reviewed By: eugenis CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2458 llvm-svn: 197907
* [asan] produce fewer stores when poisoning stack shadowKostya Serebryany2013-12-231-20/+19
| | | | llvm-svn: 197904
* [AArch64]The compare to zero intrinsics should be implemented by 'icmp/fcmp' ↵Hao Liu2013-12-232-9/+9
| | | | | | and 'sext' not 'zext'. Modify the test cases. llvm-svn: 197897
OpenPOWER on IntegriCloud