summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* TableGen: allow use of uint64_t for available features mask.Tim Northover2014-08-181-19/+21
| | | | | | | | | | ARM in particular is getting dangerously close to exceeding 32 bits worth of possible subtarget features. When this happens, various parts of MC start to fail inexplicably as masks get truncated to "unsigned". Mostly just refactoring at present, and there's probably no way to test. llvm-svn: 215887
* Revert "Repace SmallPtrSet with SmallPtrSetImpl in function arguments to ↵Craig Topper2014-08-181-6/+6
| | | | | | | | avoid needing to mention the size." Getting a weird buildbot failure that I need to investigate. llvm-svn: 215870
* Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid ↵Craig Topper2014-08-171-6/+6
| | | | | | needing to mention the size. llvm-svn: 215868
* [shuffle] Teach the shufflevector fuzzer to support fixed element types.Chandler Carruth2014-08-171-6/+12
| | | | | | | I'm using this to try to find more minimal test cases by re-fuzzing within a specific domain once errors are found. llvm-svn: 215823
* [LIT] Move display of unsupported and xfail tests to summary. Eric Fiselier2014-08-161-4/+7
| | | | | | | | | | | | | | | | | | | | Summary: This patch changes the way xfail and unsupported tests are displayed. This output is only displayed when the --show-unsupported/--show-xfail flags are passed to lit. Currently xfail/unsupported tests are printed during the run of the test-suite. I think its better to display this information during the summary instead. This patch removes the printing of these tests from when they are run to the summary. Reviewers: ddunbar, EricWF Reviewed By: EricWF Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4842 llvm-svn: 215809
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-1314-26/+30
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* [shuffle] Stand back! I'm about to (try to) do math!Chandler Carruth2014-08-131-2/+39
| | | | | | | | | | | | | | | | | | | Especially with blends and large tree heights there was a problem with the fuzzer where it would end up with enough undef shuffle elements in enough parts of the tree that in a birthday-attack kind of way we ended up regularly having large numbers of undef elements in the result. I was seeing reasonably frequent cases of *all* results being undef which prevents us from doing any correctness checking at all. While having undef lanes is important, this was too much. So I've tried to apply some math to the probabilities of having an undef lane and balance them against the tree height. Please be gentle, I'm really terrible at math. I probably made a bunch of amateur mistakes here. Fixes, etc. are quite welcome. =D At least in running it some, it seems to be producing more interesting (for correctness testing) results. llvm-svn: 215540
* [shuffle] Make the seed an optional component and add support forChandler Carruth2014-08-131-2/+3
| | | | | | letting the python very directly compute a UUID. llvm-svn: 215533
* [shuffle] Teach the shuffle fuzzer to fuzz blends, including formingChandler Carruth2014-08-131-39/+67
| | | | | | | | | | | | | | | | | a tree of inputs to blend iteratively together. This required a pretty substantial rewrite of the innards. The number of shuffle instructions is now bounded in terms of tree-height. There is a flag to disable blends so that its still possible to test single input shuffles. I've also improved various aspects of how the test program is generated, primarily to simplify the test harness and allow some optimizations to clean up how we actually check the results and build up the inputs. Again, apologies for my likely horrible use of Python... But hey, it works! (Ish?) llvm-svn: 215530
* [shuffle] Tweak the shuffle fuzzer to support bigger seeds. I'mChandler Carruth2014-08-131-6/+6
| | | | | | currently using UUIDs to seed this in order to scan a bigger range. llvm-svn: 215521
* Add isRegSequence property.Quentin Colombet2014-08-113-0/+3
| | | | | | | | | | | This patch adds a new property: isRegSequence and the related target hooks: TargetIntrInfo::getRegSequenceInputs and TargetInstrInfo::getRegSequenceLikeInputs to specify that a target specific instruction is a (kind of) REG_SEQUENCE. <rdar://problem/12702965> llvm-svn: 215394
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-072-7/+21
| | | | | | | | | | | be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate. Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reverts commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 215154
* FileCheck: Add a flag to allow checking empty inputJustin Bogner2014-08-071-1/+6
| | | | | | | | | | | | | Currently FileCheck errors out on empty input. This is usually the right thing to do, but makes testing things like "this command does not emit some error message" hard to test. This usually leads to people using "command 2>&1 | count 0" instead, and then the bots that use guard malloc fail a few hours later. By adding a flag to FileCheck that allows empty inputs, we can make tests that consist entirely of "CHECK-NOT" lines feasible. llvm-svn: 215127
* Nuke the old JIT.Rafael Espindola2014-08-072-21/+7
| | | | | | | | | I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
* Change BitsInit to inherit from TypedInit.Pete Cooper2014-08-071-0/+15
| | | | | | This is useful in a later patch where binary literals such as 0b000 will become BitsInit values instead of IntInit values. llvm-svn: 215085
* Add an option to the shuffle fuzzer that lets you fuzz exclusivelyChandler Carruth2014-08-071-2/+16
| | | | | | | | | within a single bit-width of vectors. This is particularly useful for when you know you have bugs in a certain area and want to find simpler test cases than those produced by an open-ended fuzzing that ends up legalizing the vector in addition to shuffling it. llvm-svn: 215056
* Use the minor number for the revision numbers.Bill Wendling2014-08-071-12/+13
| | | | llvm-svn: 215055
* Add a vector shuffle fuzzer.Chandler Carruth2014-08-071-0/+170
| | | | | | | | | | | | | | | | | | | | | | This is a python script which for a given seed generates a random sequence of random shuffles of a random vector width. It embeds this into a function and emits a main function which calls the test routine and checks that the results (where defined) match the obvious results. I'll be using this to drive out miscompiles from the new vector shuffle logic now that it is clean of any crashes I can find with llvm-stress. Note, my python skills are very poor. Sorry if this is terrible code, and feel free to tell me how I should write this or just patch it as necessary. The tests generated try to be very portable and use boring C routines. It technically will mis-declare the C routines and pass 32-bit integers to parametrs that expect 64-bit integers. If someone wants to fix this and has less terrible ideas of how to do it, I'm all ears. Fortunately, this "just works" for x86. =] llvm-svn: 215054
* Remove the target machine from CCState. Previously it was only usedEric Christopher2014-08-061-2/+2
| | | | | | | | | to get the subtarget and that's accessible from the MachineFunction now. This helps clear the way for smaller changes where we getting a subtarget will require passing in a MachineFunction/Function as well. llvm-svn: 214988
* Remove the TargetMachine forwards for TargetSubtargetInfo basedEric Christopher2014-08-041-4/+8
| | | | | | information and update all callers. No functional change. llvm-svn: 214781
* [SKX] Enabling load/store instructions: encodingRobert Khasanov2014-08-041-0/+11
| | | | | | | | Instructions: VMOVAPD, VMOVAPS, VMOVDQA8, VMOVDQA16, VMOVDQA32,VMOVDQA64, VMOVDQU8, VMOVDQU16, VMOVDQU32,VMOVDQU64, VMOVUPD, VMOVUPS, Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com> llvm-svn: 214719
* Add a small utility called bisect that enables commandline bisecting on a ↵Michael Gottesman2014-08-021-0/+37
| | | | | | | | | | | | | | | | | | | | | | | counter. This is something that I have found to be very useful in my work and I wanted to contribute it back to the community since several people in the past have asked me for something along these lines. (Jakob, I know this has been a while coming ; )] The way you use this is you create a script that takes in as its first argument a count. The script passes into LLVM the count via a command line flag that disables a pass after LLVM has run after the pass has run for count number of times. Then the script invokes a test of some sort and indicates whether LLVM successfully compiled the test via the scripts exit status. Then you invoke bisect as follows: bisect --start=<start_num> --end=<end_num> ./script.sh "%(count)s" And bisect will continually call ./script.sh with various counts using the exit status to determine success and failure. llvm-svn: 214610
* [lit] Add --show-xfail flag to LIT.Eric Fiselier2014-08-021-0/+4
| | | | | | | | | | | | | | | | | | Summary: This patch add a --show-xfail flag. If this flag is specified then each xfail test will be printed to output. When it is not given xfail tests are ignored. Ignoring xfail tests is the current behavior. This flag is meant to mirror the --show-unsupported flag that was recently added. Reviewers: ddunbar, EricWF Reviewed By: EricWF Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4750 llvm-svn: 214609
* Make getNamedOperandIdx readonlyMatt Arsenault2014-08-011-0/+1
| | | | llvm-svn: 214524
* Remove some calls to std::move.Rafael Espindola2014-08-012-4/+4
| | | | | | | | | Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. llvm-svn: 214516
* Simplify the code a bit with std::unique_ptr.Rafael Espindola2014-08-011-9/+5
| | | | llvm-svn: 214514
* TableGen: Allow AddedComplexity values to be negativeTom Stellard2014-08-013-7/+7
| | | | | | | | | | | | | This is useful for cases when stand-alone patterns are preferred to the patterns included in the instruction definitions. Instead of requiring that stand-alone patterns set a larger AddedComplexity value, which can be confusing to new developers, the allows us to reduce the complexity of the included patterns to achieve the same result. There will be test cases for this added to the R600 backend in a future commit. llvm-svn: 214466
* Add support for the X86 secure guard extensions instructions in assembler (SGX).Kevin Enderby2014-07-311-56/+59
| | | | | | | | | | | | | This allows assembling the two new instructions, encls and enclu for the SKX processor model. Note the diffs are a bigger than what might think, but to fit the new MRM_CF and MRM_D7 in things in the right places things had to be renumbered and shuffled down causing a bit more diffs. rdar://16228228 llvm-svn: 214460
* Fix FileCheck crash when empty prefix is passed.Eli Bendersky2014-07-291-0/+4
| | | | llvm-svn: 214210
* [SKX] Enabling mask logic instructions: encoding, loweringRobert Khasanov2014-07-281-0/+2
| | | | | | | | Instructions: KAND{BWDQ}, KANDN{BWDQ}, KOR{BWDQ}, KXOR{BWDQ}, KXNOR{BWDQ} Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com> llvm-svn: 214081
* [stack protector] Fix a potential security bug in stack protector where theAkira Hatanaka2014-07-251-1/+2
| | | | | | | | | | | | | | address of the stack guard was being spilled to the stack. Previously the address of the stack guard would get spilled to the stack if it was impossible to keep it in a register. This patch introduces a new target independent node and pseudo instruction which gets expanded post-RA to a sequence of instructions that load the stack guard value. Register allocator can now just remat the value when it can't keep it in a register. <rdar://problem/12475629> llvm-svn: 213967
* [SKX] Enabling mask instructions: encoding, loweringRobert Khasanov2014-07-231-0/+4
| | | | | | | | KMOVB, KMOVW, KMOVD, KMOVQ, KNOTB, KNOTW, KNOTD, KNOTQ Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com> llvm-svn: 213757
* Add openmp to the list of tagged things.Bill Wendling2014-07-221-1/+1
| | | | llvm-svn: 213608
* Revert of r213521. This change introduced a non-hermetic test (depending on aRichard Smith2014-07-223-7/+7
| | | | | | | | | | file not in the test/ area). Backing out now so that this test isn't part of the 3.5 branch. Original commit message: "TableGen: Allow AddedComplexity values to be negative [...]" llvm-svn: 213596
* test-release.sh: Add support for dot releasesTom Stellard2014-07-211-1/+1
| | | | llvm-svn: 213580
* [SKX] Enabling SKX target and AVX512BW, AVX512DQ, AVX512VL features.Robert Khasanov2014-07-211-0/+14
| | | | | | | | | | | | Enabling HasAVX512{DQ,BW,VL} predicates. Adding VK2, VK4, VK32, VK64 masked register classes. Adding new types (v64i8, v32i16) to VR512. Extending calling conventions for new types (v64i8, v32i16) Patch by Zinovy Nis <zinovy.y.nis@intel.com> Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com> llvm-svn: 213545
* TableGen: Allow AddedComplexity values to be negativeTom Stellard2014-07-213-7/+7
| | | | | | | | | | This is useful for cases when stand-alone patterns are preferred to the patterns included in the instruction definitions. Instead of requiring that stand-alone patterns set a larger AddedComplexity value, which can be confusing to new developers, the allows us to reduce the complexity of the included patterns to achieve the same result. llvm-svn: 213521
* Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ↵David Blaikie2014-07-191-1/+1
| | | | | | | | | | | ".reset()" It's also possible to just write "= nullptr", but there's some question of whether that's as readable, so I leave it up to authors to pick which they prefer for now. If we want to discuss standardizing on one or the other, we can do that at some point in the future. llvm-svn: 213438
* TableGen: Add 'static' to a large array to avoid a huge stack allocationReid Kleckner2014-07-171-1/+1
| | | | | | | | Speculative fix for a -Wframe-larger-than warning from gcc. Clang will implicitly promote such constant arrays to globals, so in theory it won't hit this. llvm-svn: 213298
* [X86] AVX512: Add disassembler support for compressed displacementAdam Nemet2014-07-172-2/+20
| | | | | | | | | | | | There are two parts here. First is to modify tablegen to adjust the encoding type ENCODING_RM with the scaling factor. The second is to use the new encoding types to compute the correct displacement in the decoder. Fixes <rdar://problem/17608489> llvm-svn: 213281
* [TABLEGEN] Do not crash on intrinsics with names longer than 40 charactersJustin Holewinski2014-07-171-2/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D4537 llvm-svn: 213253
* [lit] Add --show-unsupported flag to LITEric Fiselier2014-07-172-4/+7
| | | | llvm-svn: 213227
* Move Post RA Scheduling flag bit into SchedMachineModelSanjay Patel2014-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | Refactoring; no functional changes intended Removed PostRAScheduler bits from subtargets (X86, ARM). Added PostRAScheduler bit to MCSchedModel class. This bit is set by a CPU's scheduling model (if it exists). Removed enablePostRAScheduler() function from TargetSubtargetInfo and subclasses. Fixed the existing enablePostMachineScheduler() method to use the MCSchedModel (was just returning false!). Added methods to TargetSubtargetInfo to allow overrides for AntiDepBreakMode, CriticalPathRCs, and OptLevel for PostRAScheduling. Added enablePostRAScheduler() function to PostRAScheduler class which queries the subtarget for the above values. Preserved existing scheduler behavior for ARM, MIPS, PPC, and X86: a. ARM overrides the CPU's postRA settings by enabling postRA for any non-Thumb or Thumb2 subtarget. b. MIPS overrides the CPU's postRA settings by enabling postRA for everything. c. PPC overrides the CPU's postRA settings by enabling postRA for everything. d. X86 is the only target that actually has postRA specified via sched model info. Differential Revision: http://reviews.llvm.org/D4217 llvm-svn: 213101
* Option: Propagate flags from groups to options in each groupReid Kleckner2014-07-121-11/+15
| | | | | | | This should make it easy to set a flag for a whole group of clang driver options. llvm-svn: 212865
* Add FileCheck -implicit-check-not option to allow stricter tests without ↵Alexander Kornienko2014-07-111-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | adding too many CHECK-NOTs manually. Summary: Add FileCheck -implicit-check-not option which allows specifying a pattern that should only occur in the input when explicitly matched by a positive check. This feature allows checking tool diagnostics in a way clang -verify does it for compiler diagnostics. The option has been tested on a number of clang-tidy checks, I'll post a link to the clang-tidy patch to this thread. Once there's an agreement on the general direction, I can add tests and documentation. Reviewers: djasper, bkramer Reviewed By: bkramer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4462 llvm-svn: 212810
* Change an assert() to a diagnostic.Jim Grosbach2014-07-091-3/+5
| | | | llvm-svn: 212637
* Use correct memeber when displaying StringMap's size.Nikola Smiljanic2014-07-091-2/+2
| | | | llvm-svn: 212588
* [testing]: lld generally lives in tools/, so fix llvm-lit.Tim Northover2014-07-071-1/+1
| | | | | | Otherwise we can't run individual tests directly ("llvm-lit /path/to/test") llvm-svn: 212461
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-062-12/+17
| | | | llvm-svn: 212405
* SourceMgr: make valid buffer IDs start from oneAlp Toker2014-07-061-2/+2
| | | | | | | | | | Use 0 for the invalid buffer instead of -1/~0 and switch to unsigned representation to enable more idiomatic usage. Also introduce a trivial SourceMgr::getMainFileID() instead of hard-coding 0/1 to identify the main file. llvm-svn: 212398
OpenPOWER on IntegriCloud