1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00
Peter Collingbourne 1e468d612b Re-apply r269081 and r269082 with a fix for MSVC.
llvm-svn: 269094
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