Displaying 8 results from an estimated 8 matches for "ourfunctionpass".
2018 Apr 01
2
Custom Binary Format Challenges
...zation pass:
> http://llvm.org/docs/ProgrammersManual.html
>
> It sounds like your highest level is a module, hence you should write a
> module pass. There is example code on LLVM Programmer's Manual on how to do
> a function pass:
>
> Function* targetFunc = ...;
> class OurFunctionPass : public FunctionPass {
> public:
> OurFunctionPass(): callCounter(0) { }
>
> virtual runOnFunction(Function& F) {
> for (BasicBlock &B : F) {
> for (Instruction &I: B) {
> if (auto *CallInst = dyn_cast<CallInst>(&I)) {
&g...
2018 Apr 01
0
Custom Binary Format Challenges
...ite it as if you are writing an optimization pass:
http://llvm.org/docs/ProgrammersManual.html
It sounds like your highest level is a module, hence you should write a
module pass. There is example code on LLVM Programmer's Manual on how to do
a function pass:
Function* targetFunc = ...;
class OurFunctionPass : public FunctionPass {
public:
OurFunctionPass(): callCounter(0) { }
virtual runOnFunction(Function& F) {
for (BasicBlock &B : F) {
for (Instruction &I: B) {
if (auto *CallInst = dyn_cast<CallInst>(&I)) {
// We know we've enc...
2018 Apr 01
2
Custom Binary Format Challenges
Hello,
I hope you are all doing well and thanks in advance. I need to program a
transformation of a set of llvm bitcode to have some various techniques
woven in. In particular, I need to resolve a given computed target address
to one of several in the same way that the function of a dynamic library is
resolved, but I need this resolution to happen in the binary target of my
choice where I tell
2018 Apr 01
2
Custom Binary Format Challenges
....html
>>>
>>> It sounds like your highest level is a module, hence you should write a
>>> module pass. There is example code on LLVM Programmer's Manual on how to do
>>> a function pass:
>>>
>>> Function* targetFunc = ...;
>>> class OurFunctionPass : public FunctionPass {
>>> public:
>>> OurFunctionPass(): callCounter(0) { }
>>>
>>> virtual runOnFunction(Function& F) {
>>> for (BasicBlock &B : F) {
>>> for (Instruction &I: B) {
>>> if...
2018 Apr 01
0
Custom Binary Format Challenges
...m.org/docs/ProgrammersManual.html
>>
>> It sounds like your highest level is a module, hence you should write a
>> module pass. There is example code on LLVM Programmer's Manual on how to do
>> a function pass:
>>
>> Function* targetFunc = ...;
>> class OurFunctionPass : public FunctionPass {
>> public:
>> OurFunctionPass(): callCounter(0) { }
>>
>> virtual runOnFunction(Function& F) {
>> for (BasicBlock &B : F) {
>> for (Instruction &I: B) {
>> if (auto *CallInst = dyn_cast&l...
2018 Apr 02
0
Custom Binary Format Challenges
...gt;>> It sounds like your highest level is a module, hence you should write a
>>>> module pass. There is example code on LLVM Programmer's Manual on how to do
>>>> a function pass:
>>>>
>>>> Function* targetFunc = ...;
>>>> class OurFunctionPass : public FunctionPass {
>>>> public:
>>>> OurFunctionPass(): callCounter(0) { }
>>>>
>>>> virtual runOnFunction(Function& F) {
>>>> for (BasicBlock &B : F) {
>>>> for (Instruction &I: B) {
&g...
2002 Sep 16
1
[LLVMdev] questions about llvm
Hi, I have some basic questions. I'd appreciate if you can
help me with them.
1. In the LLVM programmer manual, section "Finding call sites:
a slightly more complex example", there is such piece of code:
-------------------------------------------------
class OurFunctionPass : public FunctionPass {
public:
OurFunctionPass(): callCounter(0) { }
virtual runOnFunction(Function& F) {
for(Function::iterator b = F.begin(), be =
F.end(); b != be; ++b) {
for(BasicBlock::iterator i = b->begin(); ie =
b->end(); i != ie...
2018 Apr 02
1
Custom Binary Format Challenges
...s like your highest level is a module, hence you should write
>>>>> a module pass. There is example code on LLVM Programmer's Manual on how to
>>>>> do a function pass:
>>>>>
>>>>> Function* targetFunc = ...;
>>>>> class OurFunctionPass : public FunctionPass {
>>>>> public:
>>>>> OurFunctionPass(): callCounter(0) { }
>>>>>
>>>>> virtual runOnFunction(Function& F) {
>>>>> for (BasicBlock &B : F) {
>>>>> for (Ins...