summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Verifier: Don't reject varargs callee cleanup functionsReid Kleckner2014-08-294-12/+83
| | | | | | | | | | | | | | | | | | We've rejected these kinds of functions since r28405 in 2006 because it's impossible to lower the return of a callee cleanup varargs function. However there are lots of legal ways to leave such a function without returning, such as aborting. Today we can leave a function with a musttail call to another function with the correct prototype, and everything works out. I'm removing the verifier check declaring that a normal return from such a function is UB. Reviewed By: nlewycky Differential Revision: http://reviews.llvm.org/D5059 llvm-svn: 216779
* Fix for PR20660, where unexpanded parameter pack in function parameter ↵Larisse Voufo2014-08-293-7/+64
| | | | | | clause causes clang to crash. llvm-svn: 216778
* Add a comment, no functional change.Nico Weber2014-08-291-1/+1
| | | | llvm-svn: 216777
* Remove spurious mask operations from AArch64 add->compares on 16 and 8 bit ↵Louis Gerbarg2014-08-292-0/+532
| | | | | | | | | | | | | | | | | | | | | | | | | | values This patch checks for DAG patterns that are an add or a sub followed by a compare on 16 and 8 bit inputs. Since AArch64 does not support those types natively they are legalized into 32 bit values, which means that mask operations are inserted into the DAG to emulate overflow behaviour. In many cases those masks do not change the result of the processing and just introduce a dependent operation, often in the middle of a hot loop. This patch detects the relevent DAG patterns and then tests to see if the transforms are equivalent with and without the mask, removing the mask if possible. The exact mechanism of this patch was discusses in http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074444.html There is a reasonably good chance there are missed oppurtunities due to similiar (but not identical) DAG patterns that could be funneled into this test, adding them should be simple if we see test cases. Tests included. rdar://13754426 llvm-svn: 216776
* X86: Fix conflict over ESI between base register and rep;movslReid Kleckner2014-08-293-6/+136
| | | | | | | | | | | | | | The new solution is to not use this lowering if there are any dynamic allocas in the current function. We know up front if there are dynamic allocas, but we don't know if we'll need to create stack temporaries with large alignment during lowering. Conservatively assume that we will need such temporaries. Reviewed By: hans Differential Revision: http://reviews.llvm.org/D5128 llvm-svn: 216775
* another typoSanjay Patel2014-08-291-1/+1
| | | | llvm-svn: 216774
* typoSanjay Patel2014-08-291-1/+1
| | | | llvm-svn: 216773
* [PECOFF] Fix AMD64_REL_[1-5] and AMD64_SECTION relocationsRui Ueyama2014-08-295-177/+84
| | | | | | | | | | | | | | | | | | | | | | | | I hope this is the last fix for x64 relocations as I've wasted a few days on this. This caused a mysterious issue that some C++ programs crash on startup. It was because a null pointer is passed as argv to main. __tmainCRTStartup calls main, but before that it calls all initialization routines between .text$xc_a and .text$xc_z. pre_cpp_init is one of such routines, and it is the one who initializes a heap pointer for argv for later use. That routine was not called for some reason. It turned out that __tmainCRTStartup was skipping a block of code because of the relocation bug. A condition in the function depends on a memory load, and that memory load was referring a wrong location. As a result a jump instruction took the wrong branch, skipping pre_cpp_init and so on. This patch fixes the issue. Also added more tests to fix them once and for all. llvm-svn: 216772
* Relax the constraint more in MemoryDependencyAnalysis.cppRobin Morisset2014-08-293-64/+147
| | | | | | | | Even loads/stores that have a stronger ordering than monotonic can be safe. The rule is no release-acquire pair on the path from the QueryInst, assuming that the QueryInst is not atomic itself. llvm-svn: 216771
* Fix a test broken by r216564.Todd Fiala2014-08-291-4/+6
| | | | | | | | | | | | | | llgs Linux is no longer doing the translation to some gdb fixed signal numbers. This change modifies the test method to take in the signo expected for a segfault. The debugserver test uses the fixed gdb number, and everything else uses signal.SIGSEGV for the platform. Sidenote: I somehow did not see this reported in multicore tests. I will need to verify that we aren't missing test failures in that script. I need to verify why this wasn't more obvious with test/dosep.py. llvm-svn: 216770
* Objective-C [qoi]. If property is going to be implementedFariborz Jahanian2014-08-293-7/+22
| | | | | | | | in the super class, do not issue the warning about property in current class's protocol will not be auto synthesized. // rdar://18179833 llvm-svn: 216769
* [X86] Refactor X86ISelDAGToDAG::SelectAtomicLoadArith - NFCRobin Morisset2014-08-291-10/+17
| | | | | | | | | | | | | | | | | | | Summary: Mostly renaming the (not very explicit) variables Tmp0, .. Tmp4, and grouping related statements together, along with a few lines of comments for the surprising parts. No functional change intended. Test Plan: make check-all Reviewers: jfb Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5088 llvm-svn: 216768
* unique_ptrify the raw_ostream argument to clang::serialized_diags::createDavid Blaikie2014-08-293-13/+13
| | | | llvm-svn: 216767
* lldb - fix misleading "valid target indexes are" error messageTodd Fiala2014-08-291-3/+10
| | | | | | | | See http://reviews.llvm.org/D4430 for more details. Change by Paul Osmialowski. llvm-svn: 216766
* unique_ptrify clang::ento::createCheckerManagerDavid Blaikie2014-08-293-22/+15
| | | | llvm-svn: 216765
* unique_ptrify PathDiagnosticConsumer::HandlePathDiagnosticDavid Blaikie2014-08-293-9/+8
| | | | | | | FoldingSet, another intrusive data structure that could use some unique_ptr love on its interfaces. Eventually. llvm-svn: 216764
* Add an option to silence all analyzer warnings.Anna Zaks2014-08-297-2/+36
| | | | | | | | | | | | People have been incorrectly using "-analyzer-disable-checker" to silence analyzer warnings on a file, when analyzing a project. Add the "-analyzer-disable-all-checks" option, which would allow the suppression and suggest it as part of the error message for "-analyzer-disable-checker". The idea here is to compose this with "--analyze" so that users can selectively opt out specific files from static analysis. llvm-svn: 216763
* unique_ptrify thep passing of BugReports to BugReportEquivClassDavid Blaikie2014-08-292-6/+8
| | | | | | | | I suspect llvm::ilist should take elements by unique_ptr, since it does take ownership of the element (by stitching it into the linked list) - one day. llvm-svn: 216761
* Add missing mach-o EXPORT_SYMBOL_FLAG_KIND_ABSOLUTENick Kledzik2014-08-291-2/+3
| | | | llvm-svn: 216759
* unique_ptrify HeaderMap::FileBufferDavid Blaikie2014-08-292-12/+8
| | | | llvm-svn: 216758
* Tablegen fixes for new syntax when initializing bits from variables.Jean-Luc Duprat2014-08-292-1/+12
| | | | | | Followup to r215086. llvm-svn: 216757
* unique_ptrify Preprocessor's TokenLexerCacheDavid Blaikie2014-08-293-14/+13
| | | | llvm-svn: 216756
* unique_ptrify the result of CFG::buildCFG/CFGBuilder::buildCFGDavid Blaikie2014-08-294-19/+13
| | | | llvm-svn: 216755
* unique_ptrify the diagnostics in CXDiagnosticSetImplDavid Blaikie2014-08-293-27/+25
| | | | llvm-svn: 216754
* Objective-C. Tweak diagnosing properties that are not auto-synthesized.Fariborz Jahanian2014-08-298-34/+54
| | | | | | | | | | | Do not warn when property declared in class's protocol will be auto-synthesized by its uper class implementation because super class has also declared this property while this class has not. Continue to warn if current class has declared the property also (because this declaration will not result in a 2nd synthesis). rdar://18152478 llvm-svn: 216753
* unique_ptrify PathDiagnostic::setEndOfPath's argumentDavid Blaikie2014-08-292-6/+6
| | | | | | | | | | | | | | Again, if shared ownership is the right model here (I assume it is, given graph algorithms & such) this could be tidied up (the 'release' call removed in favor of something safer) by having IntrunsiveRefCntPointer constructible from a unique_ptr. (& honestly I'd probably favor taking a page out of shared_ptr's book, allowing implicit construction from a unique_ptr rvalue, and only allow explicit from a raw pointer - currently IntrusiveRefCntPointer can implicitly own from a raw pointer, which seems unsafe) llvm-svn: 216752
* unique_ptr-ify PathDiagnosticPiece ownershipDavid Blaikie2014-08-295-46/+39
| | | | llvm-svn: 216751
* [FastISel][AArch64] Fix an incorrect kill flag due to a bug in SelectTrunc.Juergen Ributzka2014-08-292-6/+25
| | | | | | | | | | | | | | | | | | | | When we select a trunc instruction we don't emit any code if the type is already i32 or smaller. This is because the instruction that uses the truncated value will deal with it. This behavior can incorrectly transfer a kill flag, which was meant for the result of the truncate, onto the source register. %2 = trunc i32 %1 to i16 ... = ... %2 -> ... = ... vreg1 <kill> ... = ... %1 ... = ... vreg1 This commit fixes this by emitting a COPY instruction, so that the result and source register are distinct virtual registers. This fixes rdar://problem/18178188. llvm-svn: 216750
* Check in a test case for the problem with late-dropped dllimport (PR20803)Hans Wennborg2014-08-291-4/+15
| | | | llvm-svn: 216749
* Consolidate UnixSignals setting/getting in Process.Todd Fiala2014-08-2918-85/+118
| | | | | | | | | | | | | | | | See http://reviews.llvm.org/D5108 for details. This change does the following: * eliminates the Process::GetUnixSignals() virtual method and replaces with a fixed getter. * replaces the Process UnixSignals storage with a shared pointer. * adds a Process constructor variant that can be passed the UnixSignalsSP. When the constructor without the UnixSignalsSP is specified, the Host's default UnixSignals is used. * adds a host-specific version of GetUnixSignals() that is used when we need the host's appropriate UnixSignals variant. * replaces GetUnixSignals() overrides in PlatformElfCore, ProcessGDBRemote, ProcessFreeBSD and ProcessLinux with code that appropriately sets the Process::UnixSignals for the process. This change also enables some future patches that will enable llgs to be used for local Linux debugging. llvm-svn: 216748
* Allow "breakpoint command add" to add commands to more than one breakpoint ↵Jim Ingham2014-08-296-81/+137
| | | | | | | | at a time. <rdar://problem/13314462> llvm-svn: 216747
* [ARM] Add Thumb-2 code size optimization test for ASR (register).Tilmann Scheller2014-08-291-0/+9
| | | | llvm-svn: 216746
* Add arbitrary command line flags to llgs/debugserver startup for local ↵Todd Fiala2014-08-291-1/+19
| | | | | | | | | | | | | | | | | | | | debugging. This patch accepts environment variables of the form: LLDB_DEBUGSERVER_EXTRA_ARG_n where n starts with 1, and may continue nearly indefinitely (up through std::numeric_limits<uint32_t>::max()). The code loops around, starting with 1, until it doesn't find one of the environment variables. For each one it does find defined, it appends the environment variable's contents to the end of the debugserver/llgs startup command line issued when the stub is started for local debugging. I am using this to add arbitrary startup commands to the llgs command line for turning on additional logging. For example: export LLDB_DEBUGSERVER_EXTRA_ARG_1="-c" export LLDB_DEBUGSERVER_EXTRA_ARG_2="log enable -f /tmp/llgs_packets.log gdb-remote packets" export LLDB_DEBUGSERVER_EXTRA_ARG_3="-c" export LLDB_DEBUGSERVER_EXTRA_ARG_4="log enable -f /tmp/llgs_process.log lldb process" llvm-svn: 216745
* [ARM] Add Thumb-2 code size optimization test for ASR (immediate).Tilmann Scheller2014-08-291-1/+9
| | | | llvm-svn: 216744
* One other BuryPointer of a unique_ptr cleanup.David Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216743
* Provide a BuryPointer for unique_ptrs.David Blaikie2014-08-295-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In theory, it'd be nice if we could move to a case where all buried pointers were buried via unique_ptr to demonstrate that the program had finished with the value (that we could really have cleanly deallocated it) but instead chose to bury it. I think the main reason that's not possible right now is the various IntrusiveRefCntPtrs in the Frontend, sharing ownership for a variety of compiler bits (see the various similar "CompilerInstance::releaseAndLeak*" functions). I have yet to figure out their correct ownership semantics - but perhaps, even if the intrusiveness can be removed, the shared ownership may yet remain and that would lead to a non-unique burying as is there today. (though we could model that a little better - by passing in a shared_ptr, etc - rather than needing the two step that's currently used in those other releaseAndLeak* functions) This might be a bit more robust if BuryPointer took the boolean: BuryPointer(bool, unique_ptr<T>) and the choice to bury was made internally - that way, even when DisableFree was not set, the unique_ptr would still be null in the caller and there'd be no chance of accidentally having a different codepath where the value is used after burial in !DisableFree, but it becomes null only in DisableFree, etc... llvm-svn: 216742
* Fix a typo in AddAliasScopeMetadataHal Finkel2014-08-291-1/+1
| | | | llvm-svn: 216741
* unique_ptrify Directives in VerifyDiagnosticConsumerDavid Blaikie2014-08-292-29/+32
| | | | llvm-svn: 216740
* lldb - ELF: add ARM64 relocation jump slot handling in ELFHeader.Todd Fiala2014-08-291-0/+3
| | | | | | | | See http://reviews.llvm.org/D4579 for more details. Change by Paul Osmialowski. llvm-svn: 216739
* Add missing include to a test case.Dan Albert2014-08-291-0/+1
| | | | | | | Some platforms get size_t defined transitively by another include, but Android does not. llvm-svn: 216738
* lldb - Register Context Linux ARM64Todd Fiala2014-08-298-302/+538
| | | | | | | | | | | | | Yet another step toward ARM64 support. With this commit, lldb-gdbserver started on ARM64 target can be accessed by lldb running on desktop PC and it can process simple commands (like 'continue'). Still ARM64 support lacks NativeRegisterContextLinux_arm64.* code which waits to be implemented. Based on similar files for Linux x86_64 and Darwin ARM64. Due to common code extraction from Darwin related files, lldb should be tested for any unexpected regression on Darwin ARM64 machines too. See the following for more details: http://reviews.llvm.org/D4580 http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140825/012670.html Change by Paul Osmialowski. llvm-svn: 216737
* Make fabs safe to speculatively executeMatt Arsenault2014-08-292-0/+18
| | | | llvm-svn: 216736
* R600/SI: Use mad for fsub + fmulMatt Arsenault2014-08-297-0/+227
| | | | | | | We can use a negate source modifier to match this for fsub. llvm-svn: 216735
* AArch64: only try to get operand of a known node.Tim Northover2014-08-292-5/+12
| | | | | | | A bug in r216725 meant we tried to discover the type of a SETCC before confirming the node actually was a SETCC. llvm-svn: 216734
* Remove unnecessary regex in test pattern per dblaikie suggestion.Frederic Riss2014-08-292-6/+6
| | | | llvm-svn: 216733
* typoSanjay Patel2014-08-291-1/+1
| | | | llvm-svn: 216732
* [NVPTX] Make the alignment an explicit argument to ldu/ldgJingyue Wu2014-08-295-47/+27
| | | | | | | | | | | | | | | | | | | | | | Summary: Instead of specifying the alignment as metadata which may be destroyed by transformation passes, make the alignment the second argument to ldu/ldg intrinsic calls. Test Plan: ldu-ldg.ll ldu-i8.ll ldu-reg-plus-offset.ll Reviewers: eliben, meheff, jholewinski Reviewed By: meheff, jholewinski Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D5093 llvm-svn: 216731
* Make _Unwind_Backtrace() work on ARM.Dan Albert2014-08-296-31/+152
| | | | | | | | | | | | | | | | | | | | | | Summary: Since the personality functions do the actual unwinding on ARM, and will also stop unwinding when they encounter a handler, we invoke _Unwind_VRS_Interpret() directly form _Unwind_Backtrace(). To simplify, the logic for decoding an EHT is moved out of unwindOneFrame() and into its own function, decode_eht_entry(). Unlike unwindOneFrame(), which could only handle ARM's compact personality function entries (section 6.3) decode_eht_entry() can handle the generic entries (section 6.2). Reviewers: jroelofs Reviewed By: jroelofs Subscribers: piman, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D5112 llvm-svn: 216730
* [ARM] Make Thumb-2 code size optimization test more strict.Tilmann Scheller2014-08-291-1/+1
| | | | llvm-svn: 216729
* [ARM] Add a first test for the Thumb-2 code size optimization pass.Tilmann Scheller2014-08-291-0/+12
| | | | | | | | While working on a Thumb-2 code size optimization I just realized that we don't have any regression tests for it. So here's a first test case, I plan to increase the coverage over time. llvm-svn: 216728
OpenPOWER on IntegriCloud