Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | fix a crash analyzing constants in 176.gcc/expr.c with my next patch. It was | Chris Lattner | 2008-11-12 | 1 | -16/+34 | |
| | | | | | | | | crashing because we errors are ignored in subexpressions that are not evaluated, but we still evaluate the result of parents. This would cause an assertion because the erroneous subexpr didn't have its result value set to the right type. llvm-svn: 59110 | |||||
* | Teach the aggressive constant folder to fold X && 0 -> 0 and X || 1 -> 1 | Chris Lattner | 2008-11-12 | 1 | -1/+21 | |
| | | | | llvm-svn: 59105 | |||||
* | Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵ | Sebastian Redl | 2008-11-11 | 1 | -14/+10 | |
| | | | | | | expressions, both of values and types. llvm-svn: 59057 | |||||
* | PR2919: __builtin_types_compatible_p strips CRV qualifiers. | Daniel Dunbar | 2008-10-24 | 1 | -1/+7 | |
| | | | | llvm-svn: 58079 | |||||
* | Teach tryEvaluate that fabs, copysign, and unary +/- are constants for | Daniel Dunbar | 2008-10-16 | 1 | -1/+36 | |
| | | | | | | | | floats. - With testcase, which also has some other things GCC folds but we don't commented out in it. llvm-svn: 57624 | |||||
* | Fix test suite regression, getFloatTypeSemantics shouldn't be called | Daniel Dunbar | 2008-10-14 | 1 | -4/+6 | |
| | | | | | | on non-float types. llvm-svn: 57477 | |||||
* | Adjust calls to APFloat conversion for new interface. | Dale Johannesen | 2008-10-09 | 1 | -2/+3 | |
| | | | | llvm-svn: 57332 | |||||
* | ExprConstant should not abort when it sees a pointer constant that isn't. | Chris Lattner | 2008-10-06 | 1 | -3/+0 | |
| | | | | llvm-svn: 57162 | |||||
* | Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExpr | Chris Lattner | 2008-10-06 | 1 | -0/+7 | |
| | | | | | | | which is checking for something that can be inconsistent with what we can constant fold. llvm-svn: 57159 | |||||
* | Move folding of __builtin_classify_type out of the CallExpr | Chris Lattner | 2008-10-06 | 1 | -2/+57 | |
| | | | | | | interface into the constant folding interface. llvm-svn: 57158 | |||||
* | Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cpp | Chris Lattner | 2008-10-06 | 1 | -0/+14 | |
| | | | | llvm-svn: 57157 | |||||
* | Teach FloatExprEvaluator to evaluate __builtin_huge_val and inf. | Chris Lattner | 2008-10-06 | 1 | -3/+5 | |
| | | | | llvm-svn: 57154 | |||||
* | Add a comment that describes tryEvaluate. Make tryEvaluate fold | Chris Lattner | 2008-10-06 | 1 | -5/+37 | |
| | | | | | | | __builtin_constant_p properly, and add some scaffolding for FloatExprEvaluator to eventually handle huge_val and inf. llvm-svn: 57152 | |||||
* | Initial implementation of floats in Expr::tryEvaluate; this doesn't | Eli Friedman | 2008-08-22 | 1 | -21/+82 | |
| | | | | | | | implement some things, like unary operators and casts, but it's enough to fix PR2703 as filed. llvm-svn: 55155 | |||||
* | Add ExplicitCastExpr to replace the current CastExpr, and have ↵ | Argyrios Kyrtzidis | 2008-08-18 | 1 | -3/+0 | |
| | | | | | | | | | | | ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr llvm-svn: 54955 | |||||
* | More #include cleaning | Daniel Dunbar | 2008-08-11 | 1 | -1/+0 | |
| | | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632 | |||||
* | Remove the old evaluator code. | Anders Carlsson | 2008-08-10 | 1 | -40/+2 | |
| | | | | llvm-svn: 54615 | |||||
* | Turn on the new constant expression evaluator; it isn't | Eli Friedman | 2008-08-09 | 1 | -1/+1 | |
| | | | | | | | anywhere near complete, but I don't know of any issues, and it can handle enough to allow removing the I-C-E pointer cast hack. llvm-svn: 54597 | |||||
* | Minor tweak plus a couple of FIXMEs. | Eli Friedman | 2008-07-27 | 1 | -2/+7 | |
| | | | | llvm-svn: 54119 | |||||
* | expand casts to handle what isIntegerConstantExpr handles. | Chris Lattner | 2008-07-12 | 1 | -11/+52 | |
| | | | | | | Casts from pointers remain a problem. :) llvm-svn: 53501 | |||||
* | Add support for __builtin_type_compatible_p, enums, etc. | Chris Lattner | 2008-07-12 | 1 | -16/+47 | |
| | | | | llvm-svn: 53500 | |||||
* | start remembering diagnostics for various cases, add some missing | Chris Lattner | 2008-07-12 | 1 | -28/+85 | |
| | | | | | | code. Switch to Eli's getIntWidth method. llvm-svn: 53499 | |||||
* | Provide a structure for passing down 'is evaluated' and passing up | Chris Lattner | 2008-07-11 | 1 | -25/+62 | |
| | | | | | | diagnosic+loc info for i-c-e evaluation. llvm-svn: 53490 | |||||
* | simplify some code a bit. | Chris Lattner | 2008-07-11 | 1 | -48/+42 | |
| | | | | llvm-svn: 53477 | |||||
* | share code between sizeof(expr) and sizeof(type) | Chris Lattner | 2008-07-11 | 1 | -61/+44 | |
| | | | | llvm-svn: 53475 | |||||
* | implement support for __extension__, make sure the result of a | Chris Lattner | 2008-07-11 | 1 | -13/+30 | |
| | | | | | | comparison has the right width. llvm-svn: 53469 | |||||
* | add a new getIntTypeSizeInBits method. | Chris Lattner | 2008-07-11 | 1 | -11/+12 | |
| | | | | llvm-svn: 53468 | |||||
* | rename "SInt" methods to "Int" in APValue. | Chris Lattner | 2008-07-11 | 1 | -1/+1 | |
| | | | | llvm-svn: 53467 | |||||
* | make the new evaluator avoid conversions APValue<->APSInt in some cases. | Chris Lattner | 2008-07-11 | 1 | -67/+51 | |
| | | | | | | Add some accessors to APValue. llvm-svn: 53465 | |||||
* | rearrange some code, no functionality changes. | Chris Lattner | 2008-07-11 | 1 | -85/+98 | |
| | | | | llvm-svn: 53463 | |||||
* | Fix small bug. The evaluator now works well enough to pass all tests | Anders Carlsson | 2008-07-08 | 1 | -1/+2 | |
| | | | | llvm-svn: 53238 | |||||
* | More constant expression work. | Anders Carlsson | 2008-07-08 | 1 | -6/+112 | |
| | | | | llvm-svn: 53235 | |||||
* | Move out some methods. | Anders Carlsson | 2008-07-08 | 1 | -159/+149 | |
| | | | | llvm-svn: 53234 | |||||
* | More work. | Anders Carlsson | 2008-07-08 | 1 | -1/+78 | |
| | | | | llvm-svn: 53233 | |||||
* | Compilation fix | Seo Sanghyeon | 2008-07-08 | 1 | -1/+1 | |
| | | | | llvm-svn: 53222 | |||||
* | Port more of Eli's evaluator over. This makes the int evaluator handle ↵ | Anders Carlsson | 2008-07-08 | 1 | -7/+143 | |
| | | | | | | binary and unary operators. llvm-svn: 53221 | |||||
* | Commit beginnings of int evaluator. Currently not used. | Anders Carlsson | 2008-07-08 | 1 | -0/+40 | |
| | | | | llvm-svn: 53219 | |||||
* | Shuffle things around in preparation for integrating Eli's constant evaluator. | Anders Carlsson | 2008-07-03 | 1 | -0/+60 | |
llvm-svn: 53074 |