Commit Graph

146189 Commits

Author SHA1 Message Date
Jim Ingham c4ca6e271c The outline of the stepping perf test case, doesn't do anything yet.
llvm-svn: 177646
2013-03-21 16:48:24 +00:00
Tobias Grosser 8ff029ccf1 Add failing test case
llvm-svn: 177645
2013-03-21 16:14:55 +00:00
Tobias Grosser 4e318abece Do not canonicalize indvars with scev based codegen
Scev code generation can now handle scops with non canonical induction
variables. Hence there is no need to introduce canonical ones any more.

llvm-svn: 177644
2013-03-21 16:14:53 +00:00
Tobias Grosser 826b2af112 Remove last uses of canoncial induction variable when scev code generating
We now detect scops without a canonical induction variable and can generate a
polyhedral representation for them. There was no modification necessary to
code generate these scops.

llvm-svn: 177643
2013-03-21 16:14:50 +00:00
Tobias Grosser 1f0d82c7d7 TempScop: Make assert more descriptive
llvm-svn: 177642
2013-03-21 16:14:45 +00:00
Dmitry Vyukov 0851fa8819 tsan: better reporting for races on vptr
explicitly say "ctor/dtor vs virtual call"

llvm-svn: 177640
2013-03-21 15:37:39 +00:00
Dmitry Vyukov 2c3b919ad3 tsan: add flag to control symbolizer flush frequency
llvm-svn: 177638
2013-03-21 13:01:50 +00:00
Dmitry Vyukov 69c323d66f tsan: intercept abort() to fflush() libc streams
llvm-svn: 177637
2013-03-21 12:50:43 +00:00
Dmitry Vyukov 6911a7f1d1 tsan: remove bogus CHECK
Asynchronous signal (e.g. SIGABRT) can be received with any value of in_rtl.

llvm-svn: 177636
2013-03-21 12:44:44 +00:00
Alexander Kornienko 547a9f5264 Better block comment formatting.
Summary:
1. When splitting one-line block comment, use indentation and *s.
2. Remove trailing whitespace from all lines of a comment, not only the ones being splitted.
3. Add backslashes for all lines if a comment is used insed a preprocessor directive.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 177635
2013-03-21 12:28:10 +00:00
Alexey Samsonov 54afba8b62 [ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ASan-specific AsanThreadRegistry.
llvm-svn: 177634
2013-03-21 11:23:41 +00:00
Alexander Potapenko 5700f40d80 [ASan] Let the users to invoke `clang -fsanitize=address` to link binaries targeting the iOS simulator.
llvm-svn: 177633
2013-03-21 10:49:06 +00:00
Chandler Carruth df973ed626 Hoist the definition of getTypeSizeInBits to be inlinable and in the
header.

This method is called in the hot path for *many* passes, SROA is what
caught my interest. A common pattern is that which branch of the switch
should be taken is known in the callsite and so it is a very good
candidate for inlining and simplification. Moving it into the header
allows the optimizer to fold a lot of boring, repeatitive code in
callers of this routine.

I'm seeing pretty significant speedups in parts of SROA and I suspect
other passes will see similar speedups if they end up working with type
sizes frequently. I've not seen any significant growth of the binaries
as a consequence, but let me know if you see anything suspicious here.

llvm-svn: 177632
2013-03-21 09:52:22 +00:00
Chandler Carruth 34f0c7fcaf [SROA] Prefix names using a custom IRBuilder inserter.
The key part of this is ensuring that name prefixes remain in a Twine
form until we get to a point where we can nuke them under NDEBUG. This
is tricky using the old APIs as they played fast and loose with Twine,
which is prone to serious error. The inserter is much cleaner as it is
actually in the call stack leading to the setName call, and so has
a good opportunity to prepend the prefix.

This matters more than you might imagine because most runs over an
alloca find a single partition, and rewrite 3 or 4 instructions
referring to it. As a consequence doing this lazily and exclusively with
Twine allows the optimizer to delete more of it and shaves another 2% to
3% off of the release build's SROA run time for PR15412. I also think
the APIs are cleaner, and the use of Twine is more reliable, so
I consider it a win-win despite the churn required to reach this state.

llvm-svn: 177631
2013-03-21 09:52:18 +00:00
Evgeniy Stepanov a9a962cad8 [msan] Add an option to disable poisoning of shadow for undef values.
llvm-svn: 177630
2013-03-21 09:38:26 +00:00
Dmitry Vyukov 48e5d4a2d3 tsan: flush symbolizer cache if not symbolized for more than 5 seconds
llvm-svn: 177629
2013-03-21 07:02:36 +00:00
Dmitry Vyukov 5e797a8e57 tsan: add a comment about magic numbers
llvm-svn: 177628
2013-03-21 06:28:04 +00:00
Dmitry Vyukov 78693730a4 tsan: use a single background thread for memory profiler and memory flush (and later for symbolizer flush)
llvm-svn: 177627
2013-03-21 06:24:31 +00:00
Bob Wilson c962f9a624 Fix a typo.
llvm-svn: 177626
2013-03-21 06:09:09 +00:00
Greg Clayton 5dbe5d4b62 Add correct file headers to all source files.
llvm-svn: 177625
2013-03-21 03:39:51 +00:00
Jason Molenda 5635f77a99 Add a new method GetFunctionAddressAndSizeVector to DWARFCallFrameInfo.
This returns a vector of <file address, size> entries for all of
the functions in the module that have an eh_frame FDE.

Update ObjectFileMachO to use the eh_frame FDE function addresses if
the LC_FUNCTION_STARTS section is missing, to fill in the start 
addresses of any symbols that have been stripped from the binary.

Generally speaking, lldb works best if it knows the actual start
address of every function in a module - it's especially important
for unwinding, where lldb inspects the instructions in the prologue
of the function.  In a stripped binary, it is deprived of this
information and it reduces the quality of our unwinds and saved
register retrieval.  

Other ObjectFile users may want to use the function addresses from 
DWARFCallFrameInfo to fill in any stripped symbols like ObjectFileMachO
does already.
<rdar://problem/13365659> 

llvm-svn: 177624
2013-03-21 03:36:01 +00:00
Greg Clayton ef0d2142ba Modify code to adhere to LLDB coding conventions.
llvm-svn: 177623
2013-03-21 03:32:24 +00:00
Meador Inge cf691565ed simplify-libcalls: Removed unused variable
The 'Modified' variable should have been removed from SimplifyLibCalls
in r177619, but was missed.  This commit removes it.

llvm-svn: 177622
2013-03-21 02:44:07 +00:00
Douglas Gregor 0339a64a40 <rdar://problem/13037793> Allow the names of modules to differ from the name of their subdirectory in the include path.
llvm-svn: 177621
2013-03-21 01:08:50 +00:00
Matt Arsenault 4ab769f4b3 Fix missing std::. Not sure how this compiles for anyone else.
llvm-svn: 177620
2013-03-21 00:57:21 +00:00
Meador Inge 6b6a161ccf Move library call prototype attribute inference to functionattrs
The simplify-libcalls pass implemented a doInitialization hook to infer
function prototype attributes for well-known functions.  Given that the
simplify-libcalls pass is going away *and* that the functionattrs pass
is already in place to deduce function attributes, I am moving this logic
to the functionattrs pass.  This approach was discussed during patch
review:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157465.html.

llvm-svn: 177619
2013-03-21 00:55:59 +00:00
Richard Smith b6f3905450 Per discussion on cxx-abi-dev, switch from comparing type_info objects to
comparing type_info names, since the latter have better uniqueness guarantees
in practice.

llvm-svn: 177618
2013-03-21 00:42:03 +00:00
Greg Clayton 384dc726b0 Added a lldb-perf test case that will be used to time various aspects of debugging clang with LLDB.
This test case will measure memory usage and expression timings in frame zero and at higher frames.

llvm-svn: 177617
2013-03-21 00:30:04 +00:00
Greg Clayton bd180cb623 Fixed the ValidOffsetForDataOfSize() to use simpler logic. Fixed DataExtractor::BytesLeft() to return the correct value.
llvm-svn: 177616
2013-03-21 00:29:45 +00:00
Greg Clayton c25e21c10e Simplify the logic for DNBDataRef::ValidOffsetForDataOfSize() and DNBDataRef::ValidOffset() functions.
llvm-svn: 177615
2013-03-21 00:24:59 +00:00
David Blaikie 9be783da45 Removing unused DISubprogram::getFile
llvm-svn: 177614
2013-03-21 00:10:31 +00:00
John McCall 433c2e64f8 Further weaken block conversion rules to permit blocks with
enum return type to be converted to blocks with any integer type
of the same size.

rdar://13463504

llvm-svn: 177613
2013-03-21 00:10:07 +00:00
Manman Ren 8aa84081e9 Add more testing cases for tbaa.struct
Testing cases for structs of structs and unions of structs.

llvm-svn: 177612
2013-03-21 00:09:50 +00:00
Jakob Stoklund Olesen 5891cf9788 Add a WriteMicrocoded for ancient microcoded instructions.
llvm-svn: 177611
2013-03-21 00:07:17 +00:00
David Blaikie efb0d65ed7 Debug info: refactor the first field of DICompileUnit to be a raw file/directory pair
This removes the DICompileUnit special case from DIScope.

llvm-svn: 177610
2013-03-20 23:58:12 +00:00
David Blaikie d54bb5c192 Debug info - generalize namespace test to not depend on a DW_TAG_file_type entry
This isn't necessary & with the next change to LLVM the DW_TAG_file_type entry
won't be emitted at all - only the raw filename/directory pair, so match on
that directly instead.

llvm-svn: 177609
2013-03-20 23:57:15 +00:00
Jakub Staszak 773be0ce1f Use pre-inc, pre-dec when possible.
They are generally faster (at least not slower) than post-inc, post-dec.

llvm-svn: 177608
2013-03-20 23:56:19 +00:00
Jakub Staszak fa41def6ce Remove 'else' after 'return'.
llvm-svn: 177607
2013-03-20 23:53:45 +00:00
Richard Smith e86b7b0bb9 Split ubsan runtime into three pieces (compiler-rt part):
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
   sanitizer runtime is present.
 * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
   a C++ ABI library, and is always linked in.
 * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
   C++ ABI library, and is only linked in when linking a C++ binary.

The Darwin ubsan runtime is unchanged.

For more details, see Clang change r177605.

llvm-svn: 177606
2013-03-20 23:49:17 +00:00
Richard Smith cff3cde28b Split ubsan runtime into three pieces (clang part):
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
   sanitizer runtime is present.
 * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
   a C++ ABI library, and is always linked in.
 * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
   C++ ABI library, and is only linked in when linking a C++ binary.

This change also switches us to using -whole-archive for the ubsan runtime
(which is made possible by the above split), and switches us to only linking
the sanitizer runtime into the main binary and not into DSOs (which is made
possible by using -whole-archive).

The motivation for this is to only link a single copy of sanitizer_common
into any binary. This is becoming important now because we want to share
more state between multiple sanitizers in the same process (for instance,
we want a single shared output mutex).

The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't
need this complexity.

llvm-svn: 177605
2013-03-20 23:49:07 +00:00
Shankar Easwaran 71738cafe6 [ELF][Hexagon][test] check .got.plt order
llvm-svn: 177604
2013-03-20 23:39:43 +00:00
Shankar Easwaran 0fa1b3c86a [X86_64][test] check that interp section is not emitted when building dynamic libraries
llvm-svn: 177603
2013-03-20 23:34:36 +00:00
Reid Kleckner e23604da5f [lit] Avoid CRLFs in bash scripts on Windows
Native Windows Python will do line ending translation by default, which
we don't want in bash scripts.  If we're not native Windows Python, then
'b' is ignored.

llvm-svn: 177602
2013-03-20 23:32:14 +00:00
Bill Wendling 7184d34f96 Add declaration for linux.
llvm-svn: 177601
2013-03-20 23:21:08 +00:00
Justin Holewinski 7478f3d776 Make variable name more explicit and eliminate redundant lookup in SDNodeOrdering
llvm-svn: 177600
2013-03-20 23:10:59 +00:00
Jakob Stoklund Olesen 712f674880 Model prefetches and barriers as loads.
It's not yet clear if these instructions need a more careful model.

llvm-svn: 177599
2013-03-20 23:09:53 +00:00
Jakob Stoklund Olesen 5b535c965e Add a catch-all WriteSystem SchedWrite type.
This is used for all the expensive system instructions.

llvm-svn: 177598
2013-03-20 23:09:50 +00:00
Enrico Granata e7ed0afee2 Making a manual mode of operation for measurements, where you can manually call start() and stop() instead of using the function-call syntax
This is especially useful to take measurements that span multiple test steps, or where you need to have different operations fall under the same measurement

An example of use is in the formatters perf test case

llvm-svn: 177597
2013-03-20 23:01:28 +00:00
Nadav Rotem 4536d582fd When computing the demanded bits of Load SDNodes, make sure that we are looking at the loaded-value operand and not the ptr result (in case of pre-inc loads).
rdar://13348420

llvm-svn: 177596
2013-03-20 22:53:44 +00:00
David Blaikie 3b88852a2d Debug Info: Swap the 2nd and 3rd parameters to DICompileUnit to match the common DIScope prefix
llvm-svn: 177595
2013-03-20 22:52:54 +00:00