summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Print register names in .seh_* directivesReid Kleckner2019-08-3028-362/+408
| | | | | | | | | | Also improve assembler parser register validation for .seh_ directives. This requires moving X86-specific seh directive handling into the x86 backend, which addresses some assembler FIXMEs. Differential Revision: https://reviews.llvm.org/D66625 llvm-svn: 370533
* [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-08-3065-384/+8946
| | | | | | | | | | | | | | | | | | Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146 llvm-svn: 370531
* [x86] add tests for shift-logic-shift; NFCSanjay Patel2019-08-301-0/+174
| | | | llvm-svn: 370529
* [AArch64] add tests for shift-logic-shift; NFCSanjay Patel2019-08-301-0/+150
| | | | llvm-svn: 370528
* Make add_new_check.py's insertion of registerCheck<> match the sort orderDaniel Sanders2019-08-301-20/+39
| | | | | | | | | | | | | | | | | Summary: Following on from review comments in D65919 about the ordering of the registerCheck<> calls. Sort based on the check name which might be on the line after the registerCheck<> Reviewers: aaron.ballman Subscribers: cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66505 llvm-svn: 370527
* [test] Make sure PROMPT is a stringJonas Devlieghere2019-08-301-1/+1
| | | | | | | | Currently tests using expect_prompt are failing on the Python 3 bot with an error saying "argument must be str, not bytes". I don't have a Python 3 build handy, but I suspect this might fix that. llvm-svn: 370526
* [Windows] Disable TrapUnreachable for Win64, add SEH_NoReturnReid Kleckner2019-08-3021-38/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users have complained llvm.trap produce two ud2 instructions on Win64, one for the trap, and one for unreachable. This change fixes that. TrapUnreachable was added and enabled for Win64 in r206684 (April 2014) to avoid poorly understood issues with the Windows unwinder. There seem to be two major things in play: - the unwinder - C++ EH, _CxxFrameHandler3 & co The unwinder disassembles forward from the return address to scan for epilogues. Inserting a ud2 had the effect of stopping the unwinder, and ensuring that it ran the EH personality function for the current frame. However, it's not clear what the unwinder does when the return address happens to be the last address of one function and the first address of the next function. The Visual C++ EH personality, _CxxFrameHandler3, needs to figure out what the current EH state number is. It does this by consulting the ip2state table, which maps from PC to state number. This seems to go wrong when the return address is the last PC of the function or catch funclet. I'm not sure precisely which system is involved here, but in order to address these real or hypothetical problems, I believe it is enough to insert int3 after a call site if it would otherwise be the last instruction in a function or funclet. I was able to reproduce some similar problems locally by arranging for a noreturn call to appear at the end of a catch block immediately before an unrelated function, and I confirmed that the problems go away when an extra trailing int3 instruction is added. MSVC inserts int3 after every noreturn function call, but I believe it's only necessary to do it if the call would be the last instruction. This change inserts a pseudo instruction that expands to int3 if it is in the last basic block of a function or funclet. I did what I could to run the Microsoft compiler EH tests, and the ones I was able to run showed no behavior difference before or after this change. Differential Revision: https://reviews.llvm.org/D66980 llvm-svn: 370525
* [IFS][NFC] llvm-ifs: Fixing build bot build break: revert r370517 and r370510.Puyan Lotfi2019-08-301-5/+13
| | | | llvm-svn: 370522
* [Thumb2] tighten CHECK lines in test; NFCSanjay Patel2019-08-301-2/+4
| | | | | | | | | The sequence between the function call and the asm start may change without affecting what this test is looking for, but we should have a better idea about what that sequence looks like. llvm-svn: 370518
* [IFS][NFC] llvm-ifs: Fixing build bot error due to commit conflicts.Puyan Lotfi2019-08-301-8/+0
| | | | | | | | r370510 and r370504 Again only on gcc. llvm-svn: 370517
* gn build: Merge r370512Nico Weber2019-08-301-0/+1
| | | | llvm-svn: 370516
* [X86] Fix mul test cases in avx512-broadcast-unfold.ll to not get ↵Craig Topper2019-08-301-239/+37
| | | | | | | | canonicalized to fadd. Remove the fsub test cases which were also testing fadd. Not sure how to prevent an fsub by constant getting turned into an fadd by negative constant. llvm-svn: 370515
* [clang-tidy] Add llvm-prefer-register-over-unsigned to clang-tidyDaniel Sanders2019-08-3010-0/+340
| | | | | | | | | | | | | | | | | Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible). Reviewers: arsenm, bogner Subscribers: jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, mgorny, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65919 llvm-svn: 370512
* [IFS][NFC] llvm-ifs: Fixing build errors for bots using GCC.Puyan Lotfi2019-08-301-5/+5
| | | | | | | | | | | | | gcc produces the error: error: specialization of ‘template<class T, class Enable> struct llvm::yaml::ScalarTraits’ in different namespace For all specializations outside of llvm::yaml. So I added llvm::yaml to these specializations to fix the errors on the bots building with gcc (/usr/bin/c++). llvm-svn: 370510
* [lld][WebAssembly] Fix spurious signature mismatch warningsSam Clegg2019-08-302-2/+17
| | | | | | | | | | | | | | | | | | | Summary: This a follow up on: https://reviews.llvm.org/D62153 Handle the case where there are multiple object files that contain undefined references to the same function. We only generate a function variant if the existing symbol is directly called. See: https://github.com/emscripten-core/emscripten/issues/8995 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67015 llvm-svn: 370509
* [DFAPacketizer] Allow namespacing of automata per-itineraryJames Molloy2019-08-302-24/+52
| | | | | | | | | | | | | | | | | | | | | The Hexagon itineraries are cunningly crafted such that functional units between itineraries do not clash. Because all itineraries are bundled into the same DFA, a functional unit index clash would cause an incorrect DFA to be generated. A workaround for this is to ensure all itineraries declare the universe of all possible functional units, but this isn't ideal for three reasons: 1) We only have a limited number of FUs we can encode in the packetizer, and using the universe causes us to hit the limit without care. 2) Silent codegen faults are bad, and careful triage of the FU list shouldn't be required. 3) Smooshing all itineraries into the same automaton allows combinations of instruction classes that cannot exist, which bloats the table. A simple solution is to allow "namespacing" packetizers. Differential Revision: https://reviews.llvm.org/D66940 llvm-svn: 370508
* [X86] Regenerate the test cases added in r370506.Craig Topper2019-08-301-21/+22
| | | | | | | | | Something weird happened with the v2i64/v2f64 test cases which don't use broadcast. So they should already be hoisted, but weren't in the version I submitted in r370506. This fixes that. Not sure if something changed or I screwed up. llvm-svn: 370507
* [X86] Add test caes for opportunities for machine LICM to unfold broadcasted ↵Craig Topper2019-08-301-0/+1844
| | | | | | | | | | | | | constant pool loads. MachineLICM is able to unfold loads to move an invariant load out a loop, but X86 infrastructure currently lacks the ability to do this when avx512 embedded broadcasting is used. This test adds examples for the basic float point operations, add, mul, and, or, and xor. llvm-svn: 370506
* [PowerPC][NFC] Avoid checking non-relevant .cfi instructionsJinsong Ji2019-08-3016-612/+146
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is brought up in https://reviews.llvm.org/D64662?id=209923#inline-599490 CFI information are non-relevant to quite some testcases, we should get rid of checking them when its unecessary. This patch avoid generating cfi info in testcases that are not testing prolog/epilog or exception handling. Reviewers: kbarton, hfinkel, nemanjai, #powerpc Reviewed By: hfinkel Subscribers: MaskRay, shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67016 llvm-svn: 370505
* Fix compilation warnings. NFC.Michael Liao2019-08-301-1/+10
| | | | llvm-svn: 370504
* [lldb][NFC] More tests for invalid register command invocationsRaphael Isemann2019-08-301-0/+15
| | | | llvm-svn: 370503
* Make `vector` unconditionally move elements when exceptions are disabled.Eric Fiselier2019-08-303-10/+82
| | | | | | | | | | | | | | | | | | | | | | | | Summary: `std::vector<T>` is free choose between using copy or move operations when it needs to resize. The standard only candidates that the correct exception safety guarantees are provided. When exceptions are disabled these guarantees are trivially satisfied. Meaning vector is free to optimize it's implementation by moving instead of copying. This patch makes `std::vector` unconditionally move elements when exceptions are disabled. This optimization is conforming according to the current standard wording. There are concerns that moving in `-fno-noexceptions`mode will be a surprise to users. For example, a user may be surprised to find their code is slower with exceptions enabled than it is disabled. I'm sympathetic to this surprised, but I don't think it should block this optimization. Reviewers: mclow.lists, ldionne, rsmith Reviewed By: ldionne Subscribers: zoecarver, christof, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D62228 llvm-svn: 370502
* gn build: Merge r370500Nico Weber2019-08-301-0/+1
| | | | llvm-svn: 370501
* [MachinePipeliner] Separate schedule emission, NFCJames Molloy2019-08-305-1200/+1496
| | | | | | | | | | | | | | | | This is the first stage in refactoring the pipeliner and making it more accessible for backends to override and control. This separates the logic and state required to *emit* a scheudule from the logic that *computes* and validates a schedule. This will enable (a) new schedule emitters and (b) new modulo scheduling implementations to coexist. NFC. Differential Revision: https://reviews.llvm.org/D67006 llvm-svn: 370500
* [llvm-ifs][IFS] llvm Interface Stubs merging + object file generation tool.Puyan Lotfi2019-08-3017-1/+793
| | | | | | | | | | | | | | | | | | | | | | This tool merges interface stub files to produce a merged interface stub file or a stub library. Currently it for stub library generation it can produce an ELF .so stub file, or a TBD file (experimental). It will be used by the clang -emit-interface-stubs compilation pipeline to merge and assemble the per-CU stub files into a stub library. The new IFS format is as follows: --- !experimental-ifs-v1 IfsVersion: 1.0 Triple: <llvm triple> ObjectFileFormat: <ELF | TBD> Symbols: _ZSymbolName: { Type: <type>, etc... } ... Differential Revision: https://reviews.llvm.org/D66405 llvm-svn: 370499
* [DAGCombine] ReduceLoadWidth - remove duplicate SDLoc. NFCI.Simon Pilgrim2019-08-301-3/+2
| | | | | | SDLoc(N0) and SDLoc(cast<LoadSDNode>(N0)) should be equivalent. llvm-svn: 370498
* [TargetLowering] SimplifyDemandedBits ADD/SUB/MUL - correctly inherit ↵Simon Pilgrim2019-08-301-4/+2
| | | | | | | | | | SDNodeFlags from the original node. Just disable NSW/NUW flags. This matches what we're already doing for the other situations for these nodes, it was just missed for the demanded constant case. Noticed by inspection - confirmed in offline discussion with @spatel. I've checked we have test coverage in the x86 extract-bits.ll and extract-lowbits.ll tests llvm-svn: 370497
* GlobalISel: Fix missing pass dependencyMatt Arsenault2019-08-301-0/+1
| | | | llvm-svn: 370496
* [X86] Pass v32i16/v64i8 in zmm registers on KNL target.Craig Topper2019-08-3069-4175/+4427
| | | | | | | | | | | | | | | gcc and icc pass these types in zmm registers in zmm registers. This patch implements a quick hack to override the register type before calling convention handling to one that is legal. Longer term we might want to do something similar to 256-bit integer registers on AVX1 where we just split all the operations. Fixes PR42957 Differential Revision: https://reviews.llvm.org/D66708 llvm-svn: 370495
* [ValueTypes] Add v16f16 and v32f16 to EVT::getEVTString and Tablegen's ↵Craig Topper2019-08-302-0/+4
| | | | | | | | getEnumName Missed these when I hadded the enum entries llvm-svn: 370494
* [clang-scan-deps] NFC, remove outdated implementation commentAlex Lorenz2019-08-301-1/+0
| | | | | | | | There's no need to purge symlinked entries in the FileManager, as the new FileEntryRef API allows us to compute dependencies more accurately when the FileManager is reused. llvm-svn: 370493
* gn build: Merge r370490Nico Weber2019-08-301-0/+1
| | | | llvm-svn: 370492
* [LLD] [COFF] Add a missing REQUIRES line to a recently added test. NFC.Martin Storsjo2019-08-301-0/+2
| | | | | | | This should fix failing buildbots like http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/7180. llvm-svn: 370491
* MemTag: unchecked load/store optimization.Evgeniy Stepanov2019-08-308-1/+389
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: MTE allows memory access to bypass tag check iff the address argument is [SP, #imm]. This change takes advantage of this to demote uses of tagged addresses to regular FrameIndex operands, reducing register pressure in large functions. MO_TAGGED target flag is used to signal that the FrameIndex operand refers to memory that might be tagged, and needs to be handled with care. Such operand must be lowered to [SP, #imm] directly, without a scratch register. The transformation pass attempts to predict when the offset will be out of range and disable the optimization. AArch64RegisterInfo::eliminateFrameIndex has an escape hatch in case this prediction has been wrong, but it is quite inefficient and should be avoided. Reviewers: pcc, vitalybuka, ostannard Subscribers: mgorny, javed.absar, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66457 llvm-svn: 370490
* [DAGCombine] visitVSELECT - remove equivalent getValueType() call. NFCI.Simon Pilgrim2019-08-301-1/+0
| | | | llvm-svn: 370489
* FileManager: Remove ShouldCloseOpenFile argument from getBufferForFile, NFCDuncan P. N. Exon Smith2019-08-303-11/+4
| | | | | | Remove this dead code. We always close it. llvm-svn: 370488
* [lld-link] implement -start-lib and -end-libBob Haarman2019-08-3015-70/+316
| | | | | | | | | | | | | | | | | | | | | | | Summary: This implements -start-lib and -end-lib flags for lld-link, analogous to the similarly named options in ld.lld. Object files after -start-lib are included in the link only when needed to resolve undefined symbols. The -end-lib flag goes back to the normal behavior of always including object files in the link. This mimics the semantics of static libraries, but without needing to actually create the archive file. Reviewers: ruiu, smeenai, MaskRay Reviewed By: ruiu, MaskRay Subscribers: akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66848 llvm-svn: 370487
* [INSTRUCTIONS] Add support of const for getLoadStorePointerOperand() andWhitney Tsang2019-08-301-2/+9
| | | | | | | | | | | | getLoadStorePointerOperand(). Reviewer: hsaito, sebpop, reames, hfinkel, mkuper, bogner, haicheng, arsenm, lattner, chandlerc, grosser, rengolin Reviewed By: reames Subscribers: wdng, llvm-commits, bmahjour Tag: LLVM Differential Revision: https://reviews.llvm.org/D66595 llvm-svn: 370486
* [Attributor] Fix: do not pretend to preserve the CFGJohannes Doerfert2019-08-301-1/+0
| | | | llvm-svn: 370485
* [X86] Merge X86InstrInfo::loadRegFromAddr/storeRegToAddr into their only ↵Craig Topper2019-08-302-50/+21
| | | | | | | | | | | call site. I'm looking at unfolding broadcast loads on AVX512 which will require refactoring this code to select broadcast opcodes instead of regular load/stores in some cases. Merging them to avoid further complicating their interfaces. llvm-svn: 370484
* [lit] Fix my earlier bogus fix to not set DYLD_LIBRARY_PATH with Asan.Jonas Devlieghere2019-08-301-1/+1
| | | | | | | | | | | | | My follow-up commit to mess with DYLD_LIBRARY_PATH was bogus for two reasons: - The condition was inverted. - We were checking the OS's environment, instead of the config's. Two wrongs don't make a right, but the second mistake meant that the sanitizer bot passed. llvm-svn: 370483
* [clangd] Add highlighting for macro expansions.Johan Vikstrom2019-08-304-29/+42
| | | | | | | | | | | | | | Summary: https://github.com/clangd/clangd/issues/134 Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66995 llvm-svn: 370482
* Revert [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-08-3064-8945/+384
| | | | | | This reverts r370476 (git commit a5590950549719d0d9ea69ed164b0c8c0f4e02e6) llvm-svn: 370481
* [Attributor] Use existing function information for the call siteJohannes Doerfert2019-08-3016-30/+278
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of recomputing information for call sites we now use the function information directly. This is always valid and once we have call site specific information we can improve here. This patch also bootstraps attributes that are created on-demand through an initial update call. Information that is known will then directly be available in the new attribute without causing an iteration delay. The tests show how this improves the iteration count. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66781 llvm-svn: 370480
* [Attributor] Manifest load/store alignment generallyJohannes Doerfert2019-08-302-25/+27
| | | | | | | | | | | | | | | | Summary: Any pointer could have load/store users not only floating ones so we move the manifest logic for alignment into the AAAlignImpl class. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66922 llvm-svn: 370479
* [DAGCombine] visitVSELECT - remove duplicate getOperand calls. NFCI.Simon Pilgrim2019-08-301-4/+3
| | | | llvm-svn: 370478
* [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-08-3064-384/+8945
| | | | | | | | | | | | | | | | | | Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146 llvm-svn: 370476
* [InstCombine][AMDGPU] Simplify tbuffer loadsPiotr Sobczak2019-08-302-0/+661
| | | | | | | | | | | | | | | | Summary: Add missing tbuffer loads intrinsics in SimplifyDemandedVectorElts. Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66926 llvm-svn: 370475
* [llvm-nm] Small fix to Exected<StringRef>Sid Manning2019-08-301-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D66976 llvm-svn: 370474
* [clangd] Added highlighting for structured bindings.Johan Vikstrom2019-08-302-0/+19
| | | | | | | | | | | | | | Summary: Structured bindings are in a BindingDecl. The decl the declRefExpr points to are the BindingDecls. So this adds an additional if statement in the addToken function to highlight them. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66738 llvm-svn: 370473
OpenPOWER on IntegriCloud