summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* Fixed few warnings; trimmed empty lines.Galina Kistanova2012-07-131-123/+151
| | | | llvm-svn: 160159
* Use the DebugInfo wrappers instead of mucking about with the MDNode directly.Bill Wendling2012-07-071-22/+8
| | | | llvm-svn: 159881
* Print the name last.Bill Wendling2012-07-061-5/+4
| | | | llvm-svn: 159879
* Check if it's a scope last, because several things are scopes.Bill Wendling2012-07-061-2/+2
| | | | llvm-svn: 159873
* Add a print method to the ObjC property object.Bill Wendling2012-07-061-0/+11
| | | | llvm-svn: 159848
* Remove trailing comma in array initialization list.Bill Wendling2012-07-061-8/+8
| | | | llvm-svn: 159843
* Remove unnecessary 'llvm::'.Bill Wendling2012-07-061-19/+19
| | | | llvm-svn: 159842
* Remove unnecessary 'llvm::'.Bill Wendling2012-07-061-4/+4
| | | | llvm-svn: 159841
* Untabify and move a function near similar functions dealing with structEric Christopher2012-07-061-29/+30
| | | | | | types. llvm-svn: 159801
* PHINode::hasConstantValue(): return undef if the PHI is fully recursive.Nuno Lopes2012-07-031-0/+2
| | | | | | Thanks Duncan for the idea llvm-svn: 159687
* Use the DebugInfo's 'print()' method to emit the comments.Bill Wendling2012-07-031-3/+5
| | | | | | | These give quite a bit more information about the DebugInfo and makes it more readable. llvm-svn: 159680
* improve PHINode::hasConstantValue() to detect recursive cases like %phi = ↵Nuno Lopes2012-07-031-2/+6
| | | | | | phi(%phi,42) as constant llvm-svn: 159666
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-292-5/+5
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* Update the CMake files.Bill Wendling2012-06-291-0/+1
| | | | llvm-svn: 159417
* The DIBuilder class is just a wrapper around debug info creationBill Wendling2012-06-291-0/+1018
| | | | | | | (a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore instead. llvm-svn: 159414
* make the verifier accept @llvm.donothing as the only intrinsic that can be ↵Nuno Lopes2012-06-281-2/+4
| | | | | | | | invoked While at it, merge 2 tests and FileCheckize them llvm-svn: 159388
* Devirtualize DIScope and subclasses.Benjamin Kramer2012-06-281-26/+0
| | | | | | Nothing in here makes use of the virtuality. llvm-svn: 159349
* Refactor operation equivalence checking in BBVectorize by extending ↵Hal Finkel2012-06-281-5/+16
| | | | | | | | | | | Instruction::isSameOperationAs. Maintaining this kind of checking in different places is dangerous, extending Instruction::isSameOperationAs consolidates this logic into one place. Here I've added an optional flags parameter and two flags that are important for vectorization: CompareIgnoringAlignment and CompareUsingScalarTypes. llvm-svn: 159329
* Only print out the tag if it's there.Bill Wendling2012-06-281-1/+2
| | | | llvm-svn: 159328
* Don't output an empty string.Bill Wendling2012-06-281-2/+3
| | | | llvm-svn: 159327
* Use the interface through DIDescriptor to get the tag/version for a debug infoBill Wendling2012-06-281-9/+11
| | | | | | MDNode. llvm-svn: 159317
* Fix cmake failure from moving files around.Bill Wendling2012-06-281-0/+1
| | | | llvm-svn: 159314
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-281-0/+1182
| | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
* improve optimization of invoke instructions:Nuno Lopes2012-06-251-1/+2
| | | | | | | | - simplifycfg: invoke undef/null -> unreachable - instcombine: invoke new -> invoke expect(0, 0) (an arbitrary NOOP intrinsic; only done if the allocated memory is unused, of course) - verifier: allow invoke of intrinsics (to make the previous step work) llvm-svn: 159146
* llvm/lib: [CMake] Add explicit dependency to intrinsics_gen.NAKAMURA Takumi2012-06-241-0/+2
| | | | llvm-svn: 159112
* VMCore/CMakeLists.txt: [CMake][MSVC] Add "/Og-" to Function.cpp on msvc10. ↵NAKAMURA Takumi2012-06-241-0/+9
| | | | | | | Otherwise, it took over 20 minutes to compile. FIXME: Suppressing optimizations to core libraries would not be good thing. llvm-svn: 159097
* Clean-up after r159077.Hans Wennborg2012-06-231-46/+1
| | | | | | | Remove temporary GlobalVariable constructors now that Clang has been updated (r159078). llvm-svn: 159079
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-234-6/+71
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* Fixed r158979.Stepan Dyatkovskiy2012-06-221-3/+17
| | | | | | | | | | Original message: Performance optimizations: - SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges. - Optimized IntItem, added APInt value caching. - Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only. llvm-svn: 158997
* Revert commit 158979 (dyatkovskiy) since it is causing several buildbots toDuncan Sands2012-06-221-11/+2
| | | | | | | | | | | | | fail. Original commit message: Performance optimizations: - SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges. - Optimized IntItem, added APInt value caching. - Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only. On my machine these optimizations gave about 4-6% of compile-time improvement. llvm-svn: 158986
* Performance optimizations:Stepan Dyatkovskiy2012-06-221-2/+11
| | | | | | | | | | - SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges. - Optimized IntItem, added APInt value caching. - Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only. On my machine these optimizations gave about 4-6% of compile-time improvement. llvm-svn: 158979
* revert r158660, since Chris has some issues with this patch (namely using ↵Nuno Lopes2012-06-182-38/+0
| | | | | | | | | | code to reprent information only used by the compiler) Original commit msg: add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers. This metadata can be attached to any instruction returning a pointer llvm-svn: 158688
* add the 'alloc' metadata node to represent the size of offset of buffers ↵Nuno Lopes2012-06-182-0/+38
| | | | | | | | pointed to by pointers. This metadata can be attached to any instruction returning a pointer llvm-svn: 158660
* Move the Metadata merging methods from GVN and make them public in MDNode.Hal Finkel2012-06-161-0/+150
| | | | | | | There are other passes, BBVectorize specifically, that also need some of this functionality. llvm-svn: 158605
* When linearizing a multiplication, return at once if we see a factor of zero,Duncan Sands2012-06-131-2/+23
| | | | | | | | | since then the entire expression must equal zero (similarly for other operations with an absorbing element). With this in place a bunch of reassociate code for handling constants is dead since it is all taken care of when linearizing. No intended functionality change. llvm-svn: 158398
* Fix intrinsics for XOP frczss/sd instructions. These instructions only take ↵Craig Topper2012-06-131-1/+22
| | | | | | one source register and zero the upper bits of the destination rather than preserving them. llvm-svn: 158396
* Now that Reassociate's LinearizeExprTree can look through arbitrary expressionDuncan Sands2012-06-122-0/+43
| | | | | | | | | | | | | | | | | topologies, it is quite possible for a leaf node to have huge multiplicity, for example: x0 = x*x, x1 = x0*x0, x2 = x1*x1, ... rapidly gives a value which is x raised to a vast power (the multiplicity, or weight, of x). This patch fixes the computation of weights by correctly computing them no matter how big they are, rather than just overflowing and getting a wrong value. It turns out that the weight for a value never needs more bits to represent than the value itself, so it is enough to represent weights as APInts of the same bitwidth and do the right overflow-avoiding dance steps when computing weights. As a side-effect it reduces the number of multiplies needed in some cases of large powers. While there, in view of external uses (eg by the vectorizer) I made LinearizeExprTree static, pushing the rank computation out into users. This is progress towards fixing PR13021. llvm-svn: 158358
* Add AutoUpgrade support for the SSE4 ptest intrinsics.Nadav Rotem2012-06-101-6/+59
| | | | | | Patch by Michael Kuperstein. llvm-svn: 158295
* Replace XOP vpcom intrinsics with fewer intrinsics that take the immediate ↵Craig Topper2012-06-091-1/+47
| | | | | | as an argument. llvm-svn: 158278
* Simplify the fma4 renaming code.Craig Topper2012-06-031-71/+3
| | | | llvm-svn: 157902
* Autoupgrade support the rename of x86.fma4 intrinsics to x86.fma from r157898.Craig Topper2012-06-031-0/+74
| | | | llvm-svn: 157899
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* PR1255: case ranges.Stepan Dyatkovskiy2012-06-021-2/+2
| | | | | | IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()" llvm-svn: 157884
* Use dominates(Instruction, Use) in the verifier.Rafael Espindola2012-06-011-46/+2
| | | | | | | This removes a bit of context from the verifier erros, but reduces code duplication in a fairly critical part of LLVM and makes dominates easier to test. llvm-svn: 157845
* PR1255: case ranges.Stepan Dyatkovskiy2012-06-011-2/+2
| | | | | | | | | IntItem cleanup. IntItemBase, IntItemConstantIntImp and IntItem merged into IntItem. All arithmetic operators was propogated from APInt. Also added comparison operators <,>,<=,>=. Currently you will find set of macros that propogates operators from APInt to IntItem in the beginning of IntegerSubset. Note that THESE MACROS WILL REMOVED after all passes will case-ranges compatible. Also note that these macros much smaller pain that something like this: if (V->getValue().ugt(AnotherV->getValue()) { ... } These changes made IntItem full featured integer object. It allows to make IntegerSubset class generic (move out all ConstantInt references inside and add unit-tests) in next commits. llvm-svn: 157810
* Fix typos noticed by Benjamin Kramer.Rafael Espindola2012-05-311-10/+29
| | | | | | | Also make the checks stronger and test that we reject ranges that overlap a previous wrapped range. llvm-svn: 157749
* Require intervals in the range metadata to be in a canonical form: They mustRafael Espindola2012-05-311-2/+16
| | | | | | | | | | | be non contiguous, non overlapping and sorted by the lower end. While this is technically a backward incompatibility, every frontent currently produces range metadata with a single interval and we don't have any pass that merges intervals yet, so no existing bitcode files should be rejected by this. llvm-svn: 157741
* ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to ↵Stepan Dyatkovskiy2012-05-292-13/+13
| | | | | | IntegersSubsetMapping. llvm-svn: 157612
* PR1255: Case RangesStepan Dyatkovskiy2012-05-282-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now? 1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst. 2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case. 3. IntItem can be easyly easily replaced with APInt. 4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes. Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code ConstantInt *V = ...; if (V->getValue().ugt(AnotherV->getValue()) { ... } will look awful. Much more better this way: IntItem V = ConstantIntVal->getValue(); if (AnotherV < V) { } Of course any reviews are welcome. P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks). Since in future these classes will founded on APInt, it will possible to use them in more generic ways. llvm-svn: 157576
* switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.Chris Lattner2012-05-281-15/+14
| | | | llvm-svn: 157556
OpenPOWER on IntegriCloud