- Aug 30, 2019
-
-
Nandor Licker authored
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
-
Sanjay Patel authored
llvm-svn: 370529
-
Sanjay Patel authored
llvm-svn: 370528
-
Daniel Sanders authored
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
-
Jonas Devlieghere authored
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
-
Reid Kleckner authored
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
-
Puyan Lotfi authored
llvm-svn: 370522
-
Sanjay Patel authored
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
-
Puyan Lotfi authored
r370510 and r370504 Again only on gcc. llvm-svn: 370517
-
Nico Weber authored
llvm-svn: 370516
-
Craig Topper authored
[X86] Fix mul test cases in avx512-broadcast-unfold.ll to not get 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
-
Daniel Sanders authored
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
-
Puyan Lotfi authored
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
-
Sam Clegg authored
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
-
James Molloy authored
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
-
Craig Topper authored
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
-
Craig Topper authored
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
-
Jinsong Ji authored
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
-
Michael Liao authored
llvm-svn: 370504
-
Raphael Isemann authored
llvm-svn: 370503
-
Eric Fiselier authored
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
-
Nico Weber authored
llvm-svn: 370501
-
James Molloy authored
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
-
Puyan Lotfi authored
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
-
Simon Pilgrim authored
SDLoc(N0) and SDLoc(cast<LoadSDNode>(N0)) should be equivalent. llvm-svn: 370498
-
Simon Pilgrim authored
[TargetLowering] SimplifyDemandedBits ADD/SUB/MUL - correctly inherit 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
-
Matt Arsenault authored
llvm-svn: 370496
-
Craig Topper authored
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
-
Craig Topper authored
Missed these when I hadded the enum entries llvm-svn: 370494
-
Alex Lorenz authored
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
-
Nico Weber authored
llvm-svn: 370492
-
Martin Storsjö authored
This should fix failing buildbots like http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/7180. llvm-svn: 370491
-
Evgeniy Stepanov authored
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
-
Simon Pilgrim authored
llvm-svn: 370489
-
Duncan P. N. Exon Smith authored
Remove this dead code. We always close it. llvm-svn: 370488
-
Bob Haarman authored
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
-
Whitney Tsang authored
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
-
Johannes Doerfert authored
llvm-svn: 370485
-
Craig Topper authored
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
-
Jonas Devlieghere authored
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
-