summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [scudo] Use gc-sections by defaultKostya Kortchinsky2018-03-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: If not using `-Wl,--gc-sections`, a whole lot of unused `sanitizer_common` code and related static variables are pulled into the shared library. Keep the binary size smaller, and its memory footprint smaller as well, by using the compiler flags `-ffunction-section` & `-fdata-sections` by default, as well as the linker flags `-Wl,--gc-sections`. Current experiments show a large discrepency between binary sizes generated by gcc (big) and clang (small). I am not sure yet how I can make a test that would encompass both, so it's an outstanding work item. Reviewers: alekseyshl, flowerhack Reviewed By: alekseyshl Subscribers: mgorny, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44121 llvm-svn: 326833
* [TargetLowering] Rename DAGCombinerInfo::isAfterLegalizeVectorOps to ↵Craig Topper2018-03-064-4/+4
| | | | | | | | | | | | DAGCombiner::isAfterLegalizeDAG since that's what it checks. NFC The code checks Level == AfterLegalizeDAG which is the fourth and last of the possible DAG combine stages that we have. There is a Level called AfterLegalVectorOps, but that's the third DAG combine and it doesn't always run. A function called isAfterLegalVectorOps should imply it returns true in either of the DAG combines that runs after the legalize vector ops stage, but that's not what this function does. llvm-svn: 326832
* [SymboleFilePDB] Put the test input back that my previous commit clobberedAaron Smith2018-03-061-0/+0
| | | | llvm-svn: 326831
* [Hexagon] Update more testcasesKrzysztof Parzyszek2018-03-0634-112/+103
| | | | llvm-svn: 326830
* [Hexagon] Remove {{ *}} from testcasesKrzysztof Parzyszek2018-03-0630-198/+197
| | | | | | The spaces in the instructions are now consistent. llvm-svn: 326829
* [InstCombine] simplify min/max canonicalization; NFCISanjay Patel2018-03-061-10/+5
| | | | llvm-svn: 326828
* [OPENMP] Fix generation of the unique names for task reductionAlexey Bataev2018-03-063-17/+32
| | | | | | | | | | | variables. If the task has reduction construct and this construct for some variable requires unique threadprivate storage, we may generate different names for variables used in taskgroup task_reduction clause and in task in_reduction clause. Patch fixes this problem. llvm-svn: 326827
* [X86] Reject registers that require a REX prefix in inline asm constraints ↵Craig Topper2018-03-063-2/+33
| | | | | | | | | | in 32-bit mode We don't currently reject r8-r15 or xmm8-32 or bpl/spl/sil/dil in 32-bit mode. Differential Revision: https://reviews.llvm.org/D44031 llvm-svn: 326826
* [AMDGPU] Add default ISA version targetsStanislav Mekhanoshin2018-03-062-0/+12
| | | | | | | | | | | In case if -mattr used to modify feature set bits in llvm-mc call getIsaVersion can fail to identify specific ISA due to test mismatch. Adding default fallback tests which will always correctly report at least major version. Differential Revision: https://reviews.llvm.org/D44163 llvm-svn: 326825
* [CodeView] Emit UdtSourceLine information for enumsAaron Smith2018-03-064-14/+41
| | | | | | | | | | | | | | | | | Summary: - Emit UdtSourceLine information for enums to match MSVC - Add a method to add UDTSrcLine and call it for all Class/Struct/Union/Enum - Update test cases to verify the changes Reviewers: zturner, llvm-commits, rnk Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D44116 llvm-svn: 326824
* [PatternMatch] define m_Not using m_Xor and cst_pred_tySanjay Patel2018-03-063-38/+15
| | | | | | | | | | | | | Using cst_pred_ty in the definition allows us to match vectors with undef elements. This is a continuation of an effort to make all pattern matchers allow undef elements in vectors: rL325437 rL325466 D43792 Differential Revision: https://reviews.llvm.org/D44076 llvm-svn: 326823
* TableGen: Give up on exact fixits for diagnostic groupsNicolai Haehnle2018-03-063-67/+17
| | | | | | | | | | | With recent changes in the TableGen frontend, we no longer have usable location information for anonymous defs. Fixes test breakage caused by r326788. The normal, non-error TableGen output is not affected by this change. llvm-svn: 326822
* lgamma_r: Move code from .inc to .cl fileJan Vesely2018-03-062-475/+496
| | | | | | Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326821
* frexp: Reuse types provided by gentype.incJan Vesely2018-03-062-78/+53
| | | | | | | | | | | v2: Use select instead of bitselect to consolidate scalar and vector versions Passes CTS on Carrizo Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326820
* select: Add vector implementationJan Vesely2018-03-065-1/+91
| | | | | | | | Passes CTS on Carrizo Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326819
* minmag: Condition variable needs to be the same bitwidth as operandsJan Vesely2018-03-062-2/+21
| | | | | | | | No changes wrt CTS Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326818
* maxmag: Condition variable needs to be the same bitwidth as operandsJan Vesely2018-03-062-2/+21
| | | | | | | | No changes wrt CTS Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326817
* Move cl_khr_fp64 exntension enablement to gentype include listsJan Vesely2018-03-0626-87/+7
| | | | | | | | This will make adding cl_khr_fp16 support easier Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326816
* [clang-format] Improve detection of ObjC for-in statementsBen Hamilton2018-03-063-3/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, clang-format would detect the following as an Objective-C for-in statement: for (int x = in.value(); ...) {} because the logic only decided a for-loop was definitely *not* an Objective-C for-in loop after it saw a semicolon or a colon. To fix this, I delayed the decision of whether this was a for-in statement until after we found the matching right-paren, at which point we know if we've seen a semicolon or not. Test Plan: New tests added. Ran tests with: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: krasimir, jolesiak Reviewed By: jolesiak Subscribers: djasper, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D43904 llvm-svn: 326815
* Refactor check for dllimport in the Verifier.Rafael Espindola2018-03-062-13/+6
| | | | | | This avoids duplicated code and now also rejects dllimport aliases. llvm-svn: 326814
* Improve duplicated version handling.Rafael Espindola2018-03-062-5/+9
| | | | | | | | | | | | It looks like the problem that caused us to originally warn instead of error was that of a symbol being assigned to the same version twice. Now we don't warn if a symbol is assigned to the same version twice, but error if it is assigned to multiple. This fixes pr28342. llvm-svn: 326813
* [ValueTracking] move helpers for SelectPatterns from InstCombine to ↵Sanjay Patel2018-03-063-53/+50
| | | | | | | | | ValueTracking Most of the folds based on SelectPatternResult belong in InstSimplify rather than InstCombine, so the helper code should be available to other passes/analysis. llvm-svn: 326812
* [AArch64] define isExtractSubvectorCheapSebastian Pop2018-03-065-21/+17
| | | | | | | | | | | | | | | | | | Following the ARM-neon backend, define isExtractSubvectorCheap to return true when extracting low and high part of a neon register. The patch disables a test in llvm/test/CodeGen/AArch64/arm64-ext.ll This testcase is fragile in the sense that it requires a BUILD_VECTOR to "survive" all DAG transforms until ISelLowering. The testcase is supposed to check that AArch64TargetLowering::ReconstructShuffle() works, and for that we need a BUILD_VECTOR in ISelLowering. As we now transform the BUILD_VECTOR earlier into an VEXT + vector_shuffle, we don't have the BUILD_VECTOR pattern when we get to ISelLowering. As there is no way to disable the combiner to only exercise the code in ISelLowering, the patch disables the testcase. Differential revision: https://reviews.llvm.org/D43973 llvm-svn: 326811
* [Asm] Fix another layering violation in assmebly macro dumpingOliver Stannard2018-03-061-1/+1
| | | | | | | | AsmToken is in the MCParser library, so we can't use its dump function from MCAsmMacro in the MC library. Instead, just print the string, which we don't need the MCParser library for. llvm-svn: 326810
* [clangd] Don't end completion item labels with '::'Ilya Biryukov2018-03-063-3/+17
| | | | llvm-svn: 326809
* [Pipeliner] Test commit: fixed spelling mistake in commentsRoorda, Jan-Willem2018-03-061-1/+1
| | | | | | | | | | Reviewers: bcahoon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44152 llvm-svn: 326808
* [X86] Fix typo in cpuid.h, bit_AVX51SER->bit_AVX512ER.Craig Topper2018-03-061-1/+1
| | | | llvm-svn: 326807
* [AMDGPU] Fix lowering OpenCL enqueue_kernelYaxun Liu2018-03-062-76/+69
| | | | | | | | | | One addrspacecast disappeared in clang emitted IR for block invoke function due to adoption of the new addr space mapping. Differential Revision: https://reviews.llvm.org/D43785 llvm-svn: 326806
* Rewrite TestTargetSymbolsBuildidCase to be more focusedPavel Labath2018-03-065-46/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was failing in remote debugging scenario with windows as a host as cmd.exe is not able to parse the complicated shell commands in the Makefile. The test seemed like a perfect candidate for a more focused testing approach, so I have rewritten in on top of lldb-test's module-sections functionality. The slight gotcha there was that the Module::GetSectionList does not include the sections from the symbol file until someone manually calls Module::GetSymbolVendor. Normally, this is not an issue, because someone will have initialized the symbol vendor by the time anyone starts looking at the sections. However, when all one this is dump the section list, we run into this problem. I've tried making this behavior more automatic, but it turns out it's not that easy, so for now, I just manually initialize the Symbol Vendor before dumping out the sections in lldb-test. Reviewers: jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D42914 llvm-svn: 326805
* [ARM][Asm] Fix layering violation introduced by r326795Oliver Stannard2018-03-062-9/+7
| | | | | | | The MCAsmMacro::dump function is in the MCParser library, so can't be called from the MC library. llvm-svn: 326804
* [ARM]Decoding MSR with unpredictable destination register causes an assertSimi Pallipurath2018-03-065-7/+27
| | | | | | | | | | | | | | | This patch handling: Enable parsing of raw encodings of system registers . Allows UNPREDICTABLE sysregs to be decoded to a raw number in the same way that disasslib does, rather than llvm crashing. Disassemble msr/mrs with unpredictable sysregs as SoftFail. Fix regression due to SoftFailing some encodings. Patch by Chris Ryder Differential revision:https://reviews.llvm.org/D43374 llvm-svn: 326803
* One more test for P0767:Marshall Clow2018-03-061-0/+8
| | | | llvm-svn: 326802
* Implement P0767R1 - Deprecate PODMarshall Clow2018-03-064-3/+116
| | | | llvm-svn: 326801
* test commit: fix typo in comment Simi Pallipurath2018-03-061-1/+1
| | | | | | This is a simple change to do the test commit and verify commit access. llvm-svn: 326800
* [clang-tidy] Fix one corner case in make-unique check.Haojian Wu2018-03-062-9/+9
| | | | | | | | | | | | | | | | | Summary: Previously, we tried to cover all "std::initializer_list" implicit conversion cases in the code, but there are some corner cases that not covered (see newly-added test in the patch). Sipping all implicit AST nodes is a better way to filter out all these cases. Reviewers: ilya-biryukov Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D44137 llvm-svn: 326799
* [clangd] Address missed comments from D44003Sam McCall2018-03-061-2/+4
| | | | llvm-svn: 326798
* [demangler] Modernize the rest of the demangler.Erik Pilkington2018-03-062-458/+290
| | | | llvm-svn: 326797
* [demangler] Modernize parse_unresolved_name.Erik Pilkington2018-03-061-403/+177
| | | | llvm-svn: 326796
* [Asm] Add debug printing for assembler macrosOliver Stannard2018-03-064-1/+58
| | | | | | | | | This adds some debug printing (gated behind the "asm-macros" debug flag) which can help tracing complicated assembly macros. Differential revision: https://reviews.llvm.org/D43937 llvm-svn: 326795
* [Asm] Refactor debug printing of AsmTokenOliver Stannard2018-03-063-137/+100
| | | | | | | | | | | | | | * Move printing from llvm-mc to the AsmToken class, so that it can be used elsewhere. * Add 5 cases which were missed: BigNum, Comment, HashDirective, Space and BackSlash, and remove the default case so that -Wswitch will catch this error in future. This is almost NFC, except for the fact that llvm-mc can now print those 5 tokens in -as-lex mode. Differential revision: https://reviews.llvm.org/D43936 llvm-svn: 326794
* [CallSiteSplitting] Do not crash when BB's terminator changes.Florian Hahn2018-03-062-1/+97
| | | | | | | | | | | | | | | Change doCallSiteSplitting to iterate until we reach the terminator instruction. tryToSplitCallSite can replace BB's terminator in case BB is a successor of itself. Then IE will be invalidated and we also have to check the current terminator. Reviewers: junbuml, davidxl, davide, fhahn Reviewed By: fhahn, junbuml Differential Revision: https://reviews.llvm.org/D43824 llvm-svn: 326793
* [clang-format] fix handling of consecutive unary operatorsKrasimir Georgiev2018-03-063-4/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: Code that used to be formatted as `if (! + object) {` is now formatted as `if (!+object) {` (we have a particular object in our codebase where unary `operator+` is overloaded to return the underlying value, which in this case is a `bool`) We still preserve the TypeScript behavior where `!` is a trailing non-null operator. (This is already tested by an existing unit test in `FormatTestJS.cpp`) It doesn't appear like handling of consecutive unary operators are tested in general, so I added another test for completeness Patch contributed by @kevinl! Reviewers: krasimir Reviewed By: krasimir Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43312 llvm-svn: 326792
* ObjectFileMachO: split CreateSections mega-function into more manageable chunksPavel Labath2018-03-062-508/+517
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In an effort to understand the function's operation, I've split it into logical pieces. Parsing of a single segment is moved to a separate function (and the parsing state that is carried from one segment to another is explicitly captured in the SegmentParsingContext object). I've also extracted some pieces of code which were already standalone (validation of the segment load command, determining the section type, determining segment permissions) into separate functions. Parsing of a single section within the segment should probably also be a separate function, but I've left that for a separate patch. This patch is intended to be NFC. Reviewers: clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D44074 llvm-svn: 326791
* TableGen: Add !foldl operationNicolai Haehnle2018-03-068-4/+312
| | | | | Change-Id: I63d67bf6e0b315e2d3360e47e3b62c9517f38987 llvm-svn: 326790
* TableGen: Remove the ResolveFirst mechanismNicolai Haehnle2018-03-062-27/+1
| | | | | | | | | | | | | | | Summary: It is no longer used. Change-Id: I1e47267d1975d43ad43acd6347f54e958e3b6c86 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43757 llvm-svn: 326789
* TableGen: Delay instantiating inline anonymous recordsNicolai Haehnle2018-03-064-45/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Only instantiate anonymous records once all variable references in template arguments have been resolved. This allows patterns like the new test case, which in practice can appear in expressions like: class IntrinsicTypeProfile<list<LLVMType> ty, int shift> { list<LLVMType> types = !listconcat(ty, [llvm_any_ty, LLVMMatchType<shift>]); } class FooIntrinsic<IntrinsicTypeProfile P, ...> : Intrinsic<..., P.types, ...>; Without this change, the anonymous LLVMMatchType instantiation would never get resolved. Another consequence of this change is that anonymous inline instantiations are uniqued via the folding set of the newly introduced VarDefInit. Change-Id: I7a7041a20e297cf98c9109b28d85e64e176c932a Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43756 llvm-svn: 326788
* TableGen: Move getNewAnonymousName into RecordKeeperNicolai Haehnle2018-03-064-17/+17
| | | | | | | | | | | | | | | | Summary: So that we will be able to generate new anonymous names more easily outside the parser as well. Change-Id: I28f396a7bdbc3ff0c665d466abbd3d31376e21b4 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43755 llvm-svn: 326787
* TableGen: Explicitly check whether a record has been resolvedNicolai Haehnle2018-03-065-15/+92
| | | | | | | | | | | | | | | | | | Summary: There are various places where resolving and constant folds can get stuck, especially around casts. We don't always signal an error for those, because in many cases they can legitimately occur without being an error in the "untaken branch" of an !if. Change-Id: I3befc0e4234c8e6cc61190504702918c9f29ce5c Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43754 llvm-svn: 326786
* TableGen: Allow !cast of records, cleanup conversion machineryNicolai Haehnle2018-03-068-161/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Distinguish two relationships between types: is-a and convertible-to. For example, a bit is not an int or vice versa, but they can be converted into each other (with range checks that you can think of as "dynamic": unlike other type checks, those range checks do not happen during parsing, but only once the final values have been established). Actually converting initializers between types is subtle: even when values of type A can be converted to type B (e.g. int into string), it may not be possible to do so with a concrete initializer (e.g., a VarInit that refers to a variable of type int cannot be immediately converted to a string). For this reason, distinguish between getCastTo and convertInitializerTo: the latter implements the actual conversion when appropriate, while the former will first try to do the actual conversion and fall back to introducing a !cast operation so that the conversion will be delayed until variable references have been resolved. To make the approach of adding !cast operations to work, !cast needs to fallback to convertInitializerTo when the special string <-> record logic does not apply. This enables casting records to a subclass, although that new functionality is only truly useful together with !isa, which will be added in a later change. The test is removed because it uses !srl on a bit sequence, which cannot really be supported consistently, but luckily isn't used anywhere either. Change-Id: I98168bf52649176654ed2ec61a29bdb29970cfe7 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43753 llvm-svn: 326785
* TableGen: Simplify BitsInit::resolveReferencesNicolai Haehnle2018-03-063-46/+48
| | | | | | | | | | | | | | | | | | | | Summary: No functional change intended. The removed code has a loop for recursive resolving, which is superseded by the recursive resolving done by the Resolver implementations. Add a test case which was broken by an earlier version of this change. Change-Id: Ib208d037b77a8bbb725977f1388601fc984723d8 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43655 llvm-svn: 326784
OpenPOWER on IntegriCloud