| Commit message (Collapse) | Author | Age | Files | Lines | 
| ... |  | 
| | 
| 
| 
|  | 
llvm-svn: 17136
 | 
| | 
| 
| 
| 
| 
|  | 
Patch contributed by Morten Ofstad. Thanks Morten!
llvm-svn: 17123
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Simplify code by simplifying terminators that branch to blocks that start
with an unreachable instruction.
llvm-svn: 17116
 | 
| | 
| 
| 
| 
| 
| 
|  | 
particular, invoke ret values are only live in the normal dest of the invoke
not in the unwind dest.
llvm-svn: 17108
 | 
| | 
| 
| 
| 
| 
| 
|  | 
If a function had no return instruction in it, and the result of the inlined
call instruction was used, we would crash.
llvm-svn: 17104
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
unneccesary.  This allows us to delete several hundred phi nodes of the
form PHI(x,x,x,undef) from 253.perlbmk and probably other programs as well.
This implements Mem2Reg/UndefValuesMerge.ll
llvm-svn: 17098
 | 
| | 
| 
| 
| 
| 
|  | 
to think that PHI[4, undef] == 4.
llvm-svn: 17096
 | 
| | 
| 
| 
|  | 
llvm-svn: 17056
 | 
| | 
| 
| 
|  | 
llvm-svn: 17046
 | 
| | 
| 
| 
|  | 
llvm-svn: 17045
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
nodes unless we KNOW that we are able to promote all of them.
This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll
llvm-svn: 16973
 | 
| | 
| 
| 
|  | 
llvm-svn: 16950
 | 
| | 
| 
| 
|  | 
llvm-svn: 16893
 | 
| | 
| 
| 
| 
| 
|  | 
potentially fold more in one pass.
llvm-svn: 16583
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
whose addresses where used by trivial phi nodes and select instructions.  This
is now performed by the instcombine pass, which is more powerful, is much
simpler, and is faster.  This allows the deletion of a bunch of code, two
FIXME's and two gotos.
llvm-svn: 16406
 | 
| | 
| 
| 
|  | 
llvm-svn: 16389
 | 
| | 
| 
| 
| 
| 
|  | 
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
 | 
| | 
| 
| 
|  | 
llvm-svn: 16347
 | 
| | 
| 
| 
| 
| 
|  | 
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
block (common in a switch), make sure to remove extra edges in successor
blocks.  This fixes CodeExtractor/2004-08-12-BlockExtractPHI.ll and should
be pulled into LLVM 1.3 (though the regression test need not be, as that
would require pulling in the LoopExtract.cpp changes).
llvm-svn: 15717
 | 
| | 
| 
| 
| 
| 
|  | 
the extracted code was, instead of putting it at the end of the function
llvm-svn: 15716
 | 
| | 
| 
| 
| 
| 
|  | 
Nate ran into when bugpointing siod.  This fix should go into LLVM 1.3
llvm-svn: 15712
 | 
| | 
| 
| 
| 
| 
|  | 
run into.  This should go into 1.3
llvm-svn: 15679
 | 
| | 
| 
| 
|  | 
llvm-svn: 15487
 | 
| | 
| 
| 
|  | 
llvm-svn: 15369
 | 
| | 
| 
| 
|  | 
llvm-svn: 15337
 | 
| | 
| 
| 
|  | 
llvm-svn: 15334
 | 
| | 
| 
| 
|  | 
llvm-svn: 15325
 | 
| | 
| 
| 
| 
| 
|  | 
"Support/Debug.h".
llvm-svn: 15089
 | 
| | 
| 
| 
| 
| 
| 
|  | 
return, clone the 'ret' BB code into the block AFTER the inlined call, not the
other way around.
llvm-svn: 15030
 | 
| | 
| 
| 
|  | 
llvm-svn: 15022
 | 
| | 
| 
| 
|  | 
llvm-svn: 14968
 | 
| | 
| 
| 
| 
| 
|  | 
- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953
 | 
| | 
| 
| 
| 
| 
|  | 
- Minimize redundant isa<GlobalValue> usage
llvm-svn: 14948
 | 
| | 
| 
| 
|  | 
llvm-svn: 14840
 | 
| | 
| 
| 
|  | 
llvm-svn: 14622
 | 
| | 
| 
| 
|  | 
llvm-svn: 14348
 | 
| | 
| 
| 
|  | 
llvm-svn: 14340
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
since May 1st.  In this code, the pred iterator was being invalidated sometimes
causing the wrong entries to be added to PHI nodes.
The fix for this is to defererence and safe the *PI value before we hack on
branch instructions, which changes use/def chains, which SOMETIMES invalidates
the iterator.
llvm-svn: 14278
 | 
| | 
| 
| 
| 
| 
|  | 
breaking the build on sparc is not acceptable.
llvm-svn: 14277
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Fix another non-deterministic behavior, this one should actually speed up the
code though as it was doing silly things.
llvm-svn: 14258
 | 
| | 
| 
| 
|  | 
llvm-svn: 14247
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
non-deterministic things like the ordering of blocks in the dominance
frontier of a BB.  Unfortunately, I don't know of a better way to solve
this problem than to explicitly sort the BB's in function-order before
processing them.  This is guaranteed to slow the pass down a bit, but
is absolutely necessary to get usable diffs between two different tools
executing the mem2reg or scalarrepl pass.
Before this, bazillions of spurious diff failures occurred all over the
place due to the different order of processing PHIs:
-       %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.0, uint 0, uint 0
+       %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.1, uint 0, uint 0
Now, the diffs match.
llvm-svn: 14244
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
nondeterministic results that depend on where these objects land in memory.
Instead, sort by the value of the constant, which is stable.
Before this patch, the -simplifycfg pass run from two different compilers
could cause different code to be generated, though it was semantically the
same:
@@ -12258,8 +12258,8 @@
        %s_addr.1 = phi sbyte* [ %s, %entry ], [ %inc.0, %no_exit ]             ; <sbyte*> [#uses=5]
        %tmp.1 = load sbyte* %s_addr.1          ; <sbyte> [#uses=1]
        switch sbyte %tmp.1, label %no_exit [
-                sbyte 0, label %loopexit
                 sbyte 46, label %loopexit
+                sbyte 0, label %loopexit
        ]
We need to stomp all of this stuff out.
llvm-svn: 14243
 | 
| | 
| 
| 
|  | 
llvm-svn: 14206
 | 
| | 
| 
| 
| 
| 
|  | 
PR371
llvm-svn: 14203
 | 
| | 
| 
| 
|  | 
llvm-svn: 14201
 | 
| | 
| 
| 
|  | 
llvm-svn: 14192
 | 
| | 
| 
| 
|  | 
llvm-svn: 14186
 |