Displaying 20 results from an estimated 4000 matches similar to: "Mem2reg: load before single store"
2020 Sep 14
2
Mem2reg: load before single store
On 9/14/20 9:30 AM, James Y Knight via llvm-dev wrote:
> On Mon, Sep 14, 2020 at 3:19 AM László Radnai via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> A problem arises, and I am not sure if it is really a problem or just
>> weird C-compliant behavior.
>>
>> int a; // or, equally, int a=0;
>>
>> int main(){
>> int b;
>> if
2020 Aug 13
3
Deterministic function return attribute
Hi!
I'm interested in what attributes in LLVM mean, specifically how to
say that the result is always the same for the given input parameters.
The main thing would be to merge two calls with the same parameters
when the function is declared but not defined. (just like two stores).
I'll call this property mergability.
%1 := call @test(%0)
%2 := call @test(%0)
and the optimization would
2020 Aug 14
2
Fwd: Deterministic function return attribute
Hi László,
On 8/13/20 5:21 PM, László Radnai via llvm-dev wrote:
> (Sorry I clicked reply instead of reply to all)
> I'm fighting with my email client, I hope the quoted text contains
> what I want it to contain.
>
> ---------- Forwarded message ----------
> From: László Radnai <radlaci97 at gmail.com>
> Date: Fri, 14 Aug 2020 00:11:35 +0200
> Subject:
2015 Jul 17
2
[LLVMdev] Suspicious behavior of mem2reg (promoteSingleBlockAlloca)
Hi LLVMDev,
this is Jeehoon Kang, a Ph.D. student of Software Foundations Laboratory (
http://sf.snu.ac.kr), Dept. of Computer Science & Engineering, Seoul
National University. Our group studied the mem2reg pass, and we got a
question on its algorithm.
As far as I understand, the mem2reg pass essentially uses the SSA
construction algorithm to promote allocas into registers, but there are
2013 Aug 27
1
R Language Newbie
Hi,
set.seed(29)
myVector<- rnorm(100)
?seq(1,100,by=2)
# [1]? 1? 3? 5? 7? 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
#[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99
myVector[seq(1,100,by=2)]
rev(myVector)
?sum(myVector>0)
#[1] 46
#or
?table(myVector>0)
#
#FALSE? TRUE
?#? 54??? 46
A.K.
Hey guys, this is my first week
2008 Jul 02
2
[LLVMdev] Problem while using mem2reg Optimization
Hi,
I am using various LLVM optimization passes and I noticed a strange
behaviour in Mem2Reg Optimization. These pass is used for SSA construction
and basically removed alloca of the corresponding pointers are just used in
load/stores.
I tried the following .ll file
*define i32 @test(i32 %y,i32 %z) {
entry:
%X = alloca i32 ; type of %X is i32*.
%X.0 = add i32 %y ,%z
2015 Oct 05
2
Adding mem2reg pass to pass manager
Hi,
I want to add "mem2reg" pass similar to this:
PassManager PM;
PM.add(new LoopInfo());
PM.add(new Mem2Reg()); // What's the class name for this pass
I couldn't find the name of corresponding class and header file of mem2reg
pass except "mem2reg.cpp". So how can I add mem2reg pass into my pass
manager?
Thanks,
Riyad
-------------- next part --------------
An
2016 Feb 11
2
Writing an LLVM Pass that depends on mem2reg
Hello,
I am used to specifying dependence on other LLVM passes in the
`getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't
seem that there is a header file that exposes the `mem2reg` pass - it is
implemented in `Mem2Reg.cpp` as a wrapper.
Is there an easy way to reuse this pass, or should I, in essence, duplicate
`Mem2Reg.cpp` in my project?
Cheers,
- Stan
2016 Mar 22
2
Passing llvm option -mem2reg to clang
Hi,
I was trying to pass llvm option -mem2reg to clang using -mllvm and I
found the following error:
clang (LLVM option parsing): Unknown command line argument '-mem2reg'.
Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-debug'?
I would appreciate if anyone could help me.
--
Syed Rafiul Hussain
2017 Oct 15
2
question about mem2reg
Hello,
I just upgraded my llvm to 5.0.0. I applied mem2reg pass as follows:
opt -mem2reg m2rtttl.bc > m2rtttl.opt
But after that, I compared m2rtttl.bc and m2rtttl.opt. I noticed that there are no difference between m2rtttl.bc and m2rtttl.opt. Did I apply llvm in the correct way?
Thanks a lot for the help!
Best,
Linhai
-------------- next part
2008 Oct 07
2
[LLVMdev] mem2reg optimization
On Tuesday 07 October 2008 16:13, Dan Gohman wrote:
> > No, it's analysis that depend on the orderings of loads and stores
> > (or any
> > instruction). I ran across this need in another area.
>
> I believe that there are problems, but I'm not seeing what
> the problem is with an instruction ordering pass to be used
> by mem2reg. Can you be more specific, or
2013 Feb 26
0
[LLVMdev] mem2reg for non entry blocks?
Hi Justin,
> an alloca outside of the entry block might be inside a loop, in which case the
> semantics are that it would allocate more stack space on every loop iteration.
> I think some of the optimizers that run later try to move allocas into the entry
> block if possible, but in general it is simpler to have the front-end just put
> them there in the first
2002 Sep 29
1
[LLVMdev] mem2reg
I have a question. In the handout, it says that out pass
should enable mem2reg to put as many scalar fields of
structures in virtual registers as possible. Does that just
mean that we should try to replace as many structures as
possible to scalars? or it means something else special to
enable mem2reg to do that? If that's the case, how to enable
mem2reg to do that?
Thanks,
xiaodong
2008 Oct 06
1
[LLVMdev] mem2reg optimization
On Oct 6, 2008, at 9:47 AM, David Greene wrote:
>> As far as the approach goes, here's a counterproposal that is a bit
>> less complex. I suggest adding a single DenseMap<Instruction*,
>> unsigned> to Mem2reg. If there is an entry in this map for a load/
>> store instruction, it would store the instruction's index in its
>> basic
>> block.
2008 Oct 07
0
[LLVMdev] mem2reg optimization
On Mon, October 6, 2008 10:32 pm, Nicolas Capens wrote:
> Hi Dan,
>
> I don't want to beat a dead horse here, but why would anyone want to use
> mem2reg after LICM or other passes that can move around loads and stores?
> I
> fully understand the design goal to arbitrarily reorder other passes but
> for
> mem2reg it actually seems vital to run it as the first pass to
2008 Oct 07
0
[LLVMdev] mem2reg optimization
Hi Dan,
I don't want to beat a dead horse here, but why would anyone want to use
mem2reg after LICM or other passes that can move around loads and stores? I
fully understand the design goal to arbitrarily reorder other passes but for
mem2reg it actually seems vital to run it as the first pass to make all
other passes useful.
Anyway, this can definitely also be done with an analysis pass that
2008 Oct 07
0
[LLVMdev] mem2reg optimization
On Oct 7, 2008, at 11:43 AM, David Greene wrote:
> On Tuesday 07 October 2008 12:37, Dan Gohman wrote:
>> On Tue, October 7, 2008 9:02 am, David Greene wrote:
>>> On Tuesday 07 October 2008 00:32, Nicolas Capens wrote:
>>>> Anyway, this can definitely also be done with an analysis pass that
>>>> provides information about ordering between loads and
2008 Jul 02
0
[LLVMdev] Problem while using mem2reg Optimization
On Wed, Jul 2, 2008 at 10:07 AM, kapil anand <kapilanand2 at gmail.com> wrote:
> Hi,
>
> I am using various LLVM optimization passes and I noticed a strange
> behaviour in Mem2Reg Optimization. These pass is used for SSA construction
> and basically removed alloca of the corresponding pointers are just used in
> load/stores.
> So, is there any restriction that all the
2008 Oct 27
1
[LLVMdev] mem2reg optimization
On Oct 26, 2008, at 11:09 PM, Chris Lattner wrote:
>> Fundamentally, we need a map from BasicBlock to a list of ordered
>> loads and
>> stores in that block.
>
> Are you seeing cases where lots of time is spent in
> RewriteSingleStoreAlloca[s]? If so, please provide a testcase and I
> can apply the obvious fix.
Okay, I decided to just go ahead and make the change,
2011 May 30
0
[LLVMdev] Uninitialized variables and mem2reg pass
Hello,
I noticed a strage behavior of mem2reg pass when the code has an
uninitialized local variable dereference. Running the pass over the
following bytecode:
%buf = alloca i32
%val = load i32* %buf
store i32 10, i32* %buf
ret %val
produces the following result:
ret i32 10
I would expect mem2reg to produce undef result instead:
ret i32 undef
As behavior of the original code is