search for: guards

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

Did you mean: guard
2019 May 28
6
Making loop guards part of canonical loop structure
...ader. Similarly, when checking for perfect loop nests, a loop guard around the inner loop will make the nest appear imperfect. However, if the guard is considered to be part of the inner loop, it is easier to prove a perfect nest. Both of these examples have alternative ways to deal with the loop guards, if they are present. However, I would like to have the discussion regarding making guards part of the canonical loop structure. If people are supportive of this, we can start doing the work to implement the guards and start modify loop optimizations to deal with them appropriately. However, if thi...
2018 Jul 10
2
Giving up using implicit control flow in guards
Hello Everyone, I want to raise a discussion about @llvm.experimental.guard intrinsic and reasons why we should give up using it. Here is an alternative approach to representation of guards that resolves some of fundamental flaws that the current guards have. Basically, this intrinsic was introduced to model the following situation: we want to check that some condition is true, and if it's not, we should deoptimize at this point and quit execution of the compiled code. According...
2018 Jul 13
2
Giving up using implicit control flow in guards
...Max -----Original Message----- From: Sanjoy Das [mailto:sanjoy at playingwithpointers.com] Sent: Wednesday, July 11, 2018 8:35 PM To: Maxim Kazantsev <max.kazantsev at azul.com> Cc: llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Giving up using implicit control flow in guards Hi Max, I think this works, but I'm a bit wary around the complexity introduced by widenable_condition. For instance, we'd have to be careful in spec'ing out its memory effects (if it is readnone/readonly, it will get CSE'ed (which may not be what you want?) but if it can write m...
2019 May 30
2
Making loop guards part of canonical loop structure
...a hardware loop, because hardware loops must iterate at least once. If the entire loop is guarded against zero iteration count, we can put the loop setup in the preheader, since at that point the loop is guaranteed to execute at least once. I am strongly in favor of having some way to create loop guards, even if they are trivial. -- Krzysztof Parzyszek  kparzysz at quicinc.com   LLVM compiler development -----Original Message----- From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Finkel, Hal J. via llvm-dev Sent: Tuesday, May 28, 2019 4:02 PM To: Kit Barton <kit.barton a...
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 "gu...
2016 Feb 18
2
RFC: Add guard intrinsics to LLVM
...n* which contains the guard. A caller of that function in the same > module may be returned to by either the function itself, or the interpreter > after running the continuation implied by the guard. This introduces a > complication for IPA/IPO; any guard (really, any side exit, of which guards > are one form) has to be treated as a possible return point from the callee > with an unknowable return value and memory state. This is a really good point. This has strong implications for the guards memory effects as well -- even though a guard can be seen as readonly in its containing f...
2016 Apr 27
2
RFC: Generalize AssumptionCache to AxiomCache
...mid level optimizer to exploit this property. The steps I want to take are (not necessarily in this order or split up this way): - Rename AssumptionCache to AxiomCache (or something similar) - Maintain two lists in AxiomCache, one for assumptions (exactly the same as today) and other for guards (`AxiomCache::guards()`) - Change places that check check the `assumptions()` list to also check the newly added `guards()` list I want to maintain `assumptions()` and `guards()` separately since, as noted above, the way they can be used by the optimizer is different (guards don't necess...
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....
2016 Feb 17
7
RFC: Add guard intrinsics to LLVM
...Q) ]; unreachable; } ... ``` before the widening transform. The widening transform will now effectively pass in an incorrect value for `!(6 < %len)`. This isn't to say it is impossible to do check widening in a explicit control flow representation, just that is more natural to do it with guards. # details: semantics ## as-if control flow The observable behavior of `@llvm.guard_on` is specified as: ``` void @llvm.guard_on(i1 %pred) { entry: %unknown_cond = < unknown source > %cond = and i1 %unknown_cond, %pred br i1 %cond, label %left, label %right left: c...
2010 Sep 23
1
Behavior of R CMD build and library() w.r.t. setGeneric-like functions
...quot;set_date" Execution halted If I add the explicit function definition for 'month' as shown above, I get one of my own error messages indicating that no guard statements were executed. > set_date(20100921) Error in UseFunction("set_date", ...) : Function must have guards for functional dispatching Calls: set_date -> UseFunction Execution halted I decided to bypass the check process and just install the built package to see if it is an issue with check as opposed to the package. Unfortunately, it seems that when the package is built, the guard commands get strip...
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 > c...
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
Hi, I was building LLVM with gcc 6.1.1 recently and it was spitting out some warnings relating to misleading indention that caught my eye. This wasn't a fresh build so I may have missed some. I've CC'ed the authors of the potentially misleading lines so they can decide what do about the warnings (if anything). I'm wondering if clang-format is making some inappropriate choices
2019 May 30
4
Making loop guards part of canonical loop structure
...ilip Reames <listmail at philipreames.com> Sent: Thursday, May 30, 2019 3:00 PM To: Krzysztof Parzyszek <kparzysz at quicinc.com>; Finkel, Hal J. <hfinkel at anl.gov>; Kit Barton <kit.barton at gmail.com>; llvm-dev at lists.llvm.org Subject: [EXT] Re: [llvm-dev] Making loop guards part of canonical loop structure Er, I'm missing something.  Every loop header is guaranteed to 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 wha...
2016 Feb 18
2
RFC: Add guard intrinsics to LLVM
...he widening transform. The widening transform will now > effectively pass in an incorrect value for `!(6 < %len)`. > > This isn't to say it is impossible to do check widening in a explicit > control flow representation, just that is more natural to do it with > guards. > > > # details: semantics > > ## as-if control flow > > The observable behavior of `@llvm.guard_on` is specified as: > > ``` > void @llvm.guard_on(i1 %pred) { > entry: > %unknown_cond = < unknown source > > %...
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
...nt inline_bar2() { int x = inline_foo(); if (x % 37) { x += 3; } return x; } }; int Foo::public_foo() { return inline_foo() ? inline_bar1() : inline_bar2(); } ``` Compiling this with `clang++ -fsanitize-coverage=trace-pc-guard /tmp/test.cpp -c -O1` generates sancov guards (__sancov_gen_.X) that are used outside of their comdat group due to inlining: ``` @__sancov_gen_.1 = private global [3 x i32] zeroinitializer, section "__sancov_guards", comdat($_ZN3Foo10inline_fooEv) define dso_local i32 @_ZN3Foo10public_fooEv(%struct.Foo* %0) local_unnamed_addr #0 c...
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]