klee
klee::LowerSwitchPass Class Reference

#include <Passes.h>

Inherits llvm::FunctionPass.

Classes

struct  SwitchCase
 

Public Types

typedef std::vector< SwitchCaseCaseVector
 
typedef std::vector< SwitchCase >::iterator CaseItr
 

Public Member Functions

 LowerSwitchPass ()
 
bool runOnFunction (llvm::Function &F) override
 

Static Public Attributes

static char ID = 0
 

Private Member Functions

void processSwitchInst (llvm::SwitchInst *SI)
 
void switchConvert (CaseItr begin, CaseItr end, llvm::Value *value, llvm::BasicBlock *origBlock, llvm::BasicBlock *defaultBlock)
 

Detailed Description

LowerSwitchPass - Replace all SwitchInst instructions with chained branch instructions. Note that this cannot be a BasicBlock pass because it modifies the CFG!

Definition at line 128 of file Passes.h.

Member Typedef Documentation

◆ CaseItr

typedef std::vector<SwitchCase>::iterator klee::LowerSwitchPass::CaseItr

Definition at line 144 of file Passes.h.

◆ CaseVector

Definition at line 143 of file Passes.h.

Constructor & Destructor Documentation

◆ LowerSwitchPass()

klee::LowerSwitchPass::LowerSwitchPass ( )
inline

Definition at line 131 of file Passes.h.

Member Function Documentation

◆ processSwitchInst()

void klee::LowerSwitchPass::processSwitchInst ( llvm::SwitchInst *  SI)
private

Definition at line 96 of file LowerSwitch.cpp.

References switchConvert().

Referenced by runOnFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runOnFunction()

bool klee::LowerSwitchPass::runOnFunction ( llvm::Function &  F)
override

Definition at line 40 of file LowerSwitch.cpp.

References processSwitchInst().

Here is the call graph for this function:

◆ switchConvert()

void klee::LowerSwitchPass::switchConvert ( CaseItr  begin,
CaseItr  end,
llvm::Value *  value,
llvm::BasicBlock *  origBlock,
llvm::BasicBlock *  defaultBlock 
)
private

Definition at line 58 of file LowerSwitch.cpp.

Referenced by processSwitchInst().

Here is the caller graph for this function:

Member Data Documentation

◆ ID

char klee::LowerSwitchPass::ID = 0
static

Definition at line 130 of file Passes.h.


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