summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MachineOutliner][NFC] Don't add MBBs with a size < 2 to the search spaceJessica Paquette2018-09-201-1/+5
| | | | | | | | | | | The suffix tree won't ever consider sequences with a length less than 2. Therefore, we really ought to not even consider them in the first place. Also add a FIXME explaining that this should be defined in terms of the size in B of an outlined call versus the size in B of the MBB. llvm-svn: 342688
* Rename a function. NFC.Rui Ueyama2018-09-201-2/+2
| | | | llvm-svn: 342687
* Make variable names shorter. NFC.Rui Ueyama2018-09-201-11/+10
| | | | llvm-svn: 342686
* Simplify. NFC.Rui Ueyama2018-09-201-7/+3
| | | | llvm-svn: 342685
* [GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC].Xin Tong2018-09-201-1/+1
| | | | | | | | | | | | | | | | Summary: AvailableExternal was not handled in isDiscardableIfUnused when isDiscardableIfUnused was added in r158476. Till it was handled in r247044. This is a NFC. Reviewers: pcc, tejohnson Reviewed By: tejohnson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52319 llvm-svn: 342684
* [InstCombine] rename test file, simplify tests, regenerate full checks; NFCSanjay Patel2018-09-202-39/+58
| | | | | | Fast-math is irrelevant for these transforms. llvm-svn: 342683
* [RegAllocGreedy] Fix crash in tryLocalSplitWalter Lee2018-09-202-1/+270
| | | | | | | | | | tryLocalSplit only handles a single use block, but an interval may have multiple use blocks. So don't crash in that case. This fixes PR38795. Differential revision: https://reviews.llvm.org/D52277 llvm-svn: 342682
* [PDB] Fix -Wcovered-switch-default warning.Zachary Turner2018-09-201-3/+0
| | | | llvm-svn: 342681
* [Hwasan] interceptor macro / extra comma removalDavid Carlier2018-09-201-5/+5
| | | | | | | | | | | | gcc being pedantic, removing the unnecessary comma. Reviewers: eugenis, kcc Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D52305 llvm-svn: 342680
* Fix an assert in -Wquoted-include-in-framework-headerErik Pilkington2018-09-204-1/+6
| | | | | | | | Fixes rdar://43692300 Differential revision: https://reviews.llvm.org/D52253 llvm-svn: 342679
* [Bitcode] Address backwards compat bug in r342631Vedant Kumar2018-09-203-2/+10
| | | | | | | | | | | | | | | | | r342631 expanded bitc::METADATA_LOCATION by one element. The bitcode metadata loader was changed in a backwards-incompatible way, leading to crashes when disassembling old bitcode: assertion: empty() && "PlaceholderQueue hasn't been flushed before being destroyed" Assertion failed: (empty() && "PlaceholderQueue hasn't been flushed before being destroyed") This commit teaches the metadata loader to assume that the newly-added IsImplicitCode bit is 'false' when not present in old bitcode. I've added a bitcode compat regression test. rdar://44645820 llvm-svn: 342678
* [MachineOutliner][NFC] Move debug info emission to createOutlinedFunctionJessica Paquette2018-09-201-35/+23
| | | | | | | | | When you create an outlined function, you know everything you need to know to decide if debug info should be created. If we emit debug info in createOutlinedFunction, then we don't need to keep track of every IR function we create. llvm-svn: 342677
* [inline Cost] Don't mark functions accessing varargs as non-inlinableSameer AbuAsal2018-09-202-7/+34
| | | | | | | | | | | | | | | | | | Summary: rL323619 marks functions that are calling va_end as not viable for inlining. This patch reverses that since this va_end doesn't need access to the vriadic arguments list that are saved on the stack, only va_start does. Reviewers: efriedma, fhahn Reviewed By: fhahn Subscribers: eraman, haicheng, llvm-commits Differential Revision: https://reviews.llvm.org/D52067 llvm-svn: 342675
* Fix -Wtrigraphs.Rui Ueyama2018-09-201-1/+1
| | | | llvm-svn: 342674
* Add paretntheses around a C macro parameter.Rui Ueyama2018-09-201-1/+1
| | | | llvm-svn: 342673
* [Sema] Retain __restrict qualifiers when substituting a reference type.Erik Pilkington2018-09-202-3/+27
| | | | | | | | Fixes rdar://43760099 Differential revision: https://reviews.llvm.org/D52271 llvm-svn: 342672
* Replace boolean parameter with enum value according r342633Tatyana Krasnukha2018-09-201-1/+1
| | | | llvm-svn: 342671
* Fix warnings.Zachary Turner2018-09-202-4/+3
| | | | llvm-svn: 342670
* [SelectionDAG] replace duplicated peekThroughBitcast helper functions; NFCISanjay Patel2018-09-204-51/+39
| | | | | | | | | | | | | | x86 had 2 versions of peekThroughBitcast. DAGCombiner had 1. Plus, it had a 1-off implementation for the one-use variant. Move the x86 versions of the code to SelectionDAG, so we don't have different copies of the code. No functional change intended. I'm putting this next to isBitwiseNot() because I am planning to use it in there. Another option is next to the helpers in the ISD namespace (eg, ISD::isConstantSplatVector()). But if there's no good reason for those to be there, I'd prefer to pull other helpers over to SelectionDAG in follow-up steps. Differential Revision: https://reviews.llvm.org/D52285 llvm-svn: 342669
* Add testcases for r342667.Eric Christopher2018-09-202-0/+6
| | | | llvm-svn: 342668
* r342177 introduced a hint in cases where an #included file is not found. It ↵Eric Christopher2018-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | tries to find a suggestion by removing leading or trailing non-alphanumeric characters and checking if a matching file exists, then it reports an error like: include-likely-typo.c:3:10: error: '<empty_file_to_include.h>' file not found, did you mean 'empty_file_to_include.h'? ^~~~~~~~~~~~~~~~~~~~~~~~~~~ "empty_file_to_include.h" 1 error generated. However, if a hint is not found, the error message will show only the trimmed name we use to look for a hint, so: will result in: include-leading-nonalpha-no-suggest.c:3:10: fatal error: 'non_existing_file_to_include.h' file not found ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. where the name reported after "fatal error:" doesn't match what the user wrote. Patch by Jorge Gorbe! Differential Revision: https://reviews.llvm.org/D52280 This change reports the original file name instead of the trimmed one when a suggestion is not found. llvm-svn: 342667
* [OPENMP] Fix spelling of getLoopCounter (NFC)Mike Rice2018-09-204-7/+7
| | | | llvm-svn: 342666
* [InstCombine] add tests for vector concat with binop (PR33026); NFCSanjay Patel2018-09-201-0/+281
| | | | llvm-svn: 342665
* [New PM] Introducing PassInstrumentation frameworkFedor Sergeev2018-09-2022-35/+720
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interface" posted 06/07/2018 on llvm-dev@ The intent is to provide a common machinery to implement all the pass-execution-debugging features like print-before/after, opt-bisect, time-passes etc. Here we get a basic implementation consisting of: * PassInstrumentationCallbacks class that handles registration of callbacks and access to them. * PassInstrumentation class that handles instrumentation-point interfaces that call into PassInstrumentationCallbacks. * Callbacks accept StringRef which is just a name of the Pass right now. There were some ideas to pass an opaque wrapper for the pointer to pass instance, however it appears that pointer does not actually identify the instance (adaptors and managers might have the same address with the pass they govern). Hence it was decided to go simple for now and then later decide on what the proper mental model of identifying a "pass in a phase of pipeline" is. * Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies on different IRUnits (e.g. Analyses). * PassInstrumentationAnalysis analysis is explicitly requested from PassManager through usual AnalysisManager::getResult. All pass managers were updated to run that to get PassInstrumentation object for instrumentation calls. * Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra args out of a generic PassManager's extra args. This is the only way I was able to explicitly run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or RepeatedPass::run. TODO: Upon lengthy discussions we agreed to accept this as an initial implementation and then get rid of getAnalysisResult by improving RepeatedPass implementation. * PassBuilder takes PassInstrumentationCallbacks object to pass it further into PassInstrumentationAnalysis. Callbacks registration should be performed directly through PassInstrumentationCallbacks. * new-pm tests updated to account for PassInstrumentationAnalysis being run * Added PassInstrumentation tests to PassBuilderCallbacks unit tests. Other unit tests updated with registration of the now-required PassInstrumentationAnalysis. Made getName helper to return std::string (instead of StringRef initially) to fix asan builtbot failures on CGSCC tests. Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D47858 llvm-svn: 342664
* Refactor FindVariable() core functionality into StackFrame out of SBFrameShafik Yaghmour2018-09-203-20/+52
| | | | | | | | | | rdar://problem/14365983 Patch by Shafik Yaghmour Differential Revision: https://reviews.llvm.org/D52247 llvm-svn: 342663
* [ELF][HEXAGON] Set DefaultMaxPageSize to 64KSid Manning2018-09-202-50/+56
| | | | | | Update testcase to reflect the change. llvm-svn: 342662
* [profile] Fix tests in compiler-rt for patch in gcov ↵Calixte Denizet2018-09-203-5/+3
| | | | | | | | | | | | | | | | (https://reviews.llvm.org/D49659) Summary: Some tests are broken if patch in D49659 is accepted so this patch fixes them. Reviewers: marco-c Reviewed By: marco-c Subscribers: dberris, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49721 llvm-svn: 342661
* Fix one more test failure.Zachary Turner2018-09-201-3/+3
| | | | llvm-svn: 342660
* [PDB] Fix failing test.Zachary Turner2018-09-201-3/+3
| | | | | | | This test was missed on the last run since I only ran a subset of them before commiting. llvm-svn: 342659
* [PDB] Better printing of builtin types when using DIA dumper.Zachary Turner2018-09-204-2/+34
| | | | llvm-svn: 342658
* [gcov] Fix wrong line hit counts when multiple blocks are on the same lineCalixte Denizet2018-09-2015-48/+174
| | | | | | | | | | | | | | | | | | | | | Summary: The goal of this patch is to have the same behaviour than gcc-gcov. Currently the hit counts for a line is the sum of the counts for each block on that line. The idea is to detect the cycles in the graph of blocks in using the algorithm by Hawick & James. The count for a cycle is the min of the counts for each edge in the cycle. Once we've the count for each cycle, we can sum them and add the transition counts of those cycles. Fix both https://bugs.llvm.org/show_bug.cgi?id=38065 and https://bugs.llvm.org/show_bug.cgi?id=38066 Reviewers: marco-c, davidxl Reviewed By: marco-c Subscribers: vsk, lebedev.ri, sylvestre.ledru, dblaikie, llvm-commits Differential Revision: https://reviews.llvm.org/D49659 llvm-svn: 342657
* [PDB] Add the ability to map forward references to full decls.Zachary Turner2018-09-2015-17/+416
| | | | | | | | | | | | | | | | | | | | | Some records point to an LF_CLASS, LF_UNION, LF_STRUCTURE, or LF_ENUM which is a forward reference and doesn't contain complete debug information. In these cases, we'd like to be able to quickly locate the full record. The TPI stream stores an array of pre-computed record hash values, one for each type record. If we pre-process this on startup, we can build a mapping from hash value -> {list of possible matching type indices}. Since hashes of full records are only based on the name and or unique name and not the full record contents, we can then use forward ref record to compute the hash of what *would* be the full record by just hashing the name, use this to get the list of possible matches, and iterate those looking for a match on name or unique name. llvm-pdbutil is updated to resolve forward references for the purposes of testing (plus it's just useful). Differential Revision: https://reviews.llvm.org/D52283 llvm-svn: 342656
* [llvm-mca][BtVer2] Modify ANDN tests in zero-idioms-avx-256.s. NFCAndrea Di Biagio2018-09-201-42/+42
| | | | | | | Two test cases should have tested 256-bit variants of VANDN zero-idioms instead of the 128-bit variants. llvm-svn: 342655
* Fix test after r342652David Major2018-09-201-0/+1
| | | | llvm-svn: 342654
* [IR] add shuffle query for vector concatenationSanjay Patel2018-09-203-0/+67
| | | | | | This can be used for combining and in the vectorizers/cost models. llvm-svn: 342653
* [winasan] Unpoison the stack in NtTerminateThreadDavid Major2018-09-201-1/+11
| | | | | | | | In long-running builds we've seen some ASan complaints during thread creation that we suspect are due to leftover poisoning from previous threads whose stacks occupied that memory. This patch adds a hook that unpoisons the stack just before the NtTerminateThread syscall. Differential Revision: https://reviews.llvm.org/D52091 llvm-svn: 342652
* [sanitizer] Make __sanitizer::CheckFailed not publicKostya Kortchinsky2018-09-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As far as I can tell, there is no reason why `__sanitizer::CheckFailed` should be exported. Looking back in time, it was added with the FIXME with the following by @timurrrr: ``` [*San/RTL] Fix minor breakage Grumbling: this hasn't been caught by running 'make check-{a,l,t}san check-sanitizer' ``` I can't find any detail about the breakage, all tests seem to work for me, so maybe Windows (@rnk?) or something I have no setup for. The reason to make it private (past the FIXME) is that Scudo defines its own (without callback) and I am trying to make the .so be loadable with the UBsan one (that has its own public `CheckFailed`) with as little drama as possible. Reviewers: eugenis, rnk Reviewed By: eugenis, rnk Subscribers: kubamracek, delcypher, #sanitizers, timurrrr, rnk, llvm-commits Differential Revision: https://reviews.llvm.org/D52279 llvm-svn: 342651
* [IR] reduce duplication in unittest for shuffles; NFCSanjay Patel2018-09-201-16/+12
| | | | llvm-svn: 342650
* [winasan] Reduce hotpatch prefix check to 8 bytesDavid Major2018-09-201-4/+4
| | | | | | | | Same idea as r310419: The 8 byte nop is a suffix of the 9 byte nop, and we need at most 6 bytes. Differential Revision: https://reviews.llvm.org/D51788 llvm-svn: 342649
* [OPENMP] Add support for mapping memory pointed by member pointer.Alexey Bataev2018-09-204-13/+436
| | | | | | Added support for map(s, s.ptr[0:1]) kind of mapping. llvm-svn: 342648
* [InstCombine] Handle vector compares in foldGEPIcmp()Jesper Antonsson2018-09-202-1/+26
| | | | | | | | | | | | | | | | Summary: This is to fix PR38984 "InstCombine assertion at vector gep/icmp folding": https://bugs.llvm.org/show_bug.cgi?id=38984 Reviewers: majnemer, spatel, lattner, lebedev.ri Reviewed By: lebedev.ri Subscribers: lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D52263 llvm-svn: 342647
* [llvm-exegesis] Fix broken build bots.Guillaume Chatelet2018-09-202-15/+19
| | | | | | | | | | Reviewers: javed.absar Subscribers: tschuett, courbet, llvm-commits Differential Revision: https://reviews.llvm.org/D52302 llvm-svn: 342646
* [X86][SSE] Remove UNPCKL(SHUFFLE)->UNPCKH custom combineSimon Pilgrim2018-09-201-34/+0
| | | | | | This can be achieved more generally by combineX86ShufflesRecursively. llvm-svn: 342645
* [llvm-exegesis] Improve Register Setup (roll forward of D51856).Guillaume Chatelet2018-09-2016-361/+462
| | | | | | | | | | | | | | Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: llvm-commits, tschuett, mgorny Differential Revision: https://reviews.llvm.org/D52297 llvm-svn: 342644
* [ADT] Bring back memmove to make GCC 5.4 happyBenjamin Kramer2018-09-201-2/+5
| | | | | | | All other GCCs look good so far. GCC 5.4 complains about strict aliasing, so fix that. llvm-svn: 342643
* [X86][SSE] Remove PSHUFLW/PSHUFHW combineRedundantHalfShuffle combineSimon Pilgrim2018-09-201-71/+0
| | | | | | This can be achieved more generally by combineX86ShufflesRecursively and was causing a fuzz test failure found by Mikael Holmén. llvm-svn: 342642
* [RISCV][MC] Modify evaluateConstantImm interface to allow reuse from addExprAlex Bradbury2018-09-201-35/+34
| | | | | | | | | | | | | This is a trivial refactoring that I'm committing now as it makes a patch I'm about to post for review easier to follow. There is some overlap between evaluateConstantImm and addExpr in RISCVAsmParser. This patch allows evaluateConstantImm to be reused from addExpr to remove this overlap. The benefit will be greater when a future patch adds extra code to allows immediates to be evaluated from constant symbols (e.g. `.equ CONST, 0x1234`). No functional change intended. llvm-svn: 342641
* Fix -Wdocumentation warnings introduced by r342555. NFCAndrea Di Biagio2018-09-202-24/+23
| | | | | | | These were reported by buildbot llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast (see build #36798). llvm-svn: 342640
* Fix line-endings. NFCI.Simon Pilgrim2018-09-2019-1082/+1082
| | | | llvm-svn: 342639
* [OpenCL] Diagnose redundant address space conversionSven van Haastregt2018-09-203-1/+14
| | | | | | | | | | | | | | | | Add a warning if a parameter with a named address space is passed to a to_addr builtin. For example: int i; to_private(&i); // generate warning as conversion from private to private is redundant. Patch by Alistair Davies. Differential Revision: https://reviews.llvm.org/D51411 llvm-svn: 342638
OpenPOWER on IntegriCloud