- Feb 24, 2017
-
-
Rafael Espindola authored
With this we complete the transition out of special output sections, and with the previous patches it should be possible to merge OutputSectionBase and OuputSection. llvm-svn: 296023
-
Michael Kruse authored
Control flow would flow-through after the check whether the operations quota exceeded, with the intention that it would later be caught by Knowledge::isUsable(). However, the Knowledge constructor has its own assertions to check consistency which would fail if its fields have only been initialized partially because some sets have been computed correctly before the operations quota takes effect. Fix by erroring-out early instead of falling-throught into the code that might expect that everything has been computed correctly. For robustness, also bail-out if any of the fields contain nullptr values instead of relying on isl always setting exactly this error code if something went wrong. This should fix the perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable (-polly-process-unprofitable -polly-position=before-vectorizer -polly-enable-delicm) buildbot. llvm-svn: 296022
-
Stanislav Mekhanoshin authored
Clang issues warning about hidden overload. That was intended, so add "using AMDGPUGenRegisterInfo::getRegUnitWeight;" to mute it. llvm-svn: 296021
-
Richard Smith authored
llvm-svn: 296020
-
Adam Nemet authored
Last use was killed in my previous patch. The preferred way is now to construct the remark, pipe things to it and pass it to ORE.emit. llvm-svn: 296019
-
Kyle Butt authored
Rename ComputedTrellisEdges to ComputedEdges to allow for other methods of pre-computing edges. Differential Revision: https://reviews.llvm.org/D30308 llvm-svn: 296018
-
Adam Nemet authored
The need for this removed when I converted everything to use the opt-remark classes directly with the streaming interface. llvm-svn: 296017
-
Adam Nemet authored
The need for this removed when I converted everything to use the opt-remark classes directly with the streaming interface. llvm-svn: 296016
-
Erik Pilkington authored
CodeGens uses of @available into calls to the compiler-rt function __isOSVersionAtLeast. This commit is part of a feature that I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential revision: https://reviews.llvm.org/D27827 llvm-svn: 296015
-
Evgeniy Stepanov authored
The TLS slot did not exist back then. llvm-svn: 296014
-
Ahmed Bougacha authored
Having more fine-grained information on the specific construct that caused us to fallback is valuable for large-scale data collection. We still have the fallback warning, that's also used for FastISel. We still need to remove the fallback warning, and teach FastISel to also emit remarks (it currently has a combination of the warning, stats, and debug prints: the remarks could unify all three). The abort-on-fallback path could also be better handled using remarks: one could imagine a "-Rpass-error", analoguous to "-Werror", which would promote missed/failed remarks to errors. It's not clear whether that would be useful for other remarks though, so we're not there yet. llvm-svn: 296013
-
Ahmed Bougacha authored
This will be used with GISel opt remarks. llvm-svn: 296012
-
Ahmed Bougacha authored
This matches the behavior for skip-operands. While there, document it. This is a follow-up to r296007. llvm-svn: 296011
-
Ahmed Bougacha authored
llvm-svn: 296010
-
Stanislav Mekhanoshin authored
If a subreg is used in an instruction it counts as a whole superreg for the purpose of register pressure calculation. This patch corrects improper register pressure calculation by examining operand's lane mask. Differential Revision: https://reviews.llvm.org/D29835 llvm-svn: 296009
-
Ahmed Bougacha authored
llvm-svn: 296008
-
Ahmed Bougacha authored
llvm-svn: 296007
-
Ahmed Bougacha authored
This lets us use more natural early-returns when selection fails. llvm-svn: 296006
-
Adrian Prantl authored
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
-
Sanjay Patel authored
llvm-svn: 296004
-
Chad Rosier authored
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
-
Dehao Chen authored
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
-
Michael Kruse authored
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
-
Krzysztof Parzyszek authored
llvm-svn: 295997
-
Adam Nemet authored
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
-
Filipe Cabecinhas authored
llvm-svn: 295995
-
Filipe Cabecinhas authored
llvm-svn: 295994
-
Rafael Espindola authored
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
-
Sanjay Patel authored
llvm-svn: 295992
-
Sanjay Patel authored
llvm-svn: 295991
-
Jan Vesely authored
Hit on ASICs that support 16bit instructions. Differential Revision: https://reviews.llvm.org/D30281 llvm-svn: 295990
-
Simon Pilgrim authored
llvm-svn: 295989
-
Manuel Klimek authored
`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
-
- Feb 23, 2017
-
-
Michael Kruse authored
llvm-svn: 295987
-
Michael Kruse authored
Non-const references are the more C++-ish way to modify a variable passed by the caller. llvm-svn: 295986
-
Michael Kruse authored
llvm-svn: 295985
-
Michael Kruse authored
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
-
Michael Kruse authored
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
-
Serge Pavlov authored
llvm-svn: 295982
-
Krzysztof Parzyszek authored
llvm-svn: 295981
-