- Jul 16, 2012
-
-
Nuno Lopes authored
Make it always return APInts with the same bitwidth for the same ConstantRange bitwidth to simply clients llvm-svn: 160294
-
Chandler Carruth authored
Added a basic unit test for this with CreateCondBr. I didn't go all the way and test the switch side as the boilerplate for setting up the switch IRBuilder unit tests is a lot more. Fortunately, the two share all the interesting code paths. llvm-svn: 160251
-
Chandler Carruth authored
This is in anticipation of changing CreateCondBr and wanting to test those changes. llvm-svn: 160250
-
Chandler Carruth authored
the original move of IRBuilder. llvm-svn: 160249
-
Chandler Carruth authored
the move of *Builder classes into the Core library. No uses of this builder in Clang or DragonEgg I could find. If there is a desire to have an IR-building-support library that contains all of these builders, that can be easily added, but currently it seems likely that these add no real overhead to VMCore. llvm-svn: 160243
-
Chandler Carruth authored
IRBuilder, DIBuilder, etc. This is the proper layering as MDBuilder can't be used (or implemented) without the Core Metadata representation. Patches to Clang and Dragonegg coming up. llvm-svn: 160237
-
- Jul 03, 2012
-
-
Eric Christopher authored
This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. llvm-svn: 159618
-
- Jul 02, 2012
-
-
Stepan Dyatkovskiy authored
- Changed isSingleNumber method behaviour. Now this flag is calculated on demand. IntegersSubsetMapping - Optimized diff operation. - Replaced type of Items field from std::list with std::map. - Added new methods: bool isOverlapped(self &RHS) void add(self& RHS, SuccessorClass *S) void detachCase(self& NewMapping, SuccessorClass *Succ) void removeCase(SuccessorClass *Succ) SuccessorClass *findSuccessor(const IntTy& Val) const IntTy* getCaseSingleNumber(SuccessorClass *Succ) IntegersSubsetTest - DiffTest: Added checks for successors. SimplifyCFG Updated SwitchInst usage (now it is case-ragnes compatible) for - SimplifyEqualityComparisonWithOnlyPredecessor - FoldValueComparisonIntoPredecessors llvm-svn: 159527
-
- Jun 29, 2012
-
-
Chandler Carruth authored
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
-
Bill Wendling authored
(a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore instead. llvm-svn: 159414
-
- Jun 28, 2012
-
-
Nuno Lopes authored
llvm-svn: 159352
-
Nuno Lopes authored
llvm-svn: 159319
-
Bill Wendling authored
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
-
- Jun 26, 2012
-
-
Stepan Dyatkovskiy authored
IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL with NOT_A_NUMBER constant (0xffff). llvm-svn: 159207
-
Stepan Dyatkovskiy authored
IntegersSubsetMapping: implemented "diff" operation. Operation allows at the same time perform up to three operations: - LHS exclude RHS - LHS intersect RHS (LHS successors will keeped) - RHS exclude LHS The complexity is N+M, where N is size of LHS M is size of RHS. llvm-svn: 159201
-
Stepan Dyatkovskiy authored
IntegersSubsetMapping: removed exclude operation, it will replaced with more universal "diff" operation in next commit. Changes was separated onto two commits for better readability. llvm-svn: 159200
-
- Jun 24, 2012
-
-
NAKAMURA Takumi authored
llvm-svn: 159099
-
NAKAMURA Takumi authored
llvm-svn: 159098
-
- Jun 22, 2012
-
-
NAKAMURA Takumi authored
llvm-svn: 158942
-
NAKAMURA Takumi authored
llvm-svn: 158941
-
- Jun 21, 2012
-
-
NAKAMURA Takumi authored
llvm-svn: 158914
-
Chandler Carruth authored
using to test the alignment support library. Patch from Nikola on IRC. llvm-svn: 158912
-
Chandler Carruth authored
through. Also sort them. llvm-svn: 158911
-
Chandler Carruth authored
Makefiles, the CMake files in every other part of the LLVM tree, and sanity. This should also restore the output tree structure of all the unit tests, sorry for breaking that, and thanks for letting me know. The fundamental change is to put a CMakeLists.txt file in the unittest directory, with a single test binary produced from it. This has several advantages: - No more weird directory stripping in the unittest macro, allowing it to be used more readily in other projects. - No more directory prefixes on all the source files. - Allows correct and precise use of LLVM's per-directory dependency system. - Allows use of the checking logic for source files that have not been added to the CMake build. This uncovered a file being skipped with CMake in LLVM and one in Clang's unit tests. - Makes Specifying conditional compilation or other custom logic for JIT tests easier. It did require adding the concept of an explicit 'optional' source file to the CMake build so that the missing-file check can skip cases where the file is *supposed* to be missing. =] This is another chunk of refactoring the CMake build in order to make it usable for other clients like CompilerRT / ASan / TSan. Note that this is interdependent with a Clang CMake change. llvm-svn: 158909
-
Chandler Carruth authored
a helper function in CMake. This will allow us to share all of this logic with Clang, and eventually CompilerRT. llvm-svn: 158896
-
Chandler Carruth authored
llvm-svn: 158893
-
Chandler Carruth authored
facilities. This was only used in one place in LLVM, and was used pervasively (but with different code!) in Clang. It has no advantages over the standard CMake facilities and in some cases disadvantages. llvm-svn: 158889
-
- Jun 20, 2012
-
-
Chandler Carruth authored
The TEST_F macros actually declare *subclasses* of the test fixtures. Even if they didn't we don't want them to declare external functions. The entire unit test, including both the fixture class and the fixture test cases should be wrapped in the anonymous namespace. This issue was caught by the new '-Winternal-linkage-in-inline' warning. llvm-svn: 158798
-
Nick Kledzik authored
Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs and add unit test. Unix is implemented. Windows side needs to be implemented. llvm-svn: 158770
-
- Jun 19, 2012
-
-
Chandler Carruth authored
StringMap suffered from the same bug as DenseMap: when you explicitly construct it with a small number of buckets, you can arrange for the tombstone-based growth path to be followed when the number of buckets was less than '8'. In that case, even with a full map, it would compare '0' as not less than '0', and refuse to grow the table, leading to inf-loops trying to find an empty bucket on the next insertion. The fix is very simple: use '<=' as the comparison. The same fix was applied to DenseMap as well during its recent refactoring. Thanks to Alex Bolz for the great report and test case. =] llvm-svn: 158725
-
Chandler Carruth authored
GoogleTest already prints errors with all the information about which test case contained the error. llvm-svn: 158724
-
- Jun 17, 2012
-
-
Benjamin Kramer authored
llvm-svn: 158648
-
Benjamin Kramer authored
llvm-svn: 158647
-
Benjamin Kramer authored
I don't know how useful these are for SmallDenseMap, I'll leave that decision to Chandler. llvm-svn: 158646
-
Benjamin Kramer authored
It always returns the iterator for the first inserted element, or the passed in iterator if the inserted range was empty. Flesh out the unit test more and fix all the cases it uncovered so far. llvm-svn: 158645
-
Benjamin Kramer authored
SmallVector: return a valid iterator for the rare case of inserting an empty range into a SmallVector. Patch by Johannes Schaub! llvm-svn: 158643
-
Chandler Carruth authored
SmallDenseMap::swap. First, make it parse cleanly. Yay for uninstantiated methods. Second, make the inline-buckets case work correctly. This is way trickier than it should be due to the uninitialized values in empty and tombstone buckets. Finally fix a few typos that caused construction/destruction mismatches in the counting unittest. llvm-svn: 158641
-
Chandler Carruth authored
implementation of the class layout for the V8 type. llvm-svn: 158640
-
Chandler Carruth authored
destruction and fix a bug in SmallDenseMap they caught. This is kind of a poor-man's version of the testing that just adds the addresses to a set on construction and removes them on destruction. We check that double construction and double destruction don't occur. Amusingly enough, this is enough to catch a lot of SmallDenseMap issues because we spend a lot of time with fixed stable addresses in the inline buffer. The SmallDenseMap bug fix included makes grow() not double-destroy in some cases. It also fixes a FIXME there, the code was pretty crappy. We now don't have any wasted initialization, but we do move the entries in inline bucket array an extra time. It's probably a better tradeoff, and is much easier to get correct. llvm-svn: 158639
-
Chandler Carruth authored
implementation. This type includes an inline bucket array which is used initially. Once it is exceeded, an array of 64 buckets is allocated on the heap. The bucket count grows from there as needed. Some highlights of this implementation: - The inline buffer is very carefully aligned, and so supports types with alignment constraints. - It works hard to avoid aliasing issues. - Supports types with non-trivial constructors, destructors, copy constructions, etc. It works reasonably hard to minimize copies and unnecessary initialization. The most common initialization is to set keys to the empty key, and so that should be fast if at all possible. This class has a performance / space trade-off. It tries to optimize for relatively small maps, and so packs the inline bucket array densely into the object. It will be marginally slower than a normal DenseMap in a few use patterns, so it isn't appropriate everywhere. The unit tests for DenseMap have been generalized a bit to support running over different map implementations in addition to different key/value types. They've then been automatically extended to cover the new container through the magic of GoogleTest's typed tests. All of this is still a bit rough though. I'm going to be cleaning up some aspects of the implementation, documenting things better, and adding tests which include non-trivial types. As soon as I'm comfortable with the correctness, I plan to switch existing users of SmallMap over to this class as it is already more correct w.r.t. construction and destruction of objects iin the map. Thanks to Benjamin Kramer for all the reviews of this and the lead-up patches. That said, more review on this would really be appreciated. As I've noted a few times, I'm quite surprised how hard it is to get the semantics for a hashtable-based map container with a small buffer optimization correct. =] llvm-svn: 158638
-