summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix selecting legal types in TypeInfer::getLegalTypesKrzysztof Parzyszek2017-09-151-9/+3
| | | | | | Collect all legal types for all modes. llvm-svn: 313380
* Added optional validation of svn sources to Dockerfiles.Ilya Biryukov2017-09-157-9/+335
| | | | | | | | | | | | | | Summary: This commit also adds a script to compute sha256 hashes of llvm checkouts. Reviewers: klimek, mehdi_amini Reviewed By: klimek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37099 llvm-svn: 313359
* Revert "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-154-33/+40
| | | | | | | | This patch is still breaking several multi-stage compiler-rt bots. I already know what the fix is, but I want to get the bots green for now and then try re-applying in the morning. llvm-svn: 313335
* merge-request.sh: Update to use new "Fixed by Commit(s)" fieldTom Stellard2017-09-151-40/+50
| | | | | | | | | | | | | | | | | | Summary: This will be used instead of the url field to track which commits need to be merged. This patch also drops support for version 1.x of the bugzilla CLI tool. Reviewers: hansw, hans Reviewed By: hans Subscribers: hans, llvm-commits Differential Revision: https://reviews.llvm.org/D37786 llvm-svn: 313334
* [lit] Revert "Add a lit.llvm module that all llvm projects can use"Zachary Turner2017-09-153-142/+0
| | | | | | | This is breaking due to some changes I forgot to merge in, so I'm temporarily reverting them until I can re-test that this works. llvm-svn: 313328
* [lit] Remove some code that I forgot to remove.Zachary Turner2017-09-151-8/+0
| | | | llvm-svn: 313326
* [lit] Add a lit.llvm module that all test suites can use.Zachary Turner2017-09-153-0/+150
| | | | | | | | | | | | | | To further reduce duplicate code, this patch introduces a module that configs can simply import and get access to a lot of useful functionality such as setting up paths, adding features that are useful across all projects, and other utility-type functions. For now this only updates llvm's suite to use this new library, but subsequent patches will update other projects. Differential Revision: https://reviews.llvm.org/D37778 llvm-svn: 313325
* [lit] Fix some windows line endings that snuck in.Zachary Turner2017-09-141-2/+2
| | | | llvm-svn: 313301
* Subtarget support for parameterized register class informationKrzysztof Parzyszek2017-09-141-5/+27
| | | | | | | | Implement "checkFeatures" and emitting HW mode check code. Differential Revision: https://reviews.llvm.org/D31959 llvm-svn: 313295
* Remove usages of deprecated std::unary_function and std::binary_function.Benjamin Kramer2017-09-141-1/+1
| | | | | | | | | | These are removed in C++17. We still have some users of unary_function::argument_type, so just spell that typedef out. No functionality change intended. Note that many of the argument types are actually wrong :) llvm-svn: 313287
* Silence warning about unused variable in release buildKrzysztof Parzyszek2017-09-141-0/+1
| | | | llvm-svn: 313273
* TableGen support for parameterized register class informationKrzysztof Parzyszek2017-09-1418-1045/+2052
| | | | | | | | | | | | | | | | | | | | | | | | | This replaces TableGen's type inference to operate on parameterized types instead of MVTs, and as a consequence, some interfaces have changed: - Uses of MVTs are replaced by ValueTypeByHwMode. - EEVT::TypeSet is replaced by TypeSetByHwMode. This affects the way that types and type sets are printed, and the tests relying on that have been updated. There are certain users of the inferred types outside of TableGen itself, namely FastISel and GlobalISel. For those users, the way that the types are accessed have changed. For typical scenarios, these replacements can be used: - TreePatternNode::getType(ResNo) -> getSimpleType(ResNo) - TreePatternNode::hasTypeSet(ResNo) -> hasConcreteType(ResNo) - TypeSet::isConcrete -> TypeSetByHwMode::isValueTypeByHwMode(false) For more information, please refer to the review page. Differential Revision: https://reviews.llvm.org/D31951 llvm-svn: 313271
* [lit] Force site configs to be run before source-tree configsZachary Turner2017-09-144-40/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies LLVM's lit infrastructure by enforcing an ordering that a site config is always run before a source-tree config. A significant amount of the complexity from lit config files arises from the fact that inside of a source-tree config file, we don't yet know if the site config has been run. However it is *always* required to run a site config first, because it passes various variables down through CMake that the main config depends on. As a result, every config file has to do a bunch of magic to try to reverse-engineer the location of the site config file if they detect (heuristically) that the site config file has not yet been run. This patch solves the problem by emitting a mapping from source tree config file to binary tree site config file in llvm-lit.py. Then, during discovery when we find a config file, we check to see if we have a target mapping for it, and if so we use that instead. This mechanism is generic enough that it does not affect external users of lit. They will just not have a config mapping defined, and everything will work as normal. On the other hand, for us it allows us to make many simplifications: * We are guaranteed that a site config will be executed first * Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere. * We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line. * It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects. * All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone. One potentially noteworthy thing that was required to implement this change is that whereas the ninja check targets previously used the first method to spawn lit, they now use the second. In particular, you can no longer run lit.py against the source tree while specifying the various `foo_site_config=<path>` parameters. Instead, you need to run llvm-lit.py. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313270
* [tblgen] Remove uses of std::ptr_fun, it's removed in C++17.Benjamin Kramer2017-09-141-8/+5
| | | | | | No functionality change intended. llvm-svn: 313269
* Convenience/safety fix for llvm::sys::Execute(And|No)WaitAlexander Kornienko2017-09-131-2/+1
| | | | | | | | | | | | | | | | | | | | Summary: Change the type of the Redirects parameter of llvm::sys::ExecuteAndWait, ExecuteNoWait and other APIs that wrap them from `const StringRef **` to `ArrayRef<Optional<StringRef>>`, which is safer and simplifies the use of these APIs (no more local StringRef variables just to get a pointer to). Corresponding clang changes will be posted as a separate patch. Reviewers: bkramer Reviewed By: bkramer Subscribers: vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D37563 llvm-svn: 313155
* [MiSched|TableGen] : Tidy up and modernise. NFC.Javed Absar2017-09-132-113/+99
| | | | | | | | | Replacing with range-based loop and substituting 'using'. Reviewed by: @MatzeB Differential Revision: https://reviews.llvm.org/D37748 llvm-svn: 313140
* Remove ancient, commented out code from TableGen, NFCKrzysztof Parzyszek2017-09-122-16/+0
| | | | | | These pieces were commented out in r98534 and r129691, i.e. 6+ years ago. llvm-svn: 313038
* Formatting changes, add LLVM_DUMP_METHOD to a dump function, NFCKrzysztof Parzyszek2017-09-122-6/+6
| | | | llvm-svn: 313037
* [TableGen] Ensure that __lsan_is_turned_off isn't removed by DCE in llvm-tblgenFrancis Ricci2017-09-111-1/+1
| | | | | | | | | | | | | | Summary: Since asan is linked dynamically on Darwin, the weak interface symbol is removed by -Wl,-dead_strip. Reviewers: kcc, compnerd, aaron.ballman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37636 llvm-svn: 312914
* Util: Improve update_llc_test_checks to scrub macosx-style assembly annotationsZvi Rackover2017-09-061-1/+1
| | | | | | | | | | | | | | | | | | | Summary: In D37523 Sanjay pointed out that the tool does not scrub macosx-style 'End of Function' annotations, where the comments begin with a double-#. I tested this patch by verifying all existing occurences of 'End function' are scrubbed: find ./test/CodeGen/X86 -name '*.ll' | xargs grep -l "End function" | xargs utils/update_llc_test_checks.py --llc-binary build/bin/llc Reviewers: spatel, chandlerc, craig.topper Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37532 llvm-svn: 312678
* [TableGen] Teach tablegen to allow SDNPCommutable nodes with more than 2 ↵Craig Topper2017-09-041-4/+9
| | | | | | | | | | | | | | | | | | | operands. Summary: Tablegen already supports commutable instrinsics with more than 2 operands. There it just assumes the first two operands are commutable. I plan to use this to improve the generation of FMA patterns in the X86 backend. Reviewers: aymanmus, zvi, RKSimon, spatel, arsenm Reviewed By: arsenm Subscribers: arsenm, llvm-commits Differential Revision: https://reviews.llvm.org/D37430 llvm-svn: 312464
* [lit] Fix some issues with short paths in test discovery introduced in r312254Reid Kleckner2017-08-312-1/+8
| | | | llvm-svn: 312288
* [lit] Make symlinks in test paths work a different wayReid Kleckner2017-08-311-3/+4
| | | | | | | | | | | | | Use os.path.normpath instead of realpath to collapse '..' and '.' path components. Use realpath when caching search results about a path for good measure. I considered rigging up a test involving symlinks for this, but I doubt I can check a symlink into SVN. The test would have to conditionally create a symlink at runtime if the host OS supports it. This sounds too fragile and complicated to me to be worth it. llvm-svn: 312254
* Revert "[lit] Don't call realpath on the path used for test suite search"Reid Kleckner2017-08-311-0/+3
| | | | | | This reverts r312250, it breaks the lit test suite. llvm-svn: 312251
* [lit] Don't call realpath on the path used for test suite searchReid Kleckner2017-08-311-3/+0
| | | | | | | | | This preserves symlinks in paths, so that someone can symlink more tests into a larger test suite. For example, debuginfo-tests is currently designed to be checked out into clang/test. With this change, it can be symlinked into place instead, which works better with the monorepo. llvm-svn: 312250
* [TableGen] Fix a range based for loop to take the value by reference so that ↵Craig Topper2017-08-301-1/+1
| | | | | | SimplifyTree can modify the copy in the array if its needs to. llvm-svn: 312088
* [Bash-autocompletion] Add support for -std=Yuka Takahashi2017-08-291-2/+2
| | | | | | | | | | | | | | | Summary: Add support for autocompleting values of -std= by including LangStandards.def. This patch relies on D36782, and is using two-stage code generation. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36820 llvm-svn: 311971
* Revert "Revert r311552: [Bash-autocompletion] Add support for static ↵Yuka Takahashi2017-08-291-0/+26
| | | | | | | | | | | analyzer flags" This reverts commit 7c46b80c022e18d43c1fdafb117b0c409c5a6d1e. r311552 broke lld buildbot because I've changed OptionInfos type from ArrayRef to vector. However the bug is fixed, so I'll commit this again. llvm-svn: 311958
* Try to fix compilation problem with libstdc++Matthias Braun2017-08-281-1/+3
| | | | llvm-svn: 311918
* Address r311914 review commentsMatthias Braun2017-08-281-7/+5
| | | | llvm-svn: 311917
* TableGen: Fix subreg composition/concatenationMatthias Braun2017-08-282-33/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes 2 problems in subregister hierarchies with multiple levels and tuples: 1) For bigger tuples computing secondary subregs would miss 2nd order effects. In the test case a register like `S10_S11_S12_S13_S14` with D5 = S10_S11, D6 = S12_S13 we would correctly compute sub0 = D5, sub1 = D6 but would miss the fact that we could now form ssub0_ssub1_ssub2_ssub3 (aka sub0_sub1) = D5_D6. This is fixed by changing computeSecondarySubRegs() to compute a fixpoint. 2) Fixing 1) exposed a problem where TableGen would create multiple names for effectively the same subregister index. In the test case the subregister index sub0 is composed from ssub0 and ssub1, and sub1 is composed from ssub2 and ssub3. TableGen should not create both sub0_sub1 and ssub0_ssub1_ssub2_ssub3 as infered subregister indexes. This changes the code to build a transitive closure of the subregister components before forming new concatenated subregister indexes. This fix was developed for an out of tree target. For the in-tree targets the only change is in the register information computed for ARM. There is a slight chance this fixed/improved some register coalescing around the QQQQ/QQ register classes there but I couldn't see/provoke any code generation differences. Differential Revision: https://reviews.llvm.org/D36913 llvm-svn: 311914
* TableGen: Add -gen-register-info-debug-dumpMatthias Braun2017-08-281-4/+67
| | | | | | | | | | | | | | | | | | Adds a new --gen-register-info-debug-dump mode to tablegen that dumps various register related information: - List of register classes with super and subclasses - List of subregister indexes with lanemasks - List of registers with subregisters I will use this in an upcoming commit to create a test. It may also be useful for target developers wanting to get an overview of all the register related information, esp. the things inferred by tablegen and not directly visible in the .td file. Differential Revision: https://reviews.llvm.org/D36911 llvm-svn: 311913
* Changed Dockerfiles to install LLVM into /usr/localIlya Biryukov2017-08-283-3/+3
| | | | | | | | | | | | | | | | | Summary: Previously, the installation path was simply '/'. Using '/usr/local' would ensure that LLVM installation does not conflict with software installed via package managers. Reviewers: mehdi_amini, klimek Reviewed By: klimek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37213 llvm-svn: 311890
* [utils] add aarch64 target as an optionSanjay Patel2017-08-251-19/+29
| | | | | | I don't know enough to add a custom scrubber for AArch64, so I just re-used ARM. llvm-svn: 311795
* Use temporary directory when building docker image.Ilya Biryukov2017-08-251-8/+14
| | | | | | | | | | | | | | | | Summary: This avoids races on copying of compiled clang from 'build' image to 'release' image. Reviewers: klimek, mehdi_amini Reviewed By: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37098 llvm-svn: 311769
* Teach the llc check updater to recognize the end-of-function commentChandler Carruth2017-08-251-2/+2
| | | | | | | used on Windows and sometimes Darwin. Cleans up generated patterns for me quite a bit. llvm-svn: 311752
* [globalisel][tablegen] Predicates should start from GIPFP_Invalid+1 not ↵Daniel Sanders2017-08-241-2/+4
| | | | | | | | | GIPFP_Invalid This fixes a warning when there are zero defined predicates and also fixes an unnoticed bug where the first predicate in the table was unusable. llvm-svn: 311684
* Re-commit: [globalisel][tablegen] Add support for ImmLeaf without SDNodeXFormDaniel Sanders2017-08-241-13/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for predicates on imm nodes but only for ImmLeaf and not for PatLeaf or PatFrag and only where the value does not need to be transformed before being rendered into the instruction. The limitation on PatLeaf/PatFrag/SDNodeXForm is due to differences in the necessary target-supplied C++ for GlobalISel. Depends on D36085 The previous commit was reverted for breaking the build but this appears to have been the recurring problem on the Windows bots with tablegen not being re-run when llvm-tblgen is changed but the .td's aren't. If it re-occurs then forcing a build with clean=True should fix it but this string should do this in advance: Requires a clean build. Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36086 llvm-svn: 311645
* Fixed invalid variable name in Dockerfile scripts.Ilya Biryukov2017-08-231-2/+4
| | | | | | | LLVM_SVN_REVISION was used instead of LLVM_SVN_REV. This caused a revision option to be ignored in Dockerfiles. llvm-svn: 311564
* Revert r311546 as it breaks buildVictor Leschuk2017-08-231-124/+13
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/4394 llvm-svn: 311560
* Make lit :: shtest-format.py supported on Windows againVictor Leschuk2017-08-231-1/+0
| | | | | | | | | | | | It was marked as unsupported on Windows in r311230 because on some Win10 machines it failed or caused hang. The problem was that on these machines system bash (C:\Windows\System32\bash.exe) was used which requires paths to be passed like '/mnt/c/path/to/my/script' instead of 'C:\path\to\my\script'. TODO: we should make lit detect if system bash is used instead of msys and set appropriate path format. llvm-svn: 311558
* Revert r311552: [Bash-autocompletion] Add support for static analyzer flagsRui Ueyama2017-08-231-26/+0
| | | | | | This reverts commit r311552 because it broke ubsan and asan bots. llvm-svn: 311557
* [Bash-autocompletion] Add support for static analyzer flagsYuka Takahashi2017-08-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: This is a patch for clang autocomplete feature. It will collect values which -analyzer-checker takes, which is defined in clang/StaticAnalyzer/Checkers/Checkers.inc, dynamically. First, from ValuesCode class in Options.td, TableGen will generate C++ code in Options.inc. Options.inc will be included in DriverOptions.cpp, and calls OptTable's addValues function. addValues function will add second argument to Option's Values class. Values contains string like "foo,bar,.." which is handed to Values class in OptTable. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: hiraditya, cfe-commits Differential Revision: https://reviews.llvm.org/D36782 llvm-svn: 311552
* [globalisel][tablegen] Add support for ImmLeaf without SDNodeXFormDaniel Sanders2017-08-231-13/+124
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support for predicates on imm nodes but only for ImmLeaf and not for PatLeaf or PatFrag and only where the value does not need to be transformed before being rendered into the instruction. The limitation on PatLeaf/PatFrag/SDNodeXForm is due to differences in the necessary target-supplied C++ for GlobalISel. Depends on D36085 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36086 llvm-svn: 311546
* [globalisel][tablegen] Add tests for FeatureBitsets and ComplexPattern ↵Daniel Sanders2017-08-231-3/+6
| | | | | | predicates. llvm-svn: 311542
* [AVX512] Add 128->256 vbroadcastf64x2/vbroadcasti64x2 instructions to the ↵Craig Topper2017-08-211-0/+3
| | | | | | EVEX->VEX table. llvm-svn: 311307
* Temporary mark lit :: shtest-format as unsupported on windowsVictor Leschuk2017-08-191-0/+1
| | | | | | When run manually it fails, but when run under buildbot it causes hang. llvm-svn: 311230
* [lit] support unsetting env variables (again!)Ben Dunbobbin2017-08-187-0/+89
| | | | | | | | | | | | This is an updated version of https://reviews.llvm.org/D22144 by @jlpeyton. The patch was accepted but not landed. This is useful functionality and I would like to use this to enable lit tests for environment variable behaviour. Differential Revision: https://reviews.llvm.org/D36403 llvm-svn: 311180
* Addressed some security issues in Dockerfiles.Ilya Biryukov2017-08-183-14/+19
| | | | | | | | | | | | | | | | | | | Summary: - Removed --trust-server-cert from `svn checkout` invocations. Installing 'ca-certificates' package on ubuntu adds required CAs to the system and svn can do proper checkout using https. - Added checksum verification when installing cmake from cmake.org. Reviewers: mehdi_amini, klimek Reviewed By: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36673 llvm-svn: 311152
* [globalisel][tablegen] Generate TypeObject table. NFCDaniel Sanders2017-08-171-33/+29
| | | | | | | | | | | | | | | | | | Summary: Generate the type table from the types used by a target rather than hard-coding the union of types used by all targets. Depends on D36084 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36085 llvm-svn: 311084
OpenPOWER on IntegriCloud