- Mar 06, 2013
-
-
Jim Grosbach authored
When considering folding a bitcast of an alloca into the alloca itself, make sure we don't shrink the amount of memory being allocated, or things rapidly go sideways. rdar://13324424 llvm-svn: 176547
-
- Mar 04, 2013
-
-
Lang Hames authored
GlobalValue linkage up to ExternalLinkage in the ExtractGV pass. This prevents linkonce and linkonce_odr symbols from being DCE'd. llvm-svn: 176459
-
Preston Gurd authored
* Only apply divide bypass optimization when not optimizing for size. * Fixed bug caused by constant for 0 value of type Int32, used dividend type to generate the constant instead. * For atom x86-64 apply the divide bypass to use 16-bit divides instead of 64-bit divides when operand values are small enough. * Added lit tests for 64-bit divide bypass. Patch by Tyler Nowicki! llvm-svn: 176442
-
- Mar 02, 2013
-
-
Nadav Rotem authored
The LoopVectorizer often runs multiple times on the same function due to inlining. When this happens the loop vectorizer often vectorizes the same loops multiple times, increasing code size and adding unneeded branches. With this patch, the vectorizer during vectorization puts metadata on scalar loops and marks them as 'already vectorized' so that it knows to ignore them when it sees them a second time. PR14448. llvm-svn: 176399
-
Peter Collingbourne authored
llvm-svn: 176397
-
- Mar 01, 2013
-
-
Benjamin Kramer authored
Fixes PR15384. llvm-svn: 176366
-
- Feb 28, 2013
-
-
Quentin Colombet authored
The instcombine recognized pattern looks like: a = b * c d = a +/- Cst or a = b * c d = Cst +/- a When creating the new operands for fadd or fsub instruction following the related fmul, the first operand was created with the second original operand (M0 was created with C1) and the second with the first (M1 with Opnd0). The fix consists in creating the new operands with the appropriate original operand, i.e., M0 with Opnd0 and M1 with C1. llvm-svn: 176300
-
Evgeniy Stepanov authored
Shadow checks are disabled and memory loads always produce fully initialized values in functions that don't have a sanitize_memory attribute. Value and argument shadow is propagated as usual. This change also updates blacklist behaviour to match the above. llvm-svn: 176247
-
Evgeniy Stepanov authored
llvm-svn: 176240
-
- Feb 27, 2013
-
-
Benjamin Kramer authored
This properly asks TargetLibraryInfo if a call is available and if it is, it can be translated into the corresponding LLVM builtin. We don't vectorize sqrt() yet because I'm not sure about the semantics for negative numbers. The other intrinsic should be exact equivalents to the libm functions. Differential Revision: http://llvm-reviews.chandlerc.com/D465 llvm-svn: 176188
-
Nick Lewycky authored
passing a null pointer to the function name in to GCDAProfiling, and add another switch onto GCOVProfiling. llvm-svn: 176173
-
Nick Lewycky authored
not llvm. llvm-svn: 176172
-
Nadav Rotem authored
For each function that we optimize we initialize a new list of lib functions. For each function name we malloc memory. This patch changes the Libcall map to use BumpPtrAllocator. Now we malloc only once. This speeds up instcombine by a few % on a large c++ program. llvm-svn: 176170
-
Nick Lewycky authored
clean up this code a tiny bit. No functionality change. llvm-svn: 176168
-
Pedro Artigas authored
enhancement done the trivial way; by extending inputs and truncating outputs which is addequate for targets with little or no support for integer arithmetic on integer types less than 32 bits. llvm-svn: 176139
-
- Feb 26, 2013
-
-
Kostya Serebryany authored
These are two related changes (one in llvm, one in clang). LLVM: - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode) - rename thread_safety => sanitize_thread - rename no_uninitialized_checks -> sanitize_memory CLANG: - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis)) - add __attribute__((no_sanitize_thread)) - add __attribute__((no_sanitize_memory)) for S in address thread memory If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not set llvm attribute sanitize_S llvm-svn: 176075
-
- Feb 24, 2013
-
-
Benjamin Kramer authored
This is a common pattern with dyn_cast and similar constructs, when the PHI no longer depends on the select it can often be turned into a simpler construct or even get hoisted out of the loop. PR15340. llvm-svn: 175995
-
- Feb 23, 2013
-
-
Michael Gottesman authored
rdar://13273675. llvm-svn: 175939
-
- Feb 22, 2013
-
-
Bill Wendling authored
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should not treat the callee function as a built-in function. I.e., it shouldn't try to replace that function with different code. llvm-svn: 175835
-
- Feb 21, 2013
-
-
Renato Golin authored
Storing the load/store instructions with the values and inspect them using Alias Analysis to make sure they don't alias, since the GEP pointer operand doesn't take the offset into account. Trying hard to not add any extra cost to loads and stores that don't overlap on global values, AA is *only* calculated if all of the previous attempts failed. Using biggest vector register size as the stride for the vectorization access, as we're being conservative and the cost model (which calculates the real vectorization factor) is only run after the legalization phase. We might re-think this relationship in the future, but for now, I'd rather be safe than sorry. llvm-svn: 175818
-
Chad Rosier authored
llvm-svn: 175804
-
- Feb 20, 2013
-
-
Chad Rosier authored
llvm-svn: 175658
-
Kostya Serebryany authored
llvm-svn: 175617
-
- Feb 19, 2013
-
-
Jakub Staszak authored
llvm-svn: 175568
-
Jakub Staszak authored
llvm-svn: 175567
-
Jakub Staszak authored
llvm-svn: 175565
-
Jakub Staszak authored
llvm-svn: 175562
-
Kostya Serebryany authored
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or packed structures. Instrumentation is done with two 1-byte checks (first and last bytes) and if the error is found __asan_report_load_n(addr, real_size) or __asan_report_store_n(addr, real_size) is called. Also, call these two new functions in memset/memcpy instrumentation. asan-rt part will follow. llvm-svn: 175507
-
Bill Wendling authored
llvm-svn: 175476
-
Bill Wendling authored
llvm-svn: 175470
-
- Feb 18, 2013
-
-
Kostya Serebryany authored
[asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution llvm-svn: 175442
-
- Feb 17, 2013
-
-
Hal Finkel authored
This fixes PR15289. This bug was introduced (recently) in r175215; collecting all std::vector references for candidate pairs to delete at once is invalid because subsequent lookups in the owning DenseMap could invalidate the references. bugpoint was able to reduce a useful test case. Unfortunately, because whether or not this asserts depends on memory layout, this test case will sometimes appear to produce valid output. Nevertheless, running under valgrind will reveal the error. llvm-svn: 175397
-
Bill Wendling authored
(or (bool?A:B),(bool?C:D)) --> (bool?(or A,C):(or B,D)) By the time the OR is visited, both the SELECTs have been visited and not optimized and the OR itself hasn't been transformed so we do this transform in the hopes that the new ORs will be optimized. The transform is explicitly disabled for vector-selects until "codegen matures to handle them better". Patch by Muhammad Tauqir! llvm-svn: 175380
-
- Feb 16, 2013
-
-
Jakub Staszak authored
No functionality change. llvm-svn: 175364
-
- Feb 15, 2013
-
-
Hal Finkel authored
Several functions and variable names used the term 'tree' to refer to what is actually a DAG. Correcting this mistake will, hopefully, prevent confusion in the future. No functionality change intended. llvm-svn: 175278
-
Arnaud A. de Grandmaison authored
llvm-svn: 175273
-
Arnaud A. de Grandmaison authored
It enables to work with a smaller constant, which is target friendly for those which can compare to immediates. It also avoids inserting a shift in favor of a trunc, which can be free on some targets. This used to work until LLVM-3.1, but regressed with the 3.2 release. llvm-svn: 175270
-
Kostya Serebryany authored
[asan] support long double on 64-bit. See https://code.google.com/p/address-sanitizer/issues/detail?id=151 llvm-svn: 175266
-
Benjamin Kramer authored
llvm-svn: 175264
-
Hal Finkel authored
For some basic blocks, it is possible to generate many candidate pairs for relatively few pairable instructions. When many (tens of thousands) of these pairs are generated for a single instruction group, the time taken to generate and rank the different vectorization plans can become quite large. As a result, we now cap the number of candidate pairs within each instruction group. This is done by closing out the group once the threshold is reached (set now at 3000 pairs). Although this will limit the overall compile-time impact, this may not be the best way to achieve this result. It might be better, for example, to prune excessive candidate pairs after the fact the prevent the generation of short, but highly-connected groups. We can experiment with this in the future. This change reduces the overall compile-time slowdown of the csa.ll test case in PR15222 to ~5x. If 5x is still considered too large, a lower limit can be used as the default. This represents a functionality change, but only for very large inputs (thus, there is no regression test). llvm-svn: 175251
-