Files
archived-llvm/include/llvm/Analysis/BitSetUtils.h
Peter Collingbourne aa07a976c3 Re-apply r269081 and r269082 with a fix for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 18:07:21 +00:00

39 lines
1.2 KiB
C++

//===- BitSetUtils.h - Utilities related to pointer bitsets ------*- C++ -*-==//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains functions that make it easier to manipulate bitsets for
// devirtualization.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ANALYSIS_BITSETUTILS_H
#define LLVM_ANALYSIS_BITSETUTILS_H
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/CallSite.h"
namespace llvm {
/// A call site that could be devirtualized.
struct DevirtCallSite {
/// The offset from the address point to the virtual function.
uint64_t Offset;
/// The call site itself.
CallSite CS;
};
/// Given a call to the intrinsic @llvm.bitset.test, find all devirtualizable
/// call sites based on the call and return them in DevirtCalls.
void findDevirtualizableCalls(SmallVectorImpl<DevirtCallSite> &DevirtCalls,
SmallVectorImpl<CallInst *> &Assumes,
CallInst *CI);
}
#endif