Commit Graph

145362 Commits

Author SHA1 Message Date
Hal Finkel ad92b46505 Add a comment about overlapping PPC frame offsets
I don't think that it is otherwise clear how the overlapping offsets
are processed into distinct spill slots. Comment that this is done
in processFunctionBeforeFrameFinalized.

llvm-svn: 177094
2013-03-14 18:38:31 +00:00
Howard Hinnant d70e6570fd Some forward-looking and optimistic documentation.
llvm-svn: 177093
2013-03-14 18:37:48 +00:00
Akira Hatanaka 040d225588 [mips] Rename functions and variables to start with proper case.
llvm-svn: 177092
2013-03-14 18:33:23 +00:00
Greg Clayton faac111870 <rdar://problem/13421412>
Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.

llvm-svn: 177091
2013-03-14 18:31:44 +00:00
Akira Hatanaka 29a0da3551 Add header file MipsISelDAGToDAG.h.
llvm-svn: 177090
2013-03-14 18:28:19 +00:00
Akira Hatanaka 30a847876b [mips] Define two subclasses of MipsDAGToDAGISel. Mips16DAGToDAGISel is for
mips16 and MipsSEDAGToDAGISel is for mips32/64. 

No functionality changes.

llvm-svn: 177089
2013-03-14 18:27:31 +00:00
Shuxin Yang 2eca602f8b Perform factorization as a last resort of unsafe fadd/fsub simplification.
Rules include:
  1)1 x*y +/- x*z => x*(y +/- z) 
    (the order of operands dosen't matter)

  2) y/x +/- z/x => (y +/- z)/x 

 The transformation is disabled if the new add/sub expr "y +/- z" is a 
denormal/naz/inifinity.

rdar://12911472

llvm-svn: 177088
2013-03-14 18:08:26 +00:00
Adrian Prantl ed6d955416 Test that we emit a DW_AT_location for self captured by a block.
This is the backend part of a CFE test with the same name.

llvm-svn: 177087
2013-03-14 17:54:13 +00:00
Adrian Prantl 51936dd0bc Allocate stack storage for .block_descriptor and captured self at -O0.
This way the register allocator will not optimize away the debug info
for captured variables.

Fixes rdar://problem/12767564

llvm-svn: 177086
2013-03-14 17:53:33 +00:00
Sean Callanan c4b1ab442d Fixed a problem where we didn't return TypedefNameDecls
when clang asked for them by name.

llvm-svn: 177085
2013-03-14 17:21:53 +00:00
Jordan Rose 529e239aee [analyzer] Fix scan-build's -stats mode.
We were failing to match the output line, which led to us collecting no
stats at all, which led to a divide-by-zero error.

Fixes PR15510.

llvm-svn: 177084
2013-03-14 17:18:30 +00:00
Edwin Vane ead1696fa6 Adding a new code owners file for clang-tools-extra.
Populated file with known existing owners.

llvm-svn: 177083
2013-03-14 16:56:31 +00:00
Greg Clayton 617995c095 <rdar://problem/13413693>
Fixed a crasher in the new DWARF in .o files line table linking function where "back()" could end up being called on an empty std::vector.

llvm-svn: 177082
2013-03-14 16:47:56 +00:00
Manuel Klimek b64d6b7fee Implements memoization for ancestor matching.
This yields a log(#ast_nodes) worst-case improvement with matchers like
stmt(unless(hasAncestor(...))).

Also made the order of visitation for ancestor matches BFS, as the most
common use cases (for example finding the closest enclosing function
definition) rely on that.

llvm-svn: 177081
2013-03-14 16:33:21 +00:00
Alexander Kornienko dd8ed854a0 Multi-line comment alignment
Summary:
Aligns continuation lines of multi-line comments to the base
indentation level +1:
class A {
  /*
   * test
   */
  void f() {}
};

The first revision is work in progress. The implementation is not yet complete.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D541

llvm-svn: 177080
2013-03-14 16:10:54 +00:00
Shankar Easwaran 8962feb915 [lld] remove trailing whitespace
llvm-svn: 177079
2013-03-14 16:09:49 +00:00
Vincent Lejeune 0a22bc4156 R600: Factorize code handling Const Read Port limitation
llvm-svn: 177078
2013-03-14 15:50:45 +00:00
Alexey Samsonov d1999a1ccc [Sanitizer] Fix compiler warnings and style issues in sanitizer_common tests. Use -Werror=sign-compare when building them.
llvm-svn: 177077
2013-03-14 15:15:35 +00:00
Matt Kopec 85cc3b3dbf Backout POSIX realtime lldb output. TestEvents.py is causing lldb to assert.
llvm-svn: 177076
2013-03-14 14:22:40 +00:00
Daniel Jasper f38a0ace2d Slightly improve formatting of longer pipe statements.
The stronger binding of a string ending in :/= does not really make
sense if it is the only character.

Before:
llvm::outs() << aaaaaaaaaaaaaaaaaaaaaaaa
             << "=" << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

After:
llvm::outs() << aaaaaaaaaaaaaaaaaaaaaaaa << "="
             << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

llvm-svn: 177075
2013-03-14 14:00:17 +00:00
Alexey Samsonov 1cb684381a [Sanitizer] Add generic ThreadRegistry class for sanitizer runtimes. This class holds basic thread bookkeeping logic and allows specific sanitizer runtimes to create thread contexts and mark threads as created/running/joined etc. The class is based on the way we currently store thread contexts in TSan.
llvm-svn: 177074
2013-03-14 13:54:30 +00:00
Daniel Jasper 40aacf4872 Basic support for formatting asm() statments.
llvm-svn: 177073
2013-03-14 13:45:21 +00:00
Alexey Samsonov a097f7b1e3 [Sanitizer] Add default constructor for BlockingMutex
llvm-svn: 177072
2013-03-14 13:30:56 +00:00
Evgeniy Stepanov 8d487b4407 [sanitizer] No dirent64 on Android.
llvm-svn: 177071
2013-03-14 13:24:03 +00:00
Alexey Samsonov 3d09fdbf21 [Sanitizer] Build sanitizer_common with -fno-rtti
llvm-svn: 177070
2013-03-14 13:16:35 +00:00
Kostya Serebryany d332d42372 [asan] remove one redundant malloc stress test, unify the usage of ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM)
llvm-svn: 177069
2013-03-14 13:16:09 +00:00
Alexander Potapenko 34e1171768 [libsanitizer] fixed a bug in ThreadLister tests where we forgot to terminate one thread
Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 177068
2013-03-14 13:15:14 +00:00
Evgeniy Stepanov 740e6ebe71 [msan] Add changes missing from r177065.
llvm-svn: 177067
2013-03-14 13:13:49 +00:00
Dmitri Gribenko 4e72a40604 Documentation: improve formatting
llvm-svn: 177066
2013-03-14 12:53:46 +00:00
Evgeniy Stepanov c6bce93591 [msan] Intercept readdir64.
llvm-svn: 177065
2013-03-14 12:49:23 +00:00
Alexey Samsonov 1dc928e1b1 [ASan] remove -fsanitize=init-order from lit tests as now it's implied by -fsanitize=address
llvm-svn: 177064
2013-03-14 12:43:03 +00:00
Alexey Samsonov 819eddc3ce [ASan] emit instrumentation for initialization order checking by default
llvm-svn: 177063
2013-03-14 12:38:58 +00:00
Alexey Samsonov f29d81f234 [ASan] Update docs for -fsanitize=init-order option
llvm-svn: 177062
2013-03-14 12:26:21 +00:00
Alexey Samsonov 881d150cc7 [ASan] Make -fsanitize=address imply -fsanitize=init-order (if the latter is not explicitly disabled).
llvm-svn: 177061
2013-03-14 12:13:27 +00:00
Alexander Potapenko ac3bbb3ef3 [libsanitizer] Fixed incorrect handling of pre-existing threads in ThreadLister test.
Also, extended the test to check that ThreadLister::Reset() works as intended.

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 177060
2013-03-14 12:06:54 +00:00
Evgeniy Stepanov 4062a396c7 [msan] Fix a typo in test.
llvm-svn: 177059
2013-03-14 11:58:13 +00:00
Alexey Samsonov 963be1ddd8 [ASan] turn off checking initialization order in ASan runtime by default. Instead, it should be turned on by default in the compiler
llvm-svn: 177058
2013-03-14 11:49:40 +00:00
Evgeniy Stepanov fe0199ea54 [msan] Options for switching between fast and cfi unwinders in run time.
Does not change default behavior.

llvm-svn: 177057
2013-03-14 11:47:03 +00:00
Evgeniy Stepanov 231894a902 [sanitizer] Intercept frexp and friends.
llvm-svn: 177056
2013-03-14 11:34:39 +00:00
Chandler Carruth a1c54bbe34 PR14972: SROA vs. GVN exposed a really bad bug in SROA.
The fundamental problem is that SROA didn't allow for overly wide loads
where the bits past the end of the alloca were masked away and the load
was sufficiently aligned to ensure there is no risk of page fault, or
other trapping behavior. With such widened loads, SROA would delete the
load entirely rather than clamping it to the size of the alloca in order
to allow mem2reg to fire. This was exposed by a test case that neatly
arranged for GVN to run first, widening certain loads, followed by an
inline step, and then SROA which miscompiles the code. However, I see no
reason why this hasn't been plaguing us in other contexts. It seems
deeply broken.

Diagnosing all of the above took all of 10 minutes of debugging. The
really annoying aspect is that fixing this completely breaks the pass.
;] There was an implicit reliance on the fact that no loads or stores
extended past the alloca once we decided to rewrite them in the final
stage of SROA. This was used to encode information about whether the
loads and stores had been split across multiple partitions of the
original alloca. That required threading explicit tracking of whether
a *use* of a partition is split across multiple partitions.

Once that was done, another problem arose: we allowed splitting of
integer loads and stores iff they were loads and stores to the entire
alloca. This is a really arbitrary limitation, and splitting at least
some integer loads and stores is crucial to maximize promotion
opportunities. My first attempt was to start removing the restriction
entirely, but currently that does Very Bad Things by causing *many*
common alloca patterns to be fully decomposed into i8 operations and
lots of or-ing together to produce larger integers on demand. The code
bloat is terrifying. That is still the right end-goal, but substantial
work must be done to either merge partitions or ensure that small i8
values are eagerly merged in some other pass. Sadly, figuring all this
out took essentially all the time and effort here.

So the end result is that we allow splitting only when the load or store
at least covers the alloca. That ensures widened loads and stores don't
hurt SROA, and that we don't rampantly decompose operations more than we
have previously.

All of this was already fairly well tested, and so I've just updated the
tests to cover the wide load behavior. I can add a test that crafts the
pass ordering magic which caused the original PR, but that seems really
brittle and to provide little benefit. The fundamental problem is that
widened loads should Just Work.

llvm-svn: 177055
2013-03-14 11:32:24 +00:00
Alexey Samsonov 7d2385419a [Sanitizer] fix compilation for Windows
llvm-svn: 177054
2013-03-14 11:29:06 +00:00
Chandler Carruth 5aa9d793c5 Fix an unused variable warning from Clang by sinking a dyn_cast into an
isa and a cast inside the assert. The efficiency concern isn't really
important here. The code should likely be cleaned up a bit more,
especially getting a message into the assert.

Please review Rafael.

llvm-svn: 177053
2013-03-14 11:17:20 +00:00
Evgeniy Stepanov ead6cf7c72 [msan] Intercept __strdup, strndup, __strndup.
llvm-svn: 177052
2013-03-14 11:10:36 +00:00
Alexey Samsonov 83e7622df6 [Sanitizer] Write a slightly better implementation of GetEnv() function on Windows
llvm-svn: 177051
2013-03-14 11:10:23 +00:00
Daniel Jasper ae9076457e Fix dereference formatting in for-loops.
Before: for (char **a = b; * a; ++a) {}
After:  for (char **a = b; *a; ++a) {}
llvm-svn: 177037
2013-03-14 10:50:25 +00:00
Alexey Samsonov 140cd84155 [ASan] make ASan assume ASAN_OPTIONS=symbolize=1 if ASAN_EXTERNAL_SYMBOLIZER is defined
llvm-svn: 177036
2013-03-14 10:07:40 +00:00
Joey Gouly 0608ae89a2 Add support for the 'endian' attribute for OpenCL.
llvm-svn: 177035
2013-03-14 09:54:43 +00:00
Daniel Jasper bf4755bb28 Improve formatting of trailing annotations.
Before:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa __attribute__((
    unused));

After:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    __attribute__((unused));

llvm-svn: 177034
2013-03-14 09:50:46 +00:00
Joerg Sonnenberger 7118befdb5 Add two of the float related ARM-specific entries for e_flags needed for
linkers to interact with GNU ld.

llvm-svn: 177016
2013-03-14 08:01:36 +00:00
Craig Topper ba82429826 Fix the name of a variable to match its declaration. Fixes build failure from r177014.
llvm-svn: 177015
2013-03-14 07:47:43 +00:00