Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Keno
Keno / bad.ll
Created March 30, 2022 02:36
bad loop vectorize
define internal {} addrspace(10)* @japi1_vect_42283({} addrspace(10)** %0, i32 %1) #0 {
top:
%2 = sext i32 %1 to i64
%3 = load atomic {} addrspace(10)* ({} addrspace(10)*, i64)*, {} addrspace(10)* ({} addrspace(10)*, i64)** bitcast (void ()** @jlplt_ijl_alloc_array_1d_10294_got to {} addrspace(10)* ({} addrspace(10)*, i64)**) unordered, align 8
%4 = call {} addrspace(10)* %3({} addrspace(10)* null, i64 0)
%5 = bitcast {} addrspace(10)** %0 to { {} addrspace(10)*, i64 } addrspace(10)**
%6 = load { {} addrspace(10)*, i64 } addrspace(10)*, { {} addrspace(10)*, i64 } addrspace(10)** %5, align 8, !tbaa !0
%7 = bitcast {} addrspace(10)* %4 to { {} addrspace(10)*, i64 } addrspace(13)* addrspace(10)*
%8 = addrspacecast { {} addrspace(10)*, i64 } addrspace(13)* addrspace(10)* %7 to { {} addrspace(10)*, i64 } addrspace(13)* addrspace(11)*
%9 = load { {} addrspace(10)*, i64 } addrspace(13)*, { {} addrspace(10)*, i64 } addrspace(13)* addrspace(11)* %8, align 8, !tbaa !5
target triple = "x86_64-unknown-linux-gnu"
@SUM.CoreDOT.Tuple5334 = external dso_local global {}*
@jlplt_ijl_alloc_array_1d_10294_got = external dso_local global void ()*
@jl_sysimg_gvars = constant [15411 x i64*] [i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64* undef, i64*
module TortureTest
# Scalability parameters - set here to roughly match the real world usecase
# though that use case does more work.
const NFIELDS = 888
const NSET = 387
const NREPS = 40
using Random
using Base.Meta
--- nv-pci.c 2022-01-08 23:12:19.137095516 +0000
+++ /usr/src/nvidia-495.46/nvidia/nv-pci.c 2022-01-09 00:05:21.323360921 +0000
@@ -217,7 +217,78 @@
+#define NV_GPU_BAR1 1
+static int nv_resize_pcie_bars(struct pci_dev *pci_dev) {
+ struct pci_host_bridge *host;
+ u16 cmd;
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 78f6e345170..35e050abf27 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -1385,7 +1385,7 @@ static NTSTATUS read_console( struct console *console, unsigned int ioctl, size_
if (edit_line_grow( console, 1 )) console->edit_line.buf[0] = 0;
console->pending_read = out_size;
- return process_console_input( console );
+ return STATUS_PENDING;
This file has been truncated, but you can view the full file.
$ RR_LOG=all:debug ~/rr-build/bin/rr replay -g 3770
[GdbCommandHandler] registering command: elapsed-time
[GdbCommandHandler] registering command: when
[GdbCommandHandler] registering command: when-ticks
[GdbCommandHandler] registering command: when-tid
[GdbCommandHandler] registering command: rr-history-push
[GdbCommandHandler] registering command: back
[GdbCommandHandler] registering command: forward
[GdbCommandHandler] registering command: checkpoint
[GdbCommandHandler] registering command: delete checkpoint
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
circshift_gcdless!(arr::AbstractVector, shift)
Circularly shift the array `arr` by the given `shift` amount.
The algorithm used is the well-known GCD-less (aka implicit GCD)
juggling algorithm (e.g. STL3 in [SHENE97]).
[SHENE97] https://pages.mtu.edu/~shene/PUBLICATIONS/1997/Array-Rotation.pdf
"""
function circshift_gcdless!(arr::AbstractVector, shift::Integer)
#=
using Revise
Revise.track(Core.Compiler)
=#
using Symbolics
bar(a, b) = a * b
function foo(a, b, c)
bar(a, b) + c
@compiler_plugin FastSinPlugin
#=
Some sort of implementation of FastSinPlugin where
sin(x::Float64) is replaced by fast_sin(x::Float64).
N.B.: If the function being called is not `sin`, this
needs to recurse.
N.B.: This needs to handle the non-inferred case
N.B.: This should be done in the optimizer and may assume