summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* dwarf: add dwarf v4 maximum_operations_per_instruction to DWARFDebugLine.Todd Fiala2014-09-292-2/+10
| | | | | | | | See http://reviews.llvm.org/D5533 for details. Change by Tong Shen. llvm-svn: 218641
* Don't trap when passing non-POD arguments to variadic functions in ↵Hans Wennborg2014-09-295-0/+35
| | | | | | | | | | | | | | | | | | MS-compatibility mode Clang warns (treated as error by default, but still ignored in system headers) when passing non-POD arguments to variadic functions, and generates a trap instruction to crash the program if that code is ever run. Unfortunately, MSVC happily generates code for such calls without a warning, and there is code in system headers that use it. This makes Clang not insert the trap instruction when in -fms-compatibility mode, while still generating the warning/error message. Differential Revision: http://reviews.llvm.org/D5492 llvm-svn: 218640
* [mach-o] Move implementation of MachOFileNode::parseNick Kledzik2014-09-293-46/+71
| | | | | | | Move method implementation from header file to .cpp file. No functionality change. llvm-svn: 218639
* thread state coordinator: added a thread resume request and related tests.Todd Fiala2014-09-293-1/+116
| | | | | | | | | The thread resume block is executed in the normal flow of thread state queued event processing. The tests verify that it is executed when we track the thread to be stopped and skipped when we track it to already be running. llvm-svn: 218638
* [AVX512] Use X86VectorVTInfo in the masking helper classes and the FMAsAdam Nemet2014-09-291-155/+135
| | | | | | | | | | | | | | No functionality change. Makes the code more compact (see the FMA part). This needs a new type attribute MemOpFrag in X86VectorVTInfo. For now I only defined this in the simple cases. See the commment before the attribute. Diff of X86.td.expanded before and after is empty except for the appearance of the new attribute. llvm-svn: 218637
* WinCOFFObjectWriter: optimize the string table for common sufficesHans Wennborg2014-09-297-107/+121
| | | | | | | | This is a follow-up from r207670 which did the same for ELF. Differential Revision: http://reviews.llvm.org/D5530 llvm-svn: 218636
* Use ClangToLLVMArgsMapping in CodeGenTypes::GetFunctionType(). NFC.Alexey Samsonov2014-09-292-183/+200
| | | | | | | | | | | This is the last piece of CGCall code that had implicit assumptions about the order in which Clang arguments are translated to LLVM ones (positions of inalloca argument, sret, this, padding arguments etc.) Now all of this data is encapsulated in ClangToLLVMArgsMapping. If this information would be required somewhere else, this class can be moved to a separate header or pulled into CGFunctionInfo. llvm-svn: 218634
* [lld] [ELF] Support for general dynamic TLS relocations on X86_64Rafael Auler2014-09-2922-62/+290
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the general dynamic TLS access model for X86_64 (see www.akkadia.org/drepper/tls.pdf). To properly support TLS, the patch also changes the __tls_get_addr atom to be a shared library atom instead of a regularly defined atom (the previous lld approach). This closely models the reality of a function that will be resolved at runtime by the dynamic linker and loader itself (ld.so). I was tempted to force LLD to link against ld.so itself to resolve these symbols, but since GNU ld does not need the ld.so library to resolve this symbol, I decided to mimic its behavior and keep hardwired a definition of __tls_get_addr in the lld code. This patch also moves some important logic that previously was only available to the MIPS lld backend to be used to all ELF backends. This logic, which now lives in the DefaultLayout class, will monitor which external (shared lib) symbols are really imported by the current module and will only populate the dynamic symbol table with used symbols, as opposed to the previous approach of dumping all shared lib symbols in the dynamic symbol table. This is important to this patch to avoid __tls_get_addr from getting injected into all dynamic symbol tables. By solving the previous problem of always adding __tls_get_addr, now the produced symbol tables are slightly smaller. But this impacted several tests that relied on hardwired/predefined sizes of the symbol table, requiring this patch to update such tests. Test Plan: Added a LIT test case that exercises a simple use case of TLS variable in a shared library. Reviewers: ruiu, rafael, Bigcheese, shankarke Reviewed By: Bigcheese, shankarke Subscribers: emaste, shankarke, joerg, kledzik, mcrosier, llvm-commits Projects: #lld Differential Revision: http://reviews.llvm.org/D5505 llvm-svn: 218633
* Add soft-float to the key for the subtarget lookup in the TargetMachineEric Christopher2014-09-293-7/+64
| | | | | | | | | | | map, this makes sure that we can compile the same code for two different ABIs (hard and soft float) in the same module. Update one testcase accordingly (and fix some confusing naming) and add a new testcase as well with the ordering swapped which would highlight the problem. llvm-svn: 218632
* Fix spelling and reflow comments.Eric Christopher2014-09-291-6/+5
| | | | llvm-svn: 218631
* Test commit. Fix a whitespace in ToolChains.cpp.Rafael Auler2014-09-291-1/+1
| | | | llvm-svn: 218630
* thread state coordinator: add exec reset support, remove empty virtual ↵Todd Fiala2014-09-293-22/+96
| | | | | | | | | | | destructors. Also added a test for the reset handling. The reset/state clearing happens as a processed queue event. The only diff vs. standard processing is that the exec clears the queue before queueing the activity to clear internal state. i.e. once we get an exec, we really stop doing any other queue-based activity. llvm-svn: 218629
* AST: Fix a typo in RecordLayoutBuilderDavid Majnemer2014-09-291-1/+1
| | | | | | No functional change intended. llvm-svn: 218628
* [AArch64] Refines the Cortex-A57 Machine ModelDave Estes2014-09-292-24/+395
| | | | | | | | | | | | | | | Primarily refines all of the instructions with accurate latency and micro-op information. Refinements largely focus on the NEON instructions. Additionally, a few advanced features are modeled, including forwarding for MAC instructions and hazards for floating point SQRT and DIV. Lastly, the issue-width is reduced to three so that the scheduler will better accommodate the narrower decode and dispatch width. llvm-svn: 218627
* Unit test r218187, changing RTDyldMemoryManager::getSymbolAddress's behavior ↵David Blaikie2014-09-293-2/+36
| | | | | | | | | | | favor mangled lookup over unmangled lookup. The contract of this function seems problematic (fallback in either direction seems like it could produce bugs in one client or another), but here's some tests for its current behavior, at least. See the commit/review thread of r218187 for more discussion. llvm-svn: 218626
* Introduce CGFunctionInfo::getNumRequiredArgs(). NFC.Alexey Samsonov2014-09-293-23/+14
| | | | | | Save the callers from necessity to special-case on variadic functions. llvm-svn: 218625
* CUDA: Fix incorrect target inference for implicit members.Eli Bendersky2014-09-299-18/+665
| | | | | | | | | | | | As PR20495 demonstrates, Clang currenlty infers the CUDA target (host/device, etc) for implicit members (constructors, etc.) incorrectly. This causes errors and even assertions in Clang when compiling code (assertions in C++11 mode where implicit move constructors are added into the mix). Fix the problem by inferring the target from the methods the implicit member should call (depending on its base classes and fields). llvm-svn: 218624
* Speedup ClangToLLVMArgMapping construction. NFC.Alexey Samsonov2014-09-291-6/+18
| | | | | | | | Add a method to calculate the number of arguments given QualType expnads to. Use this method in ClangToLLVMArgMapping calculation. This number may be cached in CodeGenTypes for efficiency, if needed. llvm-svn: 218623
* Fixing the build for compilers which do not yet have support for constexpr ↵Aaron Ballman2014-09-291-1/+1
| | | | | | functions, NFC. llvm-svn: 218622
* Objective-C [qoi] - provide group name forFariborz Jahanian2014-09-292-3/+3
| | | | | | warn_property_types_are_incompatible. rdar://18487506 llvm-svn: 218621
* [asan] add a test for array cookie if the operator new is defined inside the ↵Kostya Serebryany2014-09-292-1/+36
| | | | | | class (the cookie should not be poisoned in such case); update the related comment in asan_poisoning.cc llvm-svn: 218620
* Add getValueOr to llvm::Optional<T>.Jordan Rose2014-09-292-0/+39
| | | | | | | | | | This takes a single argument convertible to T, and - if the Optional has a value, returns the existing value, - otherwise, constructs a T from the argument and returns that. Inspired by std::experimental::optional from the "Library Fundamentals" C++ TS. llvm-svn: 218618
* Add "typedef T value_type;" to llvm::Optional<T>.Jordan Rose2014-09-291-0/+2
| | | | | | Inspired by std::experimental::optional from the "Library Fundamentals" C++ TS. llvm-svn: 218617
* Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts.Samuel Benzaquen2014-09-296-214/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change introduces DynMatcherInterface and changes the internal representation of DynTypedMatcher and Matcher<T> to use a generic interface instead. It removes unnecessary indirections and virtual function calls when converting matchers by implicit and dynamic casts. DynTypedMatcher now remembers the stricter type in the chain of casts and checks it before calling into DynMatcherInterface. This change improves our clang-tidy related benchmark by ~14%. Also, it opens the door for more optimizations of this kind that are coming in future changes. As a side effect of removing these template instantiations, it also speeds up compilation of Dynamic/Registry.cpp by ~17% and reduces the number of symbols generated by ~30%. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5485 llvm-svn: 218616
* Refactor ABIArgInfo::Expand implementation (NFC).Alexey Samsonov2014-09-291-120/+155
| | | | | | | | Hoist the logic which determines the way QualType is expanded into a separate method. Remove a bunch of copy-paste and simplify getTypesFromArgs() / ExpandTypeFromArgs() / ExpandTypeToArgs() methods. llvm-svn: 218615
* Update modules documentation now that C++ support is working pretty well.Richard Smith2014-09-291-6/+3
| | | | llvm-svn: 218614
* Disable runtime alias checks when we ignore aliasing.Johannes Doerfert2014-09-291-0/+6
| | | | | | | This is just a optimization to save the compile time and execution time for runtime alias checks if the user guarantees no aliasing all together. llvm-svn: 218613
* Fixing missing C++ mode commentMatt Arsenault2014-09-291-1/+1
| | | | llvm-svn: 218612
* Fix include orderMatt Arsenault2014-09-291-1/+1
| | | | llvm-svn: 218611
* R600/SI: Fix hardcoded values for modifiers.Matt Arsenault2014-09-294-19/+22
| | | | | | Move enums to SIDefines.h llvm-svn: 218610
* R600/SI: Also fix fsub + fadd a, a to mad combinesMatt Arsenault2014-09-293-0/+86
| | | | llvm-svn: 218609
* R600/SI: Fix using mad with multiplies by 2Matt Arsenault2014-09-292-6/+187
| | | | | | | | | These turn into fadds, so combine them into the target mad node. fadd (fadd (a, a), b) -> mad 2.0, a, b llvm-svn: 218608
* [AArch64] Improve cost model to handle sdiv by a pow-of-two.Chad Rosier2014-09-292-0/+65
| | | | | | | | | | | This patch improves the target-specific cost model to better handle signed division by a power of two. The immediate result is that this enables the SLP vectorizer to do a better job. http://reviews.llvm.org/D5469 PR20714 llvm-svn: 218607
* Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single ↵Frederic Riss2014-09-293-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | DWARFUnitSection. There will be multiple TypeUnits in an unlinked object that will be extracted from different sections. Now that we have DWARFUnitSection that is supposed to represent an input section, we need a DWARFUnitSection<TypeUnit> per input .debug_types section. Once this is done, the interface is homogenous and we can move the Section parsing code into DWARFUnitSection. This is a respin of r218513 that got reverted because it broke some builders. This new version features an explicit move constructor for the DWARFUnitSection class to workaround compilers unable to generate correct C++11 default constructors. Reviewers: samsonov, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5482 llvm-svn: 218606
* [sanitizer] Android build cleanup.Evgeniy Stepanov2014-09-2914-194/+233
| | | | | | | | | | | | * Detect Android toolchain target arch and set correct runtime library name. * Merged a lot of Android and non-Android code paths. * Android is only supported in standalone build of compiler-rt now. * Linking lsan-common in ASan-Android (makes lsan annotations work). * Relying on -fsanitize=address linker flag when building tests (again, unification with non-Android path). * Runtime library moved from lib/asan to lib/linux. llvm-svn: 218605
* Use a loop to simplify the runtime unrolling prologue.Kevin Qin2014-09-295-137/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Runtime unrolling will create a prologue to execute the extra iterations which is can't divided by the unroll factor. It generates an if-then-else sequence to jump into a factor -1 times unrolled loop body, like extraiters = tripcount % loopfactor if (extraiters == 0) jump Loop: if (extraiters == loopfactor) jump L1 if (extraiters == loopfactor-1) jump L2 ... L1: LoopBody; L2: LoopBody; ... if tripcount < loopfactor jump End Loop: ... End: It means if the unroll factor is 4, the loop body will be 7 times unrolled, 3 are in loop prologue, and 4 are in the loop. This commit is to use a loop to execute the extra iterations in prologue, like extraiters = tripcount % loopfactor if (extraiters == 0) jump Loop: else jump Prol Prol: LoopBody; extraiters -= 1 // Omitted if unroll factor is 2. if (extraiters != 0) jump Prol: // Omitted if unroll factor is 2. if (tripcount < loopfactor) jump End Loop: ... End: Then when unroll factor is 4, the loop body will be copied by only 5 times, 1 in the prologue loop, 4 in the original loop. And if the unroll factor is 2, new loop won't be created, just as the original solution. llvm-svn: 218604
* [Thumb2] ldrexd and strexd are not defined on v7MOliver Stannard2014-09-292-2/+18
| | | | | | | The Thumb2 ldrexd and strexd instructions are not defined for M-class architectures. llvm-svn: 218603
* Fix bug 20116 - http://llvm.org/bugs/show_bug.cgi?id=20116Alexey Bataev2014-09-292-13/+15
| | | | | | | | Fixes incorrect codegen when devirtualization is aborted due to covariant return types. Differential Revision: http://reviews.llvm.org/D5321 llvm-svn: 218602
* [compiler-rt] Do not use ldrexd or strexd on v7MOliver Stannard2014-09-2910-0/+20
| | | | | | | | | | | | | | | | The ldrexd and strexd instructions are undefined for the ARMv7M architecture, so we cannot use them to implement the __sync_fetch_and_*_8 builtins. There is no other way to implement these without OS support, so this patch #ifdef's these functions out for M-class architectures. There are no tests as I cannot find any existing tests for these builtins. I used the __ARM_ARCH_PROFILE predefine because __ARM_FEATURE_LDREX is deprecated and not set by clang. llvm-svn: 218601
* [x86] Make the new vector shuffle lowering lower blends as VSELECTChandler Carruth2014-09-293-209/+162
| | | | | | | | | | | | | | | | | | | | | nodes, and rely exclusively on its logic. This removes a ton of duplication from the blend lowering and centralizes it in one place. One downside is that it requires a bunch of hacks to make this work with the current legalization framework. We have to manually speculate one aspect of legalizing VSELECT nodes to get everything to work nicely because the existing legalization framework isn't *actually* bottom-up. The other grossness is that we somewhat duplicate the analysis of constant blends. I'm on the fence here. If reviewers thing this would look better with VSELECT when it has constant operands dumping over tho VECTOR_SHUFFLE, we could go that way. But it would be a substantial change because currently all of the actual blend instructions are matched via patterns in the TD files based around VSELECT nodes (despite them not being perfect fits for that). Suggestions welcome, but at least this removes the rampant duplication in the backend. llvm-svn: 218600
* [asan] Fix SELinux setup on Android-K.Evgeniy Stepanov2014-09-291-2/+27
| | | | | | | On pre-L devices SELinux is set up in such a way that zygote wrapper has to be in system_file context, not zygote_exec. llvm-svn: 218599
* clang-format: Fix GCC warning about implicit bool pointer conversion.Daniel Jasper2014-09-291-6/+6
| | | | | | Introduced in r217880. llvm-svn: 218597
* Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sectionsMatthew Gardiner2014-09-2910-48/+129
| | | | | | | | | | | works, as do breakpoints, run and pause, display zeroth frame. See http://reviews.llvm.org/D5503 for a fuller description of the changes in this commit. llvm-svn: 218596
* clang-format: [JS] Improve formatting of function literals in chainsDaniel Jasper2014-09-292-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before: getSomeLongPromise(.....) .then( function(value) { body(); body(); }) .thenCatch(function(error) { body(); body(); }); After: getSomeLongPromise(.....) .then(function(value) { body(); body(); }) .thenCatch(function(error) { body(); body(); }); llvm-svn: 218595
* Included cstdarg for compilation of va_start and va_end.Matthew Gardiner2014-09-291-0/+1
| | | | llvm-svn: 218594
* Remove dead code from DIBuilderJyoti Allur2014-09-293-75/+14
| | | | llvm-svn: 218593
* testing commit access to clang repoJyoti Allur2014-09-291-1/+0
| | | | llvm-svn: 218592
* Tests for DR600-640.Richard Smith2014-09-292-34/+381
| | | | llvm-svn: 218591
* Fix "unsupported friend" diagnostic to also appear for friend functions with ↵Richard Smith2014-09-292-5/+9
| | | | | | dependent scopes. llvm-svn: 218590
* [x86] Delete a bunch of really bad and totally unnecessary code in theChandler Carruth2014-09-294-137/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | X86 target-specific DAG combining that tried to convert VSELECT nodes into VECTOR_SHUFFLE nodes that it "knew" would lower into immediate-controlled blend nodes. Turns out, we have perfectly good lowering of all these VSELECT nodes, and indeed that lowering already knows how to handle lowering through BLENDI to immediate-controlled blend nodes. The code just wasn't getting used much because this thing forced the world to go through the vector shuffle lowering. Yuck. This also exposes that I was too aggressive in avoiding domain crossing in v218588 with that lowering -- when the other option is to expand into two 128-bit vectors, it is worth domain crossing. Restore that behavior now that we have nice tests covering it. The test updates here fall into two camps. One is where previously we ended up with an unsigned encoding of the blend operand and now we get a signed encoding. In most of those places there were elaborate comments explaining exactly what these operands really mean. Rather than that, just switch these tests to use the nicely decoded comments that make it obvious that the final shuffle matches. The other updates are just removing pointless domain crossing by blending integers with PBLENDW rather than BLENDPS. llvm-svn: 218589
OpenPOWER on IntegriCloud