From 5fbada2e2142e6227f8312dcff242b1729e89c82 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 8 May 2002 22:19:01 +0000 Subject: [PATCH] Add expr reassociation pass prototype llvm-svn: 2558 --- llvm/include/llvm/Transforms/Scalar.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h index 144db2367092..ba8b90ca47dc 100644 --- a/llvm/include/llvm/Transforms/Scalar.h +++ b/llvm/include/llvm/Transforms/Scalar.h @@ -110,6 +110,16 @@ Pass *createInstructionCombiningPass(); Pass *createPromoteMemoryToRegister(); +//===----------------------------------------------------------------------===// +// +// This pass reassociates commutative expressions in an order that is designed +// to promote better constant propogation, GCSE, LICM, PRE... +// +// For example: 4 + (x + 5) -> x + (4 + 5) +// +Pass *createReassociatePass(); + + //===----------------------------------------------------------------------===// // // These functions removes symbols from functions and modules.