Displaying 8 results from an estimated 8 matches for "doesnotreturn".
2008 Mar 16
0
[LLVMdev] improving the ocaml binding's type safety
...sing these constraints explicitly in the open system involves
> annotating the C++ class hierarchy with extra variants which are unnecessary
> in the closed model.
It looks like you might be right, and open variants might not be able
to handle the pseudo-shared functions like
llvm::CallInst::doesNotReturn and llvm::InvokeInst::doesNotReturn. We
can't do the naive
val does_not_return : [> `CallInst | `InvokeInst] t -> bool
Like we can with closed variants:
val does_not_return : [< llcallinst | llinvokeinst] t -> bool.
Although... what if we just add another variant? This would wor...
2008 Mar 16
2
[LLVMdev] improving the ocaml binding's type safety
Erick,
After some experimentation, I'd prefer the closed system. LLVM has
some type peculiarities like the commonality between CallInst and
InvokeInst. I find that the closed type system lets me express such
constraints more naturally. Expressing these constraints explicitly in
the open system involves annotating the C++ class hierarchy with extra
variants which are unnecessary in
2012 Nov 29
0
[LLVMdev] noreturn attribute on a call instruction vs noreturn on afunction
You can use CallInst::hasFnAttr(). It checks for attributes in the
instruction and in the function decl.
http://llvm.org/docs/doxygen/html/Instructions_8cpp_source.html#l00345
Nuno
----- Original Message -----
> Hi,
>
> Building the following C code I get a call instruction that has no
> noreturn
> attribute, while the function itself does have it.
>
> void foo(void **b)
2012 Nov 28
4
[LLVMdev] noreturn attribute on a call instruction vs noreturn on a function
Hi,
Building the following C code I get a call instruction that has no noreturn
attribute, while the function itself does have it.
void foo(void **b) {
__builtin_longjmp(b, 1);
}
define void @_Z3fooPPv(i8** %b) noreturn nounwind uwtable {
entry:
%0 = bitcast i8** %b to i8*
tail call void @llvm.eh.sjlj.longjmp(i8* %0)
2019 Jun 04
2
is this a bug in PruneEH?
...s built with wrong version of ROM image */
while(1) {
;
}
}
The -O2 level PruneEH pass uses SimplifyFunction() which contains this code:
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; )
if (CallInst *CI = dyn_cast<CallInst>(I++))
if (CI->doesNotReturn() && !CI->isMustTailCall() &&
!isa<UnreachableInst>(I)) {
// This call calls a function that cannot return. Insert an
// unreachable instruction after it and simplify the code. Do this
// by splitting the BB, adding the unreachabl...
2010 May 15
0
[LLVMdev] [cfe-dev] Question about UnreachableInst and exit() system call
Hi Chris,
Thanks for the reply. Right now, I disabled the doesNotReturn() check in the
code for emitting calls in clang (CGCall) and also disabled running
simplifycfg/prune-eh passes that introduce UnreachableInst after exit().
The main issue is that the particular transform pass that I am using in our
backend does not yet support multiple loop exits and common case w...
2012 May 25
0
[LLVMdev] Changes to TargetLowering::{LowerCallTo,LowerCall}
...; &Ins = CLI.Ins;
SDValue Chain = CLI.Chain;
SDValue Callee = CLI.Callee;
bool &isTailCall = CLI.IsTailCall;
CallingConv::ID CallConv = CLI.CallConv;
bool doesNotRet = CLI.DoesNotReturn;
bool isVarArg = CLI.IsVarArg;
The CallLoweringInfo struct now contains all parameters that were originally available as parameters. The InVals vector was left as a parameter since it is the responsibility of the LowerCall implementation to fill it and does not repr...
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.
...;(this))
>>> return !CI->doesNotThrow();
>>> return isa<ResumeInst>(this);
>>> }
>>>
>>> +bool Instruction::mayReturn() const {
>>> + if (const CallInst *CI = dyn_cast<CallInst>(this))
>>> + return !CI->doesNotReturn();
>>> + return true;
>>> +}
>>> +
>>> /// isAssociative - Return true if the instruction is associative:
>>> ///
>>> /// Associative operators satisfy: x op (y op z) === (x op y) op z
>>>
>>> Added: llvm/trunk/test/T...