summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Objective-C. Prevents a crash generating AST for aFariborz Jahanian2014-09-151-0/+4
| | | | | | | | | a property assignment due to numerous user errors. Cannot come up with a reasonable test case due to array of user errors before the crash point. rdar://17813651. llvm-svn: 217825
* Remove dead code in SimplifyCFGJingyue Wu2014-09-151-43/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: UsedByBranch is always true according to how BonusInst is defined. Test Plan: Passes check-all, and also verified if (BonusInst && !UsedByBranch) { ... } is never entered during check-all. Reviewers: resistor, nadav, jingyue Reviewed By: jingyue Subscribers: llvm-commits, eliben, meheff Differential Revision: http://reviews.llvm.org/D5324 llvm-svn: 217824
* [FastISel][AArch64] Improve floating-point compare support.Juergen Ributzka2014-09-152-147/+218
| | | | | | | | Add support for the last two missing fcmp condition codes: UEQ and ONE. This fixes rdar://problem/18341575. llvm-svn: 217823
* [FastISel] Move optimizeCmpPredicate to FastISel base class. NFC.Juergen Ributzka2014-09-153-40/+42
| | | | | | Make the optimizeCmpPredicate function available to all targets. llvm-svn: 217822
* Add mips32 r1 to the list of supported targets for Mips fast-iselReed Kotler2014-09-157-10/+37
| | | | | | | | | | | | | | | | | | | | | Summary: Expand list of supported targets for Mips to include mips32 r1. Previously it only include r2. More patches are coming where there is a difference but in the current patches as pushed upstream, r1 and r2 are equivalent. Test Plan: simplestorefp1.ll add new build bots at mips to test this flavor at both -O0 and -O2 Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D5306 llvm-svn: 217821
* Fix the build for MSVC, it doesn't support extended sizeofDavid Majnemer2014-09-151-4/+4
| | | | llvm-svn: 217820
* [x86] Start fixing our emission of ADDSUBPS and ADDSUBPD instructions byChandler Carruth2014-09-154-26/+37
| | | | | | | | | | | | | | | | introducing a synthetic X86 ISD node representing this generic operation. The relevant patterns for mapping these nodes into the concrete instructions are also added, and a gnarly bit of C++ code in the target-specific DAG combiner is replaced with simple code emitting this primitive. The next step is to generically combine blends of adds and subs into this node so that we can drop the reliance on an SSE4.1 ISD node (BLENDI) when matching an SSE3 feature (ADDSUB). llvm-svn: 217819
* use std::atomic<> to protect variables being accessed by multiple threadsTodd Fiala2014-09-158-14/+23
| | | | | | | | | | There are several places where multiple threads are accessing the same variables simultaneously without any kind of protection. I propose using std::atomic<> to make it safer. I did a special build of lldb, using the google tool 'thread sanitizer' which identified many cases of multiple threads accessing the same memory. std::atomic is low overhead and does not use any locks for simple types such as int/bool. See http://reviews.llvm.org/D5302 for more details. Change by Shawn Best. llvm-svn: 217818
* Major rewrite of linking strategy for sanitizer runtimes on Linux.Alexey Samsonov2014-09-152-173/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change 1: we used to add static sanitizer runtimes at the very beginning of the linker invocation, even before crtbegin.o, which is gross and not correct in general. Fix this: now addSanitizerRuntimes() adds all sanitizer-related link flags to the end of the linker invocation being constructed. It means, that we should call this function in the correct place, namely, before AddLinkerInputs() to make sure sanitizer versions of library functions will be preferred. Change 2: Put system libraries sanitizer libraries depend on at the end of the linker invocation, where all the rest system libraries are located. Respect --nodefaultlibs and --nostdlib flags. This is another way to fix PR15823. Original fix landed in r215940 put "-lpthread" and friends immediately after static ASan runtime, before the user linker inputs. This caused significant slowdown in dynamic linker for large binaries linked against thousands of shared objects. Instead, to mark system libraries as DT_NEEDED we prepend them with "--no-as-needed" flag, discarding the "-Wl,--as-needed" flag that could be provided by the user. Otherwise, this change is a code cleanup. Instead of having a special method for each sanitizer, we introduce a function collectSanitizerRuntimes() that analyzes -fsanitize= flags and returns the set of static and shared libraries that needs to be linked. llvm-svn: 217817
* Fix JITLoaderGDB for 64-bit host and 32-bit targetTodd Fiala2014-09-152-8/+26
| | | | | | | | | | | | | | There are target pointer members in struct jit_code_entry and jit_descriptor. Data layout of those structures should be decided by target, not host. This fixes JITLoaderGDB for 64-bit host and 32-bit target. See http://reviews.llvm.org/D5339 for more details. Change by Tong Shen. llvm-svn: 217816
* Adjust lld to handle LLVM r217812David Majnemer2014-09-151-1/+2
| | | | llvm-svn: 217815
* Replace dead links to "Hacker's Delight" with general references. NFC.Sanjay Patel2014-09-153-10/+10
| | | | llvm-svn: 217814
* Reduce code duplication a bit more. NFC.Rafael Espindola2014-09-152-24/+2
| | | | llvm-svn: 217813
* MC: Add support for BigObjDavid Majnemer2014-09-157-88/+140
| | | | | | | | | | | | | | | | | | | | | | | | Teach WinCOFFObjectWriter how to write -mbig-obj style object files; these object files allow for more sections inside an object file. Our support for BigObj is notably different from binutils and cl: we implicitly upgrade object files to BigObj instead of asking the user to compile the same file *again* but with another flag. This matches up with how LLVM treats ELF variants. This was tested by forcing LLVM to always emit BigObj files and running the entire test suite. A specific test has also been added. I've lowered the maximum number of sections in a normal COFF file, VS "14" CTP 3 supports no more than 65279 sections. This is important otherwise we might not switch to BigObj quickly enough, leaving us with a COFF file that we couldn't link. yaml2obj support is all that remains to implement. Differential Revision: http://reviews.llvm.org/D5349 llvm-svn: 217812
* Reduce code duplication a bit more. NFC.Rafael Espindola2014-09-154-24/+30
| | | | llvm-svn: 217811
* Add return that was lost somehow in my last commit.Benjamin Kramer2014-09-151-0/+1
| | | | llvm-svn: 217810
* Simplify the code a bit, NFC.Rafael Espindola2014-09-152-21/+4
| | | | | | hasConstructorVariants is always true for MS and false for Itanium. llvm-svn: 217809
* Remove ancient hack that was emulating move semantics with reference counting.Benjamin Kramer2014-09-151-20/+13
| | | | | | No functionality change. llvm-svn: 217808
* Move emitCXXStructor to CGCXXABI.Rafael Espindola2014-09-156-83/+164
| | | | | | A followup patch will address the code duplication. llvm-svn: 217807
* llvm/test/CodeGen/X86/peephole-fold-movsd.ll: Relax an expression for win32.NAKAMURA Takumi2014-09-151-1/+1
| | | | llvm-svn: 217806
* Add a triple to fix the bots.Rafael Espindola2014-09-151-1/+1
| | | | llvm-svn: 217805
* Create a emitCXXStructor function and make the existing emitCXXConstructor andRafael Espindola2014-09-153-49/+58
| | | | | | | | emitCXXDestructor static helpers. A next patch will make it a helper in CGCXXABI. llvm-svn: 217804
* Fix memory leak in error paths in YAMLTraits by using unique_ptrDavid Blaikie2014-09-152-36/+28
| | | | | | | | | There's some other cleanup that could happen here, but this is at least the mechanical transformation to unique_ptr. Derived from a patch by Anton Yartsev. llvm-svn: 217803
* [Fix] Rewire the Region after a unconditional entry edge is createdJohannes Doerfert2014-09-152-11/+111
| | | | | | | | | | | | We use SplitEdge to split a conditional entry edge of the SCoP region. However, SplitEdge can cause two different situations (depending on whether or not the edge is critical). This patch tests which one is present and deals with the former unhandled one. It also refactors and unifies the case we have to change the basic blocks of the SCoP to new ones (see replaceScopAndRegionEntry). llvm-svn: 217802
* Fix a lot of confusion around inserting nops on empty functions.Rafael Espindola2014-09-158-48/+39
| | | | | | | | | | | | | | | | On MachO, and MachO only, we cannot have a truly empty function since that breaks the linker logic for atomizing the section. When we are emitting a frame pointer, the presence of an unreachable will create a cfi instruction pointing past the last instruction. This is perfectly fine. The FDE information encodes the pc range it applies to. If some tool cannot handle this, we should explicitly say which bug we are working around and only work around it when it is actually relevant (not for ELF for example). Given the unreachable we could omit the .cfi_def_cfa_register, but then again, we could also omit the entire function prologue if we wanted to. llvm-svn: 217801
* [CodeGenPrepare][AddressingModeMatcher] Fix a think-o for the sext(zext) -> ↵Quentin Colombet2014-09-152-7/+72
| | | | | | | | | | | zext promotion introduced in r217629. We were returning the old sext instead of the new zext as the promoted instruction! Thanks Joerg Sonnenberger for the test case. llvm-svn: 217800
* [X86] Fix a bug in X86's peephole optimization.Akira Hatanaka2014-09-152-14/+55
| | | | | | | | | | | | | | | | | | | | | | Peephole optimization was folding MOVSDrm, which is a zero-extending double precision floating point load, into ADDPDrr, which is a SIMD add of two packed double precision floating point values. (before) %vreg21<def> = MOVSDrm <fi#0>, 1, %noreg, 0, %noreg; mem:LD8[%7](align=16)(tbaa=<badref>) VR128:%vreg21 %vreg23<def,tied1> = ADDPDrr %vreg20<tied0>, %vreg21; VR128:%vreg23,%vreg20,%vreg21 (after) %vreg23<def,tied1> = ADDPDrm %vreg20<tied0>, <fi#0>, 1, %noreg, 0, %noreg; mem:LD8[%7](align=16)(tbaa=<badref>) VR128:%vreg23,%vreg20 X86InstrInfo::foldMemoryOperandImpl already had the logic that prevented this from happening. However the check wasn't being conducted for loads from stack objects. This commit factors out the logic into a new function and uses it for checking loads from stack slots are not zero-extending loads. rdar://problem/18236850 llvm-svn: 217799
* Use intrusive refcounted pointers to manage RopeRefCountString lifetime.Benjamin Kramer2014-09-152-48/+14
| | | | | | | | | std::shared_ptr<char []> would be even nicer, but shared_ptr doesn't work with arrays :( No functionality change. llvm-svn: 217798
* CHECK-LABELize testMatt Arsenault2014-09-152-19/+19
| | | | llvm-svn: 217797
* Use dyn_cast<> instead of isa<> and cast<>Matt Arsenault2014-09-151-1/+2
| | | | llvm-svn: 217796
* Add a --help (-h) option to "command script add" that enables users to ↵Enrico Granata2014-09-154-13/+34
| | | | | | | | | | | | | define a one-liner short help for their command Also, in case they don't define any, change the default from "Run Python function <blah>" into "For more information run help <blah>" The core issue here is that Python only allows one docstring per function, so we can't really attach both a short and a long help to the same command easily There are alternatives but this is not a pressing enough concern to go through the motions quite yet Fixes rdar://18322737 llvm-svn: 217795
* [MCJIT] Start Stringref-izing the ExecutionEngine interface.Lang Hames2014-09-154-5/+4
| | | | | | | | | More methods to follow. Using StringRef allows us the EE interface to work with more string types without forcing construction of std::strings. llvm-svn: 217794
* unique_ptrify ChainedDiagnosticConsumer's ctor parametersDavid Blaikie2014-09-154-16/+19
| | | | llvm-svn: 217793
* Teach Clang how to use response files when calling other toolsReid Kleckner2014-09-1511-65/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Rafael Auler! This patch addresses PR15171 and teaches Clang how to call other tools with response files, when the command line exceeds system limits. This is a problem for Windows systems, whose maximum command-line length is 32kb. I introduce the concept of "response file support" for each Tool object. A given Tool may have full support for response files (e.g. MSVC's link.exe) or only support file names inside response files, but no flags (e.g. Apple's ld64, as commented in PR15171), or no support at all (the default case). Therefore, if you implement a toolchain in the clang driver and you want clang to be able to use response files in your tools, you must override a method (getReponseFileSupport()) to tell so. I designed it to support different kinds of tools and internationalisation needs: - VS response files ( UTF-16 ) - GNU tools ( uses system's current code page, windows' legacy intl. support, with escaped backslashes. On unix, fallback to UTF-8 ) - Clang itself ( UTF-16 on windows, UTF-8 on unix ) - ld64 response files ( only a limited file list, UTF-8 on unix ) With this design, I was able to test input file names with spaces and international characters for Windows. When the linker input is large enough, it creates a response file with the correct encoding. On a Mac, to test ld64, I temporarily changed Clang's behavior to always use response files regardless of the command size limit (avoiding using huge command line inputs). I tested clang with the LLVM test suite (compiling benchmarks) and it did fine. Test Plan: A LIT test that tests proper response files support. This is tricky, since, for Unix systems, we need a 2MB response file, otherwise Clang will simply use regular arguments instead of a response file. To do this, my LIT test generate the file on the fly by cloning many -DTEST parameters until we have a 2MB file. I found out that processing 2MB of arguments is pretty slow, it takes 1 minute using my notebook in a debug build, or 10s in a Release build. Therefore, I also added "REQUIRES: long_tests", so it will only run when the user wants to run long tests. In the full discussion in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130408/171463.html, Rafael Espindola discusses a proper way to test llvm::sys::argumentsFitWithinSystemLimits(), and, there, Chandler suggests to use 10 times the current system limit (20MB resp file), so we guarantee that the system will always use response file, even if a new linux comes up that can handle a few more bytes of arguments. However, by testing with a 20MB resp file, the test takes long 8 minutes just to perform a silly check to see if the driver will use a response file. I found it to be unreasonable. Thus, I discarded this approach and uses a 2MB response file, which should be enough. Reviewers: asl, rafael, silvas Reviewed By: silvas Subscribers: silvas, rnk, thakis, cfe-commits Differential Revision: http://reviews.llvm.org/D4897 llvm-svn: 217792
* Fix memory leak of raw_ostreams in LogDiagnosticPrinter handling.David Blaikie2014-09-153-21/+17
| | | | | | | | | | | | | | | This is another case of conditional ownership (in this case a raw reference, plus a boolean to indicate whether the referenced object should be deleted). While it's not ideal, I prefer to make the ownership explicit with a unique_ptr than using a boolean flag (though it does make the reference and the unique_ptr redundant in the sense that they both refer to the same memory). At some point we might write a reusable conditional ownership pointer (a stateful custom deleter for a unique_ptr may be appropriate). Based on a patch from a patch by Anton Yartsev. llvm-svn: 217791
* Add -fseh-exceptions for MinGW-w64Reid Kleckner2014-09-158-0/+40
| | | | | | | | | | | | | | This adds a flag called -fseh-exceptions that uses the native Windows .pdata and .xdata unwind mechanism to throw exceptions. The other EH possibilities are DWARF and SJLJ exceptions. Patch by Martell Malone! Reviewed By: asl, rnk Differential Revision: http://reviews.llvm.org/D3419 llvm-svn: 217790
* R600/SI: Prefer selecting more e64 instruction forms.Matt Arsenault2014-09-157-16/+88
| | | | | | | | Add some more tests to make sure better operand choices are still made. Leave some cases that seem to have no reason to ever be e64 alone. llvm-svn: 217789
* lldb fix ARM64 register access - llgs sideTodd Fiala2014-09-151-0/+104
| | | | | | | | See http://reviews.llvm.org/D5341 for more details. Change by Paul Osmialowski. llvm-svn: 217788
* R600/SI: Make sure double vector fmul is testedMatt Arsenault2014-09-151-4/+29
| | | | llvm-svn: 217787
* Add unit test for r217454Ed Maste2014-09-151-0/+4
| | | | llvm-svn: 217786
* R600/SI: Add some mubuf testcases.Matt Arsenault2014-09-151-0/+34
| | | | | | | | | | | | | | | | I noticed some odd looking cases where addr64 wasn't set when storing to a pointer in an SGPR. This seems to be intentional, and partially tested already. The documentation seems to describe addr64 in terms of which registers addressing modifiers come from, but I would expect to always need addr64 when using 64-bit pointers. If no offset is applied, it makes sense to not need to worry about doing a 64-bit add for the final address. A small immediate offset can be applied, so is it OK to not have addr64 set if a carry is necessary when adding the base pointer in the resource to the offset? llvm-svn: 217785
* Pretty print attributes associated with record declarations.Aaron Ballman2014-09-154-1/+15
| | | | llvm-svn: 217784
* Objective-C SDK modernizer. Do not modernize an enum Fariborz Jahanian2014-09-153-1/+17
| | | | | | | which already has the underlying interger type specification. // rdar://1826225 llvm-svn: 217783
* Handle ARM ELF symbols properly: skip $t* and $a* symbols in ObjectFileELF.Todd Fiala2014-09-151-0/+26
| | | | | | | | | | | | | | | ELF objects contain marker symbols to differentiate between ARM and THUMB functions. Instead of storing them internally and having garbage show up when symbols are searched for by the user, we can just skip them and not store them at all, as we never actually need them. Change by Stephane Sezer. Tested: Ubuntu 14.04 x86_64 MacOSX 10.9.4 x86_64 llvm-svn: 217782
* Adding some FIXMEs to the attribute emitter code regarding whether pretty ↵Aaron Ballman2014-09-151-0/+6
| | | | | | printing enumerators should use quoted string literals, or identifiers. NFC. llvm-svn: 217781
* Spell out the template args for compilers having issues with the injected classBenjamin Kramer2014-09-151-1/+2
| | | | | | name. llvm-svn: 217780
* Properly decode architecture type in ↵Todd Fiala2014-09-151-1/+21
| | | | | | | | | | | | | | | | | | | GDBRemoteCommunicationClient::GetCurrentProcessInfo. Instead of forcing the remote arch type to MachO all the time, we inspect the OS/vendor that the remote debug server reports and use it to set the arch type to MachO, ELF or COFF accordingly. See thread here for more context: http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140915/012968.html Change by Stephane Sezer. Tested: MacOSX 10.9.4 x86_64 Ubuntu 14.04 x86_64 llvm-svn: 217779
* Use IntrusiveRefCntPtr to manage the lifetime of BitCodeAbbrevs.Benjamin Kramer2014-09-154-101/+19
| | | | | | | | | This doesn't change the interface or gives additional safety but removes a ton of retain/release boilerplate. No functionality change. llvm-svn: 217778
* R600/SI: Add preliminary support for flat address spaceMatt Arsenault2014-09-1521-11/+622
| | | | llvm-svn: 217777
* R600/SI: Fix promote alloca pass breaking addrspacecastMatt Arsenault2014-09-151-0/+7
| | | | llvm-svn: 217776
OpenPOWER on IntegriCloud