summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* Add Support for Creating and Deleting Unicode Files and Directories in LitSerge Guelton2019-02-284-7/+40
| | | | | | | | | | | This enables lit to work with unicode file names via mkdir, rm, and redirection. Lit still uses utf-8 internally, but converts to utf-16 on Windows, or just utf-8 bytes on everything else. Committed on behalf of Jason Mittertreiner Differential Revision: https://reviews.llvm.org/D56754 llvm-svn: 355122
* Fixed typos in a test: s/CEHCK/CHECK/Dmitri Gribenko2019-02-281-7/+7
| | | | | | | | | | | | Reviewers: ilya-biryukov, serge-sans-paille Subscribers: delcypher, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58613 llvm-svn: 355080
* [hwasan, asan] Intercept vfork.Evgeniy Stepanov2019-02-271-0/+1
| | | | | | | | | | | | | | | Summary: Intercept vfork on arm, aarch64, i386 and x86_64. Reviewers: pcc, vitalybuka Subscribers: kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58533 llvm-svn: 355030
* gn build: Merge r354989Nico Weber2019-02-271-11/+11
| | | | llvm-svn: 354991
* gn build: Merge r354692Nico Weber2019-02-271-0/+2
| | | | llvm-svn: 354987
* vim: `swiftself` is an attributeSaleem Abdulrasool2019-02-271-0/+1
| | | | | | Highlight the `swiftself` attribute on parameters. llvm-svn: 354934
* [lit] Allow setting parallelism groups to NoneJulian Lettner2019-02-266-6/+45
| | | | | | | | | | | | | | | | | | | Check that we do not crash if a parallelism group is explicitly set to None. Permits usage of the following pattern. [lit.common.cfg] lit_config.parallelism_groups['my_group'] = None if <condition>: lit_config.parallelism_groups['my_group'] = 3 [project/lit.cfg] config.parallelism_group = 'my_group' Reviewers: rnk Differential Revision: https://reviews.llvm.org/D58305 llvm-svn: 354912
* [TableGen] Make OpcodeMappings sort comparator deterministic NFCIAndrew Ng2019-02-261-18/+16
| | | | | | | | | | The previous sort comparator was not deterministic, i.e. in some situations it would be possible for lhs < rhs && rhs < lhs. This was discovered by an STL assertion in a Windows debug build of llvm-tblgen. Differential Revision: https://reviews.llvm.org/D58687 llvm-svn: 354910
* [llvm-objdump] Implement -Mreg-names-raw/-std options.Igor Kudrin2019-02-261-5/+14
| | | | | | | | | | | | | | The --disassembler-options, or -M, are used to customize the disassembler and affect its output. The two implemented options allow selecting register names on ARM: * With -Mreg-names-raw, the disassembler uses rNN for all registers. * With -Mreg-names-std it prints sp, lr and pc for r13, r14 and r15, which is the default behavior of llvm-objdump. Differential Revision: https://reviews.llvm.org/D57680 llvm-svn: 354870
* [ARM] Make fullfp16 instructions not conditionalisable.Simon Tatham2019-02-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More or less all the instructions defined in the v8.2a full-fp16 extension are defined as UNPREDICTABLE if you put them in an IT block (Thumb) or use with any condition other than AL (ARM). LLVM didn't know that, and was happy to conditionalise them. In order to force these instructions to count as not predicable, I had to make a small Tablegen change. The code generation back end mostly decides if an instruction was predicable by looking for something it can identify as a predicate operand; there's an isPredicable bit flag that overrides that check in the positive direction, but nothing that overrides it in the negative direction. (I considered the alternative approach of actually removing the predicate operand from those instructions, but thought that it would be more painful overall for instructions differing only in data type to have different shapes of operand list. This way, the only code that has to notice the difference is the if-converter.) So I've added an isUnpredicable bit alongside isPredicable, and set that bit on the right subset of FP16 instructions, and also on the VSEL, VMAXNM/VMINNM and VRINT[ANPM] families which should be unpredicable for all data types. I've included a couple of representative regression tests, both of which previously caused an fp16 instruction to be conditionalised in ARM state and (with -arm-no-restrict-it) to be put in an IT block in Thumb. Reviewers: SjoerdMeijer, t.p.northover, efriedma Reviewed By: efriedma Subscribers: jdoerfert, javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57823 llvm-svn: 354768
* [SelectionDAG] Add a OPC_CheckChild2CondCode to SelectionDAGISel to remove a ↵Craig Topper2019-02-254-2/+40
| | | | | | | | | | MoveChild and MoveParent pair. OPC_CheckCondCode is always used as operand 2 of a setcc. And its always surrounded by a MoveChild2 and a MoveParent. By having a dedicated opcode for this case we can reduce the number of bytes needed for this pattern from 4 bytes to 2. This saves ~3000 bytes in the X86 table. llvm-svn: 354763
* [GN] Updated build file to allow GN builds to succeed at ToT.Mitch Phillips2019-02-221-0/+1
| | | | llvm-svn: 354683
* [gn] Add LLVM_BUILD_EXAMPLES.Evgeniy Stepanov2019-02-211-0/+1
| | | | llvm-svn: 354636
* Revert "[asan] Fix vfork handling.", +1Evgeniy Stepanov2019-02-211-1/+0
| | | | | | Revert r354625, r354627 - multiple build failures. llvm-svn: 354629
* [hwasan,asan] Intercept vfork.Evgeniy Stepanov2019-02-211-0/+1
| | | | | | | | | | | | | | Summary: AArch64 only for now. Reviewers: vitalybuka, pcc Subscribers: srhines, kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, jdoerfert, #sanitizers, llvm-commits, kcc Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58313 llvm-svn: 354625
* [gn] Add target flags to asmflags.Evgeniy Stepanov2019-02-211-0/+1
| | | | | | | | | | | | Reviewers: pcc, thakis Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58483 llvm-svn: 354618
* Fix missing C++ mode commentsMatt Arsenault2019-02-211-1/+1
| | | | llvm-svn: 354590
* Add support for pointer types in patternsTom Stellard2019-02-205-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds support for defining patterns for global isel using pointer types, for example: def : Pat<(load GPR32:$src), (p1 (LOAD GPR32:$src))>; DAGISelEmitter will ignore the pointer information and treat these types as integers with the same bit-width as the pointer type. Reviewers: dsanders, rtereshin, arsenm Reviewed By: arsenm Subscribers: Petar.Avramovic, wdng, rovka, kristof.beyls, jfb, volkan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57065 llvm-svn: 354510
* gn build: Merge r354365 moreNico Weber2019-02-201-0/+3
| | | | llvm-svn: 354413
* gn build: Merge r354365Nico Weber2019-02-201-0/+1
| | | | llvm-svn: 354411
* [MC] Make SubtargetFeatureKV only store one FeatureBitset and use an ↵Craig Topper2019-02-181-6/+6
| | | | | | | | | | | | 'unsigned' to hold the value. This class is used for two difference tablegen generated tables. For one of the tables the Value FeatureBitset only has one bit set. For the other usage the Implies field was unused. This patch changes the Value field to just be an unsigned. For the usage that put a real vector in bitset, we now use the previously unused Implies field and leave the Value field unused instead. This is good for a 16K reduction in the size of llc on my local build with all targets enabled. llvm-svn: 354243
* gn build: Merge r354156Nico Weber2019-02-182-0/+2
| | | | llvm-svn: 354242
* [lit] Remove LitTestCaseJulian Lettner2019-02-167-87/+0
| | | | | | | | | | | | | From the docs: `class LitTestCase(unittest.TestCase)` LitTestCase is an adaptor for providing a 'unittest' compatible interface to 'lit' tests so that we can run lit tests with standard python test runners. It does not seem to be used anywhere. Differential Revision: https://reviews.llvm.org/D58264 llvm-svn: 354188
* [lit][NFC] Cleanup lit worker process handlingJulian Lettner2019-02-163-106/+109
| | | | | | | | | | | | | | | | | Move code that is executed on worker process to separate file. This makes the use of the pickled arguments stored in global variables in the worker a bit clearer. (Still not pretty though.) Extract handling of parallelism groups to it's own function. Use BoundedSemaphore instead of Semaphore. BoundedSemaphore raises for unmatched release() calls. Cleanup imports. Differential Revision: https://reviews.llvm.org/D58196 llvm-svn: 354187
* [lit][NFC] Cleanup copy&paste naming mistakeJulian Lettner2019-02-152-5/+5
| | | | llvm-svn: 354095
* [lit] Remove --single-process option (use -j1 instead)Julian Lettner2019-02-142-12/+4
| | | | | | | | Remove `--single-process` command line option. Use `-j1` instead. Also see commit: 96adb78b120b6aa9739eb714534dc8e819f7bc52 llvm-svn: 354073
* [lit] Set --single-process for single tests and --threads=1Julian Lettner2019-02-146-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Automatically upgrade debugging experience (single process, no thread pool) when: 1) we only run a single test 2) user specifies `-j1` Details: Fix `--max-failures` in single process mode. Option did not have an effect in single process mode. Add display feedback for single process mode. Adapted test. Improve argument checking (require positive integers). `--single-process` is now essentially an alias for `-j1`. Should we remove it? Reviewers: rnk Differential Revision: https://reviews.llvm.org/D58249 llvm-svn: 354068
* gn build: Merge r353957.Peter Collingbourne2019-02-131-0/+7
| | | | llvm-svn: 353980
* [gn build] Separate debug and optimization settingsDavid Major2019-02-122-3/+12
| | | | | | | | | | This patch adds an `is_optimized` variable, orthogonal to `is_debug`, to allow for a gn analogue to `RelWithDebInfo` builds. As part of this we'll want to explicitly enable GC+ICF, for the sake of `is_debug && is_optimized` builds. The flags normally default to true except that if you pass `/DEBUG` they default to false. Differential Revision: https://reviews.llvm.org/D58075 llvm-svn: 353888
* [tablegen] Add locations to many PrintFatalError() callsDaniel Sanders2019-02-1213-80/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While working on the GISel Combiner, I noticed I was producing location-less error messages fairly often and set about fixing this. In the process, I noticed quite a few places elsewhere in TableGen that also neglected to include a relevant location. This patch adds locations to errors that relate to a specific record (or a field within it) and also have easy access to the relevant location. This is particularly useful when multiclasses are involved as many of these errors refer to the full name of a record and it's difficult to guess which substring is grep-able. Unfortunately, tablegen currently only supports Record granularity so it's not currently possible to point at a specific Init so these sometimes point at the record that caused the error rather than the precise origin of the error. Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, nhaehnle Reviewed By: nhaehnle Subscribers: jdoerfert, nhaehnle, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58077 llvm-svn: 353862
* [tblgen] Add a timer covering the time spent reading the Instruction defsDaniel Sanders2019-02-112-0/+15
| | | | | | | | | | | | | | | This patch adds a -time-regions option to tablegen that can enable timers (currently only one) that assess the performance of tablegen itself. This can be useful for identifying scaling problems with tablegen backends. This particular timer has allowed me to ignore time that is not attributed the GISel combiner pass. It's useful by itself but it is particularly useful in combination with https://reviews.llvm.org/D52954 which causes this period of time to be annotated within Xcode Instruments which in turn allows profile samples and recorded allocations attributed to reading instructions to be filtered out. llvm-svn: 353763
* test-release.sh: Add option to use ninjaDiana Picus2019-02-111-9/+29
| | | | | | | | | | | | | | | | | | | | Allow the use of ninja instead of make. This is useful on some platforms where we'd like to be able to limit the number of link jobs without slowing down the other steps of the release. This patch adds a -use-ninja command line option, which sets the generator to Ninja both for LLVM and the test-suite. It also deals with some differences between make and ninja: * DESTDIR handling - ninja doesn't like this to be listed after the target, but both make and ninja can handle it before the command * Verbose mode - ninja uses -v, make uses VERBOSE=1 * Keep going mode - make has a -k mode, which builds as much as possible even when failures are encountered; for ninja we need to set a hard limit (we use 100 since most people won't look at 100 failures anyway) I haven't tested with gmake. llvm-svn: 353685
* gn build: Fix clang-tidy dep on ClangSACheckers.Nico Weber2019-02-111-4/+1
| | | | | | | | Patch by Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57998 llvm-svn: 353657
* gn build: Merge r353590Nico Weber2019-02-095-7/+6
| | | | llvm-svn: 353621
* [GlobalISel] Skip patterns that define complex suboperands twice instead of ↵Jessica Paquette2019-02-091-6/+16
| | | | | | | | | | | | | | | | | | | dying If we run into a pattern that looks like this: add (complex $x, $y) (complex $x, $z) We should skip the pattern instead of asserting/doing something unpredictable. This makes us return an Error in that case, and adds a testcase for skipped patterns. Differential Revision: https://reviews.llvm.org/D57980 llvm-svn: 353586
* gn build: Merge r353566Nico Weber2019-02-091-0/+1
| | | | llvm-svn: 353585
* Implementation of asm-goto support in LLVMCraig Topper2019-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch accompanies the RFC posted here: http://lists.llvm.org/pipermail/llvm-dev/2018-October/127239.html This patch adds a new CallBr IR instruction to support asm-goto inline assembly like gcc as used by the linux kernel. This instruction is both a call instruction and a terminator instruction with multiple successors. Only inline assembly usage is supported today. This also adds a new INLINEASM_BR opcode to SelectionDAG and MachineIR to represent an INLINEASM block that is also considered a terminator instruction. There will likely be more bug fixes and optimizations to follow this, but we felt it had reached a point where we would like to switch to an incremental development model. Patch by Craig Topper, Alexander Ivchenko, Mikhail Dvoretckii Differential Revision: https://reviews.llvm.org/D53765 llvm-svn: 353563
* gn build: Merge r353471, r353373.Nico Weber2019-02-086-6/+8
| | | | llvm-svn: 353518
* gn build: Make check-{clang,lld,llvm} pass on FreeBSD.Peter Collingbourne2019-02-0713-37/+43
| | | | | | | | | Mostly achieved by assuming that anything that isn't Win or Mac is ELF, which seems reasonable enough for now. Differential Revision: https://reviews.llvm.org/D57870 llvm-svn: 353470
* gn build: Merge the test part of r353237.Peter Collingbourne2019-02-071-0/+1
| | | | llvm-svn: 353369
* build: Remove the cmake check for malloc.h.Peter Collingbourne2019-02-061-2/+0
| | | | | | | | | | | As far as I can tell, malloc.h is only being used here to provide a definition of mallinfo (malloc itself is declared in stdlib.h via cstdlib). We already have a macro for whether mallinfo is available, so switch to using that instead. Differential Revision: https://reviews.llvm.org/D57807 llvm-svn: 353329
* gn build: Merge r353265, r353237Nico Weber2019-02-065-2/+3
| | | | llvm-svn: 353298
* gn build: Fix clang-tidy buildNico Weber2019-02-051-8/+6
| | | | | | | | | | | | | | | | | | Not depending on //clang/lib/StaticAnalyzer/Core and //clang/lib/StaticAnalyzer/Frontend causes a linker error even if ClangSACheckers are not supported. Undefined symbols for architecture x86_64: "clang::ento::CreateAnalysisConsumer(clang::CompilerInstance&)", referenced from: clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer( clang::CompilerInstance&, llvm::StringRef) in libclangTidy.a(libclangTidy.ClangTidy.o) Patch from Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57777 llvm-svn: 353244
* gn build: BUILD.gn files for clang-tidy and clang-apply-replacementsNico Weber2019-02-0526-1/+731
| | | | | | | | Patch from Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57329 llvm-svn: 353177
* Fix typo in comment, NFCIKrasimir Georgiev2019-02-051-1/+1
| | | | llvm-svn: 353176
* gn build: Merge r353072Nico Weber2019-02-051-0/+1
| | | | llvm-svn: 353175
* Recommit: Detect incorrect FileCheck variable CLI definitionThomas Preud'homme2019-02-051-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: While the backend code of FileCheck relies on definition of variable from the command-line to have an equal sign '=' and a variable name before that, the frontend does not actually enforce it. This leads to FileCheck crashing when invoked with invalid syntax for the -D option. This patch adds the missing validation in the frontend. It also makes the -D option an AlwaysPrefix option to be able to detect -D=FOO as being a define without variable and -D as missing its value. Copyright: - Linaro (changes in version 2 of revision D55940) - GraphCore (changes in later versions) Reviewers: jdenny Subscribers: JonChesterfield, hiraditya, kristina, probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D55940 llvm-svn: 353173
* gn build: Fix Python 3 write_vcsrevision script compatibilitySerge Guelton2019-02-051-1/+1
| | | | | | | | | | Trivial fix: decode was not called for all subprocess.check_output calls. Commited on behalf of Andrew Boyarshin Differential Revision: https://reviews.llvm.org/D57505 llvm-svn: 353168
* gn build: Upgrade to NDK r19.Peter Collingbourne2019-02-055-27/+7
| | | | | | | | | | NDK r19 includes a sysroot that can be used directly by the compiler without creating a standalone toolchain, so we just need a handful of flags to point Clang there. Differential Revision: https://reviews.llvm.org/D57733 llvm-svn: 353139
* [WebAssembly] Make disassembler always emit most canonical name.Wouter van Oortmerssen2019-02-051-5/+26
| | | | | | | | | | | | | | | | | | | | | Summary: There are a few instructions that all map to the same opcode, so when disassembling, we have to pick one. That was just the first one before (the except_ref variant in the case of "call"), now it is the one marked as IsCanonical in tablegen, or failing that, the shortest name (which is typically the "canonical" one). Also introduced a canonical "end" instruction for this purpose. Reviewers: dschuff, tlively Subscribers: sbc100, jgravelle-google, aheejin, llvm-commits, sunfish Tags: #llvm Differential Revision: https://reviews.llvm.org/D57713 llvm-svn: 353131
OpenPOWER on IntegriCloud