[PATCH] D14707: add fast-math-flags to 'call' instructions (PR21290)
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 14:26:22 PST 2015
spatel added inline comments.
================
Comment at: lib/AsmParser/LLParser.cpp:5647
@@ +5646,3 @@
+/// OptionalAttrs Type Value ParameterList OptionalAttrs
+/// ::= 'notail' 'call' OptionalFastMathFlags OptionalCallingConv
+/// OptionalAttrs Type Value ParameterList OptionalAttrs
----------------
ahatanak wrote:
> Is it possible to commit the 'notail' change in a separate patch (and thank you for catching this)?
Sure - will do that first and update this patch.
================
Comment at: lib/AsmParser/LLParser.cpp:5678
@@ -5670,1 +5677,3 @@
+ if (FMF.any() && !RetType->isFPOrFPVectorTy())
+ return Error(CallLoc, "fast-math-flags specified for invalid call");
----------------
ahatanak wrote:
> Are there cases where you want to optimize calls to functions that take floating point arguments but don't have floating point return types?
I thought about that too, however, if we use this definition, then we do not have to redefine "isa<FPMathOperator>" in this patch.
I don't know if that is a reasonable justification by itself, but I think we can expand the definition of FPMathOperator in a separate patch if we do decide that FMF should apply to more types of calls.
http://reviews.llvm.org/D14707
More information about the llvm-commits
mailing list