summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-mt] Use WithColor for printing errors.Jonas Devlieghere2018-06-234-6/+7
| | | | | | Use the WithColor helper from support to print errors. llvm-svn: 335416
* [TableGen] Use WithColor for printing errors/warningsJonas Devlieghere2018-06-231-6/+3
| | | | | | Use the WithColor helper from support to print errors and warnings. llvm-svn: 335415
* [X86] Make %eiz usage in 64-bit mode, force a 0x67 address size prefix. Fix ↵Craig Topper2018-06-232-6/+12
| | | | | | some test CHECK lines. llvm-svn: 335414
* [X86] Teach disassembler to use %eip instead of %rip when 0x67 prefix is ↵Craig Topper2018-06-232-1/+7
| | | | | | used on a rip-relative address. llvm-svn: 335413
* [X86][AsmParser] Improve base/index register checks.Craig Topper2018-06-232-8/+45
| | | | | | | | | -Ensure EIP isn't used with an index reigster. -Ensure EIP isn't used as index register. -Ensure base register isn't a vector register. -Ensure eiz/riz usage matches the size of their base register. llvm-svn: 335412
* Fix invariant fdiv hoisting in LICMStanislav Mekhanoshin2018-06-232-16/+42
| | | | | | | | | | | | | FDiv is replaced with multiplication by reciprocal and invariant reciprocal is hoisted out of the loop, while multiplication remains even if invariant. Switch checks for all invariant operands and only invariant denominator to fix the issue. Differential Revision: https://reviews.llvm.org/D48447 llvm-svn: 335411
* [Fuchsia] Enable static libc++, libc++abi, libunwindPetr Hosek2018-06-233-6/+10
| | | | | | | | This is needed for building Fuchsia drivers. Differential Revision: https://reviews.llvm.org/D48208 llvm-svn: 335410
* [AMDGPU] Update includes for intrinsic changes :(Reid Kleckner2018-06-232-4/+4
| | | | llvm-svn: 335409
* [ORC] Fix formatting and list pending queries in VSO::dump.Lang Hames2018-06-231-3/+7
| | | | llvm-svn: 335408
* [IR] Split Intrinsics.inc into enums and implementationsReid Kleckner2018-06-2310-43/+68
| | | | | | | | | | | | | | | | | | | Implements PR34259 Intrinsics.h is a very popular header. Most LLVM TUs care about things like dbg_value, but they don't care how they are implemented. After I split these out, IntrinsicImpl.inc is 1.7 MB, so this saves each LLVM TU from scanning 1.7 MB of source that gets pre-processed away. It also means we can modify intrinsic properties without triggering a full rebuild, but that's probably less of a win. I think the next best thing to do would be to split out the target intrinsics into their own header. Very, very few TUs care about target-specific intrinsics. It's very hard to split up the target independent intrinsics like llvm.expect, assume, and dbg.value, though. llvm-svn: 335407
* Avoid including intrin.h from MathExtras.hReid Kleckner2018-06-231-4/+10
| | | | | | | | This is repeatably worth 0.3s compile time on MathExtras.cpp. This is a very popular header, and it basically pulls all Intel intrinsics into every LLVM TU. Let's not do that. llvm-svn: 335406
* [ELF] Change isSectionData to exclude SHF_EXECINSTRFangrui Song2018-06-232-3/+4
| | | | | | | | | | | | | | | | | | | Summary: This affects what sections are displayed as "DATA" in llvm-objdump. The other user llvm-size is unaffected. Before, a "TEXT" section is also "DATA", which seems weird. The sh_flags condition matches that of bfd's SEC_DATA but the sh_type condition uses (== SHF_PROGBITS) instead of bfd's (!= SHT_NOBITS). bfd's SEC_DATA is not appealing as so many sections will be shown as DATA. Reviewers: jyknight, Bigcheese Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48472 llvm-svn: 335405
* [ELF] Change llvm-objdump output for D48472: TEXT DATA -> TEXTFangrui Song2018-06-2315-25/+25
| | | | | | | | | | Reviewers: jyknight, Bigcheese, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D48473 llvm-svn: 335404
* [X86][AsmParser] Rework that allows (%dx) to be used in place of %dx with ↵Craig Topper2018-06-231-41/+29
| | | | | | | | | | in/out instructions. Previously, to support (%dx) we left a wide open hole in our 16-bit memory address checking. This let this address value be used with any instruction without error in the parser. It would later fail in the encoder with an assertion failure on debug builds and who knows what on release builds. This patch passes the mnemonic down to the memory operand parsing function so we can allow the (%dx) form only on specific instructions. llvm-svn: 335403
* [RuntimeDyld] Implement the ELF PIC large code model relocationsReid Kleckner2018-06-222-0/+147
| | | | | | | Prerequisite for https://reviews.llvm.org/D47211 which improves our ELF large PIC codegen. llvm-svn: 335402
* Update cmdtemplate.py to use best pratices.Greg Clayton2018-06-221-53/+78
| | | | | | | | | | Fixes include: - fix all lint errors - add code that will automatically register and LLDB command classes by detecting the classes and any classes that have a "register_lldb_command" function - automatically fill in the correct module name when registering commands - automatically fill in the class name when registering command llvm-svn: 335401
* [LoopReroll] Rewrite induction variable rewriting.Eli Friedman2018-06-227-253/+179
| | | | | | | | | | | | | | | | | | | | This gets rid of a bunch of weird special cases; instead, just use SCEV rewriting for everything. In addition to being simpler, this fixes a bug where we would use the wrong stride in certain edge cases. The one bit I'm not quite sure about is the trip count handling, specifically the FIXME about overflow. In general, I think we need to widen the exit condition, but that's probably not profitable if the new type isn't legal, so we probably need a check somewhere. That said, I don't think I'm making the existing problem any worse. As a followup to this, a bunch of IV-related code in root-finding could be cleaned up; with SCEV-based rewriting, there isn't any reason to assume a loop will have exactly one or two PHI nodes. Differential Revision: https://reviews.llvm.org/D45191 llvm-svn: 335400
* [MSSA] Remove incorrect comment + `auto`ify dyn_cast results; NFCGeorge Burgess IV2018-06-221-6/+5
| | | | llvm-svn: 335399
* [X86][AsmParser] Keep track of whether an explicit scale was specified while ↵Craig Topper2018-06-222-8/+22
| | | | | | | | | | parsing an address in Intel syntax. Use it for improved error checking. This allows us to check these: -16-bit addressing doesn't support scale so we should error if we find one there. -Multiplying ESP/RSP by a scale even if the scale is 1 should be an error because ESP/RSP can't be an index. llvm-svn: 335398
* [llvm-size] Make global variables staticFangrui Song2018-06-221-2/+2
| | | | llvm-svn: 335397
* [x86] add more tests for bit hacking opportunities with setcc; NFCSanjay Patel2018-06-221-0/+56
| | | | | | Missed cases where the input and output are the same size in rL335391. llvm-svn: 335396
* [PowerPC] add more tests for bit hacking opportunities with setcc; NFCSanjay Patel2018-06-221-0/+57
| | | | | | Missed cases where the input and output are the same size in rL335390. llvm-svn: 335395
* [X86][AsmParser] In Intel syntax make sure we support ESP/RSP being the ↵Craig Topper2018-06-222-0/+12
| | | | | | | | | | second register in memory expressions like [EAX+ESP]. By default, the second register gets assigned to the index register slot. But ESP can't be an index register so we need to swap it with the other register. There's still a slight bug that we allow [EAX+ESP*1]. The existence of the multiply even though its with 1 should force ESP to the index register and trigger an error, but it doesn't currently. llvm-svn: 335394
* [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on DarwinJF Bastien2018-06-227-40/+109
| | | | | | | | | | | | | | | | | | | | | | | Summary: Pick D42933 back up, and make NSInteger/NSUInteger with %zu/%zi specifiers on Darwin warn only in pedantic mode. The default -Wformat recently started warning for the following code because of the added support for analysis for the '%zi' specifier. NSInteger i = NSIntegerMax; NSLog(@"max NSInteger = %zi", i); The problem is that on armv7 %zi is 'long', and NSInteger is typedefed to 'int' in Foundation. We should avoid this warning as it's inconvenient to our users: it's target specific (happens only on armv7 and not arm64), and breaks their existing code. We should also silence the warning for the '%zu' specifier to ensure consistency. This is acceptable because Darwin guarantees that, despite the unfortunate choice of typedef, sizeof(size_t) == sizeof(NS[U]Integer), the warning is therefore noisy for pedantic reasons. Once this is in I'll update public documentation. Related discussion on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2018-May/058050.html <rdar://36874921&40501559> Reviewers: ahatanak, vsapsai, alexshap, aaron.ballman, javed.absar, jfb, rjmccall Subscribers: kristof.beyls, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D47290 llvm-svn: 335393
* [llvm-mca] Remove unnecessary include and forward decl in RCU. NFC.Matt Davis2018-06-222-5/+3
| | | | | | | The DispatchUnit is no longer a dependency of RCU, so this patch removes a stale include and forward decl. This patch also cleans up some comments. llvm-svn: 335392
* [x86] add tests for bit hacking opportunities with setcc; NFCSanjay Patel2018-06-221-0/+117
| | | | | | | | | | We likely gave up on folding some select-of-constants patterns in IR with rL331486, and we need to recover those in the DAG. The tests without select are based on our current DAGCombiner optimizations for select-of-constants. llvm-svn: 335391
* [PowerPC] add tests for bit hacking opportunities with setcc; NFCSanjay Patel2018-06-221-0/+114
| | | | | | | | | | We likely gave up on folding some select-of-constants patterns in IR with rL331486, and we need to recover those in the DAG. The tests without select are based on our current DAGCombiner optimizations for select-of-constants. llvm-svn: 335390
* [X86] Add test cases showing missed select simplifcation for MCU when icmp ↵Craig Topper2018-06-221-0/+110
| | | | | | | | is in a slightly different form. These test cases show that the "(select (and (x , 0x1) == 0), y, (z ^ y) ) -> (-(and (x , 0x1)) & z ) ^ y" doesn't work if the select condition is changed to (and (x, 0x1) != 1) llvm-svn: 335389
* [GISel]: Add G_ADDRSPACE_CAST OpcodeAditya Nandakumar2018-06-224-1/+21
| | | | | | | | | | Added IRTranslator support for addrspacecast. https://reviews.llvm.org/D48469 reviewed by: volkan llvm-svn: 335388
* [gdb] Use Latin-1 to decode StringRefFangrui Song2018-06-221-1/+1
| | | | llvm-svn: 335387
* Mark this test as no debuginfoAdrian Prantl2018-06-221-1/+1
| | | | llvm-svn: 335386
* Re-land "[LTO] Enable module summary emission by default for regular LTO"Tobias Edler von Koch2018-06-228-21/+58
| | | | | | | | | | | | Since we are now producing a summary also for regular LTO builds, we need to run the NameAnonGlobals pass in those cases as well (the summary cannot handle anonymous globals). See https://reviews.llvm.org/D34156 for details on the original change. This reverts commit 6c9ee4a4a438a8059aacc809b2dd57128fccd6b3. llvm-svn: 335385
* [X86] Don't accept (%si,%bp) 16-bit address expressions.Craig Topper2018-06-225-6/+29
| | | | | | | | | | The second register is the index register and should only be %si or %di if used with a base register. And in that case the base register should be %bp or %bx. This makes us compatible with gas. We do still need to support both orders with Intel syntax which uses [bp+si] and [si+bp] llvm-svn: 335384
* [ubsan] Fix __ubsan_on_report interface definitionVedant Kumar2018-06-222-1/+2
| | | | | | | | | | | | | | | | Speculative fix for the interface definition of __ubsan_on_report for the Windows bots: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/30528 lib\ubsan\ubsan_interface.inc(55): error C2065: '__ubsan_on_report': undeclared identifier INTERCEPT_SANITIZER_WEAK_FUNCTION was the wrong macro to use to begin with because __ubsan_on_report isn't weak. Reading through that macro, it's still not clear to me why there is an undefined reference, though, because it appears to define a dummy __ubsan_on_report shim. llvm-svn: 335383
* Reinstate quotes around the path to python that I accidentaly removed in r335330Benjamin Kramer2018-06-221-1/+1
| | | | | | This broke users with spaces in the path, like C:\Program Files\Python llvm-svn: 335382
* Restore pre-r335182 behavior for naming inherited constructors asRichard Smith2018-06-224-4/+31
| | | | | | | | | | | | | | members of dependent contexts. This permits cases where the names before and after the '::' in a dependent inherited constructor using-declaration do not match, but where we can nonetheless tell when parsing the template that a constructor is being named. Under (open) core language DR 2070, such cases will probably be ill-formed, but r335182 does not quite give that result and didn't intend to change this, so restore the old behavior for now. llvm-svn: 335381
* Fix BUILD_SHARED_LIBS=1 build of libclangHandleLLVMSam Clegg2018-06-221-1/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D48503 llvm-svn: 335380
* [X86][AsmParser] Allow (%bp,%si) and (%bp,%di) to be encoded without using a ↵Craig Topper2018-06-222-1/+5
| | | | | | | | zero displacement. (%bp) can't be encoded without a displacement. The encoding is instead used for displacement alone. So a 1 byte displacement of 0 must be used. But if there is an index register we can encode without a displacement. llvm-svn: 335379
* AMDHSA: Put old assembler docs backKonstantin Zhuravlyov2018-06-221-6/+101
| | | | | | | | | Until we switch to code object v3 by default. Follow up for https://reviews.llvm.org/D47736. Differential Revision: https://reviews.llvm.org/D48497 llvm-svn: 335378
* [OPENMP, NVPTX] Fix reduction of the big data types/structures.Alexey Bataev2018-06-223-77/+171
| | | | | | | | If the shuffle is required for the reduced structures/big data type, current code may cause compiler crash because of the loading of the aggregate values. Patch fixes this problem. llvm-svn: 335377
* [X86][SSE] Add sdiv by (nonuniform) minus one tests (PR37119)Simon Pilgrim2018-06-221-0/+297
| | | | | | Test cases from D45806 llvm-svn: 335376
* Re-apply: Warning for framework headers using double quote includesBruno Cardoso Lopes2018-06-2215-1/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce -Wquoted-include-in-framework-header, which should fire a warning whenever a quote include appears in a framework header and suggest a fix-it. For instance, for header A.h added in the tests, this is how the warning looks like: ./A.framework/Headers/A.h:2:10: warning: double-quoted include "A0.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header] #include "A0.h" ^~~~~~ <A/A0.h> ./A.framework/Headers/A.h:3:10: warning: double-quoted include "B.h" in framework header, expected angle-bracketed instead [-Wquoted-include-in-framework-header] #include "B.h" ^~~~~ <B.h> This helps users to prevent frameworks from using local headers when in fact they should be targetting system level ones. The warning is off by default. Differential Revision: https://reviews.llvm.org/D47157 rdar://problem/37077034 llvm-svn: 335375
* Implemented proto to LLVM conversion and LLVM fuzz targetEmmett Neyman2018-06-2214-36/+430
| | | | | | Differential Revision: https://reviews.llvm.org/D48106 llvm-svn: 335374
* [X86][AsmParser] Check for invalid 16-bit base register in Intel syntax.Craig Topper2018-06-222-19/+26
| | | | llvm-svn: 335373
* [NFC] Fix AttributeList allocated_size for ParsedType.Erich Keane2018-06-221-0/+2
| | | | | | | | | This if/elseif structure seems to be missing this case. Previously, this would report a size of 1 pointer too small. This didn't really change anything besides failing to reclaim a very small amount of memory. llvm-svn: 335372
* [ubsan] Add support for reporting diagnostics to a monitor processVedant Kumar2018-06-229-59/+246
| | | | | | | | | | | | | | | | | | Add support to the ubsan runtime for reporting diagnostics to a monitor process (e.g a debugger). The Xcode IDE uses this by setting a breakpoint on __ubsan_on_report and collecting diagnostic information via __ubsan_get_current_report_data, which it then surfaces to users in the editor UI. Testing for this functionality already exists in upstream lldb, here: lldb/packages/Python/lldbsuite/test/functionalities/ubsan Apart from that, this is `ninja check-{a,ub}san` clean. Differential Revision: https://reviews.llvm.org/D48446 llvm-svn: 335371
* [X86] Don't allow ESP/RSP to be used as an index register in assembly.Craig Topper2018-06-222-1/+10
| | | | | | Fixes PR37892 llvm-svn: 335370
* [LoopUnswitch]Fix comparison for DomTree updates.Alina Sbirlea2018-06-221-2/+3
| | | | | | | | | | | | | | | | | | | Summary: In LoopUnswitch when replacing a branch Parent -> Succ with a conditional branch Parent -> True & Parent->False, the DomTree updates should insert an edge for each of True/False if True/False are different than Succ, and delete Parent->Succ edge if both are different. The comparison with Succ appears to be incorect, it's comparing with Parent instead. There is no test failing either before or after this change, but it seems to me this is the right way to do the update. Reviewers: chandlerc, kuhar Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D48457 llvm-svn: 335369
* [llvm-mca] Remove redundant call. NFCAndrea Di Biagio2018-06-221-2/+0
| | | | llvm-svn: 335368
* [X86] Add a test to show missed opportunity to generate vfnmaddEaswaran Raman2018-06-221-0/+28
| | | | llvm-svn: 335367
OpenPOWER on IntegriCloud