diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-01-07 03:02:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-01-07 03:02:36 +0000 |
commit | 977679d6034791fd48a344e5b990503ba50fc242 (patch) | |
tree | a53e7c18e92d71fe32a7df3f76f4231433bc08eb /include/llvm | |
parent | ccec74738d0fc34f4bc2ac6909324e62705f1c38 (diff) | |
download | external_llvm-977679d6034791fd48a344e5b990503ba50fc242.zip external_llvm-977679d6034791fd48a344e5b990503ba50fc242.tar.gz external_llvm-977679d6034791fd48a344e5b990503ba50fc242.tar.bz2 |
Added a late machine instruction copy propagation pass. This catches
opportunities that only present themselves after late optimizations
such as tail duplication .e.g.
## BB#1:
movl %eax, %ecx
movl %ecx, %eax
ret
The register allocator also leaves some of them around (due to false
dep between copies from phi-elimination, etc.)
This required some changes in codegen passes. Post-ra scheduler and the
pseudo-instruction expansion passes have been moved after branch folding
and tail merging. They were before branch folding before because it did
not always update block livein's. That's fixed now. The pass change makes
independently since we want to properly schedule instructions after
branch folding / tail duplication.
rdar://10428165
rdar://10640363
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/Passes.h | 4 | ||||
-rw-r--r-- | include/llvm/InitializePasses.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index b4f6cac..f077f2b 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -193,6 +193,10 @@ namespace llvm { /// instructions. FunctionPass *createMachineSinkingPass(); + /// createMachineCopyPropagationPass - This pass performs copy propagation on + /// machine instructions. + FunctionPass *createMachineCopyPropagationPass(); + /// createPeepholeOptimizerPass - This pass performs peephole optimizations - /// like extension and comparison eliminations. FunctionPass *createPeepholeOptimizerPass(); diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index ce87f16..ed044c0 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -79,6 +79,7 @@ void initializeCallGraphAnalysisGroup(PassRegistry&); void initializeCodeGenPreparePass(PassRegistry&); void initializeConstantMergePass(PassRegistry&); void initializeConstantPropagationPass(PassRegistry&); +void initializeMachineCopyPropagationPass(PassRegistry&); void initializeCorrelatedValuePropagationPass(PassRegistry&); void initializeDAEPass(PassRegistry&); void initializeDAHPass(PassRegistry&); |