- Nov 25, 2012
-
-
Meador Inge authored
This patch migrates the ffs* optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 168571
-
Nadav Rotem authored
llvm-svn: 168570
-
Nadav Rotem authored
llvm-svn: 168569
-
Nadav Rotem authored
llvm-svn: 168568
-
Nadav Rotem authored
llvm-svn: 168560
-
Nadav Rotem authored
llvm-svn: 168559
-
Nadav Rotem authored
llvm-svn: 168558
-
- Nov 23, 2012
-
-
Benjamin Kramer authored
It can delete the block, and the loop continues on free'd memory. No change in output. Found by valgrind. llvm-svn: 168525
-
Joey Gouly authored
llvm-svn: 168511
-
- Nov 22, 2012
-
-
NAKAMURA Takumi authored
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp: Prune AddressSanitizerCreateGlobalRedzonesPass::ID. [-Wunused-variable] llvm-svn: 168499
-
Kostya Serebryany authored
[asan] rip off the creation of global redzones from the main AddressSanitizer class into a separate class. The intent is to make it a separate ModulePass in the following commmits llvm-svn: 168484
-
- Nov 21, 2012
-
-
Chandler Carruth authored
Now if we can transform an alloca into a single vector value, but it has subvector, non-element accesses, we form the appropriate shufflevectors to allow SROA to proceed. This fixes PR14055 which pointed out a very common pattern that SROA couldn't handle -- mixed vec3 and vec4 operations on a single alloca. llvm-svn: 168418
-
- Nov 20, 2012
-
-
Kostya Serebryany authored
llvm-svn: 168368
-
Kostya Serebryany authored
[asan] don't instrument linker-initialized globals even with external linkage in -asan-initialization-order mode llvm-svn: 168367
-
Kostya Serebryany authored
[asan] make sure that linker-initialized globals (non-extern) are not instrumented even in -asan-initialization-order mode. This time with a test llvm-svn: 168366
-
Chandler Carruth authored
printing functions themselves. Part of PR14324 (which should have just been a patch to the list, but hey...) llvm-svn: 168362
-
Chandler Carruth authored
The issue is that we may end up with newly OOB loads when speculating a load into the predecessors of a PHI node, and this confuses the new integer splitting logic in some cases, triggering an assertion failure. In fact, the branch in question must be dead code as it loads from a too-narrow alloca. Add code to handle this gracefully and leave the requisite FIXMEs for both optimizing more aggressively and doing more to aid sanitizing invalid code which triggers these patterns. llvm-svn: 168361
-
Bill Wendling authored
When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. llvm-svn: 168354
-
Chandler Carruth authored
llvm-svn: 168347
-
Chandler Carruth authored
to properly handle the combinations of these with split integer loads and stores. This essentially replaces Evan's r168227 by refactoring the code in a different way, and trynig to mirror that refactoring in both the load and store sides of the rewriting. Generally speaking there was some really problematic duplicated code here that led to poorly founded assumptions and then subtle bugs. Now much of the code actually flows through and follows a more consistent style and logical path. There is still a tiny bit of duplication on the store side of things, but it is much less bad. This also changes the logic to never re-use a load or store instruction as that was simply too error prone in practice. I've added a few tests (one a reduction of the one in Evan's original patch, which happened to be the same as the report in PR14349). I'm going to look at adding a few more tests for things I found and fixed in passing (such as the volatile tests in the vectorizable predicate). This patch has survived bootstrap, and modulo one bugfix survived Duncan's test suite, but let me know if anything else explodes. llvm-svn: 168346
-
- Nov 19, 2012
-
-
Bob Wilson authored
This patch moves the isInlineViable function from the InlineAlways pass into the InlineCostAnalyzer and then changes the InlineCost computation to use that simple check for always-inline functions. All the special-case checks for AlwaysInline in the CallAnalyzer can then go away. llvm-svn: 168300
-
- Nov 18, 2012
-
-
Duncan Sands authored
removed in commit 168035, but I missed this bit). llvm-svn: 168292
-
Duncan Sands authored
operands of the expression being written was wrongly thought to be reusable as an inner node of the expression resulting in it turning up as both an inner node *and* a leaf, creating a cycle in the def-use graph. This would have caused the verifier to blow up if things had gotten that far, however it managed to provoke an infinite loop first. llvm-svn: 168291
-
Nick Lewycky authored
llvm-svn: 168280
-
- Nov 17, 2012
-
-
Benjamin Kramer authored
llvm-svn: 168259
-
Nadav Rotem authored
At the moment we still require to have an integer induction variable (for example: i++). llvm-svn: 168231
-
Evan Cheng authored
Teach SROA rewriteVectorizedStoreInst to handle cases when the loaded value is narrower than the stored value. rdar://12713675 llvm-svn: 168227
-
- Nov 16, 2012
-
-
Duncan Sands authored
llvm-svn: 168196
-
Duncan Sands authored
replaced by this patch is equivalent to the new logic, but you'd be wrong, and that's exactly where the bug was. There's a similar bug in instsimplify which manifests itself as instsimplify failing to simplify this, rather than doing it wrong, see next commit. llvm-svn: 168181
-
Hans Wennborg authored
Patch by Pekka Jääskeläinen! llvm-svn: 168176
-
Nadav Rotem authored
LoopVectorize: Division reductions generate incorrect code. Remove the part of the code that deals with divs. Thanks to Paul Redmond for catching this while reviewing the code. llvm-svn: 168142
-
- Nov 15, 2012
-
-
Andrew Trick authored
llvm-svn: 168058
-
Andrew Trick authored
llvm-svn: 168057
-
Dmitri Gribenko authored
llvm-svn: 168049
-
Hans Wennborg authored
For global variables that get the same value stored into them everywhere, GlobalOpt will replace them with a constant. The problem is that a thread-local GlobalVariable looks like one value (the address of the TLS var), but is different between threads. This patch introduces Constant::isThreadDependent() which returns true for thread-local variables and constants which depend on them (e.g. a GEP into a thread-local array), and teaches GlobalOpt not to track such values. llvm-svn: 168037
-
Duncan Sands authored
the utility for extracting a chain of operations from the IR, thought that it might as well combine any constants it came across (rather than just returning them along with everything else). On the other hand, the factorization code would like to see the individual constants (this is quite reasonable: it is much easier to pull a factor of 3 out of 2*3 than it is to pull it out of 6; you may think 6/3 isn't so hard, but due to overflow it's not as easy to undo multiplications of constants as it may at first appear). This patch therefore makes LinearizeExprTree stupider: it now leaves optimizing to the optimization part of reassociate, and sticks to just analysing the IR. llvm-svn: 168035
-
NAKAMURA Takumi authored
llvm-svn: 168013
-
- Nov 14, 2012
-
-
Hal Finkel authored
For now, this uses 8 on-stack elements. I'll need to do some profiling to see if this is the best number. Pointed out by Jakob in post-commit review. llvm-svn: 167966
-
Hal Finkel authored
Iterating over the children of each node in the potential vectorization plan must happen in a deterministic order (because it affects which children are erased when two children conflict). There was no need for this data structure to be a map in the first place, so replacing it with a vector is a small change. I believe that this was the last remaining instance if iterating over the elements of a Dense* container where the iteration order could matter. There are some remaining iterations over std::*map containers where the order might matter, but so long as the Value* for instructions in a block increase with the order of the instructions in the block (or decrease) monotonically, then this will appear to be deterministic. llvm-svn: 167942
-
Alexey Samsonov authored
llvm-svn: 167928
-