search for: maywritetomemori

Displaying 20 results from an estimated 33 matches for "maywritetomemori".

Did you mean: maywritetomemory
2007 Jul 25
1
[LLVMdev] Instruction::mayWriteToMemory() -- is there a logical equivalent for reads?
The Instruction::mayWriteToMemory() member function is quite useful (I'm currently writing code that will break up basic blocks at read/write instructions). Is there a safe way to do the same thing for reads from memory? It's easy enough to check for the relevant instructions, but I thought this might be a nice-to-have in a future version because it separates code like mine from
2006 May 12
2
[LLVMdev] Instruction->mayReadFromMemory
Hi I am currently trying to schedule instructions with my own algorithm. For that i need to get the data dependency between the instructions. So currently i am dooing s.t. like: for(BasicBlock::iterator j=B.begin(),bbe=B.end();j!=bbe;++j) { InstructionList.push_back(j); if (const AllocaInst *AI = dyn_cast<AllocaInst>(j)) {
2010 May 11
1
[LLVMdev] All CallInsts mayHaveSideEffects
Hi, All CallInsts should return true for Instruction::mayHaveSideEffects() because functions are not guaranteed to halt. Inliner::runOnSCC calls isInstructionTriviallyDead to determine whether code can be dead code eliminated. isInstructionTriviallyDead returns true if Instruction::mayHaveSideEffects() returns false. A function that potentially runs forever based on its input but does not write
2006 May 12
0
[LLVMdev] Instruction->mayReadFromMemory
On Fri, 12 May 2006, Silken Tiger wrote: > To find the first instructions which are not depending on others results. So > far it seems to be working but i am missing instructions like: > %tmp.1 = seteq int %argc, 2 ; <bool> [#uses=1] > There seems only an function like llvm::Instruction::mayWriteToMemory > but nothing like llvm::Instruction::mayReadFromMemory or
2010 May 11
1
[LLVMdev] All CallInsts mayHaveSideEffects
Does any real code benefit from dead code eliminating read-only functions? Tom ----- Original Message ----- From: "Reid Kleckner" <rnk at mit.edu> To: "Thomas B. Jablin" <tjablin at CS.Princeton.EDU> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Monday, May 10, 2010 9:38:47 PM GMT -05:00 US/Canada Eastern Subject: Re: [LLVMdev]
2012 Feb 03
1
[LLVMdev] Issues with the llvm.stackrestore intrinsic - now LoopRotation handling of alloca
2012/2/3 Patrik Hägglund <patrik.h.hagglund at ericsson.com>: > Hi, > > I've tracked the first problem (mentioned in my previous email, quoted > below) down further, ending up in the handling of alloca in > LoopRotation.cpp (from trunk): > >      // If the instruction's operands are invariant and it doesn't read > or write >      // memory, then it is
2011 Jan 22
0
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
Hi Chuck, > I need to figure out all LLVM Instructions that may write to memory. I->mayWriteToMemory() Ciao, Duncan.
2011 Jan 22
1
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
Duncan, I looked at this function even before starting the discussions. I think it respects LLVM's principle that only Loads and Stores (+VAArg, and maybe Call) that can access global memory, but doesn't address the issues of accessing stack frames or stack objects. Thank you for the hint. Chuck On 1/22/2011 6:17 AM, Duncan Sands wrote: > Hi Chuck, > >> I need to figure
2013 Mar 09
1
[LLVMdev] Does a recursive call have side effects?
Currently LLVM removes infinite recursion in readnone functions as dead code. I assume this falls under the same language rules that allow removal of infinite loops. But I need to be certain. Can someone confirm? Standard citations welcome. Otherwise this is wrong: bool mayHaveSideEffects() const { return mayWriteToMemory() || mayThrow() || !mayReturn(); } Note: For non-C support, it
2016 Mar 21
3
New intrinsic property IntrOnlyWrite
On 19.03.2016 16:25, Mehdi Amini wrote: > Hi, > > Can you elaborate what is the impact at the IR level? > If the point is just about how you lower for you target, why are you needing an IR level attribute? You backend if free to specialize the lowering for any intrinsic regardless the IR level attributes. As I explained in my reply to Philip, what I really need is a way to get
2008 Sep 24
0
[LLVMdev] Memory Altering/Accessing Instructions
Prakash Prabhu wrote: > Hi all, > > Would it be correct to say that the only instructions in LLVM IR that > modify/access memory potentially are the following: > I believe that every instruction has a mayWriteToMemory()/mayReadToMemory() method that you can use to determine this information. See http://llvm.org/doxygen/classllvm_1_1Instruction.html (the LLVM doxygen info on
2008 Sep 24
2
[LLVMdev] Memory Altering/Accessing Instructions
Hi all, Would it be correct to say that the only instructions in LLVM IR that modify/access memory potentially are the following: (1) LoadInst : Ref (2) StoreInst : Mod (3) VAArgInst : Ref (?) (4) AllocaInst : Mod (5) MallocInst : Mod (6) FreeInst : Mod (7) CallInst : Mod/Ref ? Also, my earlier impression was that the GEP instruction only computes the effective address and does not
2013 Feb 21
0
[LLVMdev] [llvm] r175553 - Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.
Hi Nadav, > I almost missed your email because you replied only to the list. I understand your argument. I think that my fix addresses a part of it. It says that instructions that do not return should not be removed. > The current implementation of mayReturn is to check the 'noreturn' function attribute. Are you suggesting to add a new attribute that is called 'mustreturn'
2012 Feb 03
0
[LLVMdev] Issues with the llvm.stackrestore intrinsic - now LoopRotation handling of alloca
Hi, I've tracked the first problem (mentioned in my previous email, quoted below) down further, ending up in the handling of alloca in LoopRotation.cpp (from trunk): // If the instruction's operands are invariant and it doesn't read or write // memory, then it is safe to hoist. Doing this doesn't change the order of // execution in the preheader, but does
2017 Jan 03
4
RFC: Allow readnone and readonly functions to throw exceptions
LLVM today does not clearly specify if a function specified to not write to memory (i.e. readonly or readnone) is allowed to throw exceptions. LangRef is ambiguous on this issue. The normative statement is "[readnone/readonly functions] cannot unwind exceptions by calling the C++ exception throwing methods" which does not decide an answer for non C++ languages. It used to say (h/t
2012 Feb 01
3
[LLVMdev] Issues with the llvm.stackrestore intrinsic
Hi, I have two problems regarding the llvm.stackrestore intrinsic. I'm running on 3.0, but a quick test on trunk also showed the same behavior. First problem: --------------- I have code like: tmp1 = call llvm.stacksave() tmp2 = alloca [do some stuff with tmp2] call llvm.stackrestore(tmp1) [some other stuff] tmp3 = call llvm.stacksave() tmp4 = alloca [do some stuff
2011 Jan 21
4
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
I need to figure out all LLVM Instructions that may write to memory. In http://llvm.org/docs/tutorial/OCamlLangImpl7.html, it mentions that "In LLVM, all memory accesses are explicit with load/store instructions, and it is carefully designed not to have (or need) an "address-of" operator." I take this as "StoreInst is the only one that writes to memory". However,
2011 Jul 05
1
[LLVMdev] Instructions that access memory @ the IR level
Hello, I'm working with a pass that operates at the LLVM IR level. I need to run some statistics on instructions that access memory, and I'm wondering, at the IR level, which instructions aside from Load and Store access memory directly as a result of their operation? I know on an ISA level, this varies from arch to arch, but I'm wondering how LLVM has this set up at the IR level.
2006 May 12
1
[LLVMdev] Instruction->mayReadFromMemory
Hi Chris and list Thanks for your quick answer :-). Am Freitag, 12. Mai 2006 19:09 schrieb Chris Lattner: > On Fri, 12 May 2006, Silken Tiger wrote: > > To find the first instructions which are not depending on others results. > > So far it seems to be working but i am missing instructions like: > > %tmp.1 = seteq int %argc, 2 ; <bool> [#uses=1] > >
2016 Mar 22
1
New intrinsic property IntrOnlyWrite
> On Mar 21, 2016, at 9:14 PM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > >> On Mar 21, 2016, at 8:58 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote: >> >> On 19.03.2016 16:25, Mehdi Amini wrote: >>> Hi, >>> >>> Can you elaborate what is the impact at the IR level? >>> If the point is just about