summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* NativeThreadLinux: remove translation of some Linux signals to gdb signals.Todd Fiala2014-08-271-26/+14
| | | | | | | | | | | I copied this originally based on what debugserver was doing. This appears to be incorrect and unncessary for Linux. The LinuxSignals on the lldb side don't look for these and therefore they get handled incorrectly. Leaving the hook in place since I think darwin will continue to need to translate those signal numbers. llvm-svn: 216564
* Limit the symbol search in DynamicLibrary to the module that was opened.Zachary Turner2014-08-271-2/+9
| | | | | | | | Differential Revision: http://reviews.llvm.org/D5030 Reviewed By: Reid Kleckner, Rafael Espindola llvm-svn: 216563
* Call ResolveExceptionSpec for non-OdrUsed functions.Nico Weber2014-08-273-7/+16
| | | | | | | | In C++11, instantiation of exception specs is deferred. The instantiation is done in MarkFunctionReferenced(), which wasn't called for non-OdrUsed functions, which then caused an assert in codegen. Fixes PR19190, see the bug for details. llvm-svn: 216562
* Mark test types for <atomic> nothrow default constructible. Patch from Steve ↵Eric Fiselier2014-08-2715-15/+15
| | | | | | | | | | | | | MacKenzie. The way the standard currently specifies the default constructor for atomic<T> requires T to be nothrow default constructible. This patch makes our test types meet this requirement. Note: The nothrow default constructible requirment is subject to the outcome of LWG issue 1265. llvm-svn: 216561
* Objective-C. When multiple nullary selectors are found inFariborz Jahanian2014-08-272-1/+32
| | | | | | | | | | global pool in the course of method selection for a messaging expression, select one with the most general return type of 'id'. This is to remove type-mismatch warning (which is useless) as result of random selection of method with more restrictive return type. rdar://18095772 llvm-svn: 216560
* lldb Missing ARM64 breakpoint opcode for ProcessPOSIX added.Todd Fiala2014-08-271-0/+6
| | | | | | | | See http://reviews.llvm.org/D5078. Change by Paul Osmialowski. llvm-svn: 216559
* Allow __fp16 as a function arg or return type for AArch64Oliver Stannard2014-08-2710-30/+66
| | | | | | | | | | | ACLE 2.0 allows __fp16 to be used as a function argument or return type. This enables this for AArch64. This also fixes an existing bug that causes clang to not allow homogeneous floating-point aggregates with a base type of __fp16. This is valid for AAPCS64, but not for AAPCS-VFP. llvm-svn: 216558
* Quick fix to test/CodeGen/2007-06-18-SextAttrAggregate.c for x86_64-mingw32, ↵NAKAMURA Takumi2014-08-271-1/+1
| | | | | | | corresponding to r216507. FIXME: Explicit triplets might be given here. llvm-svn: 216557
* lldb AArch64 should be listed as yet another 64-bit architecture in ↵Todd Fiala2014-08-271-0/+1
| | | | | | | | | | HostInfoBase. See http://reviews.llvm.org/D5070. Change by Paul Osmialowski. llvm-svn: 216556
* Teach the AArch64 backend about v4f16 and v8f16Oliver Stannard2014-08-2715-132/+1893
| | | | | | | | This teaches the AArch64 backend to deal with the operations required to deal with the operations on v4f16 and v8f16 which are exposed by NEON intrinsics, plus the add, sub, mul and div operations. llvm-svn: 216555
* lldb Missing break statement added.Todd Fiala2014-08-271-0/+1
| | | | | | | | See http://reviews.llvm.org/D5069. Change by Paul Osmialowski. llvm-svn: 216554
* Add Linux support for get thread area on ARM64 using ProcessMonitor debugging.Todd Fiala2014-08-271-5/+14
| | | | | | | | See http://reviews.llvm.org/D5073. Change by Paul Osmialowski. llvm-svn: 216553
* Use unique_ptr instead of OwningPtr. I'm not certain how this compiled.Ted Kremenek2014-08-271-2/+1
| | | | llvm-svn: 216552
* Adjust call 'CreateAnalysisConsumer' due to API tweak.Ted Kremenek2014-08-271-3/+1
| | | | llvm-svn: 216551
* Add support for the static analyzer to synthesize function implementations ↵Ted Kremenek2014-08-2728-42/+803
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from external model files. Currently the analyzer lazily models some functions using 'BodyFarm', which constructs a fake function implementation that the analyzer can simulate that approximates the semantics of the function when it is called. BodyFarm does this by constructing the AST for such definitions on-the-fly. One strength of BodyFarm is that all symbols and types referenced by synthesized function bodies are contextual adapted to the containing translation unit. The downside is that these ASTs are hardcoded in Clang's own source code. A more scalable model is to allow these models to be defined as source code in separate "model" files and have the analyzer use those definitions lazily when a function body is needed. Among other things, it will allow more customization of the analyzer for specific APIs and platforms. This patch provides the initial infrastructure for this feature. It extends BodyFarm to use an abstract API 'CodeInjector' that can be used to synthesize function bodies. That 'CodeInjector' is implemented using a new 'ModelInjector' in libFrontend, which lazily parses a model file and injects the ASTs into the current translation unit. Models are currently found by specifying a 'model-path' as an analyzer option; if no path is specified the CodeInjector is not used, thus defaulting to the current behavior in the analyzer. Models currently contain a single function definition, and can be found by finding the file <function name>.model. This is an initial starting point for something more rich, but it bootstraps this feature for future evolution. This patch was contributed by Gábor Horváth as part of his Google Summer of Code project. Some notes: - This introduces the notion of a "model file" into FrontendAction and the Preprocessor. This nomenclature is specific to the static analyzer, but possibly could be generalized. Essentially these are sources pulled in exogenously from the principal translation. Preprocessor gets a 'InitializeForModelFile' and 'FinalizeForModelFile' which could possibly be hoisted out of Preprocessor if Preprocessor exposed a new API to change the PragmaHandlers and some other internal pieces. This can be revisited. FrontendAction gets a 'isModelParsingAction()' predicate function used to allow a new FrontendAction to recycle the Preprocessor and ASTContext. This name could probably be made something more general (i.e., not tied to 'model files') at the expense of losing the intent of why it exists. This can be revisited. - This is a moderate sized patch; it has gone through some amount of offline code review. Most of the changes to the non-analyzer parts are fairly small, and would make little sense without the analyzer changes. - Most of the analyzer changes are plumbing, with the interesting behavior being introduced by ModelInjector.cpp and ModelConsumer.cpp. - The new functionality introduced by this change is off-by-default. It requires an analyzer config option to enable. llvm-svn: 216550
* [SLP] Re-enable vectorization of GEP expressions (re-apply r210342 with a fix).Michael Zolotukhin2014-08-272-0/+142
| | | | llvm-svn: 216549
* Rename arguments in include/cmath to work around Newlib macro implementation ↵Jonathan Roelofs2014-08-271-230/+230
| | | | | | | | using these particular names http://reviews.llvm.org/D5080 llvm-svn: 216548
* [ASan] Whitespace fix. No functionality change.Alexander Potapenko2014-08-271-1/+1
| | | | llvm-svn: 216544
* Clang-format over X86AsmInstrumentation.* with LLVM style.Evgeniy Stepanov2014-08-272-129/+132
| | | | | | r216536 mistakenly used -style=Google instead of LLVM. llvm-svn: 216543
* [asan] Add asprintf negative test.Evgeniy Stepanov2014-08-271-0/+20
| | | | llvm-svn: 216542
* Add support for kalimba architecture variants 3, 4 and 5.Matthew Gardiner2014-08-273-5/+61
| | | | | | | | Add entries to core_definitions and elf_arch_entries for those variants. Select the subtype for the variant by parsing the e_flags field of the elf header. llvm-svn: 216541
* clang-format: Fix regression in formatting of braced initializers.Daniel Jasper2014-08-272-1/+5
| | | | | | | | | | | | Before: Node n{1, Node{1000}, // 2}; After: Node n{1, Node{1000}, // 2}; llvm-svn: 216540
* Add an explicit cast to pacify implicit boolean conversion warnings.Benjamin Kramer2014-08-271-1/+1
| | | | llvm-svn: 216539
* [x86] Fix a regression introduced with r213897 for 32-bit targets whereChandler Carruth2014-08-272-6/+15
| | | | | | | | | | | | we stopped efficiently lowering sextload using the SSE41 instructions for that operation. This is a consequence of a bad predicate I used thinking of the memory access needs. The code actually handles the cases where the predicate doesn't apply, and handles them much better. =] Simple fix and a test case added. Fixes PR20767. llvm-svn: 216538
* [SDAG] Re-instate r215611 with a fix to a pesky X86 DAG combine.Chandler Carruth2014-08-274-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This combine is essentially combining target-specific nodes back into target independent nodes that it "knows" will be combined yet again by a target independent DAG combine into a different set of target-independent nodes that are legal (not custom though!) and thus "ok". This seems... deeply flawed. The crux of the problem is that we don't combine un-legalized shuffles that are introduced by legalizing other operations, and thus we don't see a very profitable combine opportunity. So the backend just forces the input to that combine to re-appear. However, for this to work, the conditions detected to re-form the unlegalized nodes must be *exactly* right. Previously, failing this would have caused poor code (if you're lucky) or a crasher when we failed to select instructions. After r215611 we would fall back into the legalizer. In some cases, this just "fixed" the crasher by produces bad code. But in the test case added it caused the legalizer and the dag combiner to iterate forever. The fix is to make the alignment checking in the x86 side of things match the alignment checking in the generic DAG combine exactly. This isn't really a satisfying or principled fix, but it at least make the code work as intended. It also highlights that it would be nice to detect the availability of under aligned loads for a given type rather than bailing on this optimization. I've left a FIXME to document this. Original commit message for r215611 which covers the rest of the chang: [SDAG] Fix a case where we would iteratively legalize a node during combining by replacing it with something else but not re-process the node afterward to remove it. In a truly remarkable stroke of bad luck, this would (in the test case attached) end up getting some other node combined into it without ever getting re-processed. By adding it back on to the worklist, in addition to deleting the dead nodes more quickly we also ensure that if it *stops* being dead for any reason it makes it back through the legalizer. Without this, the test case will end up failing during instruction selection due to an and node with a type we don't have an instruction pattern for. It took many million runs of the shuffle fuzz tester to find this. llvm-svn: 216537
* Clang-format over X86AsmInstrumentation.*.Evgeniy Stepanov2014-08-272-183/+216
| | | | llvm-svn: 216536
* Move some ARM-specific code from CGCall.cpp to TargetInfo.cppOliver Stannard2014-08-274-57/+60
| | | | | | | | | This tidies up some ARM-specific code added by r208417 to move it out of the target-independent parts of clang into TargetInfo.cpp. This also has the advantage that we can now flatten struct arguments to variadic AAPCS functions. llvm-svn: 216535
* [ASan/Win] Enable building the MD runtime by defaultTimur Iskhodzhanov2014-08-271-0/+5
| | | | llvm-svn: 216534
* [asan] Restore asan-rt name on linux back to pre-r216380.Evgeniy Stepanov2014-08-273-9/+14
| | | | | | | | | | There is no reason to have different library names for shared and static cases on linux. It also breaks Android where we install the shared asan-rt library into the system and should keep the old name. This change reverts most of r216380 limiting it to win32 targets only. llvm-svn: 216533
* [SKX] Added new versions of cmp instructions in avx512_icmp_cc multiclass, ↵Robert Khasanov2014-08-275-34/+1252
| | | | | | | | added VL multiclass. Added encoding tests llvm-svn: 216532
* Significantly fix Clang's header search for Ubuntu (and possibly otherChandler Carruth2014-08-2713-38/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | modern Debian-based distributions) due to on-going multiarch madness. It appears that when the multiarch heeader search support went into the clang driver, it went in in a quite bad state. The order of includes completely failed to match the order exhibited by GCC, and in a specific case -- when the GCC triple and the multiarch triple don't match as with i686-linux-gnu and i386-linux-gnu -- we would absolutely fail to find the libstdc++ target-specific header files. I assume that folks who have been using Clang on Ubuntu 32-bit systems have been applying weird patches to hack around this. I can't imagine how else it could have worked. This was originally reported by a 64-bit operating system user who had a 32-bit crosscompiler installed. We tried to use that rather than the bi-arch support of the 64-bit compiler, but failed due to the triple differences. I've corrected all the wrong orderings in the existing tests and added a specific test for the multiarch triple strings that are different in a significant way. This should significantly improve the usability of Clang when checked out vanilla from upstream onto Ubuntu machines with an i686 GCC installation for whatever reason. llvm-svn: 216531
* AVX-512: Added intrinsic for VMOVSS store form with mask.Elena Demikhovsky2014-08-272-0/+19
| | | | llvm-svn: 216530
* Simplify creation of a couple ArrayRefs by using None and makeArrayRef.Craig Topper2014-08-271-2/+2
| | | | llvm-svn: 216529
* Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper2014-08-2735-90/+78
| | | | | | just letting them be implicitly created. llvm-svn: 216528
* Fix some cases were ArrayRefs were being passed by reference.Craig Topper2014-08-274-12/+12
| | | | llvm-svn: 216527
* Refactor one of the larger functions for Type Diffing into smaller functions.Richard Trieu2014-08-271-185/+215
| | | | | | No functionality change. llvm-svn: 216526
* Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper2014-08-2740-131/+102
| | | | | | just letting them be implicitly created. llvm-svn: 216525
* Fix some cases were ArrayRefs were being passed by reference. Also remove ↵Craig Topper2014-08-275-8/+8
| | | | | | 'const' from some other ArrayRef uses since its implicitly const already. llvm-svn: 216524
* InstCombine: Optimize GEP's involving ptrtoint betterDavid Majnemer2014-08-272-11/+74
| | | | | | | | | | | | | | We supported transforming: (gep i8* X, -(ptrtoint Y)) to: (inttoptr (sub (ptrtoint X), (ptrtoint Y))) However, this only fired if 'X' had type i8*. Generalize this to support various types of different sizes. This results in much better CodeGen, especially for pointers to packed structs. llvm-svn: 216523
* Driver: Restore -fkeep-inline-functions as an ignored flagJustin Bogner2014-08-272-1/+3
| | | | | | | | | | Several options were moved to the clang_ignored_gcc_optimization group in r213365, but -fkeep-inline-functions was accidentally dropped. This restores the flag. Patch by Steven Wu. Thanks! llvm-svn: 216522
* Remove type unit skeletons. GDB no longer needs them & this saves a heap of ↵David Blaikie2014-08-272-40/+7
| | | | | | space. llvm-svn: 216521
* Fix representation of __attribute__((nonnull)) to support correctly modelingRichard Smith2014-08-2711-66/+129
| | | | | | | | | | | | | | | the no-arguments case. Don't expand this to an __attribute__((nonnull(A, B, C))) attribute, since that does the wrong thing for function templates and varargs functions. In passing, fix a grammar error in the diagnostic, a crash if __attribute__((nonnull(N))) is applied to a varargs function, a bug where the same null argument could be diagnosed multiple times if there were multiple nonnull attributes referring to it, and a bug where nonnull attributes would not be accumulated correctly across redeclarations. llvm-svn: 216520
* Change a few methods to static methods. No functionality change.Richard Trieu2014-08-271-12/+15
| | | | llvm-svn: 216519
* PR20760: Don't assert (and produce better diagnostics) if a default initializerRichard Smith2014-08-273-20/+41
| | | | | | contains an unmatched closing bracket token. llvm-svn: 216518
* Refactor the diagnostic DeclContext printing. No functionality change.Richard Trieu2014-08-271-10/+6
| | | | llvm-svn: 216517
* ClangCodeGenTests: Prune redundant libdeps.NAKAMURA Takumi2014-08-272-7/+2
| | | | llvm-svn: 216516
* [CMake] ClangCodeGenTests: Add Core. It's referenced by the test.NAKAMURA Takumi2014-08-271-0/+1
| | | | llvm-svn: 216515
* ClangCodeGenTests: Reorder libdeps.NAKAMURA Takumi2014-08-272-4/+4
| | | | llvm-svn: 216514
* Add __NSCFDictionary to the list of NSDictionary-like types for which we ↵Enrico Granata2014-08-271-0/+1
| | | | | | know to generate synthetic children llvm-svn: 216513
* [PECOFF] Fix AMD64_ADDR64 relocation.Rui Ueyama2014-08-273-2/+6
| | | | | | | | IMAGE_REL_AMD64_ADDR64 relocation should set 64-bit *VA* (virtual address) instead of *RVA* (relative virtual address), so we have to add the iamge base to the target's RVA. llvm-svn: 216512
OpenPOWER on IntegriCloud