[PATCH] Make it possible for ints/floats to return different values from getBooleanContents()

Daniel Sanders daniel.sanders at imgtec.com
Wed Jul 9 12:31:53 PDT 2014


================
Comment at: include/llvm/Target/TargetLowering.h:960
@@ +959,3 @@
+  /// value from i1 to a wider type.  See getBooleanContents.
+  void setBooleanFloatContents(BooleanContent Ty) { BooleanFloatContents = Ty; }
+
----------------
hfinkel at anl.gov wrote:
> I would really like to do this without causing churn to all of the targets (and causing pain for all out-of-tree targets). How about we do this:
> 
> void setBooleanContents(BooleanContent Ty) { BooleanContents = Ty; BooleanFloatContents = Ty; }
> 
> void setBooleanContents(BooleanContent Ty, BooleanContent FTy) { BooleanContents = Ty; BooleanFloatContents = FTy; }
> 
> do that the current target code will continue to do the right thing.
That makes sense to me. I've made this change in the updated patch. I've also added a comment that should ensure that people call setBooleanFloatContents() after setBooleanContents().

http://reviews.llvm.org/D4389






More information about the llvm-commits mailing list