Displaying 20 results from an estimated 400 matches similar to: "How does one reduce a function CFG to its entry block?"
2015 Feb 13
2
[LLVMdev] module functions
Hi.
I would like to move first function of module to end. To do this, I remove
function from module, then I insert it with getOrInsertFunction() method.
It worked. But there is a problem: I can't see body of function (basic
blocks). In other words, function basic blocks don't move.
To solve, I store function basic blocks before remove it. and after
function insertion, I want to insert
2011 Feb 28
3
[LLVMdev] Extending FunctionType
2011/2/28 John Criswell <criswell at illinois.edu>:
> On 2/28/11 6:31 AM, Gabriel Rodríguez wrote:
>
> Hi all,
>
> I am trying to extend a FunctionType to include new parameters. In
> particular, I want to
> ensure that the main function has been declared with both argsc and argsv.
> However
> there seems to be no easy way to accomplish this:
>
2011 Feb 28
0
[LLVMdev] Extending FunctionType
On 2/28/11 10:04 AM, Frits van Bommel wrote:
> 2011/2/28 John Criswell<criswell at illinois.edu>:
>> On 2/28/11 6:31 AM, Gabriel Rodríguez wrote:
>>
>> Hi all,
>>
>> I am trying to extend a FunctionType to include new parameters. In
>> particular, I want to
>> ensure that the main function has been declared with both argsc and argsv.
>>
2011 Feb 28
2
[LLVMdev] Extending FunctionType
On Mon, Feb 28, 2011 at 5:10 PM, John Criswell <criswell at illinois.edu> wrote:
> On 2/28/11 10:04 AM, Frits van Bommel wrote:
>> I don't think a full clone is necessary, since he wants to replace the
>> function. He only needs to create the new function and splice in the
>> body of the old one.
>
> That is exactly what MakeFunctionClone() does. It creates a
2009 Jun 04
1
[LLVMdev] assertion in LeakDetector
Hi Bill,
I am using the following version of BuildMI :
MachineInstrBuilder BuildMI(MachineFunction &MF,
const TargetInstrDesc &TID,
unsigned DestReg)
I do the following :
void createInstrs(std::vector<MachineInstr *>& ilist)
{
Machine Instr *mi;
mi = BuildMI(MF, someTID, somereg);
2008 Jul 09
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Ah, didn't see that, that's what comes of trying to do something at
5pm :) I attached an updated patch which creates a virtual register
instead of using R0. How does this look?
Cheers,
Gary
Dan Gohman wrote:
> PPCTargetLowering::EmitInstrWithCustomInserter has a reference
> to the current MachineFunction for other purposes. Can you use
> MachineFunction::getRegInfo instead?
2008 Jul 02
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Evan Cheng wrote:
> You need to insert new basic blocks and update CFG to accomplish this.
> There is a hackish way to do this right now. Add a pseudo instruction
> to represent this operation and mark it usesCustomDAGSchedInserter.
> This means the intrinsic is mapped to a single (pseudo) node. But it
> is then expanded into instructions that can span multiple basic
>
2011 Sep 21
1
[LLVMdev] Segmentation fault while adding an addtional argument
Hi, all
I am trying to write a function pass to replace a old function to a new
function like:
int haha(int a) { } ==> int haha(int a, char *IO) { }
The below is a part of my code and generate segmentation fault. Can you help
me to fix it?
Thanks,
Shawn
// Since we have now created the new function, splice the body of the
old
// function right into the new function, leaving the
2013 Sep 18
1
[LLVMdev] In llvm, how can I delete a whole branch elegantly?
Hi,
I am trying to prune some uninteresting llvm ir branches, corresponding
to the *if-else* condition in the source code. And here is the procedures:
1. Get the BasicBlock containing the BranchInst which has 2
successors(in order to keep consistent with the source code I am using the
llvm ir without any optimizations, so SelectInst/SwitchInst/PHINode is
absent), one of which should be
2013 Mar 08
0
[LLVMdev] How to use dropAllReferences in dropAllReferences
Hi all.
I want to know how the dropAllReferences() is used in the FunctionPass MoudlePass and so on.
If I want to delete the node about function in Module, I can use it ,am i right?
Thanks for your help.
yao.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130308/d3f9294b/attachment.html>
2008 Jul 11
0
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 13:49, David Greene wrote:
> > then it seems you're doing
> >
> > for each function
> > generate_ir
> > convert_to_llvm_ir
> > optimize_llvm_ir
>
> Yep.
Ok, I've mostly got a mechanism to do what I want:
1. As each function comes in for op/codegen, clone it and save off
the clone and its associated ValueMap (I
2011 Feb 24
2
[LLVMdev] Valgrind memcheck errors in llvm
I have ran under valgrind memcheck the process using libLLVM-2.9.so
(rev.126022) and got several errors:
==24227== Invalid read of size 1
==24227== at 0x40274C9: memcpy (mc_replace_strmem.c:497)
==24227== by 0x40D5B84: char* std::string::_S_construct<char
const*>(char const*, char const*, std::allocator<char> const&,
std::forward_iterator_tag) (in
2002 Nov 27
1
[LLVMdev] Instruciton replacement
llvm is giving me some assertion errors when trying to replace an
instruction, and I'm not quite sure of what to do. I have the
following snippet of code:
switch((*I)->getOpcode()) {
case Instruction::Malloc:
{
AllocaInst *AI;
AI = new AllocaInst(cast<AllocationInst>(*I)->getAllocatedType(),
cast<AllocationInst>(*I)->getArraySize());
2004 May 06
1
CD-ROM won't boot. BIOS problem?
Hi,
I'm having trouble booting my system using the SuSE 9.0 installer CD
at ftp://ftp.suse.com/pub/suse/i386/9.0/boot/boot.iso (ISOLINUX 2.06).
My system is a Kontron cPCI-DT64 single board computer. The CD-ROM
drive is an Adtron IC6C, has its own IDE controller and sits in
another cPCI slot.
System Details:
System BIOS - PhoenixBIOS 4 Release 6.0, cPCI-DT64 BIOS 2.5
Adapter BIOS - Sil
2012 Jan 13
1
[LLVMdev] 'opt' Aborted "While deleting: void %"
Using Valgrind hasn't shown me anything terribly unusual. And I'm confused
because its not even trying to delete a real instruction; deleting a void
type with no name? That doesn't make any sense...
Any other hints? I've seen a few posts in the past about this relating to
some internal LLVM bugs...
-Griffin
On Thu, 12 Jan 2012 21:26:41 +0100, Duncan Sands <baldrick at
2018 Dec 09
2
Parse LLVM IR
Hello,
I am a newbie to LLVM and right now I am on the hook to parse some IR code
and do some instrumentations. However, my problem is that no matter how I
tweak my parsing code, it simply cannot print out anything.
So here is my C code:
int your_fun(int arg2) {
int x = arg2;
return x+2;
}
And here is my parsing code:
#include <llvm/IR/Module.h>
#include
2012 Jan 12
0
[LLVMdev] 'opt' Aborted "While deleting: void %"
Hi Griffin, did your pass create a data structure that holds values somehow,
and forgot to delete it? Also, try running under valgrind in case this is
due to a memory error of some kind.
Ciao, Duncan.
> So I have an LLVM pass that appears to run completely and work fine, and
> then it aborts at the very end. When exiting the final runOnFunction call,
> I get the following error /
2012 Jan 25
1
[LLVMdev] PLEASE help with Alias Analysis initialization assertion at the end of my pass
Yes, it is a pass.
Here is a very general overview of the file structure as far as the AA is
concerned. LLVM is not my strong-suit, I do hardware simulators, not
compilers.
using namespace llvm;
char RelRecovery::ID = 0;
static RegisterPass<RelRecovery> X("relRecovery",
"Reliability transformation for lightweight recovery");
void
2012 Jan 12
3
[LLVMdev] 'opt' Aborted "While deleting: void %"
Hey everyone,
So I have an LLVM pass that appears to run completely and work fine, and
then it aborts at the very end. When exiting the final runOnFunction call,
I get the following error / stack dump. I cannot figure out why this is
happening for the life of me - does anyone have any ideas? I'm not trying
to do any crazy deallocation or anything, it just seems like a normal pass
to me.
2008 Jul 10
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Cool, that worked. New patch attached...
Cheers,
Gary
Evan Cheng wrote:
> Just cast both values to const TargetRegisterClass*.
>
> Evan
>
> On Jul 10, 2008, at 7:36 AM, Gary Benson wrote:
> > Evan Cheng wrote:
> > > How about?
> > >
> > > const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
> > > &PPC:G8RCRegClass;
>