@@ -682,6 +682,98 @@ class Instruction : public sandboxir::User {
682682 // / For isa/dyn_cast.
683683 static bool classof (const sandboxir::Value *From);
684684
685+ // / Determine whether the no signed wrap flag is set.
686+ bool hasNoUnsignedWrap () const {
687+ return cast<llvm::Instruction>(Val)->hasNoUnsignedWrap ();
688+ }
689+ // / Set or clear the nuw flag on this instruction, which must be an operator
690+ // / which supports this flag. See LangRef.html for the meaning of this flag.
691+ void setHasNoUnsignedWrap (bool B = true );
692+ // / Determine whether the no signed wrap flag is set.
693+ bool hasNoSignedWrap () const {
694+ return cast<llvm::Instruction>(Val)->hasNoSignedWrap ();
695+ }
696+ // / Set or clear the nsw flag on this instruction, which must be an operator
697+ // / which supports this flag. See LangRef.html for the meaning of this flag.
698+ void setHasNoSignedWrap (bool B = true );
699+ // / Determine whether all fast-math-flags are set.
700+ bool isFast () const { return cast<llvm::Instruction>(Val)->isFast (); }
701+ // / Set or clear all fast-math-flags on this instruction, which must be an
702+ // / operator which supports this flag. See LangRef.html for the meaning of
703+ // / this flag.
704+ void setFast (bool B);
705+ // / Determine whether the allow-reassociation flag is set.
706+ bool hasAllowReassoc () const {
707+ return cast<llvm::Instruction>(Val)->hasAllowReassoc ();
708+ }
709+ // / Set or clear the reassociation flag on this instruction, which must be
710+ // / an operator which supports this flag. See LangRef.html for the meaning of
711+ // / this flag.
712+ void setHasAllowReassoc (bool B);
713+ // / Determine whether the exact flag is set.
714+ bool isExact () const { return cast<llvm::Instruction>(Val)->isExact (); }
715+ // / Set or clear the exact flag on this instruction, which must be an operator
716+ // / which supports this flag. See LangRef.html for the meaning of this flag.
717+ void setIsExact (bool B = true );
718+ // / Determine whether the no-NaNs flag is set.
719+ bool hasNoNaNs () const { return cast<llvm::Instruction>(Val)->hasNoNaNs (); }
720+ // / Set or clear the no-nans flag on this instruction, which must be an
721+ // / operator which supports this flag. See LangRef.html for the meaning of
722+ // / this flag.
723+ void setHasNoNaNs (bool B);
724+ // / Determine whether the no-infs flag is set.
725+ bool hasNoInfs () const { return cast<llvm::Instruction>(Val)->hasNoInfs (); }
726+ // / Set or clear the no-infs flag on this instruction, which must be an
727+ // / operator which supports this flag. See LangRef.html for the meaning of
728+ // / this flag.
729+ void setHasNoInfs (bool B);
730+ // / Determine whether the no-signed-zeros flag is set.
731+ bool hasNoSignedZeros () const {
732+ return cast<llvm::Instruction>(Val)->hasNoSignedZeros ();
733+ }
734+ // / Set or clear the no-signed-zeros flag on this instruction, which must be
735+ // / an operator which supports this flag. See LangRef.html for the meaning of
736+ // / this flag.
737+ void setHasNoSignedZeros (bool B);
738+ // / Determine whether the allow-reciprocal flag is set.
739+ bool hasAllowReciprocal () const {
740+ return cast<llvm::Instruction>(Val)->hasAllowReciprocal ();
741+ }
742+ // / Set or clear the allow-reciprocal flag on this instruction, which must be
743+ // / an operator which supports this flag. See LangRef.html for the meaning of
744+ // / this flag.
745+ void setHasAllowReciprocal (bool B);
746+ // / Determine whether the allow-contract flag is set.
747+ bool hasAllowContract () const {
748+ return cast<llvm::Instruction>(Val)->hasAllowContract ();
749+ }
750+ // / Set or clear the allow-contract flag on this instruction, which must be
751+ // / an operator which supports this flag. See LangRef.html for the meaning of
752+ // / this flag.
753+ void setHasAllowContract (bool B);
754+ // / Determine whether the approximate-math-functions flag is set.
755+ bool hasApproxFunc () const {
756+ return cast<llvm::Instruction>(Val)->hasApproxFunc ();
757+ }
758+ // / Set or clear the approximate-math-functions flag on this instruction,
759+ // / which must be an operator which supports this flag. See LangRef.html for
760+ // / the meaning of this flag.
761+ void setHasApproxFunc (bool B);
762+ // / Convenience function for getting all the fast-math flags, which must be an
763+ // / operator which supports these flags. See LangRef.html for the meaning of
764+ // / these flags.
765+ FastMathFlags getFastMathFlags () const {
766+ return cast<llvm::Instruction>(Val)->getFastMathFlags ();
767+ }
768+ // / Convenience function for setting multiple fast-math flags on this
769+ // / instruction, which must be an operator which supports these flags. See
770+ // / LangRef.html for the meaning of these flags.
771+ void setFastMathFlags (FastMathFlags FMF);
772+ // / Convenience function for transferring all fast-math flag values to this
773+ // / instruction, which must be an operator which supports these flags. See
774+ // / LangRef.html for the meaning of these flags.
775+ void copyFastMathFlags (FastMathFlags FMF);
776+
685777#ifndef NDEBUG
686778 void dumpOS (raw_ostream &OS) const override ;
687779#endif
0 commit comments