summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ORE] Use const CodeRegions in the remark diagnostics. NFC.Ahmed Bougacha2017-02-232-14/+17
| | | | llvm-svn: 296008
* [CodeGen] Add a way to SkipDebugLoc in MachineInstr::print(). NFC.Ahmed Bougacha2017-02-232-5/+7
| | | | llvm-svn: 296007
* [GlobalISel] Simplify Select type cleanup using a ScopeExit. NFC.Ahmed Bougacha2017-02-231-13/+18
| | | | | | This lets us use more natural early-returns when selection fails. llvm-svn: 296006
* Revert "Teach the IR verifier to reject conflicting debug info for function ↵Adrian Prantl2017-02-232-64/+0
| | | | | | | | | | | arguments." This reverts commit r295749 while investigating PR32042. It looks like this check uncovered a problem in the frontend that needs to be fixed before the check can be enabled again. llvm-svn: 296005
* [DAG] add convenience function to get -1 constant; NFCISanjay Patel2017-02-232-32/+22
| | | | llvm-svn: 296004
* [Reassociate] Add negated value of negative constant to the Duplicates list.Chad Rosier2017-02-232-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In OptimizeAdd, we scan the operand list to see if there are any common factors between operands that can be factored out to reduce the number of multiplies (e.g., 'A*A+A*B*C+D' -> 'A*(A+B*C)+D'). For each operand of the operand list, we only consider unique factors (which is tracked by the Duplicate set). Now if we find a factor that is a negative constant, we add the negated value as a factor as well, because we can percolate the negate out. However, we mistakenly don't add this negated constant to the Duplicates set. Consider the expression A*2*-2 + B. Obviously, nothing to factor. For the added value A*2*-2 we over count 2 as a factor without this change, which causes the assert reported in PR30256. The problem is that this code is assuming that all the multiply operands of the add are already reassociated. This change avoids the issue by making OptimizeAdd tolerate multiplies which haven't been completely optimized; this sort of works, but we're doing wasted work: we'll end up revisiting the add later anyway. Another possible approach would be to enforce RPO iteration order more strongly. If we have RedoInsts, we process them immediately in RPO order, rather than waiting until we've finished processing the whole function. Intuitively, it seems like the natural approach: reassociation works on expression trees, so the optimization only works in one direction. That said, I'm not sure how practical that is given the current Reassociate; the "optimal" form for an expression depends on its use list (see all the uses of "user_back()"), so Reassociate is really an iterative optimization of sorts, so any changes here would probably get messy. PR30256 Differential Revision: https://reviews.llvm.org/D30228 llvm-svn: 296003
* Use base discriminator in sample pgo profile matching.Dehao Chen2017-02-237-27/+28
| | | | | | | | | | | | | | Summary: The discriminator has been encoded, and only the base discriminator should be used during profile matching. Reviewers: dblaikie, davidxl Reviewed By: dblaikie, davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30218 llvm-svn: 295999
* [Support] Remove NonowningIslPtr. NFC.Michael Kruse2017-02-237-94/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | NonowningIslPtr<isl_X> was used as types of function parameters when the function does not consume the isl object, i.e. an __isl_keep parameter. The alternatives are: 1. IslPtr<isl_X> This has additional calls to isl_X_copy and isl_X_free to increase/decrease the reference counter even though not needed. The caller already owns a reference to the isl object. 2. const IslPtr<isl_X>& This does not change the reference counter, but requires an additional load to get the pointer to the isl object (instead of just passing the pointer itself). Moreover, the compiler cannot rely on the constness of the pointer and has to reload the pointer every time it writes to memory (unless alias analysis such as TBAA says it is not possible). The isl C++ bindings currently in development do not have an equivalent to NonowningIslPtr and adding one would make the binding more complicated and its advantage in performance is small. In order to simplify the transition to these C++ bindings, remove NonowningIslPtr. Change every former use of it to alternative 2 mentioned aboce (const IslPtr<isl_X>&). llvm-svn: 295998
* [Hexagon] Avoid IMPLICIT_DEFs as new-value producersKrzysztof Parzyszek2017-02-232-0/+81
| | | | llvm-svn: 295997
* [LazyMachineBFI] Reimplement with getAnalysisIfAvailableAdam Nemet2017-02-233-49/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Since LoopInfo is not available in machine passes as universally as in IR passes, using the same approach for OptimizationRemarkEmitter as we did for IR will run LoopInfo and DominatorTree unnecessarily. (LoopInfo is not used lazily by ORE.) To fix this, I am modifying the approach I took in D29836. LazyMachineBFI now uses its client passes including MachineBFI itself that are available or otherwise compute them on the fly. So for example GreedyRegAlloc, since it's already using MBFI, will reuse that instance. On the other hand, AsmPrinter in Justin's patch will generate DT, LI and finally BFI on the fly. (I am of course wondering now if the simplicity of this approach is even preferable in IR. I will do some experiments.) Testing is provided by an updated version of D29837 which requires Justin's patch to bring ORE to the AsmPrinter. Differential Revision: https://reviews.llvm.org/D30128 llvm-svn: 295996
* [test] Use @LINE macroFilipe Cabecinhas2017-02-231-2/+2
| | | | llvm-svn: 295995
* [AddressSanitizer] Add PS4 offsetFilipe Cabecinhas2017-02-232-3/+21
| | | | llvm-svn: 295994
* Make InputSection a class. NFC.Rafael Espindola2017-02-2323-186/+196
| | | | | | | | | With the current design an InputSection is basically anything that goes directly in a OutputSection. That includes plain input section but also synthetic sections, so this should probably not be a template. llvm-svn: 295993
* [InstCombine] use loop instead of recursion to peek through FPExt; NFCISanjay Patel2017-02-231-6/+4
| | | | llvm-svn: 295992
* [InstCombine] use 'match' to reduce code; NFCISanjay Patel2017-02-231-11/+9
| | | | llvm-svn: 295991
* AMDGPU/SI: Fix trunc i16 patternJan Vesely2017-02-233-37/+65
| | | | | | | | Hit on ASICs that support 16bit instructions. Differential Revision: https://reviews.llvm.org/D30281 llvm-svn: 295990
* Strip trailing whitespace.Simon Pilgrim2017-02-231-8/+8
| | | | llvm-svn: 295989
* Make clang-include-fixer--insert-line work when the difference is on an ↵Manuel Klimek2017-02-232-7/+18
| | | | | | | | | | | | | | | | | | empty line `clang-include-fixer--insert-line` has an off-by-one error because it uses `(goto-char (point-min)) (forward-char chars)`, which is (goto-char (1+ chars))`. Because of this, when the first difference was on an empty line (i.e. an include was appended to the block of includes), the pointer in the `to` buffer would be on the next line. Also wrapped calls inside another process sentinel inside `with-local-quit`. Patch by Torsten Marek. Differential Revision: https://reviews.llvm.org/D30292 llvm-svn: 295988
* [DependenceInfo] Remove unused variable. NFC.Michael Kruse2017-02-231-1/+0
| | | | llvm-svn: 295987
* [DependenceInfo] Use references instead of double pointers. NFC.Michael Kruse2017-02-231-18/+18
| | | | | | | Non-const references are the more C++-ish way to modify a variable passed by the caller. llvm-svn: 295986
* [DependenceInfo] Rename StmtScheduleDomain -> TaggedStmtDomain. NFC.Michael Kruse2017-02-231-15/+14
| | | | llvm-svn: 295985
* [DependenceInfo] Simplify use of StmtSchedule's domain [NFC]Michael Kruse2017-02-231-21/+21
| | | | | | | | | | | | | | | | | Once a StmtSchedule is created, only its domain is used anywhere within DependenceInfo::calculateDependences. So, we choose to return the wrapped domain of the union_map rather than the entire union_map. However, we still build the union_map first within collectInfo(). It is cleaner to first build the entire union_map and then pull the domain out in one shot, rather than repeatedly extracting the domain in bits and pieces from accdom. Contributed-by: Siddharth Bhat <siddu.druid@gmail.com> Differential Revision: https://reviews.llvm.org/D30208 llvm-svn: 295984
* Remove all references to PostDominators. NFC.Michael Kruse2017-02-234-6/+0
| | | | | | | | | Marking a pass as preserved is necessary if any Polly pass uses it, even if it is not preserved within the generated code. Not marking it would cause the the Polly pass chain to be interrupted. It is not used by any Polly pass anymore, hence we can remove all references to it. llvm-svn: 295983
* Reverted r295975Serge Pavlov2017-02-231-27/+0
| | | | llvm-svn: 295982
* [Hexagon] Patterns for CTPOP, BSWAP and BITREVERSEKrzysztof Parzyszek2017-02-235-59/+151
| | | | llvm-svn: 295981
* [DeLICM] Add missing Doxygen comment. NFC.Michael Kruse2017-02-231-0/+1
| | | | llvm-svn: 295978
* [DeLICM] Capitalize parameter name. NFC.Michael Kruse2017-02-231-2/+2
| | | | llvm-svn: 295977
* Add a test showing that nocopyreloc is only about copy relocs.Rafael Espindola2017-02-231-0/+3
| | | | | | | | | For functions the linker uses a related hack: creating a plt in the main executable that preempts the function. Like bfd and gold, we don't disable it with nocopyreloc. llvm-svn: 295976
* Added regression testsSerge Pavlov2017-02-231-0/+27
| | | | llvm-svn: 295975
* [docs] Add information about how to checkout polly to getting started pageTobias Grosser2017-02-231-0/+6
| | | | llvm-svn: 295974
* [ARM] GlobalISel: Lower call returnsDiana Picus2017-02-232-31/+92
| | | | | | | | Introduce a common ValueHandler for call returns and formal arguments, and inherit two different versions for handling the differences (at the moment the only difference is the way physical registers are marked as used). llvm-svn: 295973
* [SLP] Fix for PR32036: Vectorized horizontal reduction returning wrongAlexey Bataev2017-02-232-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result Summary: If the same value is used several times as an extra value, SLP vectorizer takes it into account only once instead of actual number of using. For example: ``` int val = 1; for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { val = val + input[y * 8 + x] + 3; } } ``` We have 2 extra rguments: `1` - initial value of horizontal reduction and `3`, which is added 8*8 times to the reduction. Before the patch we added `1` to the reduction value and added once `3`, though it must be added 64 times. Reviewers: mkuper, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30262 llvm-svn: 295972
* [ARM] GlobalISel: Lower call parameters in regsDiana Picus2017-02-232-15/+116
| | | | | | | | Add support for lowering calls with parameters than can fit into regs. Use the same ValueHandler that we used for function returns, but rename it to match its new, extended purpose. llvm-svn: 295971
* [X86][AVX] Disable VCVTSS2SD & VCVTSD2SS memory folding and fix the register ↵Ayman Musa2017-02-234-29/+9
| | | | | | | | class of their first input when creating node in fast-isel. (Quick fix to buildbot failure after rL295940 commit). llvm-svn: 295970
* [xray] Unbreak unittest after r295967.Benjamin Kramer2017-02-231-2/+2
| | | | llvm-svn: 295969
* Switch "windows" log channel to the new registration mechanismPavel Labath2017-02-232-159/+17
| | | | llvm-svn: 295968
* [Xray] fix building the runtime with GCC.Benjamin Kramer2017-02-232-18/+21
| | | | | | | GCC has a warning about enum bitfields that cannot be disabled. Do the ugly thing and go through uint8_t for all the values. llvm-svn: 295967
* Update isl to isl-0.18-282-g12465a5Tobias Grosser2017-02-2321-57/+316
| | | | | | | Besides a variety of smaller cleanups, this update also contains a correctness fix to isl coalesce which resolves a crash in Polly. llvm-svn: 295966
* [mips][ias] Further relax operands of certain assembly instructionsSimon Dardis2017-02-234-81/+161
| | | | | | | | | | | | | | | | This patch adjusts the most relaxed predicate of immediate operands to accept immediate forms such as ~(0xf0000000|0x000f00000). Previously these forms would be accepted by GAS and rejected by IAS. This partially resolves PR/30383. Thanks to Sean Bruno for reporting the issue! Reviewers: slthakur, seanbruno Differential Revision: https://reviews.llvm.org/D29218 llvm-svn: 295965
* Fix assertion failure in ARMConstantIslandPass.Kristof Beyls2017-02-232-9/+45
| | | | | | | | | | The ARMConstantIslandPass didn't have support for handling accesses to constant island objects through ARM::t2LDRBpci instructions. This adds support for that. This fixes PR31997. llvm-svn: 295964
* Fix signed/unsigned comparison warning on MSVCSimon Pilgrim2017-02-231-1/+1
| | | | llvm-svn: 295962
* Make optimizations based on pattern matching be enabled by defaultRoman Gareev2017-02-235-9/+18
| | | | | | | | | | | | | Currently, pattern based optimizations of Polly can identify matrix multiplication and optimize it according to BLIS matmul optimization pattern (see ScheduleTreeOptimizer for details). This patch makes optimizations based on pattern matching be enabled by default. Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D30293 llvm-svn: 295958
* Revert "[SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong"Alexey Bataev2017-02-232-27/+18
| | | | | | This reverts commit 7c5141e577d9efd1c8e3087566a38ce6b3a41a84. llvm-svn: 295957
* [SLP] Fix for PR32036: Vectorized horizontal reduction returning wrongAlexey Bataev2017-02-232-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result Summary: If the same value is used several times as an extra value, SLP vectorizer takes it into account only once instead of actual number of using. For example: ``` int val = 1; for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { val = val + input[y * 8 + x] + 3; } } ``` We have 2 extra rguments: `1` - initial value of horizontal reduction and `3`, which is added 8*8 times to the reduction. Before the patch we added `1` to the reduction value and added once `3`, though it must be added 64 times. Reviewers: mkuper, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30262 llvm-svn: 295956
* Switch "posix" to the new log channel registration mechanismPavel Labath2017-02-235-220/+30
| | | | | | | | | | | | | | | | | | Summary: This also removes magic rename code, which caused the channel to be called "linux" when built on a linux machine, and "freebsd" when built on a freebsd one, which seems unnecessary - registering a new channel is sufficiently simple now that if we wish to log something extremely os-specific, we can just create a new channel. None of the current categories seem very specific to one OS or another. Reviewers: emaste, krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30250 llvm-svn: 295954
* [DeLICM] Regression test for skipping map targets.Michael Kruse2017-02-234-0/+197
| | | | | | | Add optimization-remarks-missed for when mapping targets have been skipped and add regression tests for them. llvm-svn: 295953
* Finish the reformatting of the lldb-server test executablesPavel Labath2017-02-233-366/+316
| | | | | | This also reformats the executables in subfolders of lldb-server tests. llvm-svn: 295952
* Revert "[SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong"Alexey Bataev2017-02-232-25/+17
| | | | | | This reverts commit d83c81ee6a8dea662808ac22b396d1bb0595c89d. llvm-svn: 295951
* Reformat inferior's main.cpp in lldb-server testPavel Labath2017-02-232-333/+302
| | | | | | | | | | | | | | | | | Summary: main.cpp is complete mess of tabs and spaces. This change brings it to compliance with LLVM coding style. Reviewers: jmajors, labath Reviewed By: jmajors, labath Subscribers: krytarowski, jingham, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D30234 Author: Eugene Zemtsov <ezemtsov@google.com> llvm-svn: 295950
* [SLP] Fix for PR32036: Vectorized horizontal reduction returning wrongAlexey Bataev2017-02-232-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result Summary: If the same value is used several times as an extra value, SLP vectorizer takes it into account only once instead of actual number of using. For example: ``` int val = 1; for (int y = 0; y < 8; y++) { for (int x = 0; x < 8; x++) { val = val + input[y * 8 + x] + 3; } } ``` We have 2 extra rguments: `1` - initial value of horizontal reduction and `3`, which is added 8*8 times to the reduction. Before the patch we added `1` to the reduction value and added once `3`, though it must be added 64 times. Reviewers: mkuper, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30262 llvm-svn: 295949
OpenPOWER on IntegriCloud