search for: guarded

Displaying 20 results from an estimated 2014 matches for "guarded".

2019 May 28
6
Making loop guards part of canonical loop structure
..._edge, %entry br label %for.end for.end: ; preds = %for.cond.cleanup ret void However, for loops that can be proven to execute at least once, there is no guard. This creates complications for several loop optimizations because they need to handle both guarded loops and non-guarded loops. For example, the current loop fusion pass needs to check whether two loops are control flow equivalent before fusing them (i.e., if the first loop executes, the second loop is guaranteed to execute). This is currently done by checking that the preheader of the first loo...
2018 Jul 10
2
Giving up using implicit control flow in guards
...cs of this intrinsic, and keep an eye on all new passes to make sure they can use it. I have a proposal how it can be done relatively easily and with minimum overhead. Let us inline the guard according to the specification: %guard_cond = and i1 %cond, %undef br i1 %guard_cond, label %guarded, label %deopt guarded: <do some useful stuff> deopt: <deoptimize and leave the compiled code> Let's notice two important facts: 1. In guarded block, %cond is true because it is implied by %guard_cond being true. 2. In deopt block, we cannot assum...
2018 Jul 13
2
Giving up using implicit control flow in guards
...l new passes to make sure they can use it. > > > > I have a proposal how it can be done relatively easily and with minimum overhead. Let us inline the guard according to the specification: > > > > %guard_cond = and i1 %cond, %undef > > br i1 %guard_cond, label %guarded, label %deopt > > > > guarded: > > <do some useful stuff> > > > > deopt: > > <deoptimize and leave the compiled code> > > > > Let's notice two important facts: > > 1. In guarded block, %cond is true because it i...
2019 May 30
2
Making loop guards part of canonical loop structure
On Hexagon, unguarded loops cannot be converted to hardware loops. If the loop's latch branch alone handles the iteration count, including the possibility of 0, then the loop cannot be converted to a hardware loop, because hardware loops must iterate at least once. If the entire loop is guarded against zero iterat...
2018 May 16
2
RFC: separating guards and implicit control flow
All, TLDR: guards currently require reasoning about implicit control flow.  LLVM struggles with implicit control flow within a basic block.  We should redesign guards to admit this rather than trying to boil the ocean. As you may be aware, LLVM currently has experimental support for a construct called a "guard".  A guard is like a branch to a potential deoptimzation point, except
2016 Feb 18
2
RFC: Add guard intrinsics to LLVM
Replies inline. At a high level, it feels like we'll eventually need a new instruction to represent the kind of control flow a guard entails (to be clear: we should probably still start with an intrinsic) -- they are fairly well-behaved, i.e. readonly, nounwind etc. as far as the immediate "physical" caller is concerned, but not so as far as its callers's callers are concerned.
2016 Apr 27
2
RFC: Generalize AssumptionCache to AxiomCache
Hi all, Guard intrinsics[0] are similar in nature to Assume intrinsics, in that the condition passed to a guard intrinsic call is known to be true at locations dominated (but *not* post-dominated) by the call[1]. I'd like to re-use the AssumptionCache infrastructure that already exists to teach the mid level optimizer to exploit this property. The steps I want to take are (not necessarily
2005 May 18
2
R Include File Guards
R 2.1.0/src/include from 2005/04/18 download Naming inconsistent for guards as well but that's pedantic. Simple convention: file <foo.h> #ifndef R_FOO_H file <R_ext/bar.h> #ifndef R_EXT_BAR_H Missing guards: <IOStuff.h> <Internal.h> <Parse.h> <R_ext/GraphicsBase.h> <R_ext/GraphicsDevice.h> <R_ext/GraphicsEngine.h>
2016 Feb 17
7
RFC: Add guard intrinsics to LLVM
This is a proposal to add guard intrinsics to LLVM. Couple of glossary items: when I say "interpreter" I mean "the most conservative tier in the compilation stack" which can be an actual interpreter, a "splat compiler" or even a regular JIT that doesn't make optimistic assumptions. By "bailing out to the interpreter" I mean "side exit" as
2010 Sep 23
1
Behavior of R CMD build and library() w.r.t. setGeneric-like functions
Hello developeRs, Apologies in advance for a rather long email, but to describe the problem, I need to step through many details. I have been working on a new dispatching system (futile.paradigm on CRAN) based on functional programming concepts that is an alternative to S3 and S4 dispatching. I use a declarative syntax using guard statements to control the dispatching between function variants. I
2018 May 17
0
RFC: separating guards and implicit control flow
On 05/16/2018 04:49 PM, Philip Reames wrote: > All, > > TLDR: guards currently require reasoning about implicit control flow.  > LLVM struggles with implicit control flow within a basic block.  We > should redesign guards to admit this rather than trying to boil the > ocean. > > As you may be aware, LLVM currently has experimental support for a > construct called a
2007 Oct 23
0
6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c
libswfdec/swfdec_as_frame.c | 17 ++++--------- libswfdec/swfdec_as_internal.h | 7 +++++ libswfdec/swfdec_as_interpret.c | 2 + libswfdec/swfdec_as_interpret.h | 2 + libswfdec/swfdec_as_object.c | 42 ++++++++++++++++++++++++---------- libswfdec/swfdec_as_script_function.c | 2 + libswfdec/swfdec_flash_security.c | 12 ++++-----
2016 Jun 02
6
-Wmisleading-indentation violations
...winAsmParser.cpp:962:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (Update > 255 || Update < 0) ^~ /home/dsl11/dev/llvm-upstream/src/lib/MC/MCParser/DarwinAsmParser.cpp:964:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ Lex(); ^~~ ``` ``` /home/dsl11/dev/llvm-upstream/src/lib/Transforms/Scalar/LoopStrengthReduce.cpp: In member function ‘void {anonymous}::Cost::RateRegister(const llvm::SCEV*, llvm::SmallPtrSetImpl<const llvm::SCEV*>&, const llvm::Loop*, llvm::ScalarEvolution&,...
2019 May 30
4
Making loop guards part of canonical loop structure
...execute at least once, if the preheader is reached.  How is what you need anything more than a loop header with a unique predecessor (preheader)? I'm not seeing the need for a guard block in what you said. Philip On 5/30/19 11:28 AM, Krzysztof Parzyszek via llvm-dev wrote: > On Hexagon, unguarded loops cannot be converted to hardware loops. > > If the loop's latch branch alone handles the iteration count, including the possibility of 0, then the loop cannot be converted to a hardware loop, because hardware loops must iterate at least once. If the entire loop is guarded against ze...
2016 Feb 18
2
RFC: Add guard intrinsics to LLVM
Sanjoy gave the long answer, let me give the short one. :) "deopt" argument bundles are used in the middle end, they are lowered into a statepoint, and generate the existing stackmap format. i.e. one builds on the other. On 02/18/2016 11:43 AM, Eric Christopher wrote: > Hi Sanjoy, > > A quick question here. With the bailing to the interpreter support > that you're
2019 Mar 25
2
[PATCH] x86/paravirt: Guard against invalid cpu # in pv_vcpu_is_preempted()
It was found that passing an invalid cpu number to pv_vcpu_is_preempted() might panic the kernel in a VM guest. For example, [ 2.531077] Oops: 0000 [#1] SMP PTI : [ 2.532545] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 2.533321] RIP: 0010:__raw_callee_save___kvm_vcpu_is_preempted+0x0/0x20 To guard against this kind of kernel panic, check is added to pv_vcpu_is_preempted() to
2019 Mar 25
2
[PATCH] x86/paravirt: Guard against invalid cpu # in pv_vcpu_is_preempted()
It was found that passing an invalid cpu number to pv_vcpu_is_preempted() might panic the kernel in a VM guest. For example, [ 2.531077] Oops: 0000 [#1] SMP PTI : [ 2.532545] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 2.533321] RIP: 0010:__raw_callee_save___kvm_vcpu_is_preempted+0x0/0x20 To guard against this kind of kernel panic, check is added to pv_vcpu_is_preempted() to
2020 May 14
2
Sancov guard semantics for usage between comdats
Given the following C++ code: ``` // test.cpp struct Foo { int public_foo(); int outside_foo(); [[gnu::always_inline]] int inline_foo() { int x = outside_foo(); if (x % 17) { x += 1; } return x; } [[gnu::noinline]] int inline_bar1() { int x = inline_foo(); if (x % 23) { x += 2; } return x; } [[gnu::noinline]] int inline_bar2() {
2019 Mar 25
2
[PATCH] x86/paravirt: Guard against invalid cpu # in pv_vcpu_is_preempted()
On 03/25/2019 12:40 PM, Juergen Gross wrote: > On 25/03/2019 16:57, Waiman Long wrote: >> It was found that passing an invalid cpu number to pv_vcpu_is_preempted() >> might panic the kernel in a VM guest. For example, >> >> [ 2.531077] Oops: 0000 [#1] SMP PTI >> : >> [ 2.532545] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 >> [ 2.533321]
2019 Mar 25
2
[PATCH] x86/paravirt: Guard against invalid cpu # in pv_vcpu_is_preempted()
On 03/25/2019 12:40 PM, Juergen Gross wrote: > On 25/03/2019 16:57, Waiman Long wrote: >> It was found that passing an invalid cpu number to pv_vcpu_is_preempted() >> might panic the kernel in a VM guest. For example, >> >> [ 2.531077] Oops: 0000 [#1] SMP PTI >> : >> [ 2.532545] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 >> [ 2.533321]