summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix signed/unsigned comparison warningsSimon Pilgrim2017-03-101-11/+11
| | | | llvm-svn: 297460
* Fix Wdocumentation warningSimon Pilgrim2017-03-101-1/+1
| | | | llvm-svn: 297459
* [APInt] Add APInt::insertBits() method to insert an APInt into a larger APIntSimon Pilgrim2017-03-106-10/+123
| | | | | | | | | | | | We currently have to insert bits via a temporary variable of the same size as the target with various shift/mask stages, resulting in further temporary variables, all of which require the allocation of memory for large APInts (MaskSizeInBits > 64). This is another of the compile time issues identified in PR32037 (see also D30265). This patch adds the APInt::insertBits() helper method which avoids the temporary memory allocation and masks/inserts the raw bits directly into the target. Differential Revision: https://reviews.llvm.org/D30780 llvm-svn: 297458
* [mips][msa] Accept more values for constant splatsSimon Dardis2017-03-104-29/+282
| | | | | | | | | | | | | | | | | This patches teaches the MIPS backend to accept more values for constant splats. Previously, only 10 bit signed immediates or values that could be loaded using an ldi.[bhwd] instruction would be acceptted. This patch relaxes that constraint so that any constant value that be splatted is accepted. As a result, the constant pool is used less for vector operations, and the suite of bit manipulation instructions b(clr|set|neg)i can now be used with the full range of their immediate operand. Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D30640 llvm-svn: 297457
* imm_comp_XFORM (defined in ARMInstrThumb.td) duplicates imm_not_XFORM ↵Artyom Skrobov2017-03-102-7/+2
| | | | | | | | | | | | | | (defined in ARMInstrInfo.td) Reviewers: grosbach, rengolin, jmolloy Reviewed By: jmolloy Subscribers: aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D30782 llvm-svn: 297456
* [clang-format] Use a reference in loop variable; NFCKrasimir Georgiev2017-03-101-1/+1
| | | | llvm-svn: 297455
* [Assembler] Add location info to unary expressions.Sanne Wouda2017-03-105-19/+19
| | | | | | | | | | | | | | | | | Summary: This is a continuation of D28861. Add an SMLoc to MCUnaryExpr such that a better diagnostic can be given in case of an error in later stages of assembling. Reviewers: rengolin, grosbach, javed.absar, olista01 Reviewed By: olista01 Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30581 llvm-svn: 297454
* Refactor the multiply-accumulate combines to act onArtyom Skrobov2017-03-102-108/+64
| | | | | | | | | | | | | | | | | ARMISD::ADD[CE] nodes, instead of the generic ISD::ADD[CE]. Summary: This allows for some simplification because the combines are no longer limited to just one go at the node before it gets legalized into an ARM target-specific one. Reviewers: jmolloy, rogfer01 Subscribers: aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D30401 llvm-svn: 297453
* Introduce isl C++ bindings, Part 1: value_ptr style interfaceTobias Grosser2017-03-1012-503/+3442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over the last couple of months several authors of independent isl C++ bindings worked together to jointly design an official set of isl C++ bindings which combines their experience in developing isl C++ bindings. The new bindings have been designed around a value pointer style interface and remove the need for explicit pointer managenent and instead use C++ language features to manage isl objects. This commit introduces the smart-pointer part of the isl C++ bindings and replaces the current IslPtr<T> classes, which served the very same purpose, but had to be manually maintained. Instead, we now rely on automatically generated classes for each isl object, which provide value_ptr semantics. An isl object has the following smart pointer interface: inline set manage(__isl_take isl_set *ptr); class set { friend inline set manage(__isl_take isl_set *ptr); isl_set *ptr = nullptr; inline explicit set(__isl_take isl_set *ptr); public: inline set(); inline set(const set &obj); inline set &operator=(set obj); inline ~set(); inline __isl_give isl_set *copy() const &; inline __isl_give isl_set *copy() && = delete; inline __isl_keep isl_set *get() const; inline __isl_give isl_set *release(); inline bool is_null() const; } The interface and behavior of the new value pointer style classes is inspired by http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3339.pdf, which proposes a std::value_ptr, a smart pointer that applies value semantics to its pointee. We currently only provide a limited set of public constructors and instead require provide a global overloaded type constructor method "isl::obj isl::manage(isl_obj *)", which allows to convert an isl_set* to an isl::set by calling 'S = isl::manage(s)'. This pattern models the make_unique() constructor for unique pointers. The next two functions isl::obj::get() and isl::obj::release() are taken directly from the std::value_ptr proposal: S.get() extracts the raw pointer of the object managed by S. S.release() extracts the raw pointer of the object managed by S and sets the object in S to null. We additionally add std::obj::copy(). S.copy() returns a raw pointer refering to a copy of S, which is a shortcut for "isl::obj(oldobj).release()", a functionality commonly needed when interacting directly with the isl C interface where all methods marked with __isl_take require consumable raw pointers. S.is_null() checks if S manages a pointer or if the managed object is currently null. We add this function to provide a more explicit way to check if the pointer is empty compared to a direct conversion to bool. This commit also introduces a couple of polly-specific extensions that cover features currently not handled by the official isl C++ bindings draft, but which have been provided by IslPtr<T> and are consequently added to avoid code churn. These extensions include: - operator bool() : Conversion from objects to bool - construction from nullptr_t - get_ctx() method - take/keep/give methods, which match the currently used naming convention of IslPtr<T> in Polly. They just forward to (release/get/manage). - raw_ostream printers We expect that these extensions are over time either removed or upstreamed to the official isl bindings. We also export a couple of classes that have not yet been exported in isl (e.g., isl::space) As part of the code review, the following two questions were asked: - Why do we not use a standard smart pointer? std::value_ptr was a proposal that has not been accepted. It is consequently not available in the standard library. Even if it would be available, we want to expand this interface with a complete method interface that is conveniently available from each managed pointer. The most direct way to achieve this is to generate a specialiced value style pointer class for each isl object type and add any additional methods to this class. The relevant changes follow in subsequent commits. - Why do we not use templates or macros to avoid code duplication? It is certainly possible to use templates or macros, but as this code is auto-generated there is no need to make writing this code more efficient. Also, most of these classes will be specialized with individual member functions in subsequent commits, such that there will be little code reuse to exploit. Hence, we decided to do so at the moment. These bindings are not yet officially part of isl, but the draft is already very stable. The smart pointer interface itself did not change since serveral months. Adding this code to Polly is against our normal policy of only importing official isl code. In this case however, we make an exception to showcase a non-trivial use case of these bindings which should increase confidence in these bindings and will help upstreaming them to isl. Tags: #polly Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D30325 llvm-svn: 297452
* WholeProgramDevirt: Fixed compilation error under MSVS2015.George Rimar2017-03-101-9/+18
| | | | | | | | | | | | | | | | | | | | | | It was introduced in: r296945 WholeProgramDevirt: Implement exporting for single-impl devirtualization. --------------------- r296939 WholeProgramDevirt: Add any unsuccessful llvm.type.checked.load devirtualizations to the list of llvm.type.test users. --------------------- Microsoft Visual Studio Community 2015 Version 14.0.23107.0 D14REL Does not compile that code without additional brackets, showing multiple error like below: WholeProgramDevirt.cpp(1216): error C2958: the left bracket '[' found at 'c:\access_softek\llvm\lib\transforms\ipo\wholeprogramdevirt.cpp(1216)' was not matched correctly WholeProgramDevirt.cpp(1216): error C2143: syntax error: missing ']' before '}' WholeProgramDevirt.cpp(1216): error C2143: syntax error: missing ';' before '}' WholeProgramDevirt.cpp(1216): error C2059: syntax error: ']' llvm-svn: 297451
* [clang-rename] Introduce an unittest skeleton for clang-rename.Haojian Wu2017-03-103-0/+182
| | | | | | | | | | | | | | Summary: This will make references rename tests easier. Reviewers: ioeric Reviewed By: ioeric Subscribers: cfe-commits, alexfh, mgorny Differential Revision: https://reviews.llvm.org/D30813 llvm-svn: 297450
* Update to isl-0.18-356-g0b05d01Tobias Grosser2017-03-1014-110/+287
| | | | | | This is a regular maintenance update. llvm-svn: 297449
* [llvm-readobj] Support SHT_MIPS_DWARF section type flagSimon Atanasyan2017-03-102-0/+9
| | | | llvm-svn: 297448
* [MC] Set SHT_MIPS_DWARF section type for all .debug_* sections on MIPSSimon Atanasyan2017-03-104-24/+38
| | | | | | | | | | | | All MIPS .debug_* sections should be marked with ELF type SHT_MIPS_DWARF accordingly the specification [1]. Also the same section type is assigned to these sections by GNU tools. [1] ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf Differential Revision: https://reviews.llvm.org/D29789 llvm-svn: 297447
* [MC] Accept a numeric value as an ELF section header's typeSimon Atanasyan2017-03-104-2/+43
| | | | | | | | | | | | | | | | | | | | | | GAS supports specification of section header's type using a numeric value [1]. This patch brings the same functionality to LLVM. That allows to setup some target-specific section types belong to the SHT_LOPROC - SHT_HIPROC range. If we attempt to print unknown section type, MCSectionELF class shows an error message. It's better than print sole '@' sign without any section type name. In case of MIPS, example of such section's type is SHT_MIPS_DWARF. Without the patch we will have to implement some workarounds in probably not-MIPS-specific part of code base to convert SHT_MIPS_DWARF to the @progbits while printing assembly and to assign SHT_MIPS_DWARF for @progbits sections named .debug_* if we encounter such section in an input assembly. [1] https://sourceware.org/binutils/docs/as/Section.html Differential Revision: https://reviews.llvm.org/D29719 llvm-svn: 297446
* For Thumb1, lower ADDC/ADDE/SUBC/SUBE via the glueless ARMISD nodes,Artyom Skrobov2017-03-104-36/+273
| | | | | | | | | | | | same as already done for ARM and Thumb2. Reviewers: jmolloy, rogfer01, efriedma Subscribers: aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D30400 llvm-svn: 297443
* Implement getPassName() for IR printing passes.Yaron Keren2017-03-104-0/+12
| | | | llvm-svn: 297442
* Add a distinction in an apple accelerator table between IsValid andJason Molenda2017-03-102-13/+17
| | | | | | | | | HasContent. If we have a valid accelerator table which has no content, we want to depend on that (empty) table as the authoritative source instead of reading through all the debug info for lookups. <rdar://problem/30867462> llvm-svn: 297441
* Mark this as skipped for now. There is a race condition withJason Molenda2017-03-101-0/+1
| | | | | | | | | | SectionLoadList exposed by this test. Greg tried to chase it down & got pretty far but the isn't correct so we'll disable this test for now until I can figure that out. <rdar://problem/30899227> llvm-svn: 297440
* AMDGPU: Fix insertion point when reducing load intrinsicsMatt Arsenault2017-03-102-0/+41
| | | | | | | The insertion point may be later than the next instruction, so it is necessary to set it when replacing the call. llvm-svn: 297439
* Move memory coercion functions from GVN.cpp to VNCoercion.cpp so they can be ↵Daniel Berlin2017-03-104-447/+556
| | | | | | | | | | | | | | | | | | | shared between GVN and NewGVN. Summary: These are the functions used to determine when values of loads can be extracted from stores, etc, and to perform the necessary insertions to do this. There are no changes to the functions themselves except reformatting, and one case where memdep was informed of a removed load (which was pushed into the caller). Reviewers: davide Subscribers: mgorny, llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D30478 llvm-svn: 297438
* Do not use branch metadata to check if a basic block is hot.Dehao Chen2017-03-101-12/+1
| | | | | | | | | | | | | | Summary: We should not use that to check basic block hotness as optimization may mess it up. Reviewers: eraman Reviewed By: eraman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30800 llvm-svn: 297437
* [AMDGPU] Add builtin functions readlane ds_permute mov_dppYaxun Liu2017-03-106-5/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D30551 llvm-svn: 297436
* [x86] add tests for vec div/rem with 0 element in divisor; NFCSanjay Patel2017-03-101-0/+43
| | | | llvm-svn: 297433
* PatternMatch; Add m_ZExtOrSExt matcherMatt Arsenault2017-03-101-0/+7
| | | | llvm-svn: 297432
* Use SectionBase for linker script expressions.Rafael Espindola2017-03-102-4/+5
| | | | | | | This is a small step for fixing pr32031, which needs expressions that point to input sections. llvm-svn: 297431
* [Support] Correct filename in file head comment. NFC.Michael Kruse2017-03-101-1/+1
| | | | llvm-svn: 297430
* [analyzer] Turn suppress-c++-stdlib on by defaultAnna Zaks2017-03-102-1/+2
| | | | | | | | | | | | | | | | | We have several reports of false positives coming from libc++. For example, there are reports of false positives in std::regex, std::wcout, and also a bunch of issues are reported in https://reviews.llvm.org/D30593. In many cases, the analyzer trips over the complex libc++ code invariants. Let's turn off the reports coming from these headers until we can re-evalate the support. We can turn this back on once we individually suppress all known false positives and perform deeper evaluation on large codebases that use libc++. We'd also need to commit to doing these evaluations regularly as libc++ headers change. Differential Revision: https://reviews.llvm.org/D30798 llvm-svn: 297429
* NewGVN: Rewrite DCE during elimination so we do it as well as old GVN did.Daniel Berlin2017-03-108-77/+130
| | | | llvm-svn: 297428
* NewGVN: Rename a few things for clarityDaniel Berlin2017-03-101-40/+45
| | | | llvm-svn: 297427
* [GlobalISel] Use ImmutableCallSite instead of templates. NFC.Ahmed Bougacha2017-03-103-27/+14
| | | | | | ImmutableCallSite abstracts away CallInst and InvokeInst. Use it! llvm-svn: 297426
* [GlobalISel] Fallback when failing to translate invoke.Ahmed Bougacha2017-03-102-3/+24
| | | | | | | | We unintentionally stopped falling back in r293670. While there, change an unusual construct. llvm-svn: 297425
* Add support for DenseMap/DenseSet count and find using const pointersDaniel Berlin2017-03-106-10/+51
| | | | | | | | | | | | | | Summary: Similar to SmallPtrSet, this makes find and count work with both const referneces and const pointers. Reviewers: dblaikie Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D30713 llvm-svn: 297424
* [Unittests] Fix a build failure with clang 3.8. NFCI.Davide Italiano2017-03-091-1/+1
| | | | llvm-svn: 297423
* GlobalISel: support trivial inlineasm calls.Tim Northover2017-03-094-3/+33
| | | | | | They're used for nefarious purposes by ObjC. llvm-svn: 297422
* Refactor alias check from MISched into common helper. NFC.Eli Friedman2017-03-094-65/+83
| | | | | | Differential Revision: https://reviews.llvm.org/D30598 llvm-svn: 297421
* [WebAssembly] Fix the opcode numbers for floating-point le and gt.Dan Gohman2017-03-091-2/+2
| | | | llvm-svn: 297420
* [DAGCombiner] Do various combine on uaddo.Amaury Sechet2017-03-092-3/+38
| | | | | | | | | | | | Summary: This essentially does the same transform as for ADC. Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30417 llvm-svn: 297416
* [Support] Add -polly-dump-module pass.Michael Kruse2017-03-095-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pass allows writing the LLVM-IR just before and after the Polly passes to a file. Dumping the IR before Polly helps reproducing bugs that occur in code generated by clang. It is the only reliable way to get the IR that triggers a bug. The alternative is to emit the IR with clang -c -emit-llvm -S -o dump.ll then pass it through all optimization passes opt dump.ll -basicaa -sroa ... -S -o optdump.ll to then reproduce the error with opt optdump.ll -polly-opt-isl -polly-codegen -analyze However, the IR is not the same. -O3 uses a PassBuilder than creates passes with different parameters than the default. Dumping the IR after Polly is useful to compare a miscompilation with a known-good configuration. Differential Revision: https://reviews.llvm.org/D30788 llvm-svn: 297415
* [Hexagon] Fixes to the bitsplit generationKrzysztof Parzyszek2017-03-092-11/+79
| | | | | | | | - Fix the insertion point, which occasionally could have been incorrect. - Avoid creating multiple bitsplits with the same operands, if an old one could be reused. llvm-svn: 297414
* GlobalISel: inform FrameLowering when we emit a function call.Tim Northover2017-03-094-0/+6
| | | | | | | Amongst other things (I expect) this is necessary to ensure decent backtraces when an "unreachable" is involved. llvm-svn: 297413
* Add -cc1 flag -ast-dump-all to perform an AST dump including entities that ↵Richard Smith2017-03-099-34/+65
| | | | | | haven't yet been deserialized. llvm-svn: 297412
* [InstSimplify] allow folds for bool vector div/remSanjay Patel2017-03-093-13/+9
| | | | llvm-svn: 297411
* GlobalISel: put debug info for static allocas in the MachineFunction.Tim Northover2017-03-093-10/+22
| | | | | | | | | | | | | | The good reason to do this is that static allocas are pretty simple to handle (especially at -O0) and avoiding tracking DBG_VALUEs throughout the pipeline should give some kind of performance benefit. The bad reason is that the debug pipeline is an unholy mess of implicit contracts, where determining whether "DBG_VALUE %reg, imm" actually implies a load or not involves the services of at least 3 soothsayers and the sacrifice of at least one chicken. And it still gets it wrong if the variable is at SP directly. llvm-svn: 297410
* [ConstantFold] vector div/rem with any zero element in divisor is undefSanjay Patel2017-03-093-8/+13
| | | | | | | | Follow-up for: https://reviews.llvm.org/D30665 https://reviews.llvm.org/rL297390 llvm-svn: 297409
* AMDGPU: Support for SimplifyDemandedVectorElts for load intrinsicsMatt Arsenault2017-03-092-0/+325
| | | | llvm-svn: 297408
* [InstSimplify] add tests for vector constant folding div/rem-by-0; NFCSanjay Patel2017-03-092-0/+32
| | | | llvm-svn: 297407
* AMDGPU: Add GCCBuiltin for ds_permute ds_bpermuteYaxun Liu2017-03-091-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D30580 llvm-svn: 297406
* Make the LLDB test suite work with MSVC 2017 on Windows.Zachary Turner2017-03-091-4/+6
| | | | llvm-svn: 297405
* [DAGCombiner] Do various combine on usubo.Amaury Sechet2017-03-092-29/+43
| | | | | | | | | | | | Summary: This essentially does the same transform as for SUBC. Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30437 llvm-svn: 297404
OpenPOWER on IntegriCloud