summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* AMDGPU: Fix build warning about overrideMatt Arsenault2018-03-051-3/+3
| | | | llvm-svn: 326713
* [CVP] fix formatting; NFCSanjay Patel2018-03-051-4/+2
| | | | llvm-svn: 326711
* Fuzzer: remove temporary files after we're done with them.Tim Northover2018-03-053-0/+10
| | | | | | | | These were just copies of the relevant fuzzer binary with (presumably) meaningful suffixes, but accounted for more than 10% of my build directory (> 8GB). Hard drive space is cheap, but not that cheap. llvm-svn: 326710
* [analyzer] Improves the logic of GenericTaintChecker identifying stdin.Henry Wong2018-03-052-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GenericTaintChecker can't recognize stdin in some cases. The reason is that `if (PtrTy->getPointeeType() == C.getASTContext().getFILEType()` does not hold when stdin is encountered. My platform is ubuntu16.04 64bit, gcc 5.4.0, glibc 2.23. The definition of stdin is as follows: ``` __BEGIN_NAMESPACE_STD /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; ___END_NAMESPACE_STD ... /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE __FILE; ... /* Standard streams. */ extern struct _IO_FILE *stdin; /* Standard input stream. */ extern struct _IO_FILE *stdout; /* Standard output stream. */ extern struct _IO_FILE *stderr; /* Standard error output stream. */ ``` The type of stdin is as follows AST: ``` ElaboratedType 0xc911170'struct _IO_FILE'sugar `-RecordType 0xc911150'struct _IO_FILE' `-CXXRecord 0xc923ff0'_IO_FILE' ``` `C.getASTContext().GetFILEType()` is as follows AST: ``` TypedefType 0xc932710 'FILE' sugar |-Typedef 0xc9111c0 'FILE' `-ElaboratedType 0xc911170 'struct _IO_FILE' sugar `-RecordType 0xc911150 'struct _IO_FILE' `-CXXRecord 0xc923ff0 '_IO_FILE' ``` So I think it's better to use `getCanonicalType()`. Reviewers: zaks.anna, NoQ, george.karpenkov, a.sidorin Reviewed By: zaks.anna, a.sidorin Subscribers: a.sidorin, cfe-commits, xazax.hun, szepet, MTC Differential Revision: https://reviews.llvm.org/D39159 llvm-svn: 326709
* TableGen: Resolve all template args simultaneously in ResolveMulticlassDefARgsNicolai Haehnle2018-03-051-11/+12
| | | | | | | | | | | | | | | | Summary: Use the new resolver interface more explicitly, and avoid traversing all the initializers multiple times. Change-Id: I679e86988b309d19f25e6cca8b0b14ea150198a6 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43654 llvm-svn: 326708
* TableGen: Resolve all template args simultaneously in AddSubMultiClassNicolai Haehnle2018-03-051-12/+20
| | | | | | | | | | | | | | | | Summary: Use the new resolver interface more explicitly, and avoid traversing all the initializers multiple times. Change-Id: Ia4dcc6d42dd8b65e6079d318c6a202f36f320fee Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43653 llvm-svn: 326707
* TableGen: Resolve all template args simultaneously in AddSubClassNicolai Haehnle2018-03-054-27/+52
| | | | | | | | | | | | | | | | | | | | | | Summary: Use the new resolver interface more explicitly, and avoid traversing all the initializers multiple times. Add a test case for a pattern that was broken by an earlier version of this change. An additional change is that we now remove *all* template arguments after resolving them. Change-Id: I86c828c8cc84c18b052dfe0f64c0d5cbf3c4e13c Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43652 llvm-svn: 326706
* TableGen: Reimplement !foreach using the resolving mechanismNicolai Haehnle2018-03-059-153/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This changes the syntax of !foreach so that the first "parameter" is a new syntactic variable: !foreach(x, lst, expr) will define the variable x within the scope of expr, and evaluation of the !foreach will substitute elements of the given list (or dag) for x in expr. Aside from leading to a nicer syntax, this allows more complex expressions where x is deeply nested, or even constant expressions in which x does not occur at all. !foreach is currently not actually used anywhere in trunk, but I plan to use it in the AMDGPU backend. If out-of-tree targets are using it, they can adjust to the new syntax very easily. Change-Id: Ib966694d8ab6542279d6bc358b6f4d767945a805 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits, tpr Differential Revision: https://reviews.llvm.org/D43651 llvm-svn: 326705
* TableGen: Introduce an abstract variable resolver interfaceNicolai Haehnle2018-03-053-60/+150
| | | | | | | | | | | | | | | | | Summary: The intention is to allow us to more easily restructure how resolving is done, e.g. resolving multiple variables simultaneously, or using the resolving mechanism to implement !foreach. Change-Id: I4b976b54a32e240ad4f562f7eb86a4d663a20ea8 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43564 llvm-svn: 326704
* Pass Divergence Analysis data to Selection DAG to drive divergenceAlexander Timofeev2018-03-0519-94/+405
| | | | | | | | dependent instruction selection. Differential revision: https://reviews.llvm.org/D35267 llvm-svn: 326703
* [Polly][CMake] Fix lit setup for building the in the mono repoPhilip Pfaffe2018-03-051-1/+5
| | | | | | | | | | | | | | | | | Summary: When building polly as part of the monorepo (actually, as part of any setup using LLVM_ENABLE_PROJECTS), the LLVMPolly library used in the lit tests ends up in a different directory in the build tree than in an in-tree build Reviewers: Meinersbur, grosser, bollu Reviewed By: Meinersbur Subscribers: mgorny, bollu, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D44078 llvm-svn: 326702
* [Power9] Add more missing instructions to the Power 9 schedulerStefan Pintilie2018-03-052-38/+150
| | | | | | | Adding more instructions using InstRW so that we can move away from ItinRW and ultimately have a complete Power 9 scheduler. llvm-svn: 326701
* TableGen: Allow NAME in template arguments in defm in multiclassNicolai Haehnle2018-03-053-0/+85
| | | | | | | | | | | | | | | | | | | | Summary: NAME has already worked for def in a multiclass, since the (protoype) record including its NAME variable is created before parsing the superclasses. Since defm's do not have an associated single record, support for NAME has to be implemented differently here. Original test cases provided by Artem Belevich (tra) Change-Id: I933b74f328c0ff202e7dc23a35b78f3505760cc9 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43656 llvm-svn: 326700
* TableGen: Use DefInit::getDef() instead of the type's getRecord()Nicolai Haehnle2018-03-051-14/+11
| | | | | | | | | | | The former simply makes more sense: we want to access the data here in the backend, not information about the type. More importantly, removing users of RecordRecTy::getRecord() allows us more freedom to refactor the frontend. Change-Id: Iee8905fd22cdb9b11c42ca03246c03d8fe4dd77f llvm-svn: 326699
* [MergeICmp] We can discard initial blocks that do other workXin Tong2018-03-052-3/+72
| | | | | | | | | | | | | | | | Summary: We can discard initial blocks that do other work We do not need to limit ourselves to just the first block in the chain. Reviewers: courbet, davide Reviewed By: courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44029 llvm-svn: 326698
* [WebAssembly] Add validation to reloc sectionNicholas Wilson2018-03-054-6/+67
| | | | | | | | | | | | We now check relocations offsets are within range, and the relocation index is valid. Also updated tests which contained invalid Wasm files that were previously not checked. Differential Revision: https://reviews.llvm.org/D43684 llvm-svn: 326697
* [ARM][Asm] VMOVSRR and VMOVRRS need sequential S registersOliver Stannard2018-03-052-0/+24
| | | | | | | | | | These instructions require that the two S registers are adjacent (but not the R registers), because only the first register is included in the encoding, but we were not checking this in the assembler. Differential revision: https://reviews.llvm.org/D44084 llvm-svn: 326696
* [WebAssembly] Reorder reloc sections to come between symtab and nameNicholas Wilson2018-03-056-8/+8
| | | | | | | | | | | This is required in order to enable relocs to be validated as they are read in. Also update tests with new section ordering. Differential Revision: https://reviews.llvm.org/D43940 llvm-svn: 326694
* [WebAssembly] Reorder reloc sections to come after symtabNicholas Wilson2018-03-051-1/+1
| | | | | | | | This matches LLVM change D43940. Differential Revision: https://reviews.llvm.org/D43946 llvm-svn: 326693
* [WebAssembly] Fix tests with invalid yaml (required CODE section missing)Nicholas Wilson2018-03-053-3/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D44023 llvm-svn: 326692
* [WebAssembly] Attach a name to globals similarly to function namingNicholas Wilson2018-03-052-3/+10
| | | | | | | | | This allows LLD to print the name for an InputGlobal when encountering an error. Differential Revision: https://reviews.llvm.org/D44033 llvm-svn: 326691
* Fix location of comment in EmitPopInstThomas Preud'homme2018-03-051-1/+1
| | | | | | | Comment about folding return in LDM was not moved along with the corresponding code in r242714. This commit fixes that. llvm-svn: 326690
* [x86][CET] Introduce _get_ssp, _inc_ssp intrinsicsAlexander Ivchenko2018-03-052-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The _get_ssp intrinsic can be used to retrieve the shadow stack pointer, independent of the current arch -- in contract with the rdsspd and the rdsspq intrinsics. Also, this intrinsic returns zero on CPUs which don't support CET. The rdssp[d|q] instruction is decoded as nop, essentially just returning the input operand, which is zero. Example result of compilation: ``` xorl %eax, %eax movl %eax, %ecx rdsspq %rcx # NOP when CET is not supported movq %rcx, %rax # return zero ``` Reviewers: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43814 llvm-svn: 326689
* [ELF] - Support moving location counter when MEMORY is used.George Rimar2018-03-053-29/+62
| | | | | | | | | | | | | | | | We do not expand memory region correctly for following scripts: .foo.1 : { *(.foo.1) . += 0x1000; } > ram Patch generalizes expanding of output sections and memory regions in one place and fixes the issue. Differential revision: https://reviews.llvm.org/D43999 llvm-svn: 326688
* [test] Add dotest wrapperJonas Devlieghere2018-03-052-2/+31
| | | | | | | | | | | | | | | | | | | | | This adds a wrapper around dotest, similar to llvm-lit in llvm. The wrapper is created in the binary directory, next to LLDB and allows you to invoke dotest without having to pass any of the configuration arguments yourself. I think this could also be useful for re-running a particular test case when it fails, as an alternative to "Command Invoked". The motivation for this is that I'd like to replace the driver part of dotest with lit. As a first step, I'd like to have lit invoke dotest, which would just run the complete test suite, completely identical to what the CMake target does today. Once this is in place, we can have lit run dotest for the different test directories, and ultimately once per python file. Along the way we can strip out driver functionality from dotest where appropriate. https://reviews.llvm.org/D44002 llvm-svn: 326687
* [ELF] - Report location for div/mod by zero.George Rimar2018-03-052-20/+27
| | | | | | | | | | | "division by zero" or "modulo by zero" are not very informative errors and even probably confusing as does not let to know that error is coming from linker script. Patch adds location reporting. Differential revision: https://reviews.llvm.org/D43934 llvm-svn: 326686
* [Bash-autocompletion] Fixed formattingYuka Takahashi2018-03-051-3/+4
| | | | | | Fixed a trivial formatting and indent. llvm-svn: 326685
* [Bash-autocompletion] Pass all flags in shell command-line to ClangYuka Takahashi2018-03-055-78/+75
| | | | | | | | | | | | | | | | | | | | Previously, we passed "#" to --autocomplete to indicate to enable cc1 flags. For example, when -cc1 or -Xclang was passed to bash, bash executed `clang --autocomplete=#-<flag they want to complete>`. However, this was not a good implementation because it depends -Xclang and -cc1 parsing to shell. So I changed this to pass all flags shell has, so that Clang can handle them internally. I had to change many testcases because API spec changed quite a lot. Reviewers: teemperor, v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39342 llvm-svn: 326684
* [MergeICmps][NFC] Improve logging.Clement Courbet2018-03-051-7/+9
| | | | llvm-svn: 326683
* [X86] Replace usages of X86Subtarget::hasFp256 with hasAVX. Remove hasFP256.Craig Topper2018-03-053-11/+10
| | | | | | | | Almost none of these usages were FP specific. And we had no clear guideliness on when to use hasAVX vs hasFP256. I might also remove hasInt256 too since its an alias for hasAVX2. llvm-svn: 326682
* [X86] Add a DAG combine to turn stores of vXi1 constants into scalar stores.Craig Topper2018-03-044-124/+73
| | | | llvm-svn: 326679
* [X86] Add a 32-bit mode command line to avx512-mask-op.ll. Add tests for ↵Craig Topper2018-03-041-0/+711
| | | | | | storing v2i1 and v4i1 constants. llvm-svn: 326678
* [DAGCombiner] Add a peekThroughBitcast to MergeStoresOfConstantsOrVecElts to ↵Craig Topper2018-03-042-0/+33
| | | | | | | | fix a crash if we are storing a bitcast of a constant. Loading a constant into a k-register in AVX512 requires a bitcast from a scalar constant. In the test case here we have a k-register store that gets split into multiple parts of KNL. MergeConsecutiveStores sees each of these pieces as a consecutive store and looks through the bitcast to find the underly scalar constant. But when we went to create the combined store we didn't look through the same bitcast. llvm-svn: 326677
* Amend r326665 to print out the `used` attribute subjects in a different order.Aaron Ballman2018-03-042-3/+3
| | | | llvm-svn: 326676
* Replace the custom handling for several attributes; NFC.Aaron Ballman2018-03-041-64/+10
| | | | | | These attributes were only customized because of the need to check for attribute mutual exclusion, but we now have the handleSimpleAttributeWithExclusions() helper function to handle these scenarios. llvm-svn: 326675
* [X86][X87] Add X87 folded integer arithmetic testsSimon Pilgrim2018-03-041-0/+621
| | | | | | | | Add tests for FIADD/FISUB/FISUBR/FIMUL/FIDIV/FIDIVR Shows we have more FILD stack usage than necessary (arg load, spill, reload to x87) llvm-svn: 326674
* [X86][MMX] Remove completed _mm_cvtsi32_si64 todoSimon Pilgrim2018-03-041-29/+0
| | | | | | | | | | rL322525 - mmx zero constant support rL322553 - mmx i32 zero extended value rL326497 - mmx i64 general constant handling Not all constants are folded, we generate some on the GPRs (similar to SSE build vector) where appropriate llvm-svn: 326673
* [X86] Fix unused variable in release builds.Craig Topper2018-03-041-4/+5
| | | | llvm-svn: 326672
* llgs-tests: use the auto-parsing form of SendMessage for sending the ↵Pavel Labath2018-03-042-11/+8
| | | | | | continue packets llvm-svn: 326671
* [X86] Combine (store (v1i1 (scalar_to_vector (i8 X)))) -> (store (i8 X)).Craig Topper2018-03-042-14/+24
| | | | llvm-svn: 326670
* [X86] Lower v1i1/v2i1/v4i1/v8i1 load/stores to i8 load/store during op ↵Craig Topper2018-03-043-38/+68
| | | | | | | | legalization if AVX512DQ is not supported. We were previously doing this with isel patterns. Moving it to op legalization gives us chance to see the required bitcast earlier. And it lets us remove some isel patterns. llvm-svn: 326669
* [CallSiteSplitting] fix use after-freeFedor Indutny2018-03-031-2/+7
| | | | | | | | Iterating through predecessors of `TailBB` while removing their terminators leads to use after-free, because the predecessor list is changing on each removal. llvm-svn: 326668
* ObjectFileMachO: use early return to remove one nesting level from ↵Pavel Labath2018-03-031-532/+513
| | | | | | | | CreateSections() NFCI llvm-svn: 326667
* [CallSiteSplitting] properly split musttail callsFedor Indutny2018-03-032-4/+147
| | | | | | | | | | | | | | | | | | | | Summary: `musttail` calls can't be naively splitted. The split blocks must include not only the call instruction itself, but also (optional) `bitcast` and `return` instructions that follow it. Clone `bitcast` and `ret`, place them into the split blocks, and remove the tail block when done. Reviewers: junbuml, mcrosier, davidxl, davide, fhahn Reviewed By: fhahn Subscribers: JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D43729 llvm-svn: 326666
* Create a subject list for the `used` attribute rather than use custom ↵Aaron Ballman2018-03-033-20/+7
| | | | | | | | checking logic. This changes the diagnostic wording somewhat, but otherwise intends no functional change to the attribute. llvm-svn: 326665
* [ScopInfo] Do not use the set dimension ids to carry loop informationTobias Grosser2018-03-035-48/+22
| | | | | | | | | | | | | | isl does not guarantee that set dimension ids will be preserved, so using them to carry information is not a good idea. Furthermore, the loop information can be derived without problem from the statement itself. As this even requires less code than propagating loop information on set dimension ids, starting from this commit we just derive the loop information in collectSurroundingLoops directly from the IR. Interestingly this also results in a couple of isl sets to take a simpler representation. llvm-svn: 326664
* Remove more references to ptrace_pt_{g,s}et_sigmaskKamil Rytarowski2018-03-032-8/+0
| | | | | | | | | | These operations are now obsolete on NetBSD and will be removed. No functional change for other OSes. Sponsored by <The NetBSD Foundation> llvm-svn: 326663
* Fix NetBSD 32-bit buildKamil Rytarowski2018-03-031-1/+1
| | | | | | | | Replace 'defined(SANITIZER_OPENBSD)' with appropriate 'SANITIZER_OPENBSD'. This is a fallout from adding OpenBSD partial support. llvm-svn: 326662
* [InstCombine] add test for vectors with undef elts; NFCSanjay Patel2018-03-031-1/+14
| | | | llvm-svn: 326661
* [InstCombine] (~X) - (~Y) --> Y - XSanjay Patel2018-03-032-4/+7
| | | | llvm-svn: 326660
OpenPOWER on IntegriCloud