Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::BooleanNegateInstr Class Reference

#include <il.h>

Inheritance diagram for dart::BooleanNegateInstr:
dart::TemplateDefinition< 1, NoThrow >

Public Member Functions

 BooleanNegateInstr (Value *value)
 
virtual CompileType ComputeType () const
 
Valuevalue () const
 
virtual bool ComputeCanDeoptimize () const
 
virtual bool HasUnknownSideEffects () const
 
virtual DefinitionCanonicalize (FlowGraph *flow_graph)
 
- Public Member Functions inherited from dart::TemplateDefinition< 1, NoThrow >
 TemplateDefinition (intptr_t deopt_id=DeoptId::kNone)
 
 TemplateDefinition (const InstructionSource &source, intptr_t deopt_id=DeoptId::kNone)
 
virtual intptr_t InputCount () const
 
virtual ValueInputAt (intptr_t i) const
 
virtual bool MayThrow () const
 

Additional Inherited Members

- Public Types inherited from dart::TemplateDefinition< 1, NoThrow >
using BaseClass = typename NoCSE< Definition, PureDefinition >::Base
 
- Protected Attributes inherited from dart::TemplateDefinition< 1, NoThrow >
EmbeddedArray< Value *, Ninputs_
 

Detailed Description

Definition at line 7148 of file il.h.

Constructor & Destructor Documentation

◆ BooleanNegateInstr()

dart::BooleanNegateInstr::BooleanNegateInstr ( Value value)
inlineexplicit

Definition at line 7150 of file il.h.

7150{ SetInputAt(0, value); }
Value * value() const
Definition il.h:7155

Member Function Documentation

◆ Canonicalize()

Definition * dart::BooleanNegateInstr::Canonicalize ( FlowGraph flow_graph)
virtual

Definition at line 3520 of file il.cc.

3520 {
3521 Definition* defn = value()->definition();
3522 // Convert e.g. !(x > y) into (x <= y) for non-FP x, y.
3523 if (defn->IsComparison() && defn->HasOnlyUse(value()) &&
3524 defn->Type()->ToCid() == kBoolCid) {
3525 ComparisonInstr* comp = defn->AsComparison();
3526 if (!IsFpCompare(comp)) {
3527 comp->NegateComparison();
3528 return defn;
3529 }
3530 }
3531 return this;
3532}
Definition * definition() const
Definition il.h:103
static bool IsFpCompare(ComparisonInstr *comp)
Definition il.cc:3513

◆ ComputeCanDeoptimize()

virtual bool dart::BooleanNegateInstr::ComputeCanDeoptimize ( ) const
inlinevirtual

Definition at line 7157 of file il.h.

7157{ return false; }

◆ ComputeType()

CompileType dart::BooleanNegateInstr::ComputeType ( ) const
virtual

Definition at line 1397 of file type_propagator.cc.

1397 {
1398 return CompileType::Bool();
1399}
static CompileType Bool()

◆ HasUnknownSideEffects()

virtual bool dart::BooleanNegateInstr::HasUnknownSideEffects ( ) const
inlinevirtual

Definition at line 7159 of file il.h.

7159{ return false; }

◆ value()

Value * dart::BooleanNegateInstr::value ( ) const
inline

Definition at line 7155 of file il.h.

7155{ return inputs_[0]; }
EmbeddedArray< Value *, N > inputs_
Definition il.h:2744

The documentation for this class was generated from the following files: