Displaying 8 results from an estimated 8 matches for "structret".
Did you mean:
structre
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...0 (Intrepid Ibex) for
a small part-time project combining Witty (http://www.webtoolkit.eu) and
the ExecutionEngine in LLVM. (This is my second week with any of these
so I still lack a lot of basic knowledge.)
Sometimes I want to call a function returing a struct (in this case
std::string), thus hasStructRetAttr() is true for the Function and
getNumParams() for the FunctionType is one more than the actual number
of parameters including "this".
I've made an implementation that seems to work fine, but I would
apreciate if the people on this list could take a look to see if there's
anyt...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...y)
> @@ -60,7 +60,16 @@
> +
> + /// setByValAttr - Set true to give the Argument a byVal attribute.
> + void setByValAttr(bool);
>
> + /// setNoAliasAttr - Set true to give the Argument a noalias
> attribute.
> + void setNoAliasAttr(bool noAlias);
> +
> + /// setStructRetAttr - Set true to give the Argument a sret
> attribute.
> + void setStructRetAttr(bool byVal);
These prototypes are all misleading; the bool value is ignored. I
think it would be preferable to simply have a single pair of methods,
addAttr(ParamAttr Attr) and removeAttr(ParamAttr Attr)...
2008 Apr 24
2
[LLVMdev] ParamAttr Patch - Alignment fix
Hi..
Updated so you now set alignment through LLVMInstrSetAlignment.
Anders Johnsen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ParamAttr.patch
Type: text/x-diff
Size: 7420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080424/cb72b4bb/attachment.patch>
2008 Oct 18
2
[LLVMdev] Is the online demo using outdated binaries?
...}
produces this LLVM C++ API code:
(...)
PAListPtr func__Z3foov_PAL = 0;
{
SmallVector<ParamAttrsWithIndex, 4> Attrs;
ParamAttrsWithIndex PAWI;
PAWI.index = 0; PAWI.attrs = 0 | ParamAttr::NoUnwind;
Attrs.push_back(PAWI);
PAWI.index = 1; PAWI.attrs = 0 | ParamAttr::StructRet | ParamAttr::NoAlias;
Attrs.push_back(PAWI);
func__Z3foov_PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
}
func__Z3foov->setParamAttrs(func__Z3foov_PAL);
(...)
Please note that it uses index 1 for the return attributes, which is
inconsistent with what ReleaseNotes.html TOT s...
2008 Apr 26
2
[LLVMdev] ParamAttr Patch - Alignment fix
...> + /// setByValAttr - Set true to give the Argument a byVal attribute.
> > + void setByValAttr(bool);
> >
> > + /// setNoAliasAttr - Set true to give the Argument a noalias
> > attribute.
> > + void setNoAliasAttr(bool noAlias);
> > +
> > + /// setStructRetAttr - Set true to give the Argument a sret
> > attribute.
> > + void setStructRetAttr(bool byVal);
>
> These prototypes are all misleading; the bool value is ignored. I
> think it would be preferable to simply have a single pair of methods,
> addAttr(ParamAttr Attr) and rem...
2008 Oct 18
0
[LLVMdev] Is the online demo using outdated binaries?
...>
> (...)
> PAListPtr func__Z3foov_PAL = 0;
> {
> SmallVector<ParamAttrsWithIndex, 4> Attrs;
> ParamAttrsWithIndex PAWI;
> PAWI.index = 0; PAWI.attrs = 0 | ParamAttr::NoUnwind;
> Attrs.push_back(PAWI);
> PAWI.index = 1; PAWI.attrs = 0 | ParamAttr::StructRet |
> ParamAttr::NoAlias;
> Attrs.push_back(PAWI);
> func__Z3foov_PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
>
> }
> func__Z3foov->setParamAttrs(func__Z3foov_PAL);
> (...)
>
> Please note that it uses index 1 for the return attributes, which is
> inco...
2008 Nov 17
1
[LLVMdev] Bug? Call to pointer function does not adjust the stack.
...ck corruption.
2.1 works fine when the JIT produces code with the same llvm assembly
code.
What can be causing this?
A suspicious is in the absence of `sret' on
call void %4([4 x i8]* %0)
but, on the call site, the function has the sret attribute:
assert( f->paramHasAttr(1, Attribute::StructRet) );
so why the assembly does not reflect this is beyond me.
--
Oscar
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
.../include/llvm/IR/Attributes.h
@@ -106,6 +106,7 @@ public:
StackProtect, ///< Stack protection.
StackProtectReq, ///< Stack protection required.
StackProtectStrong, ///< Strong Stack protection.
+ SafeStack, ///< Safe Stack protection.
StructRet, ///< Hidden pointer to structure to return
SanitizeAddress, ///< AddressSanitizer is on.
SanitizeThread, ///< ThreadSanitizer is on.
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h
index 2964798..76e44f4 100644
--- a/includ...