- Jun 17, 2012
-
-
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
-
Chandler Carruth authored
construct just for my sanity. llvm-svn: 158637
-
James Dennett authored
* Escaped # characters in Doxygen comments as needed; * Exposed summaries using the \brief command. llvm-svn: 158636
-
James Dennett authored
* Escaped # characters in Doxygen comments as needed; * Added/reformatted \brief docs; * Used a \file comment to document the file (MultipleIncludeOpt.h). llvm-svn: 158635
-
James Dennett authored
* For Doxygen, escaped "::std" as "\::std"; * For humans, fixed "namespaecs" to "namespaces". llvm-svn: 158634
-
James Dennett authored
llvm-svn: 158633
-
James Dennett authored
* Escaped # characters in Doxygen comments; * Added \brief markup to provide summaries. llvm-svn: 158632
-
James Dennett authored
llvm-svn: 158631
-
James Dennett authored
llvm-svn: 158630
-
James Dennett authored
llvm-svn: 158629
-
James Dennett authored
* Added \file, \brief and \verbatim...\endverbatim markup, particularly around documentation of subset of the grammars that are being parsed. llvm-svn: 158628
-
James Dennett authored
llvm-svn: 158627
-
James Dennett authored
llvm-svn: 158626
-
James Dennett authored
llvm-svn: 158625
-
James Dennett authored
llvm-svn: 158624
-
Pete Cooper authored
Now that SROA can form alloca's for dynamic vector accesses, further improve it to be able to replace operations on these vector alloca's with insert/extract element insts llvm-svn: 158623
-
James Dennett authored
llvm-svn: 158622
-
James Dennett authored
llvm-svn: 158621
-
James Dennett authored
llvm-svn: 158620
-
James Dennett authored
llvm-svn: 158619
-
James Dennett authored
* Removed docs for Lexer::makeFileCharRange from Lexer.cpp, as they're in the header file; * Reworked the documentation for SkipBlockComment so that it doesn't confuse Doxygen's comment parsing; * Added another summary with \brief markup. llvm-svn: 158618
-
James Dennett authored
llvm-svn: 158617
-
James Dennett authored
formatting of Doxygen's output for StringLiteralParser::StringLiteralParser. llvm-svn: 158616
-
James Dennett authored
* Escaped #pragma (as \#pragma) in Doxygen comments; * Added \code...\endcode annotations around code examples in doc comments. llvm-svn: 158615
-
James Dennett authored
llvm-svn: 158614
-
Hal Finkel authored
llvm-svn: 158613
-
Michael J. Spencer authored
Although the code is not valid to begin with. It is trying to do a raw memory copy of a non standard-layout type. nameoffset is not guaranteed to directly follow cmdsize. This should be properly fixed. llvm-svn: 158612
-
Richard Smith authored
initializer, it is uninitialized, even if we may be coming from somewhere where it was initialized. llvm-svn: 158611
-
- Jun 16, 2012
-
-
Benjamin Kramer authored
llvm-svn: 158610
-
Benjamin Kramer authored
llvm-svn: 158609
-
Benjamin Kramer authored
llvm-svn: 158608
-
Hal Finkel authored
This cleans up the method used to find trip counts in order to form CTR loops on PPC. This refactoring allows the pass to find loops which have a constant trip count but also happen to end with a comparison to zero. This also adds explicit FIXMEs to mark two different classes of loops that are currently ignored. In addition, we now search through all potential induction operations instead of just the first. Also, we check the predicate code on the conditional branch and abort the transformation if the code is not EQ or NE, and we then make sure that the branch to be transformed matches the condition register defined by the comparison (multiple possible comparisons will be considered). llvm-svn: 158607
-
Hal Finkel authored
The present implementation handles only TBAA and FP metadata, discarding everything else. For debug metadata, the current behavior is maintained (the debug metadata associated with one of the instructions will be kept, discarding that attached to the other). This should address PR 13040. llvm-svn: 158606
-
Hal Finkel authored
There are other passes, BBVectorize specifically, that also need some of this functionality. llvm-svn: 158605
-
Rafael Espindola authored
llvm-svn: 158604
-
Kay Tiong Khoo authored
llvm-svn: 158603
-
NAKAMURA Takumi authored
llvm-svn: 158602
-
Benjamin Kramer authored
llvm-svn: 158601
-
Benjamin Kramer authored
Merge the SmallBitVector and BitVector unit tests with gtest's typed test magic and bring SmallBitVector up to date. llvm-svn: 158600
-