similar to: [LLVMdev] Coding Standards: Iterator begin and end functions.

Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] Coding Standards: Iterator begin and end functions."

2013 Aug 02
0
[LLVMdev] Coding Standards: Iterator begin and end functions.
On Fri, Aug 2, 2013 at 1:56 PM, Rafael Espíndola <rafael.espindola at gmail.com > wrote: > One exception we have in the coding standard is that classes that look > like STL ones should use similar names for the methods (begin(), > push_back(), etc...). > > But different parts of llvm have different opinions on how to handle > the related case of classes that are not STL
2013 Aug 02
0
[LLVMdev] Coding Standards: Iterator begin and end functions.
On Aug 2, 2013, at 1:56 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote: > One exception we have in the coding standard is that classes that look > like STL ones should use similar names for the methods (begin(), > push_back(), etc...). > > But different parts of llvm have different opinions on how to handle > the related case of classes that are not STL like,
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2012 Jun 12
4
[LLVMdev] Questions about llvm/Object/COFF.h
So, I'm trying to use this file to look inside COFF files. Got the header. OK. Now I want to look at the sections. Look, there's a section iterator. I can use that! So, I write: for (llvm::object::section_iterator iter = Obj.begin_sections (); iter != Obj.end_sections(); ++iter ) and it doesn't compile. There's no ++ for section iterators. Apparently, you're supposed to
2012 Jun 12
0
[LLVMdev] Questions about llvm/Object/COFF.h
If you haven't already found it, you should look inside tools/llvm-objdump/llvm-objdump.cpp, which is an easy-to-follow example of how these APIs work --Sean Silva. On Mon, Jun 11, 2012 at 5:41 PM, Marshall Clow <mclow.lists at gmail.com>wrote: > So, I'm trying to use this file to look inside COFF files. > Got the header. OK. > > Now I want to look at the sections.
2014 Mar 04
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
On Mon, Mar 3, 2014 at 12:26 AM, Chris Lattner <sabre at nondot.org> wrote: > > On Mar 2, 2014, at 8:53 PM, Renato Golin <renato.golin at linaro.org> wrote: > > > On 3 March 2014 12:32, Pete Cooper <peter_cooper at apple.com> wrote: > >> Would those work with a foreach construct? Perhaps I forgot to mention > that was what I'm trying to work out
2012 Jun 12
0
[LLVMdev] Questions about llvm/Object/COFF.h
On Mon, Jun 11, 2012 at 5:41 PM, Marshall Clow <mclow.lists at gmail.com> wrote: > So, I'm trying to use this file to look inside COFF files. > Got the header. OK. > > Now I want to look at the sections. > Look, there's a section iterator. I can use that! > > So, I write: >        for (llvm::object::section_iterator iter = Obj.begin_sections (); iter !=
2015 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Agreed. Although I assume you mean invoke the new pass under a >> ThinLTO-only option so that avail extern are not dropped in the >> compile pass before the LTO link? > > > No, this pass
2012 Apr 09
3
[LLVMdev] How to instrument a this function using insertBefore instruction???
Hi all, Im trying to instrument this hello function right before the instruction that call the "puts" function(the source code is as follow). Now I can compile the pass without errors, but when run the pass with opt tool, it broke down. The diagnose is something like Referencing function in another module! %CallCheck = call i32 @fib() Broken module found, compilation aborted! Does
2011 Dec 09
1
[LLVMdev] Finding the uses of a global variable
Hi everyone, I am writing a pass that finds all uses of global variables (my goal is to find the uses of strings, and strings are defined as global variables). So, I can iterate over global vars by for(Module::global_iterator gi = M.global_begin(), gend = M.global_end(); gi != gend; ++gi) ...... But if I use its def-use chain for(Value::use_iterator i = gi->use_begin(), e = F->use_end; i!=e;
2012 Aug 18
1
[LLVMdev] GlobalVariable initializer using from beyond the grave
For LLDB I'm writing a dumb module pass that removes all global variables, by running the following code: bool erased = true; while (erased) { erased = false; for (Module::global_iterator gi = llvm_module.global_begin(), ge = llvm_module.global_end(); gi != ge; ++gi) { GlobalVariable *global_var =
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
Talked to Eric Fri and he suggested that this might be the first of several places where we want behavior of LTO compiles to diverge from normal -O2 compiles. So for now I have implemented this such that we pass down -flto to the -cc1 job, and that gets propagated as a code gen option and into the PassManagerBuilder. I have left the current logic translating -flto to the -emit-llvm-bc option,
2013 Dec 20
2
[LLVMdev] [LLVM] What has happened to LLVM bitcode archive support?
>> Therefore LLVM is still supporting runtime libraries that consist of llvm >> bitcode files (even if the format is now different) > > runtime? It is still possible to build .a files if that is what you men. Sorry I haven't explained very clearly. The tool that I work on is an interpreter of LLVM IR and when the tool runs, it links in an archive of bitcode modules into the
2012 Apr 09
2
[LLVMdev] How to instrument a this function using insertBefore instruction???
Hi, I don't think the code you pasted can be the correct code, where does FibF come from? Anyway, the problem is that you're calling the FibF from Module A, however you defined it for Module B. You need to insert the FibF function into the Module that you're running. To do this override "virtual bool doInitialization(Module &M);" and insert FibF into M. Joey 2012/4/9
2013 Nov 13
0
[LLVMdev] Stack traces from JIT code
Yeah, take a look at the IntelJITEventListener code (in lib/ExecutionEngine/IntelJITEvents). It uses the debug info to find function names. -Andy From: Andrew MacPherson [mailto:andrew.macp at gmail.com] Sent: Wednesday, November 13, 2013 1:12 PM To: Kaylor, Andrew Cc: Reid Kleckner; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Stack traces from JIT code Hi Andy, In the NotifyObjectEmitted
2013 Apr 07
1
[LLVMdev] How to get the Instruction where one function use the global variable.
Hi, all I try to get the Instructions where one function use the global variable. for (llvm::Module::global_iterator gvar_iter = M.global_begin(); gvar_iter != M.global_end(); gvar_iter++) { llvm::GlobalVariable *gvar = &*gvar_iter; llvm::errs() << "const global var: " << gvar->getName() << "\n"; for (
2013 Nov 13
2
[LLVMdev] Stack traces from JIT code
Hi Andy, In the NotifyObjectEmitted method of our derived JITEventListener class we use the begin_symbol() iterator to walk the object's symbols looking for functions and only functions marked with ExternalLinkage seem to show up. I'm not sure how I would access the Dwarf info from within there, is there a way? Thanks, Andrew On Wed, Nov 13, 2013 at 8:23 PM, Kaylor, Andrew
2017 Aug 29
5
Is the flow "llvm-extract -> llvm-link -> clang++ " supposed to be used in this way? To Extract and Re-insert functions?
Hi all, First post to the list, I hope you can help or guide me on this task. I am involved in a project that requires to re-link extracted and edited IR code Thus I want to know if these tools can be used in this way? clang++-4.0 code03.cpp -emit-llvm -S -o code03.ll llvm-extract-4.0 code03.ll -func main -S -o extracted_main.ll llvm-link-4.0 code03.ll -only-needed -override extracted_main.ll
2011 Nov 21
1
[LLVMdev] ModulePass and Strings
Hi everybody, I am writing an LLVM pass and I want to iterate over the whole module (including global variables), that's why I use ModulePass instead of FunctionPass. But I don't know how to do it. Using Module::iterator seams to iterate only over functions. But I need to iterate over all the Instructions in the module. How should I do such an iteration? Also, I would like to find all the
2012 Dec 05
2
[LLVMdev] how to get and modify a global variable inside a module
hi Eduardo, thanks for your attention, i checked the iterator, but i didn't see any fucntion can return or modify the main memory address of a global variable inside the module. can you provide some reference code or program can achieve this? thank you very much -- View this message in context: