On Feb 27, 2007, at 12:51 PM, Reid Spencer wrote: > Can't we just change this part of ConstantInt: > > /// getTrue/getFalse - Return the singleton true/false values. > static inline ConstantInt *getTrue() { > if (TheTrueVal) return TheTrueVal; > return CreateTrueFalseVals(true); > } > static inline ConstantInt *getFalse() { > if (TheFalseVal) return TheFalseVal; > return CreateTrueFalseVals(false); > } > > into: > /// getTrue/getFalse - Return the singleton true/false values. > static inline ConstantInt *getTrue() { > return get(Type::Int1Ty, 1); > } > static inline ConstantInt *getFalse() { > return get(Type::Int1Ty, 0); > } > > and get rid of all the special handling of true/false values? Or > have we > provided this simply as an optimization on frequently obtained integer > values?
Yes we could. I would like to do that, but we should do (compile time) timings to see if it is a significant perf hit. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits