summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] MmapAlignedOrDie changes to reduce fragmentationKostya Kortchinsky2017-06-145-20/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The reasoning behind this change is explained in D33454, which unfortunately broke the Windows version (due to the platform not supporting partial unmapping of a memory region). This new approach changes `MmapAlignedOrDie` to allow for the specification of a `padding_chunk`. If non-null, and the initial allocation is aligned, this padding chunk will hold the address of the extra memory (of `alignment` bytes). This allows `AllocateRegion` to get 2 regions if the memory is aligned properly, and thus help reduce fragmentation (and saves on unmapping operations). As with the initial D33454, we use a stash in the 32-bit Primary to hold those extra regions and return them on the fast-path. The Windows version of `MmapAlignedOrDie` will always return a 0 `padding_chunk` if one was requested. Reviewers: alekseyshl, dvyukov, kcc Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D34152 llvm-svn: 305391
* Revert "[ARM] Support constant pools in data when generating execute-only code."Alexandros Lamprineas2017-06-144-93/+15
| | | | | | | | | | | This reverts commit 3a204faa093c681a1e96c5e0622f50649b761ee0. I've upset a buildbot which runs the address sanitizer: ERROR: AddressSanitizer: stack-use-after-scope lib/Target/ARM/ARMISelLowering.cpp:2690 That Twine variable is used illegally. llvm-svn: 305390
* [mips] Fix multiprecision arithmetic.Simon Dardis2017-06-1411-463/+648
| | | | | | | | | | | | | | | | | | | | | | | | | | For multiprecision arithmetic on MIPS, rather than using ISD::ADDE / ISD::ADDC, get SelectionDAG to break down the operation into ISD::ADDs and ISD::SETCCs. For MIPS, only the DSP ASE has a carry flag, so in the general case it is not useful to directly support ISD::{ADDE, ADDC, SUBE, SUBC} nodes. Also improve the generation code in such cases for targets with TargetLoweringBase::ZeroOrOneBooleanContent by directly using the result of the comparison node rather than using it in selects. Similarly for ISD::SUBE / ISD::SUBC. Address optimization breakage by moving the generation of MIPS specific integer multiply-accumulate nodes to before legalization. This revolves PR32713 and PR33424. Thanks to Simonas Kazlauskas and Pirama Arumuga Nainar for reporting the issue! Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D33494 llvm-svn: 305389
* [MathExtras] fix documentation comments; NFCSanjay Patel2017-06-141-61/+46
| | | | llvm-svn: 305388
* [ARM] Support constant pools in data when generating execute-only code.Alexandros Lamprineas2017-06-144-15/+93
| | | | | | | | | | | | | | The ARM backend asserts against constant pool lowering when it generates execute-only code in order to prevent the generation of constant pools in the text section. It appears that target independent optimizations might generate DAG nodes that represent constant pools. By lowering such nodes as global addresses we don't violate the semantics of execute-only code and also it is guaranteed that execute-only behaves correct with the position-independent addressing modes that support execute-only code. Differential Revision: https://reviews.llvm.org/D33773 llvm-svn: 305387
* Align definition of DW_OP_plus with DWARF spec [3/3]Florian Hahn2017-06-1433-114/+200
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things. The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack. This is done in three stages: • The first patch (LLVM) adds support for DW_OP_plus_uconst. • The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst. • The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions. Patch by Sander de Smalen. Reviewers: echristo, pcc, aprantl Reviewed By: aprantl Subscribers: fhahn, javed.absar, aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D33894 llvm-svn: 305386
* Corrected some comment typos; NFC.Aaron Ballman2017-06-141-2/+2
| | | | llvm-svn: 305385
* clang-format: Add CompactNamespaces optionFrancois Ferrand2017-06-147-23/+339
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add CompactNamespaces option, to pack namespace declarations on the same line (somewhat similar to C++17 nested namespace definition). With this option, consecutive namespace declarations are kept on the same line: namespace foo { namespace bar { ... }} // namespace foo::bar Reviewers: krasimir, djasper, klimek Reviewed By: djasper Subscribers: kimgr, cfe-commits, klimek Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D32480 llvm-svn: 305384
* [LLDB][MIPS] Skip TestGdbRemoteSingleStep and TestGdbRemote_vCont.py.Nitesh Jain2017-06-142-0/+3
| | | | | | | | The step count depends on code generated by compiler (GCC/Clang). It will also vary for different MIPS arch variant. Hence skipping these test for MIPS. Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 305383
* [mips] Fix machine verifier errors in the long branch passSimon Dardis2017-06-142-26/+26
| | | | | | | | | | | | | | | This patch fixes two systemic machine verifier errors in the long branch pass. The first is the incorrect basic block successors and the second was the incorrect construction of several jump instructions. This partially resolves PR27458 and the associated PR32146. Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D33378 llvm-svn: 305382
* Reverted 305379 (Function with unparsed body is a definition)Serge Pavlov2017-06-146-23/+8
| | | | | | It broke clang-x86_64-linux-selfhost-modules-2 and some other buildbots. llvm-svn: 305381
* [LLDB][MIPS] Fix TestNoreturnUnwind.py.Nitesh Jain2017-06-141-0/+1
| | | | | | | bugnumber=llvm.org/pr33452 Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 305380
* Function with unparsed body is a definitionSerge Pavlov2017-06-146-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While a function body is being parsed, the function declaration is not considered as a definition because it does not have a body yet. In some cases it leads to incorrect interpretation, the case is presented in https://bugs.llvm.org/show_bug.cgi?id=14785: ``` template<typename T> struct Somewhat { void internal() const {} friend void operator+(int const &, Somewhat<T> const &) {} }; void operator+(int const &, Somewhat<char> const &x) { x.internal(); } ``` When statement `x.internal()` in the body of global `operator+` is parsed, the type of `x` must be completed, so the instantiation of `Somewhat<char>` is started. It instantiates the declaration of `operator+` defined inline, and makes a check for redefinition. The check does not detect another definition because the declaration of `operator+` is still not defining as does not have a body yet. To solves this problem the function `isThisDeclarationADefinition` considers a function declaration as a definition if it has flag `WillHaveBody` set. This change fixes PR14785. Differential Revision: https://reviews.llvm.org/D30375 llvm-svn: 305379
* [LLDB][MIPS] Fix TestRegisterVariables.py.Nitesh Jain2017-06-141-1/+1
| | | | | | | | | Clang does not accept regparm attribute on these platforms. Fortunately, the default calling convention passes arguments in registers any way Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 305378
* Fix for Itanium mangler issue with templatesDmitry Polukhin2017-06-141-0/+2
| | | | | | | | Patch by Serge Preis Differential Revision: https://reviews.llvm.org/D32428 llvm-svn: 305377
* [clangd] Add a filename parameter to FileSystemProvider.Ilya Biryukov2017-06-143-7/+24
| | | | | | | | | | | | | | Reviewers: krasimir Reviewed By: krasimir Subscribers: klimek, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D34151 llvm-svn: 305376
* [ELF] Add armelf emulation modeEugene Leviant2017-06-141-1/+1
| | | | | | Differential revision: https://reviews.llvm.org/D34140 llvm-svn: 305375
* Use getLastArgValue instead of getStringYuka Takahashi2017-06-141-26/+20
| | | | | | | | | | | | | | | Summary: I found that getString defined in the LLD's Driver.cpp is exactly the same as Arg::getLastArgValue defined in llvm/Option/ArgLIst.h. This patch removes that local function and use the function that the Arg class provides. Reviewers: ruiu Subscribers: emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D34196 llvm-svn: 305374
* Mark `__is_inplace_*` tests as UNSUPPORTED in <= C++14.Michael Park2017-06-142-0/+4
| | | | llvm-svn: 305373
* Revert r304907 as it is causing some failures that I cannot reproduce.Nemanja Ivanovic2017-06-146-593/+6
| | | | | | Reverting this until a test case can be provided to aid the investigation. llvm-svn: 305372
* Revert "[codeview] Make obj2yaml/yaml2obj support .debug$S..."Zachary Turner2017-06-1427-860/+313
| | | | | | | | This is causing failures on linux bots with an invalid stream read. It doesn't repro in any configuration on Windows, so reverting until I have a chance to investigate on Linux. llvm-svn: 305371
* Add an `__is_inplace_index` metafunction.Michael Park2017-06-143-0/+70
| | | | | | | | | | | | Summary: This is used to constrain `variant`'s converting constructor correctly. Reviewers: EricWF, mclow.lists Reviewed By: EricWF, mclow.lists Differential Revision: https://reviews.llvm.org/D34111 llvm-svn: 305370
* Use make_shared instead of make_unique.Zachary Turner2017-06-141-2/+2
| | | | llvm-svn: 305369
* Fix some more errors.Zachary Turner2017-06-143-38/+11
| | | | llvm-svn: 305368
* Add some #includes to appease the build.Zachary Turner2017-06-142-0/+2
| | | | llvm-svn: 305367
* [codeview] Make obj2yaml/yaml2obj support .debug$S/T sections.Zachary Turner2017-06-1427-306/+878
| | | | | | | | | | | | | | | This allows us to use yaml2obj and obj2yaml to round-trip CodeView symbol and type information without having to manually specify the bytes of the section. This makes for much easier to maintain tests. See the tests under lld/COFF in this patch for example. Before they just said SectionData: <blob> whereas now we can use meaningful record descriptions. Note that it still supports the SectionData yaml field, which could be useful for initializing a section to invalid bytes for testing, for example. Differential Revision: https://reviews.llvm.org/D34127 llvm-svn: 305366
* Implement the non-parallel versions of reduce and transform_reduce for C++17Marshall Clow2017-06-147-0/+613
| | | | llvm-svn: 305365
* Use StringRef::split instead of StringRef::find and StringRef::substr.Rui Ueyama2017-06-141-6/+4
| | | | | | | | Summary: Pointed out by Yuka Takahashi. Differential Revision: https://reviews.llvm.org/D34192 llvm-svn: 305364
* [coroutines] Fix co_await for range statementEric Fiselier2017-06-144-37/+217
| | | | | | | | | | | | | | | | | Summary: Currently we build the co_await expressions on the wrong implicit statements of the implicit ranged for; Specifically we build the co_await expression wrapping the range declaration, but it should wrap the begin expression. This patch fixes co_await on range for. Reviewers: rsmith, GorNishanov Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34021 llvm-svn: 305363
* [ODRHash] Remove debugging code from r305361Richard Trieu2017-06-141-1/+0
| | | | llvm-svn: 305362
* [ODRHash] Hash Template and TemplateExpansion in TemplateArgument.Richard Trieu2017-06-142-0/+21
| | | | llvm-svn: 305361
* [ODRHash] Hash Expr for TemplateArgument::ExpressionRichard Trieu2017-06-142-0/+49
| | | | llvm-svn: 305360
* Support: Remove MSVC 2013 workarounds in ThreadPool class.Peter Collingbourne2017-06-142-41/+6
| | | | | | | | I have confirmed that these are no longer needed with MSVC 2015. Differential Revision: https://reviews.llvm.org/D34187 llvm-svn: 305347
* [libFuzzer] really restrict the new test to Linux (fails on Mac/Windows ↵Kostya Serebryany2017-06-141-1/+3
| | | | | | currently) llvm-svn: 305346
* Re-enable tests on power pc since the bug has been fixed.Eric Beckmann2017-06-142-8/+0
| | | | | | | | | | Summary: just flip them on. Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34186 llvm-svn: 305345
* Added partial verification for .apple_names accelerator table in ↵Spyridoula Gravani2017-06-146-1/+254
| | | | | | | | | | | llvm-dwarfdump output. This patch adds code which verifies that each bucket in the .apple_names accelerator table is either empty or has a valid hash index. Differential Revision: https://reviews.llvm.org/D34177 llvm-svn: 305344
* Reverted r305339 as MSVC is not happy with noreturn in lambda.Galina Kistanova2017-06-131-1/+2
| | | | llvm-svn: 305343
* [ASan] Move rss_limit_is_exceeded_ flag to ASan.Alex Shlyapnikov2017-06-132-19/+21
| | | | | | | | | | | | | | Summary: Move the OOM decision based on RSS limits out of generic allocator to ASan allocator, where it makes more sense at the moment. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34180 llvm-svn: 305342
* Simplify. NFC.Rafael Espindola2017-06-131-2/+1
| | | | llvm-svn: 305341
* [globalisel][legalizer] G_LOAD/G_STORE NarrowScalar should not emit G_GEP x, 0.Daniel Sanders2017-06-134-20/+57
| | | | | | | | | | | | | | | | | | | Summary: When legalizing G_LOAD/G_STORE using NarrowScalar, we should avoid emitting %0 = G_CONSTANT ty 0 %1 = G_GEP %x, %0 since it's cheaper to not emit the redundant instructions than it is to fold them away later. Reviewers: qcolombet, t.p.northover, ab, rovka, aditya_nandakumar, kristof.beyls Reviewed By: qcolombet Subscribers: javed.absar, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D32746 llvm-svn: 305340
* Specified LLVM_ATTRIBUTE_NORETURN for ReportError.Galina Kistanova2017-06-131-2/+1
| | | | llvm-svn: 305339
* [InstCombine] Add test cases demonstrating failure to handle (select (icmp ↵Craig Topper2017-06-131-0/+31
| | | | | | | | eq (and X, C1), 0), Y, (or Y, C2)) when the icmp portion gets turned into a truncate and a signed compare with 0. InstCombine has an optimization that recognizes an and with the sign bit of legal type size and turns it into a truncate and compare that checks the sign bit. But the select handling code doesn't recognize this idiom. llvm-svn: 305338
* Make OutputSections and OutputSectionCommands globals.Rafael Espindola2017-06-135-22/+16
| | | | | | | This is similar to what we do for InputSections and makes them easier to access. llvm-svn: 305337
* [www] Add missing '.' at the end of the sentenceTobias Grosser2017-06-131-1/+1
| | | | llvm-svn: 305336
* [libFuzzer] restrict the new test to Linux (fails on Mac currently)Kostya Serebryany2017-06-131-0/+1
| | | | llvm-svn: 305335
* [www] Add the new AOSP buildbot to release notesTobias Grosser2017-06-131-0/+14
| | | | llvm-svn: 305334
* Move clearOutputSections earlier. NFC.Rafael Espindola2017-06-131-8/+8
| | | | llvm-svn: 305333
* [ADT] Revert r305326 changes in BitVector.h to fix broken builds.Eugene Zelenko2017-06-131-28/+22
| | | | llvm-svn: 305332
* [libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in ↵Kostya Serebryany2017-06-138-9/+83
| | | | | | libFuzzer. This is not fully functional yet, but simple tests work llvm-svn: 305331
* [sanitize] Remove stack size limits from secondary threads.Evgeniy Stepanov2017-06-131-1/+0
| | | | | | | | If pthread_attr_getstack tell us the stack is 2G, why would we doubt that? Differential Revision: https://reviews.llvm.org/D34169 llvm-svn: 305330
OpenPOWER on IntegriCloud