- Jun 16, 2012
-
-
Benjamin Kramer authored
llvm-svn: 158608
-
Hal Finkel authored
This cleans up the method used to find trip counts in order to form CTR loops on PPC. This refactoring allows the pass to find loops which have a constant trip count but also happen to end with a comparison to zero. This also adds explicit FIXMEs to mark two different classes of loops that are currently ignored. In addition, we now search through all potential induction operations instead of just the first. Also, we check the predicate code on the conditional branch and abort the transformation if the code is not EQ or NE, and we then make sure that the branch to be transformed matches the condition register defined by the comparison (multiple possible comparisons will be considered). llvm-svn: 158607
-
Hal Finkel authored
The present implementation handles only TBAA and FP metadata, discarding everything else. For debug metadata, the current behavior is maintained (the debug metadata associated with one of the instructions will be kept, discarding that attached to the other). This should address PR 13040. llvm-svn: 158606
-
Hal Finkel authored
There are other passes, BBVectorize specifically, that also need some of this functionality. llvm-svn: 158605
-
Rafael Espindola authored
llvm-svn: 158604
-
Kay Tiong Khoo authored
llvm-svn: 158603
-
NAKAMURA Takumi authored
llvm-svn: 158602
-
Evan Cheng authored
It's not deterministic to iterate over SmallPtrSet. Replace it with SmallSetVector. Patch by Daniel Reynaud. rdar://11671029 llvm-svn: 158594
-
Pete Cooper authored
Dynamic GEPs created by SROA needed to insert extra "i32 0" operands to index through structs and arrays to get to the vector being indexed. llvm-svn: 158590
-
Chandler Carruth authored
the address of it. Found by a checking STL implementation used on a dragonegg builder. Sorry about this one. =/ llvm-svn: 158582
-
Chandler Carruth authored
This is likely only the tip of the ice berg, but this particular bug caused any double-free on a glibc system to turn into a deadlock! It is not generally safe to either allocate or release heap memory from within the signal handler. The 'pop_back()' in RemoveFilesToRemove was deleting memory and causing the deadlock. What's worse, eraseFromDisk in PathV1 has lots of allocation and deallocation paths. We even passed 'true' in a place that would have caused the *signal handler* to try to run the 'system' system call and shell out to 'rm -rf'. That was never going to work... This patch switches the file removal to use a vector of strings so that the exact text needed for the 'unlink' system call can be stored there. It switches the loop to be a boring indexed loop, and directly calls unlink without looking at the error. It also works quite hard to ensure that calling 'c_str()' is safe, by ensuring that the non-signal-handling code path that manipulates the vector always leaves it in a state where every element has already had 'c_str()' called at least once. I dunno exactly how overkill this is, but it fixes the deadlock-on-double free issue, and seems likely to prevent any other issues from sneaking up. Sorry for not having a test case, but I *really* don't know how to test signal handling code easily.... llvm-svn: 158580
-
Jakob Stoklund Olesen authored
We now have a proper machine code verifier pass between register allocation and rewriting. llvm-svn: 158577
-
Jakob Stoklund Olesen authored
llvm-svn: 158575
-
Jakob Stoklund Olesen authored
Calling checkRegMaskInterference(VirtReg) checks if VirtReg crosses any regmask operands, regardless of the registers they clobber. llvm-svn: 158563
-
Kevin Enderby authored
iaspr, espr and xpsr which also needed to have 0b10 in their mask encoding bits. llvm-svn: 158560
-
- Jun 15, 2012
-
-
Manman Ren authored
This patch will optimize abs(x-y) FROM sub, movs, rsbmi TO subs, rsbmi For abs, we will use cmp instead of movs. This is necessary because we already have an existing peephole pass which optimizes away cmp following sub. rdar: 11633193 llvm-svn: 158551
-
Kay Tiong Khoo authored
llvm-svn: 158543
-
Andrew Trick authored
For non-address users, Base and Scaled registers are not specially associated to fit an address mode, so SCEVExpander should apply normal expansion rules. Otherwise we may sink computation into inner loops that have already been optimized. llvm-svn: 158537
-
Andrew Trick authored
llvm-svn: 158536
-
Bill Wendling authored
llvm-svn: 158535
-
Pete Cooper authored
Allow SROA to split up an array of vectors into multiple vectors, even when the vectors are dynamically indexed llvm-svn: 158529
-
Rafael Espindola authored
linkonce linkage. For example, it is not valid to add unnamed_addr. This also fixes a crash in g++.dg/opt/static5.C. llvm-svn: 158528
-
Jakob Stoklund Olesen authored
This probably mostly shows up in bugpoint-generated code. llvm-svn: 158527
-
Jakob Stoklund Olesen authored
We only do very limited physreg coalescing now, but we still merge virtual registers into reserved registers. llvm-svn: 158526
-
Rafael Espindola authored
Patch extracted from a larger one by the PaX team. I added the testcases and tightened error handling a bit. llvm-svn: 158523
-
Duncan Sands authored
example degenerate phi nodes and binops that use themselves in unreachable code. Thanks to Charles Davis for the testcase that uncovered this can of worms. llvm-svn: 158508
-
Craig Topper authored
llvm-svn: 158497
-
Marshall Clow authored
llvm-svn: 158485
-
Marshall Clow authored
llvm-svn: 158484
-
Pete Cooper authored
Recommit r158407: Allow SROA to look at a vector type and see if the offset is out of range to be replaced with a scalar access. Now with additional fix and test for indexing into a vector inside a struct llvm-svn: 158479
-
Rafael Espindola authored
globaldce. Globaldce was already removing linkonce globals, but globalopt was not. llvm-svn: 158476
-
Pete Cooper authored
Can someone with more knowledge of this please look at other entries to see if others need moved. llvm-svn: 158474
-
- Jun 14, 2012
-
-
Akira Hatanaka authored
llvm-svn: 158471
-
Akira Hatanaka authored
being used by Mips16 or Micro Mips 2. clean up a few lines too long encountered Patch by Reed Kotler. llvm-svn: 158470
-
Akira Hatanaka authored
the last instruction of a basic block. llvm-svn: 158468
-
Lang Hames authored
llvm-svn: 158467
-
Pete Cooper authored
This reverts commit 12c1f86ffa731e2952c80d2cc577000c96b8962c. llvm-svn: 158462
-
Andrew Trick authored
llvm-svn: 158461
-
Pete Cooper authored
Recommit r158407: Allow SROA to look at a vector type and see if the offset is out of range to be replaced with a scalar access. Now with additional fix and test for indexing into a vector inside a struct llvm-svn: 158454
-
NAKAMURA Takumi authored
llvm-svn: 158446
-