summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GlobalISel] LegalizerHelper: Lower (G_FSUB X, Y) to (G_FADD X, (G_FNEG Y))Volkan Keles2017-03-101-0/+18
| | | | | | | | | | | | | | Summary: No test case as none of the in-tree targets with GlobalISel support has this condition. Reviewers: qcolombet, aditya_nandakumar, dsanders, t.p.northover, ab Reviewed By: qcolombet Subscribers: dberris, rovka, kristof.beyls, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D30786 llvm-svn: 297512
* [VFS] Remove the Path variable from RealFSDirIter. NFC.Juergen Ributzka2017-03-101-3/+1
| | | | | | This variable is set, but never used. llvm-svn: 297511
* [VFS] Ignore broken symlinks in the directory iterator.Juergen Ributzka2017-03-103-6/+86
| | | | | | | | | | | | | | | | | The VFS directory iterator and recursive directory iterator behave differently from the LLVM counterparts. Once the VFS iterators hit a broken symlink they immediately abort. The LLVM counterparts allow to recover from this issue by clearing the error code and skipping to the next entry. This change adds the same functionality to the VFS iterators. There should be no change in current behavior in the current CLANG source base, because all clients have loop exit conditions that also check the error code. This fixes rdar://problem/30934619. Differential Revision: https://reviews.llvm.org/D30768 llvm-svn: 297510
* GlobalISel: Translate ConstantAggregateZero vectorsVolkan Keles2017-03-102-1/+35
| | | | | | | | | | | | Reviewers: qcolombet, aditya_nandakumar, dsanders, ab, t.p.northover, javed.absar Reviewed By: qcolombet Subscribers: dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30259 llvm-svn: 297509
* Options such as -omagic or -opt-remarks-* should be interpreted as -o.Rui Ueyama2017-03-102-5/+5
| | | | | | | | | | | | | | | | Options can start with `-` or `--` unless they start with "o". Any option that starts with `-o` should be interpreted as an output file name. This is a quote from the GNU ld man page. Note -- there is one exception to this rule. Multiple letter options that start with a lower case 'o' can only be preceded by two dashes. This is to reduce confusion with the -o option. So for example -omagic sets the output file name to magic whereas --omagic sets the NMAGIC flag on the output. We didn't handle that properly before. llvm-svn: 297508
* Sink accessing TII to fix release Werror builds.Eric Christopher2017-03-101-5/+3
| | | | llvm-svn: 297507
* [ProfileSummaryInfo] Remove unneeded braces. NFCI.Davide Italiano2017-03-101-2/+1
| | | | llvm-svn: 297506
* Fix all these headers to properly mark the doxygen comments.Daniel Berlin2017-03-103-132/+134
| | | | llvm-svn: 297505
* [AArch64, X86] Additional debug information for MacroFusionEvandro Menezes2017-03-102-7/+19
| | | | | | | | In order to make it easier to parse information about the performance of MacroFusion, this patch adds the function and the instruction names to the debug output of this pass. llvm-svn: 297504
* WholeProgramDevirt: Implement export/import support for VCP.Peter Collingbourne2017-03-104-4/+162
| | | | | | Differential Revision: https://reviews.llvm.org/D30017 llvm-svn: 297503
* WholeProgramDevirt: Implement export/import support for unique ret val opt.Peter Collingbourne2017-03-105-13/+207
| | | | | | Differential Revision: https://reviews.llvm.org/D29917 llvm-svn: 297502
* [ELF] Propely handle .eh_frame in linker scriptsPetr Hosek2017-03-105-7/+49
| | | | | | | | | | | Using .eh_frame input section pattern in linker script currently causes a crash; this is because .eh_frame input sections require special handling since they're all combined into a synthetic section rather than regular output section. Differential Revision: https://reviews.llvm.org/D30627 llvm-svn: 297501
* Refactor the PSI to extract getCallSiteCount and remove checks for profile type.Dehao Chen2017-03-103-39/+24
| | | | | | | | | | | | | | Summary: There is no need to check profile count as only CallInst will have metadata attached. Reviewers: eraman Reviewed By: eraman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30799 llvm-svn: 297500
* [AMDGPU] Split R600/SI getFrameIndexReference and emit stack object offsets ↵Konstantin Zhuravlyov2017-03-108-39/+251
| | | | | | | | for SI Differential Revision: https://reviews.llvm.org/D29674 llvm-svn: 297499
* Rename PT_NOTE namespace name used in AMDGPUPTNote.hYaxun Liu2017-03-103-10/+11
| | | | | | | | Patch by Guansong Zhang. Differential Revision: https://reviews.llvm.org/D30750 llvm-svn: 297498
* Attempt to fix Windows buildbot.Galina Kistanova2017-03-102-0/+4
| | | | llvm-svn: 297497
* Simplify & correct the patch I wrote in r297441, after thinkingJason Molenda2017-03-102-16/+12
| | | | | | | | about this more I realized I could make the change isolated to whether we decide an empty accelerator table is valid or not. <rdar://problem/30867462> llvm-svn: 297496
* [GlobalISel] Translate insertelement and extractelementVolkan Keles2017-03-107-6/+154
| | | | | | | | | | | | Reviewers: qcolombet, aditya_nandakumar, dsanders, ab, t.p.northover, javed.absar Reviewed By: qcolombet Subscribers: dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30761 llvm-svn: 297495
* NewGVN: Rename InitialClass to TOP, which is what most people would expect ↵Daniel Berlin2017-03-101-25/+25
| | | | | | it to be called llvm-svn: 297494
* [SLP] Revert everything that has to do with memory access sorting.Michael Kuperstein2017-03-107-379/+112
| | | | | | | | | | | | This reverts r293386, r294027, r294029 and r296411. Turns out the SLP tree isn't actually a "tree" and we don't handle accessing the same packet of loads in several different orders well, causing miscompiles. Revert until we can fix this properly. llvm-svn: 297493
* [SelectionDAG] Add support for BUILD_VECTOR to ComputeNumSignBitsSimon Pilgrim2017-03-102-63/+34
| | | | llvm-svn: 297492
* [GlobalISel] Make LegalizerInfo accessible in LegalizerHelperVolkan Keles2017-03-103-15/+11
| | | | | | | | | | | | | | | | | | | | Summary: We don’t actually use LegalizerInfo in Legalizer pass, it’s just passed as an argument. In order to check if an instruction is legal or not, we need to get LegalizerInfo by calling `MI.getParent()->getParent()->getSubtarget().getLegalizerInfo()`. Instead, make LegalizerInfo accessible in LegalizerHelper. Reviewers: qcolombet, aditya_nandakumar, dsanders, ab, t.p.northover, kristof.beyls Reviewed By: qcolombet Subscribers: dberris, llvm-commits, rovka Differential Revision: https://reviews.llvm.org/D30838 llvm-svn: 297491
* CODE_OWNERS: Take code ownership of instruction scheduling.Matthias Braun2017-03-102-6/+12
| | | | llvm-svn: 297490
* CODE_OWNERS: Sort namesMatthias Braun2017-03-101-4/+4
| | | | llvm-svn: 297489
* [Support] Don't return an error if realPath fails.Zachary Turner2017-03-101-3/+2
| | | | | | | | | | | In openFileForRead, we would not previously return an error if real_path resolution failed. After a recent patch, we started propagating this error up. This caused a failure in clang when trying to call openFileForRead("nul"). This patch restores the previous behavior of not propagating this error up. llvm-svn: 297488
* [Builtin][ARM] Fix test case for uldivmodWeiming Zhao2017-03-101-0/+1
| | | | | | | | | | | | | | Summary: the inline asm should set those clobbered registers. Reviewers: rengolin, compnerd, jroelofs Reviewed By: jroelofs Subscribers: aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D30811 llvm-svn: 297487
* [X86][SSE] Added tests showing missed truncations for sitofp conversionSimon Pilgrim2017-03-101-0/+109
| | | | | | SelectionDAG::ComputeNumSignBits is poor at build_vector handling, meaning that we can't see that all the vXi64 sources are in fact sign extended i32 or smaller. llvm-svn: 297486
* [mips][msa] Remove range checks for non-immediate sld.[bhwd] instructionsPetar Jovanovic2017-03-103-14/+5
| | | | | | | | | | | Removes immediate range checks for these instructions, since they have GPR rt as their input operand. Patch by Stefan Maksimovic. Differential Revision: https://reviews.llvm.org/D30693 llvm-svn: 297485
* Fix test failure when Home directory cannot be found.Zachary Turner2017-03-101-9/+8
| | | | llvm-svn: 297484
* Add llvm::sys::fs::real_path.Zachary Turner2017-03-104-16/+207
| | | | | | | | | | | | | | | | | | | | | LLVM already has real_path like functionality, but it is cumbersome to use and involves clean up after (e.g. you have to call openFileForRead, then close the resulting FD). Furthermore, on Windows it doesn't work for directories since opening a directory and opening a file require slightly different flags. So I add a simple function `real_path` which works for all paths on all platforms and has a simple to use interface. In doing so, I add the ability to opt in to resolving tilde expressions (e.g. ~/foo), which are normally handled by the shell. Differential Revision: https://reviews.llvm.org/D30668 llvm-svn: 297483
* [SelectionDAG] Make SelectionDAG aware of the known bits in USUBO and SSUBO ↵Amaury Sechet2017-03-102-8/+17
| | | | | | | | | | | | | | | | | and SUBC. Summary: Depends on D30379 This improves the state of things for the sub class of operation. Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30436 llvm-svn: 297482
* [X86][MMX] Add tests showing missed opportunities to use MMX sitofp conversionsSimon Pilgrim2017-03-101-1/+76
| | | | | | If we are transferring MMX registers to XMM for conversion we could use the MMX equivalents (CVTPI2PD + CVTPI2PS) without affecting rounding/exceptions etc. llvm-svn: 297481
* Fix assertion failure when 'proclist' is used without 'explicit' in KMP_AFFINITYJonathan Peyton2017-03-101-2/+5
| | | | | | | | | | | | This change fixes an assertion failure the in case KMP_AFFINITY is set with 'proclist' specified but without 'explicit' e.g., KMP_AFFINITY=verbose,proclist=[0-31] Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D30404 llvm-svn: 297480
* [SelectionDAG] Make SelectionDAG aware of the known bits in UADDO and SADDO.Amaury Sechet2017-03-102-16/+40
| | | | | | | | | | | | Summary: As per title. This is extracted from D29872 and I threw SADDO in. Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30379 llvm-svn: 297479
* [isl++] Do not use enum prefixTobias Grosser2017-03-101-750/+750
| | | | | | | | | | | | | | | | | | | | | | | | Instead of declaring a function as: inline val plain_get_val_if_fixed(enum dim type, unsigned int pos) const; we use: inline isl::val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const; The first argument caused the following compile time error on windows: "error C3431: 'dim': a scoped enumeration cannot be redeclared as an unscoped enumeration" In some cases it is sufficient to just drop the 'enum' prefix, but for example for isl::set the 'enum class dim' type collides with the function name isl::set::dim and can consequently not be referenced. To avoid such kind of ambiguities in the future we add the isl:: prefix consistently to all types used. Reported-by: Michael Kruse <llvm@meinersbur.de> llvm-svn: 297478
* [X86][MMX] Add tests showing missed opportunities to use MMX fptosi conversionsSimon Pilgrim2017-03-101-0/+255
| | | | | | If we are transferring XMM conversion results to MMX registers we could use the MMX equivalents (CVTPD2PI/CVTTPD2PI + CVTPS2PI/CVTTPS2PI) with affecting rounding/expections etc. llvm-svn: 297476
* [X86][MMX] Updated bad stack spill shift value test to actually show the problemSimon Pilgrim2017-03-101-12/+14
| | | | | | Cleaning up the ir had stopped showing the issue. llvm-svn: 297475
* [X86][MMX] Regenerate mmx bitcast testsSimon Pilgrim2017-03-101-33/+89
| | | | llvm-svn: 297474
* [Simplify] Add -polly-simplify pass.Michael Kruse2017-03-1012-0/+508
| | | | | | | | | | | | | | | | | This new pass removes unnecessary accesses and writes. It currently supports 2 simplifications, but more are planned. It removes write accesses that write a loaded value back to the location it was loaded from. It is a typical artifact from DeLICM. Removing it will get rid of bogus dependencies later in dependency analysis. It also removes statements without side-effects. ScopInfo already removes these, but the removal of unnecessary writes can result in more side-effect free statements. Differential Revision: https://reviews.llvm.org/D30820 llvm-svn: 297473
* Don't pass Dot to every callback.Rafael Espindola2017-03-102-73/+60
| | | | | | It is available from ScriptBase. llvm-svn: 297472
* [X86][MMX] Add test showing bad stack spill of shift valueSimon Pilgrim2017-03-101-0/+41
| | | | | | i32 is spilled to stack but 64-bit mmx is reloaded - leaving garbage in the other half of the register llvm-svn: 297471
* [X86][MMX] Regenerate mmx load folding testsSimon Pilgrim2017-03-101-120/+402
| | | | llvm-svn: 297470
* [OpenCL] Fix type compatibility check and generic AS mangling.Anastasia Stulova2017-03-105-73/+167
| | | | | | | | | | | | | | | | | | | | 1. Reimplemented conditional operator so that it checks compatibility of unqualified pointees of the 2nd and the 3rd operands (C99, OpenCL v2.0 6.5.15). Define QualTypes compatibility for OpenCL as following: - corresponding types are compatible (C99 6.7.3) - CVR-qualifiers are equal (C99 6.7.3) - address spaces are equal (implementation defined) 2. Added generic address space to Itanium mangling. Review: D30037 Patch by Dmitry Borisenkov! llvm-svn: 297468
* [clang-format] Add option to break before inheritance separation operator in ↵Andi-Bogdan Postelnicu2017-03-107-4/+55
| | | | | | | | class declaration. Differential Revision: https://reviews.llvm.org/D30487 llvm-svn: 297467
* [DeadCodeElimination] Translate to C++ bindingsTobias Grosser2017-03-102-34/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pass is a small and self-contained example of a piece of code that was written with the isl C interface. The diff of this change nicely shows how the C++ bindings can improve the readability of the code by avoiding the long C function names and by avoiding any need for memory management. As you will see, no calls to isl_*_copy or isl_*_free are needed anymore. Instead the C++ interface takes care of automatically managing the objects. This may introduce internally additional copies, but due to the isl reference counting, such copies are expected to be cheap. For performance critical operations, we will later exploit move semantics to eliminate unnecessary copies that have shown to be costly. Below we give a set of examples that shows the benefit of the C++ interface vs. the pure C interface. Check properties ---------------- Before: if (isl_aff_is_zero(aff) || isl_aff_is_one(aff)) return true; After: if (Aff.is_zero() || Aff.is_one()) return true; Type conversion --------------- Before: isl_union_pw_multi_aff *UPMA = isl_union_pw_multi_aff_from_union_map(umap); After: isl::union_pw_multi_aff UPMA = UMap; Type construction ----------------- Before: auto *Empty = isl_union_map_empty(space); After: auto Empty = isl::union_map::empty(Space); Operations ---------- Before: set = isl_union_set_intersect(set, set2); After: Set = Set.intersect(Set2); The use of isl::boolean in return types also adds an increases the robustness of Polly, as on conversion to true or false, we verify that no isl_bool_error has been returned and assert in case an error was returned. Before this change we would have just ignored the error and proceeded with (some) exection path. Tags: #polly Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D30619 llvm-svn: 297466
* Print nested name specifiers for typedefs and type aliasesAlex Lorenz2017-03-1021-144/+153
| | | | | | | | | | | | Printing typedefs or type aliases using clang_getTypeSpelling() is missing the namespace they are defined in. This is in contrast to other types that always yield the full typename including namespaces. Patch by Michael Reiher! Differential Revision: https://reviews.llvm.org/D29944 llvm-svn: 297465
* [unittest] Translate isl tests to C++ bindingsTobias Grosser2017-03-102-114/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For this translation we introduce two functions, valFromAPInt and APIntFromVal, to convert between isl::val and APInt. For now these are just proxies, but in the future they will replace the current isl_val* based conversion functions. The isl unit test cases benefit most from the new isl::boolean (from Michael Kruse), which can be explicitly casted to bool and which -- as part of this cast -- emits a check that no error condition has been triggered so far. This allows us to simplify EXPECT_EQ(isl_bool_true, isl_val_is_zero(IslZero)); to EXPECT_TRUE(IslZero.is_zero()); This simplification also becomes very clear in operator==, which changes from auto IsEqual = isl_set_is_equal(LHS.keep(), RHS.keep()); EXPECT_NE(isl_bool_error, IsEqual); return IsEqual; to just return bool(LHS.is_equal(RHS)); Some background for non-isl users. The isl C interface has an isl_bool type, which can be either true, false, or error. Hence, whenever a function returns a value of type isl_bool, an explicit error check should be considered. By using isl::boolean, we can just cast the isl::boolean to 'bool' or simply use the isl::boolean in a context where it will automatically be casted to bool (e.g., in an if-condition). When doing so, the C++ bindings automatically add code that verifies that the return value is not an error code. If it is, the program will warn about this and abort. For cases where errors are expected, isl::boolean provides checks such as boolean::is_true_or_error() or boolean::is_true_no_error() to explicitly control program behavior in case of error conditions. Thanks to the new automatic memory management, we also can avoid many calls to isl_*_free. For code that had previously been managed by IslPtr<>, many calls to give/take/copy are eliminated. Tags: #polly Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D30618 llvm-svn: 297464
* [FlattenAlgo] Translate to C++ bindingsTobias Grosser2017-03-102-130/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate the full algorithm to use the new isl C++ bindings This is a large piece of code that has been written with the Polly IslPtr<> memory management tool, which only performed memory management, but did not provide a method interface. As such the code was littered with calls to give(), copy(), keep(), and take(). The diff of this change should give a good example how the new method interface simplifies the code by removing the need for switching between managed types and C functions all the time and consequently also the need to use the long C function names. These are a couple of examples comparing the old IslPtr memory management interface with the complete method interface. Check properties ---------------- Before: if (isl_aff_is_zero(Aff.get()) || isl_aff_is_one(Aff.get())) return true; After: if (Aff.is_zero() || Aff.is_one()) return true; Type conversion --------------- Before: isl_union_pw_multi_aff *UPMA = give(isl_union_pw_multi_aff_from_union_map(UMap.copy()); After: isl::union_pw_multi_aff UPMA = UMap; Type construction ----------------- Before: auto Empty = give(isl_union_map_empty(Space.copy()); After: auto Empty = isl::union_map::empty(Space); Operations ---------- Before: Set = give(isl_union_set_intersect(Set.copy(), Set2.copy()); After: Set = Set.intersect(Set2); Tags: #polly Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D30617 llvm-svn: 297463
* Add method interface to isl C++ bindingsTobias Grosser2017-03-101-0/+2458
| | | | | | | | | | | | | | | | | | The isl C++ binding method interface introduces a thin C++ layer that allows to call isl methods directly on the memory managed C++ objects. This makes the relevant methods directly available via code-completion interfaces, allows for the use of overloading, conversion constructors, and many other nice C++ features that make using isl a lot easier. The individual features will be highlighted in the subsequent commits. Tags: #polly Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D30616 llvm-svn: 297462
* [analyzer] Extend block in critical section check with C11 and Pthread APIs.Gabor Horvath2017-03-103-20/+150
| | | | | | | | Patch by Zoltan Daniel Torok! Differential Revision: https://reviews.llvm.org/D29567 llvm-svn: 297461
OpenPOWER on IntegriCloud