summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [x86] regenerate test checks; NFCSanjay Patel2018-12-091-8/+10
| | | | llvm-svn: 348723
* [x86] don't try to convert add with undef operands to LEASanjay Patel2018-12-093-40/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code tries to handle an undef operand while transforming an add to an LEA, but it's incomplete because we will crash on the i16 test with the debug output shown below. It's better to just give up instead. Really, GlobalIsel should have folded these before we could get into trouble. # Machine code for function add_undef_i16: NoPHIs, TracksLiveness, Legalized, RegBankSelected, Selected bb.0 (%ir-block.0): liveins: $edi %1:gr32 = COPY killed $edi %0:gr16 = COPY %1.sub_16bit:gr32 %5:gr64_nosp = IMPLICIT_DEF %5.sub_16bit:gr64_nosp = COPY %0:gr16 %6:gr64_nosp = IMPLICIT_DEF %6.sub_16bit:gr64_nosp = COPY %2:gr16 %4:gr32 = LEA64_32r killed %5:gr64_nosp, 1, killed %6:gr64_nosp, 0, $noreg %3:gr16 = COPY killed %4.sub_16bit:gr32 $ax = COPY killed %3:gr16 RET 0, implicit killed $ax # End machine code for function add_undef_i16. *** Bad machine code: Reading virtual register without a def *** - function: add_undef_i16 - basic block: %bb.0 (0x7fe6cd83d940) - instruction: %6.sub_16bit:gr64_nosp = COPY %2:gr16 - operand 1: %2:gr16 LLVM ERROR: Found 1 machine code errors. Differential Revision: https://reviews.llvm.org/D54710 llvm-svn: 348722
* [X86] Extend pfm counter coverage for llvm-exegesisSimon Pilgrim2018-12-091-5/+29
| | | | | | Extension to rL348617, turns out llvm-exegesis doesn't need to match the perf counter name against a scheduler model resource name - so I've added a few more counters that I could find in the libpfm4 source code (and fix a typo in the knl/knm retired_uops counter - which uses 'all' instead of 'any'). llvm-svn: 348721
* NFC: Rename TemplateDecl dump utilitiesStephen Kelly2018-12-091-18/+17
| | | | | | | | | | There is a clang::TemplateDecl AST type, so a method called VisitTemplateDecl looks like it should 'override' the method from the base visitor, but it does not because of the extra parameters it takes. In reality, these methods are utilities, so name them like utilities. llvm-svn: 348720
* NFC: Move dump of individual comment nodes to NodeDumperStephen Kelly2018-12-093-156/+183
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55190 llvm-svn: 348719
* Revert "Introduce optional labels to dumpStmt"Stephen Kelly2018-12-091-15/+6
| | | | | | This reverts commit 933402caa09963792058198578522a95f013c69c. llvm-svn: 348718
* Introduce optional labels to dumpStmtStephen Kelly2018-12-091-6/+15
| | | | | | | | If the label is present, it is added as a child, with the statement a child of the label. This preserves behavior of the InitListExpr dump output. llvm-svn: 348717
* Inline hasNodes into only callerStephen Kelly2018-12-091-13/+8
| | | | | | It is easier to refactor with fewer utility methods. llvm-svn: 348716
* Inline dumpFullComment into callersStephen Kelly2018-12-091-10/+7
| | | | | | | It causes confusion over whether it or dumpComment is the more important. It is easier to refactor with fewer utility methods. llvm-svn: 348715
* Re-order content from InitListExprStephen Kelly2018-12-091-4/+4
| | | | | | | | | | | | | | Summary: This causes no change in the output of ast-dump-stmt.cpp due to the way child nodes are printed with a delay. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55398 llvm-svn: 348714
* Fix InitListExpr testStephen Kelly2018-12-091-6/+6
| | | | | | Wrong case of Check meant this has no effect. llvm-svn: 348713
* [X86] Add test for PR39926; NFCNikita Popov2018-12-091-0/+48
| | | | | | | | | | The test file shows a case where the avoid store forwarding block pass misses to copy a range (-1..1) when the load displacement changes sign. Baseline test for D55485. llvm-svn: 348712
* Revert a hunk that shouldn't have been included in the last commit.Frederic Riss2018-12-091-1/+1
| | | | | | I've seen this line trigger UB, but that's obviously not the correct fix... llvm-svn: 348711
* Remove some UB in RegisterContextDarwin_arm64.cppFrederic Riss2018-12-092-2/+12
| | | | llvm-svn: 348710
* SourceManager: insert(make_pair(..)) -> try_emplace. NFCFangrui Song2018-12-091-5/+2
| | | | llvm-svn: 348709
* [COFF] Map truncated .eh_frame section nameMartin Storsjo2018-12-084-0/+140
| | | | | | | | | | | | | | | PE/COFF sections can have section names truncated to 8 chars, in order to have the name available at runtime. (The string table, where long untruncated names are stored, isn't loaded at runtime.) This allows various llvm tools to dump the .eh_frame section from such executables. Patch by Peiyuan Song! Differential Revision: https://reviews.llvm.org/D55407 llvm-svn: 348708
* Fix conflict types for this FreeBSD test.David Carlier2018-12-081-48/+0
| | | | llvm-svn: 348707
* [DAGCombiner] re-enable truncation of binopsSanjay Patel2018-12-0825-882/+735
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is effectively re-committing the changes from: rL347917 (D54640) rL348195 (D55126) ...which were effectively reverted here: rL348604 ...because the code had a bug that could induce infinite looping or eventual out-of-memory compilation. The bug was that this code did not guard against transforming opaque constants. More details are in the post-commit mailing list thread for r347917. A reduced test for that is included in the x86 bool-math.ll file. (I wasn't able to reduce a PPC backend test for this, but it was almost the same pattern.) Original commit message for r347917: The motivating case for this is shown in: https://bugs.llvm.org/show_bug.cgi?id=32023 and the corresponding rot16.ll regression tests. Because x86 scalar shift amounts are i8 values, we can end up with trunc-binop-trunc sequences that don't get folded in IR. As the TODO comments suggest, there will be regressions if we extend this (for x86, we mostly seem to be missing LEA opportunities, but there are likely vector folds missing too). I think those should be considered existing bugs because this is the same transform that we do as an IR canonicalization in instcombine. We just need more tests to make those visible independent of this patch. llvm-svn: 348706
* [x86] add 32-bit RUN for tests and test with opaque constants; NFCSanjay Patel2018-12-081-79/+198
| | | | | | | The opaque constant test is reduced from a Chrome file that infinite-looped with rL347917. llvm-svn: 348705
* [gn build] Add build files for CodeGen subfolders AsmPrinter, GlobalISel, ↵Nico Weber2018-12-083-0/+115
| | | | | | | | SelectionDAG. Differential Revision: https://reviews.llvm.org/D55462 llvm-svn: 348704
* [WebAssembly] Add support for the event sectionHeejin Ahn2018-12-0819-30/+401
| | | | | | | | | | | | | | | | | Summary: This adds support for the 'event section' specified in the exception handling proposal. Wasm exception handling binary model spec: https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md#changes-to-the-binary-model Reviewers: sbc100, ruiu Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54875 llvm-svn: 348703
* [WebAssembly] Make WasmSymbol's signature usable for events (NFC)Heejin Ahn2018-12-083-18/+12
| | | | | | | | | | | | | | Summary: WasmSignature used to use its `WasmSignature` member variable only for function types, but now it also can be used for events as well. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55247 llvm-svn: 348702
* [llvm-readobj] Little clean up inside `parseDynamicTable`Xing GUO2018-12-081-13/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: This anoymous function actually has same logic with `Obj->toMappedAddr`. Besides, I have a question on resolving illegal value. `gnu-readelf`, `gnu-objdump` and `llvm-objdump` could parse the test file 'test/tools/llvm-objdump/Inputs/private-headers-x86_64.elf', but `llvm-readobj` will fail when parse `DT_RELR` segment. Because, the value is 0x87654321 which is illegal. So, shall we do this clean up rather then remove the checking statements inside anoymous function? ``` if (Delta >= Phdr.p_filesz) return createError("Virtual address is not in any segment"); ``` Reviewers: rupprecht, jhenderson Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D55329 llvm-svn: 348701
* Convert some ObjC msgSends to runtime calls.Pete Cooper2018-12-0810-14/+245
| | | | | | | | | | | | | | It is faster to directly call the ObjC runtime for methods such as alloc/allocWithZone instead of sending a message to those functions. This patch adds support for converting messages to alloc/allocWithZone to their equivalent runtime calls. Tests included for the positive case of applying this transformation, negative tests that we ensure we only convert "alloc" to objc_alloc, not "alloc2", and also a driver test to ensure we enable this only for supported runtime versions. Reviewed By: rjmccall https://reviews.llvm.org/D55349 llvm-svn: 348687
* Move diagnostic enums into Basic.Richard Trieu2018-12-0823-166/+342
| | | | | | | | | Move enums from */*Diagnostic.h to Basic/Diagnostic*.h. Basic/AllDiagnostics.h needs all the enums and moving the sources to Basic prevents a Basic->*->Basic dependency loop. This also allows each Basic/Diagnostics*Kinds.td to have a header at Basic/Diagnostic*.h (except for Common). The old headers are kept in place since other packages are still using them. llvm-svn: 348685
* Fix a typo in the strtoi testKamil Rytarowski2018-12-081-2/+2
| | | | | | https://reviews.llvm.org/D54702 llvm-svn: 348683
* Revert a chunk of previous change in sanitizer_platform_limits_netbsd.hKamil Rytarowski2018-12-081-2/+0
| | | | | | | Undefining INLINE breaks the build. The invalid change in this file has been overlooked in D55386. llvm-svn: 348680
* Add interceptors for md5(3) from NetBSDKamil Rytarowski2018-12-085-0/+199
| | | | | | | | | | | | | | | | | | | | Summary: MD5Init, MD5Update, MD5Final, MD5End, MD5File, MD5Data - calculates the RSA Data Security, Inc., "MD5" message digest. Add a dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54993 llvm-svn: 348679
* Add interceptors for the rmd160(3) from NetBSDKamil Rytarowski2018-12-085-0/+234
| | | | | | | | | | | | | | | | | | | | Summary: RMD160Init, RMD160Update, RMD160Final, RMD160Transform, RMD160End, RMD160File, RMD160Data - calculates the ``RIPEMD-160'' message digest. Add a dedicated test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54991 llvm-svn: 348678
* Add interceptors for the md4(3) from NetBSDKamil Rytarowski2018-12-085-0/+199
| | | | | | | | | | | | | | | | | | | | Summary: MD4Init, MD4Update, MD4Final, MD4End, MD4File, MD4Data - calculates the RSA Data Security, Inc., "MD4" message digest. Add dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54990 llvm-svn: 348677
* Add interceptors for the sha1(3) from NetBSDKamil Rytarowski2018-12-085-0/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for: - SHA1Init - SHA1Update - SHA1Final - SHA1Transform - SHA1End - SHA1File - SHA1FileChunk - SHA1Data Add a dedicated regression test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54927 llvm-svn: 348676
* Stop tracking retain count of OSObject after escape to void * / other ↵George Karpenkov2018-12-082-0/+30
| | | | | | | | | | | | | | primitive types Escaping to void * / uint64_t / others non-OSObject * should stop tracking, as such functions can have heterogeneous semantics depending on context, and can not always be annotated. rdar://46439133 Differential Revision: https://reviews.llvm.org/D55465 llvm-svn: 348675
* [sanitizer] Add lit.local.cfg for FreeBSDVitaly Buka2018-12-081-0/+9
| | | | llvm-svn: 348674
* [sanitizer] Suppress lint warning conflicting with clang-formatVitaly Buka2018-12-081-1/+2
| | | | llvm-svn: 348673
* Fix style.David Carlier2018-12-081-1/+1
| | | | llvm-svn: 348672
* [gn build] Merge r348593Nico Weber2018-12-081-0/+1
| | | | llvm-svn: 348671
* [SelectionDAG] Remove ISD::ADDC/ADDE from some undef handling code in ↵Craig Topper2018-12-081-2/+0
| | | | | | | | getNode. NFCI These nodes should have two results. A real VT and a Glue. But this code would have returned Undef which would only be a single result. But we're in the single result version of getNode so these opcodes should never be seen by this function anyway. llvm-svn: 348670
* Conflict fixes from previous commits.David Carlier2018-12-083-1/+99
| | | | llvm-svn: 348669
* [Sanitizer] capsicum api subset interceptionDavid Carlier2018-12-082-0/+49
| | | | | | | | | | | | - For the moment a subset of this api dealing with file descriptors permissions and ioctls. Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D55368 llvm-svn: 348668
* [gn build] Add build files for lib/CodeGen, lib/Transforms/..., and ↵Nico Weber2018-12-087-1/+398
| | | | | | | | lib/Bitcode/Writer Differential Revision: https://reviews.llvm.org/D55454 llvm-svn: 348667
* [Documentation] Alphabetical order in new checks list.Eugene Zelenko2018-12-081-7/+7
| | | | llvm-svn: 348666
* [tests] Fix the FileManagerTest getVirtualFile test on WindowsStella Stamenova2018-12-071-8/+20
| | | | | | | | | | | | Summary: The test passes on Windows only when it is executed on the C: drive. If the build and tests run on a different drive, the test is currently failing. Reviewers: kadircet, asmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55451 llvm-svn: 348665
* [lit] Fix case-insensitive testStella Stamenova2018-12-071-4/+1
| | | | | | The test still only passes when not run from VS because the previous patch did not remove the original build commands.... This also simplifies the build command by removing some defaults llvm-svn: 348664
* Add interceptors for the strtoi(3)/strtou(3) from NetBSDKamil Rytarowski2018-12-073-0/+76
| | | | | | | | | | | | | | | | | | | | | | | Summary: strtoi/strtou converts string value to an intmax_t/uintmax_t integer. Add a dedicated test. Enable this API for NetBSD. It's a reworked version of the original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, tomsun.0.7, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54702 llvm-svn: 348663
* [CUDA] Added missing 'inline' for functions defined in a header.Artem Belevich2018-12-071-2/+4
| | | | llvm-svn: 348662
* [X86] Remove the XFAILed test added in r348620Craig Topper2018-12-071-30/+0
| | | | | | It seems to be unexpectedly passing on some bots probably because it requires asserts to fail, but doesn't say that. But we already have a patch in review to make it not xfail so I'd rather just focus on getting it passing rather than trying to figure out an unexpected pass. llvm-svn: 348661
* Update a couple of vector<bool> tests that were testing libc++-specific ↵Marshall Clow2018-12-073-10/+17
| | | | | | bahavior. Thanks to Andrey Maksimov for the catch. llvm-svn: 348660
* Fix IOError exception being raised in `asan_symbolize.py`crash whenDan Liew2018-12-071-0/+4
| | | | | | | | | using `atos` symbolizer on Darwin when the binaries don't exist. For now we just produce an unsymbolicated stackframe when the binary doesn't exist. llvm-svn: 348659
* AMDGPU: Fix offsets for < 4-byte aggregate kernel argumentsMatt Arsenault2018-12-072-8/+19
| | | | | | | | We were still using the rounded down offset and alignment even though they aren't handled because you can't trivially bitcast the loaded value. llvm-svn: 348658
* [GlobalISel] Add IR translation support for the @llvm.log10 intrinsicJessica Paquette2018-12-075-0/+28
| | | | | | | | This adds IR translation support for @llvm.log10 and updates relevant tests. https://reviews.llvm.org/D55392 llvm-svn: 348657
OpenPOWER on IntegriCloud