summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* allow for specification of compiler/lldb executables basenameTim Hammerquist2017-03-171-0/+4
| | | | llvm-svn: 298123
* [coverity] Fix uninit variable.Vassil Vassilev2017-03-171-1/+1
| | | | | | Patch by John Harvey! llvm-svn: 298122
* AMDGPU: Fix handling of constant phi input loop conditionsMatt Arsenault2017-03-172-5/+266
| | | | | | | | If the loop condition was an i1 phi with a constantexpr input, this would add a loop intrinsic fed by a phi dependent on a call to if.break in the same block. Insert the call in the loop header. llvm-svn: 298121
* [PGO] Change the internal options description. nfc.Rong Xu2017-03-171-3/+5
| | | | llvm-svn: 298120
* AMDGPU: Cleanup control flow intrinsicsMatt Arsenault2017-03-1711-106/+116
| | | | | | | | | | | | | | | | Move backend internal intrinsics along with the rest of the normal intrinsics, and use the Intrinsic::getDeclaration API instead of manually constructing the type list. It's surprising this was working before. fdiv.fast had the wrong number of parameters. The control flow intrinsic declaration attributes were not being applied, and their types were inconsistent. The actual IR use types did not match the declaration, and were closer to the types used for the patterns. The brcond lowering was changing the types, so introduce new nodes for those. llvm-svn: 298119
* [x86] clean up setcc with negated operand transform and add missing test; NFCISanjay Patel2017-03-172-23/+52
| | | | llvm-svn: 298118
* [ubsan] Add e2e test for -fsanitize=nullabilityVedant Kumar2017-03-171-0/+64
| | | | llvm-svn: 298117
* [X86] Emit fewer instructions to allocate >16GB stack framesReid Kleckner2017-03-172-37/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use this code pattern when RAX is live, instead of emitting up to 2 billion adjustments: pushq %rax movabsq +-$Offset+-8, %rax addq %rsp, %rax xchg %rax, (%rsp) movq (%rsp), %rsp Try to clean this code up a bit while I'm here. In particular, hoist the logic that handles the entire adjustment with `movabsq $imm, %rax` out of the loop. This negates the offset in the prologue and uses ADD because X86 only has a two operand subtract which always subtracts from the destination register, which can no longer be RSP. Fixes PR31962 Reviewers: majnemer, sdardis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30052 llvm-svn: 298116
* [PGO] Add omitted test cases.Rong Xu2017-03-172-0/+158
| | | | llvm-svn: 298115
* [CodeGenPrep]Restructure promoting Ext to form ExtLoadJun Bum Lim2017-03-173-108/+137
| | | | | | | | | | | | | | | | Summary: Instead of just looking for a load which is mergable with Ext to form ExtLoad, trying to promote Exts as long as the cost is acceptable. This change is not a NFC as it continue promoting Exts even after finding a load during promotions; the change in arm64-codegen-prepare-extload.ll described in 2.b might show the case. This change was motivated from D26524. Based on this change, I will move the transformation performed in aarch64-type-promotion into CGP. Reviewers: jmolloy, qcolombet, mcrosier, javed.absar Reviewed By: qcolombet Subscribers: rengolin, llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D27853 llvm-svn: 298114
* Resubmit r295469 [PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-writeRong Xu2017-03-173-0/+40
| | | | | | | | And also r295364 [PGO] remove unintended debug trace. NFC I removed the test case: it's hard to write synchronized test b/w processes in this framework. I will revisit the test-case later. llvm-svn: 298113
* executables should be validated before spawning subprocessesTim Hammerquist2017-03-171-2/+14
| | | | | | | | | | | | | | dotest.py script doesn't validate executables passed on the command line before spawning dozens of subprocesses, all of which fail silently, leaving an empty results file. We should validate the lldb and compiler executables on configuration, aborting when given invalid paths, to prevent numerous, cryptic, and spurious failures. <rdar://problem/31117272> llvm-svn: 298111
* [PGO] Value profile for size of memory intrinsic callsRong Xu2017-03-173-5/+108
| | | | | | | | This patch annotates the valuesites profile to memory intrinsics. Differential Revision: http://reviews.llvm.org/D31002 llvm-svn: 298110
* [Bitcode] Add compatibility test for the 4.0 releaseVedant Kumar2017-03-172-0/+1689
| | | | | | | Fork off compatibility.ll for the 4.0 release. The *.bc file in this commit was produced using a Release build of the release_40 branch. llvm-svn: 298109
* [SelectionDAG] Add SelectionDAG.computeKnownBits test support for ISD::ABSSimon Pilgrim2017-03-172-10/+22
| | | | llvm-svn: 298108
* [x86] avoid adc/sbb assert when both sides of add are zexted (PR32316)Sanjay Patel2017-03-172-2/+33
| | | | | | | | | | | | | | As noted in the comment, we might want to account for this case, but I didn't look at what that would mean for the asm. I'm also not sure why this only reproduces with avx512, but I'm putting a conservative fix in for now to avoid the crash. Also, if both sides of an add are zexted, shouldn't we shrink that add? https://bugs.llvm.org/show_bug.cgi?id=32316 llvm-svn: 298107
* Fix wasm build after arg_begin iterator type changeReid Kleckner2017-03-171-1/+1
| | | | llvm-svn: 298106
* Store Arguments in a flat array instead of an iplistReid Kleckner2017-03-174-43/+72
| | | | | | | | | | | | | | | | | | | | This saves two pointers from Argument and eliminates some extra allocations. Arguments cannot be inserted or removed from a Function because that would require changing its Type, which LLVM does not allow. Instead, passes that change prototypes, like DeadArgElim, create a new Function and copy over argument names and attributes. The primary benefit of iplist is O(1) random insertion and removal. We just don't need that for arguments, so don't use it. Reviewed By: chandlerc Subscribers: dlj, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D31058 llvm-svn: 298105
* Only unswitch loops with uniform conditionsStanislav Mekhanoshin2017-03-177-7/+114
| | | | | | | | | | | | | | | | | | Loop unswitching can be extremely harmful for a SIMT target. In case if hoisted condition is not uniform a SIMT machine will execute both clones of a loop sequentially. Therefor LoopUnswitch checks if the condition is non-divergent. Since DivergenceAnalysis adds an expensive PostDominatorTree analysis not needed for non-SIMT targets a new option is added to avoid unneded analysis initialization. The method getAnalysisUsage is called when TargetTransformInfo is not yet available and we cannot use it here. For that reason a new field DivergentTarget is added to PassManagerBuilder to control the behavior and set this field from a target. Differential Revision: https://reviews.llvm.org/D30796 llvm-svn: 298104
* [X86] Add SelectionDAG.computeKnownBits test showing inability to handle ↵Simon Pilgrim2017-03-171-0/+61
| | | | | | | | ISD::ABS We have to be careful as abs(INT_MIN) == INT_MIN. llvm-svn: 298103
* [ELF] - Move template instantiations to the end of file. NFC.George Rimar2017-03-171-9/+5
| | | | | | | To be consistent with other code, addresses post commit review comments. llvm-svn: 298102
* [Clang-tidy] Fix for misc-noexcept-move-constructor false triggers on ↵Alexander Kornienko2017-03-172-0/+14
| | | | | | | | | | | | | | | | | | | | | | | defaulted declarations Summary: There is no need for triggering warning when noexcept specifier in move constructor or move-assignment operator is neither evaluated nor uninstantiated. This fixes bug reported here: bugs.llvm.org/show_bug.cgi?id=24712 Reviewers: alexfh Reviewed By: alexfh Subscribers: JonasToth, JDevlieghere, cfe-commits Tags: #clang-tools-extra Patch by Marek Jenda! Differential Revision: https://reviews.llvm.org/D31049 llvm-svn: 298101
* CMake requires normalized paths when appending.Zachary Turner2017-03-171-0/+1
| | | | | | | Patch by Hugh Bellamy Differential Revision: https://reviews.llvm.org/D30927 llvm-svn: 298100
* Fix some signed/unsigned comparison warnings.Zachary Turner2017-03-171-4/+4
| | | | | | | Patch by Hugh Bellamy Differential Revision: https://reviews.llvm.org/D30926 llvm-svn: 298099
* [clang-cl] Fix cross-compilation with MSVC 2017.Zachary Turner2017-03-173-8/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-cl works best when the user runs vcvarsall to set up an environment before running, but even this is not enough on VC 2017 when cross compiling (e.g. using an x64 toolchain to target x86, or vice versa). The reason is that although clang-cl itself will have a valid environment, it will shell out to other tools (such as link.exe) which may not. Generally we solve this through adding the appropriate linker flags, but this is not enough in VC 2017. The cross-linker and the regular linker both link against some common DLLs, but these DLLs live in the binary directory of the native linker. When setting up a cross-compilation environment through vcvarsall, it will add *both* directories to %PATH%, so that when cl shells out to any of the associated tools, those tools will be able to find all of the dependencies that it links against. If you don't do this, link.exe will fail to run because the loader won't be able to find all of the required DLLs that it links against. To solve this we teach the driver how to spawn a process with an explicitly specified environment. Then we modify the PATH before shelling out to subtools and run with the modified PATH. Patch by Hamza Sood Differential Revision: https://reviews.llvm.org/D30991 llvm-svn: 298098
* Test commit.David Green2017-03-171-1/+1
| | | | llvm-svn: 298097
* Handle & and | of non abs values.Rafael Espindola2017-03-173-33/+37
| | | | | | | Handling & in particular is probably important because of its use in aligning addresses. llvm-svn: 298096
* [ScheduleOptimiser] fix typos in top comment [NFC]Siddharth Bhat2017-03-171-2/+2
| | | | | | | coice -> choice Transations -> Transactions llvm-svn: 298095
* Refuse to add two non absolute symbols.Rafael Espindola2017-03-172-0/+8
| | | | | | | Since there is no way to produce the correct answer at runtime, it is probably better to just err. llvm-svn: 298094
* [ELF][MIPS] Always collect .reginfo, .MIPS.options, and .MIPS.abiflags input ↵Simon Atanasyan2017-03-174-6/+6
| | | | | | | | | | | sections Do not take in account the `Live` flag while collecting .reginfo, .MIPS.options, and .MIPS.abiflags input sections to produce corresponding output sections. These sections have information purpose and should be always produced per ABI requirements. llvm-svn: 298093
* [AArch64] Use alias analysis in the load/store optimization pass.Chad Rosier2017-03-172-7/+44
| | | | | | | | This allows the optimization to rearrange loads and stores more aggressively. Differential Revision: http://reviews.llvm.org/D30903 llvm-svn: 298092
* [ELF] - Detemplate SymbolBody::getGotOffset(). NFC.George Rimar2017-03-174-15/+9
| | | | llvm-svn: 298091
* [change-namespace] do not rename specialized template parameters.Eric Liu2017-03-172-0/+57
| | | | | | | | | | Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31076 llvm-svn: 298090
* Revert "Remove references to AssumptionCache. NFC."Michael Kruse2017-03-174-79/+82
| | | | | | | | | | The AssumptionCache removal of r289756 has been reverted in r290086/r290087. A different solution has been implemented in r291671 which keeps the AssumptionCache. We can therefore use it again in Polly. This reverts r289791. llvm-svn: 298089
* Support non abs values in the rhs of +.Rafael Espindola2017-03-172-0/+37
| | | | llvm-svn: 298088
* [ELF] - Detemplate findSection() global static method. NFC.George Rimar2017-03-171-2/+1
| | | | llvm-svn: 298087
* [ELF] - Recommit r298078 "[ELF] - Simplify logic of creating "COMMON" section."George Rimar2017-03-173-27/+16
| | | | | | | | | | | | | | With fix of next warning: Writer.cpp:361:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Original commit message: Patch reuses BssSection section to simplify creation of COMMON section. Differential revision: https://reviews.llvm.org/D30690 llvm-svn: 298086
* [DependenceInfo] Remove idempotent union: must-writes with may-writes [NFC]Siddharth Bhat2017-03-171-2/+1
| | | | | | | Since may-writes are always a superset of the must-writes, there is no point in taking a union of one with the other. llvm-svn: 298085
* [ELF] - Revert r298078 and 298082George Rimar2017-03-173-15/+27
| | | | | | It segfaults. llvm-svn: 298084
* Add a test that now passes.Rafael Espindola2017-03-171-0/+18
| | | | llvm-svn: 298083
* [ELF] - Fix warning.George Rimar2017-03-171-2/+2
| | | | | | Writer.cpp:361:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses] llvm-svn: 298082
* [ScopInfo/PruneUnprofitable] Move default profitability check.Michael Kruse2017-03-172-2/+2
| | | | | | | | | | | | | | | | | | | | In the previous default ScopInfo applied the profitability heuristic for scalar accesses (-polly-unprofitable-scalar-accs=true) and the -polly-prune-unprofitable was disabled by default (-polly-enable-prune-unprofitable=false) as that pruning was already done. This changes switches the defaults to -polly-unprofitable-scalar-accs=true -polly-enable-prune-unprofitable=false such that the scalar access heuristic check is done by the pass. This allows passes between ScopInfo and PruneUnprofitable to optimize away scalar accesses. Without enabling such intermediate passes, there is no change in behaviour of profitability checks in a PassManagerBuilder built pass chain, but it allows us to cover this configuration with the buildbots. Suggested-by: Tobias Grosser <tobias@grosser.es> llvm-svn: 298081
* [PruneUnprofitable] Add -polly-prune-unprofitable pass.Michael Kruse2017-03-178-6/+180
| | | | | | | | | | | | | | | | | | | | | | ScopInfo's normal profitability heuristic considers SCoPs where all statements have scalar writes as not profitably optimizable and invalidate the SCoP in that case. However, -polly-delicm and -polly-simplify may be able to remove some of the scalar writes such that the flag -polly-unprofitable-scalar-accs=false allows disabling that part of the heuristic. In cases where DeLICM (or other passes after ScopInfo) are not successful in removing scalar writes, the SCoP is still not profitably optimizable. The schedule optimizer would again try computing another schedule, resulting in slower compilation. The -polly-prune-unprofitable pass applies the profitability heuristic again before the schedule optimizer Polly can still bail out even with -polly-unprofitable-scalar-accs=false. Differential Revision: https://reviews.llvm.org/D31033 llvm-svn: 298080
* Change our linker script expr representation.Rafael Espindola2017-03-173-109/+153
| | | | | | | | | | | | | | This fixes pr32031 by representing the expressions results as a SectionBase and offset. This allows us to use an input section directly instead of getting lost trying to compute an offset in an outputsection when not all the information is available yet. This also creates a struct to represent the *value* of and expression, allowing the expression itself to be a simple typedef. I think this is easier to read and will make it easier to extend the expression computation to handle more complicated cases. llvm-svn: 298079
* [ELF] - Simplify logic of creating "COMMON" section.George Rimar2017-03-173-27/+15
| | | | | | | | | Patch reuses BssSection section to simplify creation of COMMON section. Differential revision: https://reviews.llvm.org/D30690 llvm-svn: 298078
* [ScopInfo] Add option to not add parameter bounds to context [NFC]Tobias Grosser2017-03-171-0/+9
| | | | | | | | For experiments it is sometimes helpful to provide parameter bound information to polly and to not use these parameter bounds for simplification. Add a new option "-polly-ignore-parameter-bounds" which does precisely this. llvm-svn: 298077
* Remove unnecessary (). NFC.Rafael Espindola2017-03-171-2/+2
| | | | llvm-svn: 298076
* [DependenceInfo] Replace use of deprecated isl_dim_n_out [NFC]Siddharth Bhat2017-03-171-1/+2
| | | | | | Change isl_dim_n_out to isl_map_dim(*, isl_dim_out) llvm-svn: 298075
* [DependenceInfo] Track may-writes and build flow information inSiddharth Bhat2017-03-172-0/+70
| | | | | | | | | | | | Dependences::calculateDependences. This ensures that we handle may-writes correctly when building dependence information. Also add a test case checking correctness of may-write information. Not handling it before was an oversight. Differential Revision: https://reviews.llvm.org/D31075 llvm-svn: 298074
* [ScopInfo] Do not take inbounds assumptions [NFC]Tobias Grosser2017-03-171-0/+7
| | | | | | | For experiments it is sometimes helpful to not take any inbounds assumptions. Add a new option "-polly-ignore-inbounds" which does precisely this. llvm-svn: 298073
OpenPOWER on IntegriCloud