summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer] Fix build on platforms where dtls support is disabled.Evgeniy Stepanov2014-06-251-1/+1
| | | | llvm-svn: 211684
* [msan] Fix false positive on dynamic tls.Evgeniy Stepanov2014-06-257-14/+34
| | | | | | | | | Use existing DTLS code in sanitizer_tls_get_addr.{h,cc} to unpoison DTLS blocks both on allocation and deallocation. https://code.google.com/p/memory-sanitizer/issues/detail?id=44 llvm-svn: 211683
* [mach-o]: atomize zero-terminated literals correctly.Tim Northover2014-06-252-9/+9
| | | | | | | | | When looking through sections with zero-terminated string-literals (__cstring or __ustring) we were constantly rechecking the first few bytes of the string for '\0' rather than advancing along. This obviously failed unless all strings within the section had the same length as that first one. llvm-svn: 211682
* [mach-o] don't assume all sections have symbolsTim Northover2014-06-252-4/+29
| | | | | | | | We were trying to examine the first symbol in a section that we wanted to atomize by symbols, even when there wasn't one. Instead, we should make the initial anonymous symbol cover the entire section in that situation. llvm-svn: 211681
* Add exp10Jeroen Ketema2014-06-256-0/+31
| | | | | Reviewed-by: Tom Stellard <tom@stellard.net> llvm-svn: 211680
* [X86] Add target combine rule to select ADDSUB instructions from a build_vectorAndrea Di Biagio2014-06-253-1/+456
| | | | | | | | | | | | | | | | | This patch teaches the backend how to combine a build_vector that implements an 'addsub' between packed float vectors into a sequence of vector add and vector sub followed by a VSELECT. The new VSELECT is expected to be lowered into a BLENDI. At ISel stage, the sequence 'vector add + vector sub + BLENDI' is pattern-matched against ISel patterns added at r211427 to select 'addsub' instructions. Added three more ISel patterns for ADDSUB. Added test sse3-avx-addsub-2.ll to verify that we correctly emit 'addsub' instructions. llvm-svn: 211679
* Factor out part of LICM::sink into a helper function.Evgeniy Stepanov2014-06-251-28/+41
| | | | llvm-svn: 211678
* AST: Initialization with dllimport functions in CDavid Majnemer2014-06-254-9/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C++ language requires that the address of a function be the same across all translation units. To make __declspec(dllimport) useful, this means that a dllimported function must also obey this rule. MSVC implements this by dynamically querying the import address table located in the linked executable. This means that the address of such a function in C++ is not constant (which violates other rules). However, the C language has no notion of ODR nor does it permit dynamic initialization whatsoever. This requires implementations to _not_ dynamically query the import address table and instead utilize a wrapper function that will be synthesized by the linker which will eventually query the import address table. The effect this has is, to say the least, perplexing. Consider the following C program: __declspec(dllimport) void f(void); typedef void (*fp)(void); static const fp var = &f; const fp fun() { return &f; } int main() { return fun() == var; } MSVC will statically initialize "var" with the address of the wrapper function and "fun" returns the address of the actual imported function. This means that "main" will return false! Note that LLVM's optimizers are strong enough to figure out that "main" should return true. However, this result is dependent on having optimizations enabled! N.B. This change also permits the usage of dllimport declarators inside of template arguments; they are sufficiently constant for such a purpose. Add tests to make sure we don't regress here. llvm-svn: 211677
* Added a test to ensure -Wimplicit-fallthrough works with -fblocks correctly.Alexander Kornienko2014-06-251-0/+19
| | | | llvm-svn: 211676
* Fix unresolved symbols when loading gold pluginAlexey Volkov2014-06-251-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D4275 llvm-svn: 211675
* [ELF] Add two new virtual functions to the `OutputELFWriter` class to controlSimon Atanasyan2014-06-259-41/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dynamic symbol table populating and DT_NEEDED tag creation. The `isDynSymEntryRequired` function returns true if the specified shared library atom requires a dynamic symbol table entry. The `isNeededTagRequired` function returns true if we need to create DT_NEEDED tag for the shared library defined specified shared atom. By default the both functions return true. So there is no functional changes for all targets except MIPS. Probably we need to spread the same modifications on other ELF targets but I want to implement and fully tested complete set of changes for MIPS target first. For MIPS we create a dynamic symbol table entry for a shared library atom iif this atom is referenced by a regular defined atom. For example, if library L1 defines symbol T1, library L2 defines symbol T2 and uses symbol T1 and executable file E1 uses symbol T2 but does not use symbol T1 we create an entry in the E1 dynamic symbol table for symbol T2 and do not create an entry for T1. The patch creates DT_NEEDED tags for shared libraries contain shared library atoms which a) referenced by regular defined atoms; b) have corresponding copy dynamic relocations (R_MIPS_COPY). Now the patch does not take in account --as-needed / --no-as-needed command line options. So it is too restrictive and create DT_NEEDED tags for really needed shared libraries only. I plan to fix that by subsequent patches. llvm-svn: 211674
* [LICM] Don't create more than one copy of an instruction per loop exit block ↵Evgeniy Stepanov2014-06-252-24/+63
| | | | | | | | | | | | | | | | | | | | when sinking. Fixes exponential compilation complexity in PR19835, caused by LICM::sink not handling the following pattern well: f = op g e = op f, g d = op e c = op d, e b = op c a = op b, c When an instruction with N uses is sunk, each of its operands gets N new uses (all of them - phi nodes). In the example above, if a had 1 use, c would have 2, e would have 4, and g would have 8. llvm-svn: 211673
* [OPENMP] OMPSimdDirective and OMPForDirective: added initialization for ↵Alexey Bataev2014-06-253-29/+36
| | | | | | CollapsedNum member. llvm-svn: 211672
* test/ScopInfo: Remove %defaultOpts and list passes explicitlyTobias Grosser2014-06-2517-17/+17
| | | | | | | | | | Due to bad habit we sometimes used a variable %defaultOpts that listed a set of passes commonly run to prepare for Polly. None of these test cases actually needs special preparation and only two of them need the 'basicaa' to be scheduled. Scheduling the required alias analysis explicitly makes the test cases clearer. llvm-svn: 211671
* Clean up XFAILed test casesTobias Grosser2014-06-2511-453/+105
| | | | | | | | We had a set of test cases that have been incomplete and XFAILED. This patch completes a couple of the interesting ones and removes the ones which seem redundant or not sufficiently reduced to be useful. llvm-svn: 211670
* Replace GCC-specific intrinsic with portable alternative.Zachary Turner2014-06-251-1/+5
| | | | | | | | | | | | | | | | Not all supported compilers have GCC intrinsics, so this patch uses the correct portable alternative. Additionally, this patch fixes an off-by-one error. __builtin_ffs returns the 1-based index of the least-significant 1-bit, but the function expects the base 2 logarithm of the number, which is equivalent to the 0-based index of the least-significant 1-bit. Reviewed by: Keno Fischer Differential Revision: http://reviews.llvm.org/D4284 llvm-svn: 211669
* Fix another asserting method in the null streamer.Rafael Espindola2014-06-252-1/+2
| | | | llvm-svn: 211668
* Don't go through the TypeSourceInfo when getting the SourceRange.Zachary Turner2014-06-251-3/+3
| | | | | | | | | | | | VarDecl provides a method getSourceRange(), which provides a more robust way of getting the SourceRange since the TypeSourceInfo can be null in certain cases. Reviewed by: majnemer Differential Revision: http://reviews.llvm.org/D4281 llvm-svn: 211667
* Fix a regression from r211653.Rafael Espindola2014-06-252-1/+18
| | | | | | | The method was empty in the null streamer but I mistakenly replaced it with the aborting one in MCStreamer. llvm-svn: 211666
* [Driver] Follow-up to r211598, r211663. Do not build a dynamic linkerSimon Atanasyan2014-06-251-6/+6
| | | | | | path using sub-strings concatenation. Return the whole string explicitly. llvm-svn: 211665
* MCNullStreamer.cpp: Roll back a few empty methods that have been marked as ↵NAKAMURA Takumi2014-06-251-1/+2
| | | | | | | | | | | unreachable in MCStreamer.cpp. void EmitCOFFSecRel32(MCSymbol const *Symbol) override {} void EmitGPRel32Value(const MCExpr *Value) override {} It should fix crash like "llc -mtriple=i686-cygwin -filetype=null". llvm-svn: 211664
* Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of ↵NAKAMURA Takumi2014-06-251-3/+3
| | | | | | StringRef, since r211598 has introduced manipulation of return string. llvm-svn: 211663
* VirtualFileSystemTest.cpp: Get rid of initializer list on std::vector, to ↵NAKAMURA Takumi2014-06-251-21/+29
| | | | | | appease msc17. llvm-svn: 211662
* Reformat.NAKAMURA Takumi2014-06-252-13/+12
| | | | llvm-svn: 211661
* [OPENMP] Improved code and replaced struct by lambda.Alexey Bataev2014-06-252-21/+16
| | | | llvm-svn: 211660
* CodeGen/X86/pr20088.ll: Add -march=x86-64, or llc fails due to non-x86 ↵NAKAMURA Takumi2014-06-251-1/+1
| | | | | | default target. llvm-svn: 211659
* Added an option to turn OFF the "detach on error" behavior that was addedJim Ingham2014-06-2520-17/+176
| | | | | | | | to debugserver when launching processes. <rdar://problem/16216199> llvm-svn: 211658
* Implement predefined stdint macrosJF Bastien2014-06-255-9/+1856
| | | | | | | | | | | | Add predefined stdint macros that match the given patterns: U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE} U?INT{PTR,MAX}_{MAX,TYPE} http://reviews.llvm.org/D4141 Author: binji llvm-svn: 211657
* Use SourceMgr::getMemoryBuffer() in a couple of placesAlp Toker2014-06-252-3/+3
| | | | | | Cleanup only. llvm-svn: 211656
* Remove extra newline from log PrintfEd Maste2014-06-251-1/+1
| | | | | | | | | | | Clean up this one specifically, as it has the effect of double-spacing the list of thread stop reasons, and substantially bloats the log file when opening a core with hundreds of threads. There are other cases of extra newlines. Some of them do increase readability, so avoid a general sweep for now. llvm-svn: 211655
* Fix parsing nested __if_exists blocksReid Kleckner2014-06-252-8/+24
| | | | | | | | | | | Rather than having kw___if_exists be a special case of ParseCompoundStatementBody, we can look for kw___if_exists in the big switch over for valid statement tokens in ParseStatementOrDeclaration. Nested __if_exists blocks are used in the DECLARE_REGISTRY_RESOURCEID macro from atlcom.h. llvm-svn: 211654
* Move some trivial methods up to MCStreamer.Rafael Espindola2014-06-254-104/+57
| | | | | | This saves some duplicated boilerplate in RecordStreamer and NullStreamer. llvm-svn: 211653
* [RuntimeDyld] Adds the necessary hooks to MCJIT to be able to debug generatedLang Hames2014-06-254-12/+133
| | | | | | | | MachO files using the GDB JIT debugging interface. Patch by Keno Fischer. Thanks Keno! llvm-svn: 211652
* Simplify the handling of .cfi_endproc.Rafael Espindola2014-06-256-26/+9
| | | | | | No functionality change. llvm-svn: 211651
* Add a missing test for the __if_exists extensionReid Kleckner2014-06-251-0/+10
| | | | | | | MSVC does not create a new scope for the body of an __if_exists compound statement. Clang already gets this right today, but it was untested. llvm-svn: 211650
* Split tests for __if_exists out into their own fileReid Kleckner2014-06-252-97/+93
| | | | llvm-svn: 211649
* MS ABI: Ignore dll attributes on partial template specializationsHans Wennborg2014-06-245-3/+57
| | | | llvm-svn: 211648
* Merge handleDLLImportAttr and handleDLLExportAttr into one function.Hans Wennborg2014-06-241-13/+6
| | | | llvm-svn: 211647
* Simplify EmitLabel.Rafael Espindola2014-06-242-6/+1
| | | | | | | All the "real" streamers were already calling to MCStreamer::EmitLabel to do part of the work. llvm-svn: 211646
* [FastISel][X86] Fold XALU condition into branch and compare.Juergen Ributzka2014-06-242-2/+498
| | | | | | | Optimize the codegen of select and branch instructions to directly use the EFLAGS from the {s|u}{add|sub|mul}.with.overflow intrinsics. llvm-svn: 211645
* R600/SI: Use a ComplexPattern for MUBUF storesTom Stellard2014-06-243-36/+67
| | | | | | | | Now that non-leaf ComplexPatterns are allowed we can fold all the MUBUF store patterns into the instruction definition. We will also be able to reuse this new ComplexPattern for MUBUF loads and atomic operations. llvm-svn: 211644
* R600: Promote i64 stores to v2i32Tom Stellard2014-06-244-5/+11
| | | | | | Now we need only one 64-bit pattern for stores. llvm-svn: 211643
* ldr-pseudo-obj-errors.s: Fix silly copypasto.NAKAMURA Takumi2014-06-241-1/+1
| | | | llvm-svn: 211642
* Provide a better diagnostic when braces are put before the identifier.Richard Trieu2014-06-245-6/+351
| | | | | | | | | | | | | | | | | When a user types: int [4] foo; assume that the user means: int foo[4]; Update the information for 'foo' to prevent additional errors, and provide a fix-it hint to move the brackets to the correct location. Additionally, suggest parens for types that require it, such as: int [4] *foo; to: int (*foo)[4]; llvm-svn: 211641
* llvm/test/MC/AArch64/ldr-pseudo-obj-errors.s: Add -triple=aarch64-linux. ↵NAKAMURA Takumi2014-06-241-1/+1
| | | | | | | AArch64 is unaware of PECOFF for now. FIXME: This should pass for also targeting aarch64-darwin. llvm-svn: 211640
* Print a=b as an assignment.Rafael Espindola2014-06-2417-51/+19
| | | | | | | | | | | In assembly the expression a=b is parsed as an assignment, so it should be printed as one. This remove a truly horrible hack for producing a label with "a=.". It would be used by codegen but would never be reached by the asm parser. Sorry I missed this when it was first committed. llvm-svn: 211639
* Patch from Keno Fischer to enable JITLoaderGDB with mach-o file support.Greg Clayton2014-06-249-11/+107
| | | | | | The patch is as is with the functionality left disabled for apple vendors because of performance regressions. If this is enabled it ends up searching for symbols in all shared libraries that are loadeded. llvm-svn: 211638
* R600: Fix inconsistency in rsq instructions.Matt Arsenault2014-06-2413-14/+109
| | | | | | | | | | | | | R600 was using a clamped version of rsq, but SI was not. Add a new rsq_clamped intrinsic and use them consistently. It's unclear to me from the documentation what behavior the R600 instructions have, so I assume they have the legacy behavior described by the SI documents. For R600, use RECIPSQRT_IEEE for both llvm.AMDGPU.rsq.legacy and llvm.AMDGPU.rsq. R600 also has RECIPSQRT_FF, which I'm not sure how it fits in here. llvm-svn: 211637
* Rework fix in r201744. You really DO need to waitpid twice to get theJim Ingham2014-06-245-11/+13
| | | | | | | | | | | process fully reaped. The race & bad behavior was because we were letting the reaping thread in LLDB to also set the Process exit status, so debugserver would sometimes be shut down before it got a chance to report the exit status, and then we got confused. <rdar://problem/16555850> llvm-svn: 211636
* Fix up Windows build for the SBUnixSignals addition.Todd Fiala2014-06-242-0/+7
| | | | | | Change by Zachary Turner. llvm-svn: 211635
OpenPOWER on IntegriCloud