summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* MSVC 2013 supports std::forward_as_tuple, while MSVC 2012 did not; so we can ↵Aaron Ballman2015-02-161-10/+8
| | | | | | move to using the improved API. llvm-svn: 229414
* AArch64: Safely handle the incoming sret call argument.Andrew Trick2015-02-1610-29/+69
| | | | | | | | | | | | | | | | | | This adds a safe interface to the machine independent InputArg struct for accessing the index of the original (IR-level) argument. When a non-native return type is lowered, we generate the hidden machine-level sret argument on-the-fly. Before this fix, we were representing this argument as OrigArgIndex == 0, which is an outright lie. In particular this crashed in the AArch64 backend where we actually try to access the type of the original argument. Now we use a sentinel value for machine arguments that have no original argument index. AArch64, ARM, Mips, and PPC now check for this case before accessing the original argument. Fixes <rdar://19792160> Null pointer assertion in AArch64TargetLowering llvm-svn: 229413
* [ADCE] Don't indent inside an anonymous namespaceHal Finkel2015-02-161-11/+10
| | | | | | | To be consistent with what clang-format does, don't add extra indentation inside an anonymous namespace. NFC. llvm-svn: 229412
* [LoopReroll] Relax some assumptions a little.James Molloy2015-02-162-3/+36
| | | | | | | | We won't find a root with index zero in any loop that we are able to reroll. However, we may find one in a non-rerollable loop, so bail gracefully instead of failing hard. llvm-svn: 229406
* [LoopReroll] Don't crash on dead codeJames Molloy2015-02-162-0/+38
| | | | | | | | If a PHI has no users, don't crash; bail gracefully. This shouldn't happen often, but we can make no guarantees that previous passes didn't leave dead code around. llvm-svn: 229405
* [PBQP] Improve the assert for conservatively allocatables.Jonas Paulsson2015-02-162-2/+13
| | | | | | | | | Remember if the node ever was in this state instead of checking just the final state. Reviewed by Arnaud de Grandmaison. llvm-svn: 229400
* [asan] Reuse a common function.Evgeniy Stepanov2015-02-161-6/+2
| | | | | | Do not reimplement RoundUpToAlignment. llvm-svn: 229397
* [x86] Add a generic unpack-targeted lowering technique. This can be usedChandler Carruth2015-02-166-169/+246
| | | | | | | | | | | | | to generically lower blends and is particularly nice because it is available frome SSE2 onward. This removes a lot of the remaining domain crossing blends in SSE2 code. I'm hoping to replace some of the "interleaved" lowering hacks with something closer to this which should be more principled. First, this needs to learn how to detect and use other interleavings besides that of the natural type provided. That will be a follow-up patch though. llvm-svn: 229378
* [x86] Switch this test to use checks generated by my update script. NFCChandler Carruth2015-02-161-33/+85
| | | | llvm-svn: 229377
* Fix quoting of #pragma comment for MS compat, LLVM part.Michael Kuperstein2015-02-162-17/+5
| | | | | | | | | For #pragma comment(linker, ...) MSVC expects the comment string to be quoted, but for #pragma comment(lib, ...) the compiler itself quotes the library name. Since this distinction disappears by the time the directive reaches the backend, move quoting for the "lib" version to the frontend. Differential Revision: http://reviews.llvm.org/D7652 llvm-svn: 229375
* [x86] Add initial basic support for forming blends of v16i8 vectors.Chandler Carruth2015-02-163-36/+46
| | | | | | | | | | | | | This blend instruction is ... really lame. The register usage is insane. As a consequence this is probably only *barely* better than 2 pshufbs followed by a por, and that mostly because it only has to read from a single memory location. However, this doesn't fix as much as I kind of expected, so more to go. Pretty sure that the ordering and delegation of v16i8 is just really, really bad. llvm-svn: 229373
* [x86] Add some more test cases for i8 vector blends.Chandler Carruth2015-02-161-0/+115
| | | | llvm-svn: 229372
* Document that defaulted & deleted methods and explicit conversions are ↵Benjamin Kramer2015-02-161-0/+7
| | | | | | allowed now. llvm-svn: 229369
* [x86] Switch my usage of VariadicFunction to a "normal" variadicChandler Carruth2015-02-161-30/+37
| | | | | | | | | template now that we can use them. This is, of course, horribly ugly because of the required recursive formulation. Suggestions for making it less ugly welcome. llvm-svn: 229367
* IR: SrcTy == DstTy doesn't imply that a cast is validDavid Majnemer2015-02-162-4/+4
| | | | | | Cast validity depends on the cast's kind, not just its types. llvm-svn: 229366
* AsmParser: extractvalue requires at least one index operandDavid Majnemer2015-02-162-0/+9
| | | | llvm-svn: 229365
* AsmParser: Make sure GlobalVariables have sane typesDavid Majnemer2015-02-162-1/+5
| | | | llvm-svn: 229364
* AsmParser: Reject alloca with function typeDavid Majnemer2015-02-164-6/+15
| | | | llvm-svn: 229363
* Switch our index sequence away from template aliases and just useChandler Carruth2015-02-161-6/+6
| | | | | | | | | | classes. We can't use template aliases because on MSVC they don't appear to work correctly in the common usage such as Format.h. Many thanks to Zach for doing all the testing and debugging here. I just slotted the fix into the code. llvm-svn: 229362
* Verifier: Diagnose module flags which have null ID operandsDavid Majnemer2015-02-162-1/+7
| | | | llvm-svn: 229361
* [X86] Add support for lowering shuffles to 256-bit PALIGNR instruction.Craig Topper2015-02-164-78/+472
| | | | llvm-svn: 229359
* [X86] Remove some hard tab characters from tests.Craig Topper2015-02-162-9/+9
| | | | llvm-svn: 229358
* DebugInfo: Don't crash if 'Debug Info Version' has a strange valueDavid Majnemer2015-02-162-1/+6
| | | | llvm-svn: 229356
* DataLayout: Validate that the pref alignment is at least the ABI alignDavid Majnemer2015-02-162-1/+7
| | | | llvm-svn: 229355
* DataLayout: Report when the datalayout type alignment/width is too largeDavid Majnemer2015-02-164-6/+20
| | | | llvm-svn: 229354
* IR: Properly return nullptr when getAggregateElement is out-of-boundsDavid Majnemer2015-02-163-4/+44
| | | | | | | | | | | We didn't properly handle the out-of-bounds case for ConstantAggregateZero and UndefValue. This would manifest as a crash when the constant folder was asked to fold a load of a constant global whose struct type has no operands. This fixes PR22595. llvm-svn: 229352
* [CMake] Add RuntimeDyld to libdeps corresponding to r229343.NAKAMURA Takumi2015-02-164-0/+4
| | | | llvm-svn: 229351
* [x86] Teach the 128-bit vector shuffle lowering routines to takeChandler Carruth2015-02-1613-472/+870
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | advantage of the existence of a reasonable blend instruction. The 256-bit vector shuffle lowering has leveraged the general technique of decomposed shuffles and blends for quite some time, but this never made it back into the 128-bit code, and there are a large number of patterns where this is substantially better. For example, this removes almost all domain crossing in vector shuffles that involve some blend and some permutation with SSE4.1 and later. See the massive reduction in 'shufps' for integer test cases in this commit. This isn't perfect yet for a few reasons: 1) The v8i16 shuffle lowering continues to plague me. We don't always form an unpack-based blend when that would be better. But the wins pretty drastically outstrip the losses here. 2) The v16i8 shuffle lowering is just a disaster here. I never went and implemented blend support here for some terrible reason. I'll do that next probably. I've not updated it for now. More variations on this technique are coming as well -- we don't shuffle-into-unpack or shuffle-into-palignr, both of which would also be profitable. Note that some test cases grow significantly in the number of instructions, but I expect to actually be faster. We use pshufd+pshufd+blendw instead of a single shufps, but the pshufd's are very likely to pipeline well (two ports on most modern intel chips) and the blend is a *very* fast instruction. The domain switch penalty will essentially always be more than a blend instruction, which is the only increase in tree height. llvm-svn: 229350
* [x86] Clean up a few test cases with the update script. NFCChandler Carruth2015-02-163-127/+141
| | | | llvm-svn: 229349
* [X86] Remove gcc builtins for AVX2 psll_dq and psrl_dq intrinsics. Clang no ↵Craig Topper2015-02-161-4/+4
| | | | | | longer needs them. llvm-svn: 229347
* [Bitcode reader] Fix a few assertions when reading invalid filesFilipe Cabecinhas2015-02-168-0/+53
| | | | | | | | | | | | | | | | Summary: When creating {insert,extract}value instructions from a BitcodeReader, we weren't verifying the fields were valid. Bugs found with afl-fuzz Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7325 llvm-svn: 229345
* [ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager intoLang Hames2015-02-154-2/+2
| | | | | | | | RuntimeDyld. This should fix http://llvm.org/PR22593. llvm-svn: 229343
* MinGW's snprintf is not exposed through std::.Benjamin Kramer2015-02-151-1/+1
| | | | llvm-svn: 229342
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-15161-855/+827
| | | | | | requiring the macro. NFC; LLVM edition. llvm-svn: 229340
* Format: Modernize using variadic templates.Benjamin Kramer2015-02-156-147/+53
| | | | | | | | | | | Introduces a subset of C++14 integer sequences in STLExtras. This is just enough to support unpacking a std::tuple into the arguments of snprintf, we can add more of it when it's actually needed. Also removes an ancient macro hack that leaks a macro into the global namespace. Clean up users that made use of the convenient hack. llvm-svn: 229337
* Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the ↵Aaron Ballman2015-02-1518-65/+55
| | | | | | macro. NFC; LLVM edition. llvm-svn: 229335
* Since MSVC 1800 is our lowest common denominator, we don't need an explicit ↵Aaron Ballman2015-02-151-3/+2
| | | | | | check for it in these macros any longer; NFC. llvm-svn: 229333
* CommandLine: Use variadic templates to simplify opt constructors.Benjamin Kramer2015-02-151-295/+20
| | | | llvm-svn: 229332
* llvm-pdbdump: Fix warning caused by missing sentinel value.Zachary Turner2015-02-151-3/+3
| | | | llvm-svn: 229331
* llvm-pdbdump: Add flags controlling the type of values to dump.Zachary Turner2015-02-1566-267/+386
| | | | llvm-svn: 229330
* FoldingSet: Replace faux variadics with real variadics. NFC.Benjamin Kramer2015-02-151-25/+3
| | | | llvm-svn: 229328
* Remove LLVM_HAS_VARIADIC_TEMPLATES and all the faux variadic workarounds ↵Benjamin Kramer2015-02-156-734/+2
| | | | | | | | guarded by it. We no longer support compilers without variadic template support. llvm-svn: 229324
* Update the docs to require at least MSVC 2013.Benjamin Kramer2015-02-156-15/+11
| | | | llvm-svn: 229323
* Revert 229175Philip Reames2015-02-151-3/+1
| | | | | | This change is a logical suspect in 22587 and 22590. Given it's of minimal importanance and I can't get clang to build on my home machine, I'm reverting so that I can deal with this next week. llvm-svn: 229322
* Added (still inefficient) shuffle test case for PR21138Simon Pilgrim2015-02-151-0/+23
| | | | llvm-svn: 229321
* Reapply r229185(cbieneman) -- Raising minimum required Visual Studio version ↵NAKAMURA Takumi2015-02-153-12/+4
| | | | | | | | to 2013. This is based on the discussions on: [LLVMdev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk llvm-svn: 229320
* [ADCE] Convert another loop for a range-based forHal Finkel2015-02-151-2/+2
| | | | | | We can use a range-based for for the operands loop too; NFC. llvm-svn: 229319
* [ADCE] Use inst_range and range-based forsHal Finkel2015-02-151-14/+13
| | | | | | Convert a few loops to range-based fors; NFC. llvm-svn: 229318
* [ADCE] Fix formatting of pointer typesHal Finkel2015-02-151-2/+2
| | | | | | We prefer to put the * with the variable, not with the type; NFC. llvm-svn: 229317
* [ADCE] Fix capitalization of another local variableHal Finkel2015-02-151-2/+2
| | | | | | Bring another local variable in compliance with our naming conventions, NFC. llvm-svn: 229316
OpenPOWER on IntegriCloud