summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [esan] Use ModulePass for EfficiencySanitizerPass.Derek Bruening2016-05-201-9/+17
| | | | | | | | | | | | | | | | | Summary: Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to better support global variable creation for a forthcoming struct field counter tool. Patch by Qin Zhao. Reviewers: aizatsky Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc Differential Revision: http://reviews.llvm.org/D20458 llvm-svn: 270263
* pdbdump: print out symbol names referred by publics stream.Rui Ueyama2016-05-204-9/+129
| | | | | | | | | | | | | | | | | | DBI stream contains a stream number of the symbol record stream. Symbol record streams is an array of length-type-value members. Each member represents one symbol. Publics stream contains offsets to the symbol record stream. This patch is to print out all symbols that are referenced by the publics stream. Note that even with this patch, llvm-pdbdump cannot dump all the information in a publics stream since it contains more information than symbol names. I'll improve it in followup patches. Differential Revision: http://reviews.llvm.org/D20480 llvm-svn: 270262
* Use report_fatal_error after allKrzysztof Parzyszek2016-05-201-1/+1
| | | | | | | | Depending on the compiler used to build LLVM, llvm_unreachable can either expand to a call to abort(), or to a __builtin_unreachable. The latter does not have a predictable behavior at runtime. llvm-svn: 270260
* LiveIntervalAnalysis: Fix missing defs in renameDisconnectedComponents().Matthias Braun2016-05-203-15/+60
| | | | | | | | | | | | | | Fix renameDisconnectedComponents() creating vreg uses that can be reached from function begin withouthaving a definition (or explicit live-in). Fix this by inserting IMPLICIT_DEF instruction before control-flow joins as necessary. Removes an assert from MachineScheduler because we may now get additional IMPLICIT_DEF when preparing the scheduling policy. This fixes the underlying problem of http://llvm.org/PR27705 llvm-svn: 270259
* CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.Peter Collingbourne2016-05-202-5/+2
| | | | | | | | | This gives AsmPrinter a chance to initialize its DD field before we call beginModule(), which is about to start using it. Differential Revision: http://reviews.llvm.org/D20413 llvm-svn: 270258
* CodeGen: Do not require a MachineFunction just to create a DIEDwarfExpression.Peter Collingbourne2016-05-206-41/+49
| | | | | | | | | We are about to start using DIEDwarfExpression to create global variable DIEs, which happens before we generate code for functions. Differential Revision: http://reviews.llvm.org/D20412 llvm-svn: 270257
* [AArch64] Disable narrow load merge by defaultJun Bum Lim2016-05-201-1/+1
| | | | | | | | | | | | | | Summary: As this optimization converts two loads into one load with two shift instructions, it could potentially hurt performance if a loop is arithmetic operation intensive. Reviewers: t.p.northover, mcrosier, jmolloy Subscribers: evandro, jmolloy, aemerson, rengolin, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D20172 llvm-svn: 270251
* Functions with differing phis should not be merged.Mark Lacey2016-05-201-0/+11
| | | | | | | | | | | Check that the incoming blocks of phi nodes are identical, and block function merging if they are not. rdar://problem/26255167 Differential Revision: http://reviews.llvm.org/D20462 llvm-svn: 270250
* [RegBankSelect] Look for the best mapping in greedy mode.Quentin Colombet2016-05-201-10/+38
| | | | | | | | | The Fast mode takes the first mapping, the greedy mode loops over all the possible mapping for an instruction and choose the cheaper one. Test case will come with target specific code, since we currently do not have instructions that have several mappings. llvm-svn: 270249
* [MachOYAML] Removing duplicated field from LC_UUID YAMLChris Bieneman2016-05-201-1/+0
| | | | | | The uuid_command was duplicating the load_command.cmdsize field. This removes the duplicate from the YAML mapping and from the test cases. llvm-svn: 270248
* [RegBankSelect] Get rid of a now dead method: setSafeInsertPoint.Quentin Colombet2016-05-201-34/+0
| | | | | | This is now encapsulated in the RepairingPlacement class. llvm-svn: 270247
* [X86] Reduce memory allocations in X86TargetMachine::getSubtargetImplDavid Majnemer2016-05-203-10/+15
| | | | | | | | We performed a number of memory allocations each time getTTI was called, remove them by using SmallString. No functionality change intended. llvm-svn: 270246
* [RegBankSelect] Take advantage of a potential best cost information inQuentin Colombet2016-05-201-3/+18
| | | | | | | | | | | | | computeMapping. Computing the cost of a mapping takes some time. Since in Fast mode, the cost is irrelevant, just spare some cycles by not computing it. In Greedy mode, we need to choose the best cost, that means that when the local cost gets more expensive than the best cost, we can stop computing the repairing and cost for the current mapping. llvm-svn: 270245
* [RegBankSelect] Use frequency and probability information to computeQuentin Colombet2016-05-201-7/+28
| | | | | | | | | more precise cost in Greedy mode. In Fast mode the cost is irrelevant so do not bother requiring that those passes get scheduled. llvm-svn: 270244
* [RegBankSelect] Use the Fast mode for functions with the optnone attribute.Quentin Colombet2016-05-201-0/+6
| | | | llvm-svn: 270242
* fix comments; NFCSanjay Patel2016-05-201-9/+8
| | | | llvm-svn: 270237
* use range-loops; NFCISanjay Patel2016-05-201-4/+2
| | | | llvm-svn: 270236
* [RegBankSelect] Specify different optimization mode for the pass.Quentin Colombet2016-05-201-2/+4
| | | | | | The mode should be choose by the target when instantiating the pass. llvm-svn: 270235
* fix documentation comments; NFCSanjay Patel2016-05-201-9/+8
| | | | llvm-svn: 270234
* Fix error reporting in register scavenger (lack of emergency spill slot)Krzysztof Parzyszek2016-05-201-7/+4
| | | | | | | | - Do not store Twine objects. - Remove report_fatal_error, since llvm_unreachable does terminate the program in release mode. llvm-svn: 270233
* [RegBankSelect] Add a method to avoid splitting while repairing.Quentin Colombet2016-05-201-0/+125
| | | | | | | | | | | | The previous choice of the insertion points for repairing was straightfoward but may introduce some basic block or edge splitting. In some situation this is something we can avoid. For instance, when repairing a phi argument, instead of placing the repairing on the related incoming edge, we may move it to the previous block, before the terminators. This is only possible when the argument is not defined by one of the terminator. llvm-svn: 270232
* [PM/PartiallyInlineLibCalls] Fix pass dependencies.Davide Italiano2016-05-201-10/+13
| | | | | | Inline getAnalysisUsage() while I'm here. llvm-svn: 270231
* [X86][AVX] Generalized matching for target shuffle combinesSimon Pilgrim2016-05-201-99/+146
| | | | | | | | | | | | This patch is a first step towards a more extendible method of matching combined target shuffle masks. Initially this just pulls out the existing basic mask matches and adds support for some 256/512 bit equivalents. Future patterns will require a number of features to be added but I wanted to keep this patch simple. I hope we can avoid duplication between shuffle lowering and combining and share more complex pattern match functions in future commits. Differential Revision: http://reviews.llvm.org/D19198 llvm-svn: 270230
* [PartiallyInlineLibCalls] Remove dead includes. NFC.Davide Italiano2016-05-201-2/+0
| | | | llvm-svn: 270228
* [PM/PartiallyInlineLibCalls] Convert to static function in preparation for ↵Davide Italiano2016-05-201-55/+49
| | | | | | porting this pass to the new PM. llvm-svn: 270225
* [SimplifyCFG] eliminate switch cases based on known range of switch conditionSanjay Patel2016-05-201-4/+10
| | | | | | | | | | | | This was noted in PR24766: https://llvm.org/bugs/show_bug.cgi?id=24766#c2 We may not know whether the sign bit(s) are zero or one, but we can still optimize based on knowing that the sign bit is repeated. Differential Revision: http://reviews.llvm.org/D20275 llvm-svn: 270222
* Correction to r270219: fix detection of invalid frame indexKrzysztof Parzyszek2016-05-201-1/+2
| | | | llvm-svn: 270220
* Skip entries with invalid indexes in the search loop in register scavengerKrzysztof Parzyszek2016-05-201-1/+4
| | | | llvm-svn: 270219
* [MCExpr] avoid UB via negation of INT_MINSanjay Patel2016-05-201-2/+5
| | | | | | | | | I accidentally exposed a bug in MCExpr::evaluateAsRelocatableImpl() with the test file added in: http://reviews.llvm.org/rL269977 Differential Revision: http://reviews.llvm.org/D20434 llvm-svn: 270218
* Refactor X86 symbol access classification.Rafael Espindola2016-05-204-155/+130
| | | | | | | | | | | | This refactors the logic in X86 to avoid code duplication. It also splits it in two steps: it first decides if a symbol is local to the DSO and then uses that information to decide how to access it. The first part is implemented by shouldAssumeDSOLocal. It is not in any way specific to X86. In a followup patch I intend to move it to somewhere common and reused it in other backends. llvm-svn: 270209
* Simplify handling of hidden stubs on PowerPC.Rafael Espindola2016-05-202-25/+4
| | | | | | | We now handle them just like non hidden ones. This was already the case on x86 (r207518) and arm (r207517). llvm-svn: 270205
* SparcISelLowering.cpp: Add missing StringSwitch.hNAKAMURA Takumi2016-05-201-0/+1
| | | | llvm-svn: 270200
* [Sparc] Implement getRegisterByName.Chris Dewhurst2016-05-202-0/+24
| | | | | | Allows Sparc registers to be specifically referred to in inline assembly. llvm-svn: 270198
* [ProfileData] Thread unique_ptr through the summary builder to avoid leaks.Benjamin Kramer2016-05-205-12/+12
| | | | llvm-svn: 270195
* [Coverage] Fix an issue where improper coverage mapping data could be loaded ↵Igor Kudrin2016-05-201-18/+88
| | | | | | | | | | | | | | for an inline function. If an inline function is observed but unused in a translation unit, dummy coverage mapping data with zero hash is stored for this function. If such a coverage mapping section came earlier than real one, the latter was ignored. As a result, llvm-cov was unable to show coverage information for those functions. Differential Revision: http://reviews.llvm.org/D20286 llvm-svn: 270194
* [Sparc] Enable more inline assembly constraints.Chris Dewhurst2016-05-202-0/+9
| | | | | | | | Note: This is specifically to allow GCC's test pr44707 to pass. Trivial change, not put for differential revision. Test included. llvm-svn: 270192
* Fix some comment typos in SelectionDAGBuilder. NFCDiana Picus2016-05-201-3/+3
| | | | llvm-svn: 270190
* [X86] Fix another AVX pattern to only be disable if VLX and BWI are supported.Craig Topper2016-05-201-1/+1
| | | | llvm-svn: 270182
* [lanai] Use Optional<Reloc> in LanaiTargetMachine.Jacques Pienaar2016-05-204-12/+17
| | | | | | Follow r269988 and use Optional<Reloc>. llvm-svn: 270176
* [X86] Fix some AVX patterns to only be disabled if VLX and BWI are ↵Craig Topper2016-05-201-20/+24
| | | | | | supported. Without this we get isel failures on the avx-intrinsics-x86.ll test in AVX512VL. llvm-svn: 270174
* [LibFuzzer] Fix implementation of ``GetPeakRSSMb()`` on Mac OSX.Dan Liew2016-05-201-1/+9
| | | | | | | | On Linux ``rusage.ru_maxrss`` is in KiB but on Mac OSX it is in bytes. Differential Revision: http://reviews.llvm.org/D20410 llvm-svn: 270173
* [LibFuzzer] Fix ``NumberOfCpuCores()`` on Mac OSX.Dan Liew2016-05-201-4/+29
| | | | | | | | | | | | | | | The ``nprocs`` command does not exist under Mac OSX so use ``sysctl`` instead on that platform. Whilst I'm here * Use ``pclose()`` instead of ``fclose()`` which the ``popen()`` documentation says should be used. * Check for errors that were previously unhandled. Differential Revision: http://reviews.llvm.org/D20409 llvm-svn: 270172
* Add AVRTargetStreamersDylan McKay2016-05-205-0/+147
| | | | | | Reviewed by Matt Arsenault in http://reviews.llvm.org/D16311 llvm-svn: 270171
* [RegBankSelect] Refactor the code to split the repairing and mapping ofQuentin Colombet2016-05-201-131/+209
| | | | | | | | | | | an instruction. Use the previously introduced RepairingPlacement class to split the code computing the repairing placement from the code doing the actual placement. That way, we will be able to consider different placement and then, only apply the best one. llvm-svn: 270168
* [RegBankSelect] Add helper class for repairing code placement.Quentin Colombet2016-05-201-1/+215
| | | | | | | | | | | | | | | | | | | | When assigning the register banks we may have to insert repairing code to move already assigned values accross register banks. Introduce a few helper classes to keep track of what is involved in the repairing of an operand: - InsertPoint and its derived classes record the positions, in the CFG, where repairing has to be inserted. - RepairingPlacement holds all the insert points for the repairing of an operand plus the kind of action that is required to do the repairing. This is going to be used to keep track of how the repairing should be done, while comparing different solutions for an instruction. Indeed, we will need the repairing placement to capture the cost of a solution and we do not want to compute it a second time when we do the actual repairing. llvm-svn: 270167
* [RegBankSelect] Refactor assignmentMatch to avoid testing the currentQuentin Colombet2016-05-201-4/+10
| | | | | | | | | | | | | | register bank twice. Prior to this change, we were checking if the assignment for the current machine operand was matching, then we would check if the mismatch requires to insert repair code. We actually already have this information from the first check, so just pass it along. NFCI. llvm-svn: 270166
* Fix pr27728.Rafael Espindola2016-05-201-16/+8
| | | | | | | | | | | | | | | Sorry for the lack testcase. There is one in the pr, but it depends on std::sort and the .ll version is 110 lines, so I don't think it is wort it. The bug was that we were sorting after adding a terminator, and the sorting algorithm could end up putting the terminator in the middle of the List vector. With that we would create a Spans map entry keyed on nullptr which would then be added to CUs and fail in that sorting. llvm-svn: 270165
* [RegBankSelect] Introduce MappingCost helper class.Quentin Colombet2016-05-201-1/+125
| | | | | | | | | | | | | This helper class will be used to represent the cost of mapping an instruction to a specific register bank. The particularity of these costs is that they are mostly local, thus the frequency of the basic block is irrelevant. However, for few instructions (e.g., phis and terminators), the cost may be non-local and then, we need to account for the frequency of the involved basic blocks. This will be used by the greedy mode I am working on. llvm-svn: 270163
* [RuntimeDyld][MachO] Add support for SUBTRACTOR relocations between anonymousLang Hames2016-05-191-15/+52
| | | | | | symbols on x86-64. llvm-svn: 270157
* clang-format. NFC.Rafael Espindola2016-05-191-13/+13
| | | | llvm-svn: 270156
OpenPOWER on IntegriCloud