summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-05-20LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()Matthias Braun7-250/+77
We now use LiveRangeCalc::extendToUses() instead of a specially designed algorithm in constructMainRangeFromSubranges(): - The original motivation for constructMainRangeFromSubranges() were differences between the main liverange and subranges because of hidden dead definitions. This case however cannot happen anymore with the DetectDeadLaneMasks pass in place. - It simplifies the code. - This fixes a longstanding bug where we did not properly create new SSA values on merging control flow (the MachineVerifier missed most of these cases). - Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and LiveRangeCalc to better match the implementation/available helper functions. This re-applies r269016. The fixes from r270290 and r270259 should avoid the machine verifier problems this time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20MachineVerifier: subregs so not require defs/valnos on every pathMatthias Braun2-2/+29
It is fine for subregister ranges to be undefined on some CFG paths as we may have a "vregX:other_subreg<read-undef> =" def on that path. We do not (and should not) have live segments for the subregister ranges. The MachineVerifier should not complain about this. This is a slight variant of http://llvm.org/PR27705 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Fix struct member names and simplify. NFC.Rui Ueyama1-6/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270289 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[PowerPC] Add a testcase for TCO on string rvo functionTim Shen1-0/+44
Differential Revision: http://reviews.llvm.org/D20311 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[yaml2obj] [MachO] Fill Segment and Section dataChris Bieneman1-7/+61
This fills section data with 0xDEADBEEF and segment data not inside a section with 0xBAADDA7A. This results in yaml2obj generating a matching size object file. Any additional bytes in the file are zero'd. This is a starting point for populating the remaining segment data, and provides a hex viewable file that you can easily see the missing data in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20add test vector sdivSanjay Patel1-0/+15
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20add test for vector shiftSanjay Patel1-0/+13
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20SDAG: Implement Select instead of SelectImpl in PPCDAGToDAGISelJustin Bogner1-151/+209
- Where we were returning a node before, call ReplaceNode instead. - Where we would return null to fall back to another selector, rename the method to try* and return a bool for success. - Where we were calling SelectNodeTo, just return afterwards. Part of llvm.org/pr26808. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[lanai] Change reloc to use PIC_ by default and cleanup.Jacques Pienaar7-23/+23
* Change reloc to PIC_; * Cleanup (clang-format & modify test); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Switch from the linux-specific 'struct sigaltstack' to POSIX's 'stack_t'. ThisRichard Smith1-2/+2
is what I get for trusting my system's man pages I suppose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Add a configure-time check for the existence of sigaltstack. It seems that someRichard Smith3-2/+10
systems provide a <signal.h> that doesn't declare it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Reinstate r269992 (reverting r270267), but restricted to cases where glibc isRichard Smith2-4/+60
the C standard library implementation in use. This works around a glibc bug in the backtrace() function where it fails to produce a backtrace on x86_64 if libgcc / libunwind is statically linked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Create a sigaltstack when we register our signal handlers. Otherwise we'd veryRichard Smith1-0/+31
likely fail to produce a backtrace if we crash due to stack overflow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Revert r270268 due to unused variable warnings.Michael Kuperstein1-12/+17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20add tests for vector uremSanjay Patel1-1/+23
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Address post-review for r270246David Majnemer1-11/+13
This gets rid of some unnecessary SmallStrings in X86TargetMachine::getSubtargetImpl. No functionality change is intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20dsymutil/modules: Reword the warning for static libraries without module cachesAdrian Prantl8-29/+58
In addition to clarifying the warning message this contains a minor functional change in that it now warns if the *immediate* parent directory in which the missing PCM is expected to be isn't found. This patch also includes a more comprehensive testcase. rdar://problem/25860711 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[BasicAA] Turn DecomposeGEPExpression runtime checks into asserts.Michael Kuperstein1-17/+12
When it has a DataLayout, DecomposeGEPExpression() should return the same object as GetUnderlyingObject(). Per the FIXME, it currently always has a DL, so the runtime check is redundant and can become an assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270268 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Revert "Work around a glibc bug: backtrace() spuriously fails if..."Chris Bieneman2-52/+4
This commit has been breaking the FreeBSD bots: http://lab.llvm.org:8011/builders/lld-x86_64-freebsd This reverts commit r269992. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20use FileCheck instead of grep for exact checkingSanjay Patel1-5/+10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[esan] Use ModulePass for EfficiencySanitizerPass.Derek Bruening2-10/+18
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20pdbdump: print out symbol names referred by publics stream.Rui Ueyama9-11/+182
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Use report_fatal_error after allKrzysztof Parzyszek1-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20LiveIntervalAnalysis: Fix missing defs in renameDisconnectedComponents().Matthias Braun5-17/+97
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20CodeGen: Move the call to DwarfDebug::beginModule() out of the constructor.Peter Collingbourne2-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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20CodeGen: Do not require a MachineFunction just to create a DIEDwarfExpression.Peter Collingbourne6-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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20CODE_OWNERS: Take ownership of SelectionDAGJustin Bogner1-4/+1
Owen no longer has time to tend to the yaks in SelectionDAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[AArch64] Disable narrow load merge by defaultJun Bum Lim2-4/+4
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Functions with differing phis should not be merged.Mark Lacey2-0/+61
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Look for the best mapping in greedy mode.Quentin Colombet2-10/+45
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[MachOYAML] Removing duplicated field from LC_UUID YAMLChris Bieneman3-4/+0
The uuid_command was duplicating the load_command.cmdsize field. This removes the duplicate from the YAML mapping and from the test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Get rid of a now dead method: setSafeInsertPoint.Quentin Colombet2-39/+0
This is now encapsulated in the RepairingPlacement class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270247 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[X86] Reduce memory allocations in X86TargetMachine::getSubtargetImplDavid Majnemer3-10/+15
We performed a number of memory allocations each time getTTI was called, remove them by using SmallString. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Take advantage of a potential best cost information inQuentin Colombet2-4/+24
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Use frequency and probability information to computeQuentin Colombet2-7/+40
more precise cost in Greedy mode. In Fast mode the cost is irrelevant so do not bother requiring that those passes get scheduled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Use the Fast mode for functions with the optnone attribute.Quentin Colombet1-0/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[obj2yaml][yaml2obj] Adding enumFallback for MachO load commandsChris Bieneman3-3/+56
This adds support for handling unknown load commands, and a bogus_load_command tests. Unknown or unsupported load commands can be specified in YAML by their hex value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20fix comments; NFCSanjay Patel1-9/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270237 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20use range-loops; NFCISanjay Patel1-4/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Specify different optimization mode for the pass.Quentin Colombet2-4/+19
The mode should be choose by the target when instantiating the pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20fix documentation comments; NFCSanjay Patel1-9/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Fix error reporting in register scavenger (lack of emergency spill slot)Krzysztof Parzyszek1-7/+4
- Do not store Twine objects. - Remove report_fatal_error, since llvm_unreachable does terminate the program in release mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[RegBankSelect] Add a method to avoid splitting while repairing.Quentin Colombet2-0/+137
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[PM/PartiallyInlineLibCalls] Fix pass dependencies.Davide Italiano1-10/+13
Inline getAnalysisUsage() while I'm here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270231 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[X86][AVX] Generalized matching for target shuffle combinesSimon Pilgrim3-133/+161
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270230 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[X86][AVX] Sync with clang/test/CodeGen/avx-builtins.cSimon Pilgrim1-211/+3303
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270229 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[PartiallyInlineLibCalls] Remove dead includes. NFC.Davide Italiano1-2/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[PM/PartiallyInlineLibCalls] Convert to static function in preparation for ↵Davide Italiano1-55/+49
porting this pass to the new PM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20[SimplifyCFG] eliminate switch cases based on known range of switch conditionSanjay Patel2-8/+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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20Correction to r270219: fix detection of invalid frame indexKrzysztof Parzyszek1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270220 91177308-0d34-0410-b5e6-96231b3b80d8