diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2017-07-20 14:16:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 14:16:39 +0100 |
commit | 051e44e59cc5260324667d3fd8a8d46d54c3e72e (patch) | |
tree | 34fdea2badf338c2f6d78185cc5e03cea19cab9b /lib/Module/Passes.h | |
parent | 99a1e3a25cd1405a15112a85de1ff5fc714e7be1 (diff) | |
parent | ffe695c29915cf8605b2fb807cd083cdcc769d47 (diff) | |
download | klee-051e44e59cc5260324667d3fd8a8d46d54c3e72e.tar.gz |
Merge pull request #657 from delcypher/vectorized_instructions
Implement basic support for vectorized instructions.
Diffstat (limited to 'lib/Module/Passes.h')
-rw-r--r-- | lib/Module/Passes.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/Module/Passes.h b/lib/Module/Passes.h index 4f1a1453..2ac57b9b 100644 --- a/lib/Module/Passes.h +++ b/lib/Module/Passes.h @@ -180,6 +180,32 @@ private: llvm::BasicBlock *defaultBlock); }; +// This is the interface to a back-ported LLVM pass. +// Newer versions of LLVM already have this in-tree +// and we are not supporting vector instructions for +// LLVM 2.9. Therefore this interface is only needed for +// LLVM 3.4. +#if LLVM_VERSION_CODE == LLVM_VERSION(3,4) +llvm::FunctionPass *createScalarizerPass(); +#endif + +/// InstructionOperandTypeCheckPass - Type checks the types of instruction +/// operands to check that they conform to invariants expected by the Executor. +/// +/// This is a ModulePass because other pass types are not meant to maintain +/// state between calls. +class InstructionOperandTypeCheckPass : public llvm::ModulePass { +private: + bool instructionOperandsConform; + +public: + static char ID; + InstructionOperandTypeCheckPass() + : llvm::ModulePass(ID), instructionOperandsConform(true) {} + // TODO: Add `override` when we switch to C++11 + bool runOnModule(llvm::Module &M); + bool checkPassed() const { return instructionOperandsConform; } +}; } #endif |