Displaying 8 results from an estimated 8 matches for "main_func".
2015 Jun 28
5
[LLVMdev] readonly and infinite loops
...emon program wouldn't be readonly. An infinite loop can be.
Right.
To prevent miscommunication, here is a quick analysis of a problematic
(IMO) example:
We start with
```
define void @infloop(i1 %c) {
entry:
br i1 %c, label %l, label %e
l:
br label %l
e:
ret void
}
define void @main_func() {
entry:
call void @infloop(i1 1)
ret void
}
```
In this program `@main_func`, when called, will loop infinitely.
If we run this program through `opt -functionattrs -prune-eh
-early-cse`, we get
```
; Function Attrs: nounwind readnone
define void @infloop(i1 %c) #0 {
entry:
br i1 %c, la...
2015 Jun 28
2
[LLVMdev] readonly and infinite loops
On Sat, Jun 27, 2015 at 2:46 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> In C, dunno, but in LLVM, it means they aren't readonly :)
In that case, -functionattrs needs to be fixed:
define void @infloop() {
entry:
br label %l
l:
br label %l
}
== opt -functionattrs ==>
; Function Attrs: readnone
define void @infloop() #0 {
entry:
br label %l
l:
2017 Mar 31
2
How to write the same things as `opt` command in C++ API
...es =
llvm::ConstantInt::get(llvm::Type::getInt32Ty(context), 2);
builder.CreateRet(res);
llvm::verifyFunction(*cFun);
}
/// @brief Start of Main function
{
llvm::FunctionType *const func_type =
llvm::FunctionType::get(llvm::Type::getInt32Ty(context), false);
llvm::Function *const main_func =
llvm::Function::Create(func_type, llvm::Function::ExternalLinkage,
"main",
module.get());
llvm::BasicBlock *const entry = llvm::BasicBlock::Create(context,
"entrypoint", main_func);
llvm::IRBuilder<> bu...
2015 Jun 28
2
[LLVMdev] readonly and infinite loops
...communication, here is a quick analysis of a
> problematic
> (IMO) example:
>
> We start with
>
> ```
> define void @infloop(i1 %c) {
> entry:
> br i1 %c, label %l, label %e
>
> l:
> br label %l
>
> e:
> ret void
> }
>
> define void @main_func() {
> entry:
> call void @infloop(i1 1)
> ret void
> }
> ```
>
> In this program `@main_func`, when called, will loop infinitely.
>
> If we run this program through `opt -functionattrs -prune-eh
> -early-cse`, we get
>
> ```
> ; Function Attrs: nounwind...
2015 Feb 10
3
[PATCH 0/2] fix a couple cosmetic issues
Fixes some typos and missing newlines
Jonathan Boeing (2):
fix a few typos
add missing '\n' to dprintf
com32/include/sys/module.h | 2 +-
com32/lib/sys/module/exec.c | 4 ++--
core/fs/fs.c | 2 +-
core/lwip/src/netif/undiif.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--
2.3.0
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com>
This series fixes some bugs and switches the elflink branch to be
entirely ELF modules. It applies on top of,
http://syslinux.zytor.com/archives/2011-April/016369.html
The deletions in the diff stat below are mainly from deleting
com32/elflink/modules (finally!). Now there should be no duplicate
code because we don't need COM32 and
2012 Mar 23
19
[PATCH 00/19][elflink] Improve compatibility with 4.x
From: Matt Fleming <matt.fleming at intel.com>
The following patch series is available at,
git://git.zytor.com/users/mfleming/syslinux.git elflink
All patches are against the 'elflink' branch.
This series fixes a few serious bugs and some behavioural
incompatibilities with the 4.x series.
Matt Fleming (19):
ldlinux: Initialise 'p' before using it.
ldlinux: Parse
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...size = %d\n", module->str_table, module->strtable_size);
- printf("sym tbl = 0x%p, entry = %d, size = %d\n", module->sym_table, module->syment_size, module->symtable_size);
- printf("init: %p", module->init_func);
- printf("main: %p", module->main_func);
- printf("exit: %p", module->exit_func);
- printf("", module->base_addr);
- printf("", module->base_addr);
- printf("", module->base_addr);
- */
-}
-
/**
* struct module_dep - structure encapsulating a module dependency need
*
@@ -263,9 +24...