summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* [Sparc] Use target name instead of namespace as prefix for MCRegisterClasses ↵Jacob Baungard Hansen2016-11-211-1/+1
| | | | | | | | | | | | | | | | | | | array Summary: For Sparc the namespace (SP) is different from the target name (Sparc), which causes the name of the array in this declaration to differ from the name used in the definition. Patch by Daniel Cederman. Reviewers: jyknight Subscribers: llvm-commits, jyknight Differential Revision: https://reviews.llvm.org/D23650 llvm-svn: 287528
* [TableGen][ISel] Do a better job of factoring ScopeMatchers created during ↵Craig Topper2016-11-211-3/+11
| | | | | | | | | | creation of SwitchTypeMatcher. Previously we were factoring when the ScopeMatcher was initially created, but it might get more Matchers added to it later. Delay factoring until we have fully created/populated the ScopeMatchers. This reduces X86 isel tables by 154 bytes. llvm-svn: 287520
* Try again to fix unused variable warning on lld-x86_64-darwin13 after r287439.Daniel Sanders2016-11-191-1/+6
| | | | | | | The previous attempt didn't work. I assume LLVM_ATTRIBUTE_UNUSED isn't available on that machine. llvm-svn: 287442
* Check that emitted instructions meet their predicates on all targets except ↵Daniel Sanders2016-11-196-30/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | ARM, Mips, and X86. Summary: * ARM is omitted from this patch because this check appears to expose bugs in this target. * Mips is omitted from this patch because this check either detects bugs or deliberate emission of instructions that don't satisfy their predicates. One deliberate use is the SYNC instruction where the version with an operand is correctly defined as requiring MIPS32 while the version without an operand is defined as an alias of 'SYNC 0' and requires MIPS2. * X86 is omitted from this patch because it doesn't use the tablegen-erated MCCodeEmitter infrastructure. Patches for ARM and Mips will follow. Depends on D25617 Reviewers: tstellarAMD, jmolloy Subscribers: wdng, jmolloy, aemerson, rengolin, arsenm, jyknight, nemanjai, nhaehnle, tstellarAMD, llvm-commits Differential Revision: https://reviews.llvm.org/D25618 llvm-svn: 287439
* [tablegen] Merge duplicate definitions of getMinimalTypeForRange. NFC.Daniel Sanders2016-11-196-37/+72
| | | | | | | | | | | | Summary: Depends on D25614 Reviewers: qcolombet Subscribers: qcolombet, beanz, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D25617 llvm-svn: 287438
* [lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right ↵Kuba Mracek2016-11-181-1/+1
| | | | | | | | SDK path. This will make sure that we find an actual path in case you have Command Line Tools installed. llvm-svn: 287403
* Timer: Track name and description.Matthias Braun2016-11-181-12/+16
| | | | | | | | | | | | | The previously used "names" are rather descriptions (they use multiple words and contain spaces), use short programming language identifier like strings for the "names" which should be used when exporting to machine parseable formats. Also removed a unused TimerGroup from Hexxagon. Differential Revision: https://reviews.llvm.org/D25583 llvm-svn: 287369
* Fix -Wunused introduced in r286945 for release builds.Daniel Sanders2016-11-151-0/+2
| | | | llvm-svn: 286946
* [tablegen] Extract portions of AsmMatcherEmitter for re-use by another ↵Daniel Sanders2016-11-154-89/+158
| | | | | | | | | | | | | | | | | | | generator. NFC. Summary: This change is preparation for a change that will allow targets to verify that the instructions they emit meet the predicates they specify. This is useful to ensure that C++ legalization/lowering/instruction-selection doesn't incorrectly select code for a different subtarget than intended. Such cases are not caught by the integrated assembler when emitting instructions directly to an object file. Reviewers: qcolombet Subscribers: qcolombet, beanz, mgorny, llvm-commits, modocache Differential Revision: https://reviews.llvm.org/D25614 llvm-svn: 286945
* [opt-viewer] Add support for libYAML for faster parsingAdam Nemet2016-11-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | This results in a speed-up of over 6x on sqlite3. Before: $ time -p /org/llvm/utils/opt-viewer/opt-viewer.py ./MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.opt.yaml html real 415.07 user 410.00 sys 4.66 After with libYAML: $ time -p /org/llvm/utils/opt-viewer/opt-viewer.py ./MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.opt.yaml html real 63.96 user 60.03 sys 3.67 I followed these steps to get libYAML working with PyYAML: http://rmcgibbo.github.io/blog/2013/05/23/faster-yaml-parsing-with-libyaml/ llvm-svn: 286942
* [opt-viewer] Don't fail with remarks without debug locationAdam Nemet2016-11-141-2/+2
| | | | llvm-svn: 286861
* Handle non-inlined clang::Type::getAs specializations in extract_symbols.pyStephan Bergmann2016-11-141-4/+12
| | | | | | | | | | | | | The existing logic was to discard any symbols representing function template instantiations, as the definitions were assumed to be inline. But there are three explicit specializations of clang::Type::getAs that are only defined in Clang's lib/AST/Type.cpp, and at least the plugin used by the LibreOffice build (https://wiki.documentfoundation.org/Development/Clang_plugins) uses those functions. Differential Revision: https://reviews.llvm.org/D26455 llvm-svn: 286841
* Improve `git llvm push` to suggest `git pull` when applying patch failsMehdi Amini2016-11-121-4/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D26565 llvm-svn: 286695
* Print correct directory in merge script.Richard Trieu2016-11-111-1/+1
| | | | | | | When providing the project directory to the merge script, print it out in the commit instructions instead of the default project directory. llvm-svn: 286675
* [opt-viewer] Make it work in the absence of hotness informationAdam Nemet2016-11-111-12/+30
| | | | | | In this case the index page is sorted by the source location. llvm-svn: 286572
* [opt-viewer] PEPify opt-viewer.pyMandeep Singh Grang2016-11-111-5/+18
| | | | | | | | | | Reviewers: anemet Subscribers: fhahn Differential Revision: https://reviews.llvm.org/D26535 llvm-svn: 286564
* [opt-viewer] Add column number supportAdam Nemet2016-11-111-3/+8
| | | | | | | With this the yellow (bubble) part of the remark shows up under the corresponding expression. llvm-svn: 286545
* [opt-viewer] Display inlining contextAdam Nemet2016-11-111-0/+18
| | | | | | | | | | | When a function is inlined, each instance is optimized in their own inlining context. This can produce different remarks all pointing to the same source line. This adds a new column on the source view to display the inlining context. llvm-svn: 286537
* [opt-viewer] Add option to set source directoryAdam Nemet2016-11-111-1/+22
| | | | llvm-svn: 286536
* [opt-viewer] Mention Pygments in the descriptionAdam Nemet2016-11-111-1/+1
| | | | llvm-svn: 286535
* [opt-viewer] Add syntax highlightingAdam Nemet2016-11-112-1/+74
| | | | | | Uses pygments. llvm-svn: 286532
* [opt-viewer] Avoid duplicated remarksAdam Nemet2016-11-101-4/+13
| | | | | | | This can happen if a pass is run multiple times or if the code is in a header file which is included multiple times. llvm-svn: 286489
* Re-apply r286384, "X86: Introduce the "relocImm" ComplexPattern, which ↵Peter Collingbourne2016-11-093-7/+13
| | | | | | | | | represents a relocatable immediate.", with a fix for 32-bit x86. Teach X86InstrInfo::analyzeCompare() not to crash on CMP and SUB instructions that take a global address operand. llvm-svn: 286420
* Revert r286384, "X86: Introduce the "relocImm" ComplexPattern, which ↵Peter Collingbourne2016-11-093-13/+7
| | | | | | | | | represents a relocatable immediate." Suspected to be the cause of a sanitizer-windows bot failure: Assertion failed: isImm() && "Wrong MachineOperand accessor", file C:\b\slave\sanitizer-windows\llvm\include\llvm/CodeGen/MachineOperand.h, line 420 llvm-svn: 286385
* X86: Introduce the "relocImm" ComplexPattern, which represents a relocatable ↵Peter Collingbourne2016-11-093-7/+13
| | | | | | | | | | | | | | | immediate. A relocatable immediate is either an immediate operand or an operand that can be relocated by the linker to an immediate, such as a regular symbol in non-PIC code. Start using relocImm for 32-bit and 64-bit MOV instructions, and for operands of type "imm32_su". Remove a number of now-redundant patterns. Differential Revision: https://reviews.llvm.org/D25812 llvm-svn: 286384
* [opt-viewer] Avoid division by zeroAdam Nemet2016-11-071-1/+1
| | | | llvm-svn: 286172
* [OptDiag, opt-viewer] Save callee's location and display as linkAdam Nemet2016-11-071-8/+24
| | | | | | | | | | | | | With this we get a new field in the YAML record if the value being streamed out has a debug location. For examples, please see the changes to the tests. This is then used in opt-viewer to display a link for the callee function in the inlining remarks. Differential Revision: https://reviews.llvm.org/D26366 llvm-svn: 286169
* [lit] Print negative exit codes on Windows in hexReid Kleckner2016-11-071-2/+8
| | | | | | | Negative exit codes are usually exceptions. They're easier to recognize in hex. Compare -1073741502 to 0xc0000142. llvm-svn: 286150
* Fix `git-llvm` script to handle `git worktree` setups correctlyMehdi Amini2016-11-071-1/+2
| | | | llvm-svn: 286140
* Add some facilities to work with a git monorepo (experimental setup)Mehdi Amini2016-11-071-0/+278
| | | | | | | | | | | | | | | Add a new script in llvm/utils/git-svn/. When present in the $PATH, it enables a `git llvm` command. It is providing at this point only the ability to push from the git monorepo: `git llvm push`. It is intended to evolves with more features, for instance I plan on features like `git llvm show r284955` to help working with sequential revision numbers. The push feature is taken from Justin Lebar's script available here: https://github.com/jlebar/llvm-repo-tools/ Differential Revision: https://reviews.llvm.org/D26334 llvm-svn: 286138
* [X86] Fix test checks script to satisfy pyflakesZvi Rackover2016-11-071-5/+4
| | | | | | | | - Remove unused imports. - Initialize the variable 'name' before its (static) uses, and rename it to a more descriptive name. llvm-svn: 286128
* [X86] Fix test checks script to handle run lines with no pipe checksZvi Rackover2016-11-071-1/+5
| | | | | | | Fixes crashes in tests such as test/CodeGen/X86/masked_gather_scatter.ll which contains a RUN: with no pipe chain. llvm-svn: 286125
* Revert "Add some facilities to work with a git monorepo (experimental setup)"Mehdi Amini2016-11-071-296/+0
| | | | | | This reverts commit r286123, accidentally commited while testing itself... llvm-svn: 286124
* Add some facilities to work with a git monorepo (experimental setup)Mehdi Amini2016-11-071-0/+296
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Some changes are made to cmake, especially the addition of a new LLVM_ENABLE_PROJECTS option that makes the build system aware of the monorepo directory structure. Also a new script is added in llvm/utils/git-svn/. When present in the $PATH, it enables a `git llvm` command. It is providing at this point only the ability to push from the git monorepo: `git llvm push`. It is intended to evolves with more features, for instance I plan on features like `git llvm show r284955` to help working with sequential revision numbers. The push feature is taken from Justin Lebar's script available here: https://github.com/jlebar/llvm-repo-tools/ Reviewers: jlebar Subscribers: mgorny, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26334 llvm-svn: 286123
* [lit] Remove TODOBrian Gesiak2016-11-032-175/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: Instead of keeping track of TODOs for lit in a file checked into source control, use LLVM's bug tracker. The TODOs have been migrated to the following bugs: * https://llvm.org/bugs/show_bug.cgi?id=30666 * https://llvm.org/bugs/show_bug.cgi?id=30667 * https://llvm.org/bugs/show_bug.cgi?id=30668 * https://llvm.org/bugs/show_bug.cgi?id=30669 * https://llvm.org/bugs/show_bug.cgi?id=30670 * https://llvm.org/bugs/show_bug.cgi?id=30671 Reviewers: ddunbar, beanz, echristo, delcypher Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25496 llvm-svn: 285973
* vim: special case the CHECK prefixSaleem Abdulrasool2016-11-031-0/+1
| | | | | | | | | A large number of tests in the LLVM tree use the default (CHECK) prefix to indicate checked expressions via FileCheck. Highlight it as a special comment. Although this wont get all the instances of the checked patters, it is strictly better than the current state. llvm-svn: 285927
* Expandload and Compressstore intrinsicsElena Demikhovsky2016-11-032-6/+8
| | | | | | | | 2 new intrinsics covering AVX-512 compress/expand functionality. This implementation includes syntax, DAG builder, operation lowering and tests. Does not include: handling of illegal data types, codegen prepare pass and the cost model. llvm-svn: 285876
* [TableGen] Move OperandMatchResultTy enum to MCTargetAsmParser.hAlex Bradbury2016-11-011-9/+2
| | | | | | | | | | | | | | | As it stands, the OperandMatchResultTy is only included in the generated header if there is custom operand parsing. However, almost all backends make use of MatchOperand_Success and friends from OperandMatchResultTy for e.g. parseRegister. This is a pain when starting an AsmParser for a new backend that doesn't yet have custom operand parsing. Move the enum to MCTargetAsmParser.h. This patch is a prerequisite for D23563 Differential Revision: https://reviews.llvm.org/D23496 llvm-svn: 285705
* Fix per-processor model scheduler definition completeness checkUlrich Weigand2016-10-311-1/+2
| | | | | | | | | | | | | | | The CodeGenSchedModels::checkCompleteness routine in TableGen/ CodeGenSchedule.cpp is supposed to verify for each processor model that is marked as "complete" that it actually defines a scheduling class for each instruction. However, this did not work correctly due to an incorrect check whether a scheduling class has an itinerary. Reviewer: atrick Differential revision: https://reviews.llvm.org/D26156 llvm-svn: 285622
* [utils] Add a '--unified-report' option to the code coverage prep scriptVedant Kumar2016-10-261-12/+29
| | | | | | | | | | | In --unified-report mode, a single coverage report is prepared for all specified binaries and written to *report_dir*. This mode is compatible with all existing script options, including the --restrict mode which is used to limit coverage reporting to certain files or directories. This should not break any existing users of the script. llvm-svn: 285249
* [utils] Use print_function in the code coverage prep script, NFC.Vedant Kumar2016-10-261-5/+7
| | | | llvm-svn: 285248
* [utils] Add an '--only-merge' option to the code coverage prep scriptVedant Kumar2016-10-261-3/+11
| | | | | | | | | | | In --only-merge mode, the script terminates after the profile merging step. This makes the script less stateful: it's more natural to split the merge out into a separate step instead of relying on the first invocation of the script to do it. This should not break any existing users of the script. llvm-svn: 285247
* [lit] Work around Windows MSys command line tokenization bugReid Kleckner2016-10-261-0/+61
| | | | | | | | | | | | | | Summary: This will allow us to revert LLD r284768, which added spaces to get MSys echo to print what we want. Reviewers: ruiu, inglorion, rafael Subscribers: modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26009 llvm-svn: 285237
* Revert 285087.Nico Weber2016-10-251-0/+8
| | | | | | | | | | | | | The sanitizer-windows bot turned red with: FAILED: utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/IntrinsicEmitter.cpp.obj C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\cl.exe ... -c C:\...\llvm\utils\TableGen\IntrinsicEmitter.cpp c:\...\llvm\utils\tablegen\intrinsicemitter.cpp(254) : fatal error C1001: An internal error has occurred in the compiler. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/114/steps/build%20clang%20lld/logs/stdio llvm-svn: 285089
* Try removing an MSVC2010 workaround.Nico Weber2016-10-251-8/+0
| | | | | | | Things seem to build fine locally without this, so let's see what the bots think. llvm-svn: 285087
* [lit] Add more testing instructions to READMEBrian Gesiak2016-10-221-0/+15
| | | | | | | | | | | | | | | Summary: r283710 introduced two regressions, one to llvm-lit, and the other to lit executables that were installed via setuptools. Add instructions on how to test for these regressions in the future. Reviewers: ddunbar, delcypher, beanz, chapuni, cmatthews, echristo Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25459 llvm-svn: 284919
* Switch SmallSetVector to use DenseSet when it overflows its inline space.Justin Lebar2016-10-212-20/+23
| | | | | | | | | | | | | | | | | | | | Summary: SetVector already used DenseSet, but SmallSetVector used std::set. This leads to surprising performance differences. Moreover, it means that the set of key types accepted by SetVector and SmallSetVector are quite different! In order to make this change, we had to convert some callsites that used SmallSetVector<std::string, N> to use SmallSetVector<CachedHashString, N> instead. Reviewers: timshen Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25648 llvm-svn: 284887
* Improve tablegen gen-subtarget diagnostics for missing machine models.Andrew Trick2016-10-181-5/+8
| | | | | | | | | | | | -debug-only=subtarget-emitter prints a lot of machine model diagnostics. This prunes the output so that the "No machine model for XXX on processor YYY" only appears when there is definitely no machine model for that opcode. Previously it was printing that error even if the opcode was covered by a more general scheduling class. <rdar://problem/15919845> [TableGen][CodeGenSchedule] Debug output does not help spotting the missing scheduling classes llvm-svn: 284452
* vim: add `norecurse` attributeSaleem Abdulrasool2016-10-141-0/+1
| | | | | | Add missing attribute to the keyword set. llvm-svn: 284270
* vim: add `comdat` keywordSaleem Abdulrasool2016-10-141-0/+1
| | | | | | The attribute may be applied to a function. Highlight it as a keyword. llvm-svn: 284269
OpenPOWER on IntegriCloud