1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

477 Commits

Author SHA1 Message Date
Bill Wendling
b53357de39 Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165488
2012-10-09 07:45:08 +00:00
Bill Wendling
c00f4a514d Convert to using the Attributes::Builder interface.
llvm-svn: 165465
2012-10-09 00:01:21 +00:00
Micah Villmow
bb1a25cd67 Move TargetData to DataLayout.
llvm-svn: 165402
2012-10-08 16:38:25 +00:00
Kostya Serebryany
c67aaf9840 [tsan] add 3 internal flags for fine-grain control of what is instrumented and what is not.
llvm-svn: 165204
2012-10-04 05:28:50 +00:00
Dmitry Vyukov
073abe76d1 tsan: prepare for migration to new memory_order enum values (ABI compatible)
llvm-svn: 165107
2012-10-03 13:00:57 +00:00
Sylvestre Ledru
b77340e506 Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
llvm-svn: 164768
2012-09-27 10:14:43 +00:00
Sylvestre Ledru
1c5e7904de Fix a typo 'iff' => 'if'
llvm-svn: 164767
2012-09-27 09:59:43 +00:00
Bill Wendling
92f3ab845d Remove the `hasFnAttr' method from Function.
The hasFnAttr method has been replaced by querying the Attributes explicitly. No
intended functionality change.

llvm-svn: 164725
2012-09-26 21:48:26 +00:00
Bill Wendling
17ebc7c313 s/__llvm_gcov_flush/__gcov_flush/g
llvm-svn: 164040
2012-09-17 17:57:05 +00:00
Axel Naumann
bcdf671ac4 Fix a few vars that can end up being used without initialization.
The cases where no initialization happens should still be checked for logic flaws.

llvm-svn: 164032
2012-09-17 14:20:57 +00:00
Bill Wendling
a1af1f6f9f Remove comment.
llvm-svn: 163945
2012-09-14 22:35:49 +00:00
Bill Wendling
33543a2252 Use Nick's suggestion of storing a large NULL into the GV instead of memset, which requires TargetData.
llvm-svn: 163799
2012-09-13 14:32:30 +00:00
Bill Wendling
a959ed6f52 Introduce the __llvm_gcov_flush function.
This function writes out the current values of the counters and then resets
them. This can be used similarly to the __gcov_flush function to sync the
counters when need be. For instance, in a situation where the application
doesn't exit.
<rdar://problem/12185886>

llvm-svn: 163757
2012-09-13 00:09:55 +00:00
Kostya Serebryany
9330f23483 [asan] fix lint
llvm-svn: 163205
2012-09-05 09:00:18 +00:00
Kostya Serebryany
a56cf96db5 [asan] extend the blacklist functionality to handle global-init. Patch by Reid Watson
llvm-svn: 163199
2012-09-05 07:29:56 +00:00
Logan Chien
5dc162e9e0 Rename ANDROIDEABI to Android.
Most of the code guarded with ANDROIDEABI are not
ARM-specific, and having no relation with arm-eabi.
Thus, it will be more natural to call this
environment "Android" instead of "ANDROIDEABI".

Note: We are not using ANDROID because several projects
are using "-DANDROID" as the conditional compilation
flag.

llvm-svn: 163087
2012-09-02 09:29:46 +00:00
Alexey Samsonov
7f9c9b78c5 Whitespace
llvm-svn: 162907
2012-08-30 13:47:13 +00:00
Bill Wendling
cddd24c312 Pass by pointer and not std::string.
llvm-svn: 162888
2012-08-30 01:32:31 +00:00
Bill Wendling
3de0824b41 Revert r162855 in favor of changing clang to emit the absolute coverage file path.
llvm-svn: 162883
2012-08-30 00:34:21 +00:00
Bill Wendling
d3f96d717a Use the full path to output the .gcda file.
This lets the user run the program from a different directory and still have the
.gcda files show up in the correct place.
<rdar://problem/12179524>

llvm-svn: 162855
2012-08-29 20:30:44 +00:00
Bill Wendling
48eee0bfb4 Use ArrayRef instead of SmallVector when passing vector into function.
llvm-svn: 162851
2012-08-29 18:45:41 +00:00
Benjamin Kramer
b92d13cc42 Make MemoryBuiltins aware of TargetLibraryInfo.
This disables malloc-specific optimization when -fno-builtin (or -ffreestanding)
is specified. This has been a problem for a long time but became more severe
with the recent memory builtin improvements.

Since the memory builtin functions are used everywhere, this required passing
TLI in many places. This means that functions that now have an optional TLI
argument, like RecursivelyDeleteTriviallyDeadFunctions, won't remove dead
mallocs anymore if the TLI argument is missing. I've updated most passes to do
the right thing.

Fixes PR13694 and probably others.

llvm-svn: 162841
2012-08-29 15:32:21 +00:00
Kostya Serebryany
3025fe1d94 [asan/tsan] rename FunctionBlackList* to BlackList* as this class is not limited to functions any more
llvm-svn: 162566
2012-08-24 16:44:47 +00:00
Kostya Serebryany
9318c48cb3 [asan/tsan] extend the functionality of FunctionBlackList to globals and modules. Patch by Reid Watson.
llvm-svn: 162565
2012-08-24 16:40:11 +00:00
Richard Smith
8754482773 MaximumSpanningTree::EdgeWeightCompare: Make this comparator actually be a
strict weak ordering, and don't pass possibly-null pointers to dyn_cast.

llvm-svn: 162314
2012-08-21 21:03:40 +00:00
Kostya Serebryany
7ada43d99a [asan] add code to detect global initialization fiasco in C/C++. The sub-pass is off by default for now. Patch by Reid Watson. Note: this patch changes the interface between LLVM and compiler-rt parts of asan. The corresponding patch to compiler-rt will follow.
llvm-svn: 162268
2012-08-21 08:24:25 +00:00
Kostya Serebryany
8af4402528 [asan] implement --asan-always-slow-path, which is a part of the improvement to handle unaligned partially OOB accesses. See http://code.google.com/p/address-sanitizer/issues/detail?id=100
llvm-svn: 161937
2012-08-15 08:58:58 +00:00
Kostya Serebryany
06dbe5559a [asan] insert crash basic blocks inline as opposed to inserting them at the end of the function. This doesn't seem to fix or break anything, but is considered to be more friendly to downstream passes
llvm-svn: 161870
2012-08-14 14:04:51 +00:00
Kostya Serebryany
61dd5ba233 [asan] remove the code for --asan-merge-callbacks as it appears to be a bad idea. (partly related to Bug 13225)
llvm-svn: 161757
2012-08-13 14:08:46 +00:00
Nuno Lopes
4056c1ed13 revert r160742: it's breaking CMake build
original commit msg:
MemoryBuiltins: add support to determine the size of strdup'ed non-constant strings

llvm-svn: 160751
2012-07-25 18:49:28 +00:00
Nuno Lopes
e15b61fb0f MemoryBuiltins: add support to determine the size of strdup'ed non-constant strings
llvm-svn: 160742
2012-07-25 17:29:22 +00:00
Chandler Carruth
bf1cf2cb40 Move the initialization of the bounds checking pass. The pass itself
moved earlier. This fixes some layering issues.

llvm-svn: 160611
2012-07-22 05:19:32 +00:00
Nuno Lopes
66a3934c7a move the bounds checking pass to the instrumentation folder, where it belongs. I dunno why in the world I dropped it in the Scalar folder in the first place.
No functionality change.

llvm-svn: 160587
2012-07-20 22:39:33 +00:00
Kostya Serebryany
a57ebfbe10 [asan] make sure that the crash callbacks do not get merged (Chandler's idea: insert an empty InlineAsm). Change the order in which the new BBs are inserted: the slow path BB is insert between old BBs, the crash BB is inserted at the end. Don't create an empty BB (introduced by recent commits). Update the test. The experimental code that does manual crash callback merge will most likely be deleted later.
llvm-svn: 160544
2012-07-20 09:54:50 +00:00
Kostya Serebryany
a1220dc494 [asan] more code to merge crash callbacks. Doesn't fully work yet, but allows to hold performance experiments
llvm-svn: 160361
2012-07-17 11:04:12 +00:00
Kostya Serebryany
51756a72f1 [asan] a bit more refactoring, addressed some of the style comments from chandlerc, partially implemented crash callback merging (under flag)
llvm-svn: 160290
2012-07-16 17:12:07 +00:00
Kostya Serebryany
c80a9f4bea [asan] refactor instrumentation to allow merging the crash callbacks (not fully implemented yet, no functionality change except the BB order)
llvm-svn: 160284
2012-07-16 16:15:40 +00:00
Kostya Serebryany
ea753f7fc1 [asan] initialize asan error callbacks in runOnModule instead of doing that on-demand
llvm-svn: 160269
2012-07-16 14:09:42 +00:00
Chandler Carruth
800f86f31b Revert r160254 temporarily.
It turns out that ASan relied on the at-the-end block insertion order to
(purely by happenstance) disable some LLVM optimizations, which in turn
start firing when the ordering is made more "normal". These
optimizations in turn merge many of the instrumentation reporting calls
which breaks the return address based error reporting in ASan.

We're looking at several different options for fixing this.

llvm-svn: 160256
2012-07-16 10:01:02 +00:00
Chandler Carruth
2f34858fa0 Teach AddressSanitizer to create basic blocks in a more natural order.
This is particularly useful to the backend code generators which try to
process things in the incoming function order.

Also, cleanup some uses of IRBuilder to be a bit simpler and more clear.

llvm-svn: 160254
2012-07-16 08:58:53 +00:00
Chandler Carruth
0e3ed1b1f3 Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completes
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
2012-07-15 23:45:24 +00:00
Kostya Serebryany
4d76b79c2a [tsan] fix compile-time falilure found while building Chromium with tsan (tsan issue #3). A unit test will follow separately.
llvm-svn: 159736
2012-07-05 09:07:31 +00:00
Kostya Serebryany
d9130c7b17 [asan] small code simplification
llvm-svn: 159522
2012-07-02 11:42:29 +00:00
Bill Wendling
53675fa303 Don't reinsert the 'atexit' function if it already exists.
llvm-svn: 159491
2012-06-30 20:21:19 +00:00
Chandler Carruth
4b51f99c87 Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h
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
2012-06-29 12:38:19 +00:00
Kostya Serebryany
0075a4f152 [asan] set a hard limit on the number of instructions instrumented pear each BB. This is (hopefully temporary) workaround for PR13225
llvm-svn: 159344
2012-06-28 09:34:41 +00:00
Bill Wendling
e8949ecfa6 Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and
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
2012-06-28 00:05:13 +00:00
NAKAMURA Takumi
4599dee67a llvm/lib: [CMake] Add explicit dependency to intrinsics_gen.
llvm-svn: 159112
2012-06-24 13:32:01 +00:00
Hans Wennborg
8c011bd43a Extend the IL for selecting TLS models (PR9788)
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
2012-06-23 11:37:03 +00:00
Bill Wendling
f0e0ba446d Register the gcov "writeout" at init time. Don't list this as a d'tor. Instead,
inject some code in that will run via the "__mod_init_func" method that
registers the gcov "writeout" function to execute at exit time.

The problem is that the "__mod_term_func" method of specifying d'tors is
deprecated on Darwin. And it can lead to some ambiguities when dealing with
multiple libraries.
<rdar://problem/11110106>

llvm-svn: 157852
2012-06-01 23:14:32 +00:00