llvm-project/llvm/lib
Chris Lattner 5a945e3616 Rename ConstantHandling.* -> ConstantFolding.*
Move a bunch of (now) private stuff from ConstantFolding.h into
ConstantFolding.cpp.

This _finally_ gets us to a place where we have a sane constant folder.  The
rules are:

1. LLVM clients now use ConstantExpr::get* methods to fold constants.  If they
   cannot be folded, a constantexpr is created, so these methods always return
   valid Constant*'s.
2. The implementation of ConstantExpr::get* uses the functions exposed by
   ConstantFolding.h to try to fold constants.  If they cannot be folded,
   they should return a null pointer.
3. The implementation of ConstantFolding can do whatever it wants, and only
   has one client (Constants.cpp)

This cuts down on the wierd dependencies, and eliminates the two interfaces.
The old constanthandling interface was especially bad for clients to use
because almost none of them took the failure condition into consideration,
thus leading to obscure problems.

llvm-svn: 10807
2004-01-12 21:13:12 +00:00
..
Analysis Remove use of ConstantHandling itf 2004-01-12 18:02:15 +00:00
AsmParser Don't use ConstantExpr::getShift anymore 2004-01-12 19:08:43 +00:00
Bytecode Don't use ConstantExpr::getShift anymore 2004-01-12 19:08:43 +00:00
CWriter Turn off "attribute weak" to pacify Mac OS X's system compiler, which prints a 2003-12-11 00:24:36 +00:00
CodeGen Make LiveVariables::HandlePhysRegUse and 2004-01-11 09:18:45 +00:00
Debugger Fix some typos and copy-and-paste-os in comments, and doxygenify. 2004-01-05 17:22:52 +00:00
ExecutionEngine Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficiently 2003-12-31 20:21:04 +00:00
Support Remove use of ConstantHandling itf 2004-01-12 20:13:04 +00:00
Target Eliminate use of ConstantHandling itf 2004-01-12 18:08:18 +00:00
Transforms Clean up #includes 2004-01-12 19:56:36 +00:00
VMCore Rename ConstantHandling.* -> ConstantFolding.* 2004-01-12 21:13:12 +00:00
Makefile Add new dir 2004-01-05 05:25:59 +00:00