Skip to content

Instantly share code, notes, and snippets.

View nickdesaulniers's full-sized avatar

Nick Desaulniers nickdesaulniers

View GitHub Profile
@nickdesaulniers
nickdesaulniers / dml20_rq_dlg_get_dlg_reg.s
Created August 17, 2023 18:40
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.o dml20_rq_dlg_get_dlg_reg
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.o: file format elf32-i386
Disassembly of section .text:
<dml20_rq_dlg_get_dlg_reg>:
pushl %ebp
R_386_32 __stack_chk_guard
R_386_PC32 memset
R_386_PC32 print__data_rq_sizing_params_st
mm/vmalloc.c:1575:12: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
1575 | if (va && __this_cpu_cmpxchg(ne_fit_preload_node, NULL, va))
| ^
./include/linux/percpu-defs.h:475:2: note: expanded from macro '__this_cpu_cmpxchg'
475 | raw_cpu_cmpxchg(pcp, oval, nval); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/percpu-defs.h:416:2: note: expanded from macro 'raw_cpu_cmpxchg'
416 | __pcpu_size_call_return2(raw_cpu_cmpxchg_, pcp, oval, nval)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/percpu-defs.h:339:24: note: expanded from macro '__pcpu_size_call_return2'
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index 05f202840186..2d0d2324cbde 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -1654,11 +1654,6 @@ llvm::Constant *ConstantEmitter::tryEmitPrivateForVarInit(const VarDecl &D) {
QualType destType = D.getType();
- // Try to emit the initializer. Note that this can allow some things that
- // are not allowed by tryEmitPrivateForMemory alone.
wget https://lava.collabora.dev/scheduler/job/10417706/log_file/plain -O bad.txt
wget https://lava.collabora.dev/scheduler/job/10418012/log_file/plain -O good.txt
diff -u <(grep "calling " good.txt | tr -s ' ' | cut -d ' ' -f 11 | cut -d + -f 1) <(grep "calling " bad.txt | tr -s ' ' | cut -d ' ' -f 11 | cut -d + -f 1)
comm --nocheck-order --total <(grep "calling " good.txt | tr -s ' ' | cut -d ' ' -f 11 | cut -d + -f 1) <(grep "calling " bad.txt | tr -s ' ' | cut -d ' ' -f 11 | cut -d + -f 1)
@nickdesaulniers
nickdesaulniers / regallocfast.g.mir
Created February 28, 2023 22:38
llc -run-pass=regallocfast regallocfast.g.mir -o - -verify-machineinstrs
--- |
; ModuleID = 'regallocfast.g.mir'
source_filename = "x.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: noinline nounwind optnone
define dso_local i32 @main() #0 !dbg !9 {
entry:
%retval = alloca i32, align 4
@nickdesaulniers
nickdesaulniers / maccess.i
Created February 6, 2023 23:54
powernv_defconfig
void strncpy_from_kernel_nofault_count() {
asm goto("" : "=r"(*(char *)0) : : : Efault);
Efault:
}
diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td
index 475685d0857d..6090dee6f769 100644
--- a/llvm/include/llvm/IR/Intrinsics.td
+++ b/llvm/include/llvm/IR/Intrinsics.td
@@ -622,7 +622,8 @@ def int_call_preallocated_teardown : DefaultAttrsIntrinsic<[], [llvm_token_ty]>;
// This intrinsic is intentionally undocumented and users shouldn't call it;
// it's produced then quickly consumed during codegen.
-def int_callbr_landingpad : Intrinsic<[llvm_any_ty], [], [IntrNoMerge]>;
+def int_callbr_landingpad : Intrinsic<[llvm_any_ty], [LLVMMatchType<0>],
@nickdesaulniers
nickdesaulniers / 0.sh
Created June 22, 2022 20:25
perf report of clang with no input
perf record -e cycles:pp --call-graph lbr -- clang -Wfoo -c -x c /dev/null
perf report --no-children --sort=dso,symbol --total-cycles
diff --git a/init/Kconfig b/init/Kconfig
index e9119bf54b1f..fce97bfbe452 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -153,7 +153,7 @@ config WERROR
config UAPI_HEADER_TEST
bool "Compile test UAPI headers"
- depends on HEADERS_INSTALL && CC_CAN_LINK
+ depends on HEADERS_INSTALL
--- slab.before.clang.txt 2022-02-14 14:40:46.324688583 -0800
+++ slab.after.clang.bad.txt 2022-02-14 15:05:43.610957545 -0800
@@ -5,64 +5,57 @@
Disassembly of section .text:
<kmem_cache_free>:
+ push %rbp
+ mov %rsp,%rbp
push %r15
push %r14