Displaying 20 results from an estimated 100 matches similar to: "Question about reg2mem"
2015 Oct 05
2
Swift to IR, generates wrong IR
Hi,
2015-10-05 11:49 GMT+02:00 Rinaldini Julien via llvm-dev
<llvm-dev at lists.llvm.org>:
> Sorry, the error is (the previous one was from Apple’s lli):
>
> Documents/strong.codes/code/build/obfuscator-llvm/bin/opt: test.ll:57:203: error: expected comma after getelementptr's type
> @_METACLASS_DATA__TtC4test13TipCalculator = private constant { i32, i32, i32, i32, i8*, i8*,
2015 Oct 05
2
Swift to IR, generates wrong IR
Hi,
I have a simple swift code from which I generate IR code with ‘swiftc test.swift -emit-ir -o test.ll'
When I try to run the .ll file or apply optimization with opt, I get errors like this one:
lli: test.ll:548:110: error: expected instruction opcode
%9 = cmpxchg i64* bitcast (%swift.type*** @field_type_vector_TipCalculator to i64*), i64 0, i64 %8 seq_cst seq_cst
2016 Mar 02
9
RFC: Implementing the Swift calling convention in LLVM and Clang
Hi, all.
Swift uses a non-standard calling convention on its supported platforms. Implementing this calling convention requires support from LLVM and (to a lesser degree) Clang. If necessary, we’re willing to keep that support in “private” branches of LLVM and Clang, but we feel it would be better to introduce it in trunk, both to (1) minimize the differences between our branches and trunk and
2016 Mar 02
5
RFC: Implementing the Swift calling convention in LLVM and Clang
> On Mar 2, 2016, at 1:33 AM, Renato Golin <renato.golin at linaro.org> wrote:
>
> On 2 March 2016 at 01:14, John McCall via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Hi, all.
>> - We sometimes want to return more values in registers than the convention normally does, and we want to be able to use both integer and floating-point registers. For
2020 Sep 01
2
[RFC] Framework for Finding and Using Similarity at the IR Level
Hello,
I’m Andrew Litteken, and I am working on a framework for defining, detecting, and deduplicating similar code sections at the IR level.
Programmers can introduce sections of code that perform nearly the same operation. By copying and pasting code throughout a code base, or using a piece of code as a reference to create a new piece of code that has nearly the same structure redundancies
2007 Aug 10
2
[LLVMdev] Reg2Mem pass
Hi, guys.
I'm interested in using reg2mem pass but not sure about the concept of it.
Can you let me know a reference about it, if any?
Forgive my ignorance. -_-;
Thanks,
Seung J. Lee
2007 Aug 10
0
[LLVMdev] Reg2Mem pass
On Fri, 2007-08-10 at 00:51 -0500, Seung Jae Lee wrote:
> Hi, guys.
>
> I'm interested in using reg2mem pass but not sure about the concept of it.
> Can you let me know a reference about it, if any?
> Forgive my ignorance. -_-;
The reg2mem pass undoes SSA form. That is, it turns SSA registers into
alloca instructions with loads and stores.
>
> Thanks,
> Seung J.
2008 May 23
0
[LLVMdev] mem2reg & reg2mem
I have a register allocation bug I'm trying to track down. It's caused by a
convoluted series of events that results in a massive amount of code,
so looking at asm diffs is rather unhelpful.
I came up with the bright idea of adding a MaxPromotes flag to limit
the number of candidates that mem2reg promotes. But I couldn't
figure out how to safely promote some candidates but not
2011 May 30
1
[LLVMdev] Reg2mem: Identifying introduced memory locations (also, what happens to the phi nodes)
Hi.
Im exploring `opt -reg2mem` output for a simple C program (actually,
that is this snippet:
http://rosettacode.org/wiki/Dining_philosophers#C - compiled with
clang -O1) and got two questions regarding this pass.
1. How would I tell which memory locations were introduced by the
pass, and which memory locations were present in the original program?
After a brief diffing of .ll files, I'd
2011 Jun 20
0
[LLVMdev] run -mem2reg and -reg2mem programmably from within a Pass
I guess AU.addRequiredID(DemoteRegisterToMemoryID) would do the trick.
- xi
On Jun 19, 2011, at 11:03 PM, Chuck Zhao wrote:
> I am currently building a BasicBlock pass which requires to run -reg2mem before it, and need to run -mem2reg after it to clean up.
>
> So, I want to specify -reg2mem as one of the pre-requisite passes to it, as:
>
>
> class MyPass: public
2012 Jul 25
1
[LLVMdev] Inneffiecient code produced by reg2mem?
Is there a pass I can use after reg2mem to get rid of occurances like this?:
store i32 %cond, i32* %cond.reg2mem
%cond.reload = load i32* %cond.reg2mem
store i32 %cond.reload, i32* %cond4.reg2mem
Essentially, in this case, reg2mem creates an extra memory space to store
and load a value from just here, and never uses the value again; since this
isn't efficient code, I'm wondering if
2012 Dec 31
1
[LLVMdev] reg2mem breaks module
Hello,
I'm trying to apply the reg2mem pass on my bc file, but it somehow adds an instruction before a landingpad instruction and so I get a broken module error:
The unwind destination does not have a landingpad instruction!
%41 = invoke %class.x* @_ZN10xC2Ev(%class.x* %.reload19)
to label %.noexc unwind label %88
2013 Sep 22
0
[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
Below are the 4 cases out of which for the first 3 cases am able to
understand the variation on total number of store inst.
But
when -gvn parameters is passed (in case 4) , why does the total number of
strore Instruction present on the attached file increases (instead of
decrease).
Please explain considering that use of -reg2mem pass is mandatory.
eg.
clang -emit-llvm bzip.c -c -o bzip1.bc
2013 Sep 22
0
[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
Might have to do with GVN's PRE (partial redundancy elimination), which tends to increase code size.
H.
----- Original Message -----
From: Abhinash Jain
Sent: 09/22/13 01:17 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
Below are the 4 cases out of which for the first 3 cases am able to understand the variation
2011 May 17
1
[LLVMdev] eliminate phi nodes, reduce unnecessary loads / stores , reg2mem, mem2reg
Hi,
I work on a pass that requires as input LLVM code without any phi nodes. For
this, I use the reg2mem pass which produces suitable code, the pass runs
correctly, but I obtain a significant performance decrease. I expect that this
is because there are more reads / writes to memory after running the reg2mem
pass.
How can I optimize the code, without inserting any phi nodes? Or is there a
2011 Jun 20
2
[LLVMdev] run -mem2reg and -reg2mem programmably from within a Pass
I am currently building a BasicBlock pass which requires to run -reg2mem
before it, and need to run -mem2reg after it to clean up.
So, I want to specify -reg2mem as one of the pre-requisite passes to it, as:
class MyPass: public BasicBlockPass{
virtual void getAnalysisUsage(AnalysisUsage &AU){
...
AU.addRequired<RegToMem>();
...
}
};
I searched all passes under
2015 Apr 22
2
[LLVMdev] Use clang to generate LLVM IR with -O3, how to visit these load operations after -reg2mem
Hi, all
I want to instrument load/store operations in LLVM IR. And I find the LLVM
IR generated with flag -o3 is much more efficient than -o0, so I try to
instrument on these optimized LLVM IR, but, some load operations are
changed to Phi loads. Then, I try the -reg2mem flag to remove these phi
nodes.
The problems are:
1) I use visitLoadInst to collect these load operations, and it seems I
2015 Apr 22
2
[LLVMdev] Use clang to generate LLVM IR with -O3, how to visit these load operations after -reg2mem
Best Regards!
Eric Lew
On 周三, 4月 22, 2015 at 12:11 下午, David Blaikie < dblaikie at gmail.com [dblaikie at gmail.com] > wrote:
On Tue, Apr 21, 2015 at 8:34 PM, Eric Lu <eirc.lew at gmail.com> wrote:
> Hi, all
>
> I want to instrument load/store operations in LLVM IR. And I find the LLVM
> IR generated with flag -o3 is much more efficient than -o0, so I try to
>
2007 Sep 05
2
[LLVMdev] reg2mem pass
Hello, guys.
I just tested -reg2mem pass to see how it changes my bitcode.
E.g., for the following simple C code:
-------------------------------------------------------------
int foo() {
int i,j;
int sum = 0;
for (i=0; i<10; i++)
{
sum += i;
for (j=0; j<3; j++)
sum += 2;
}
return sum;
}
-------------------------------------------------------------
I could get the
2016 Mar 03
2
RFC: Implementing the Swift calling convention in LLVM and Clang
> On Mar 3, 2016, at 2:00 AM, Renato Golin <renato.golin at linaro.org> wrote:
>
> On 2 March 2016 at 20:03, John McCall <rjmccall at apple.com> wrote:
>> We don’t need to. We don't use the intermediary convention’s rules for aggregates.
>> The Swift rule for aggregate arguments is literally “if it’s too complex according to
>> <foo>, pass it