Skip to content

Instantly share code, notes, and snippets.

@LebedevRI
LebedevRI / googlebenchmark-state_assembly_test-new.ll
Created May 11, 2019
googlebenchmark-state_assembly_test llvm
View googlebenchmark-state_assembly_test-new.ll
; ModuleID = '../test/state_assembly_test.cc'
source_filename = "../test/state_assembly_test.cc"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%"class.benchmark::State" = type { i64, i64, i64, i8, i8, i8, %"class.std::vector", i64, i64, i64, %"class.std::map", i32, i32, %"class.benchmark::internal::ThreadTimer"*, %"class.benchmark::internal::ThreadManager"* }
%"class.std::vector" = type { %"struct.std::Vector_base" }
%"struct.std::Vector_base" = type { %"struct.std::Vector_base<long, std::allocator<long> >::Vector_impl" }
%"struct.std::Vector_base<long, std::allocator<long> >::Vector_impl" = type { i64*, i64*, i64* }
%"class.std::map" = type { %"class.std::Rb_tree" }
View CMakeLists.txt
cmake_minimum_required (VERSION 2.8.12)
project (test CXX C)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
add_executable(zzzzzz zzzzzz.cc)
target_link_libraries(zzzzzz Threads::Threads)
View gist:ebf23be1fe0b984423b9ee7d4f78d010
class FunctionASTVisitor : public RecursiveASTVisitor<FunctionASTVisitor> {
using Base = RecursiveASTVisitor<FunctionASTVisitor>;
public:
bool VisitOMPExecDir(OMPExecDir *D) {
OmpStructuredStmts.emplace_back(D.getStructuredStmt());
}
bool VisitSOMETHINGELSE(???) {
if(InOmpStructuredStmt)
@LebedevRI
LebedevRI / combineLowHighPass.ll
Last active Jan 4, 2019
rawspeed VC5Decompressor wavelet vectorization
View combineLowHighPass.ll
; ModuleID = '/tmp/full.ll'
source_filename = "/home/lebedevri/rawspeed/src/librawspeed/decompressors/VC5Decompressor.cpp"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.ident_t = type { i32, i32, i32, i32, i8* }
%"class.rawspeed::VC5Decompressor::Wavelet" = type <{ i32, i32, i16, [6 x i8], %"struct.std::array", i32, [4 x i8] }>
%"struct.std::array" = type { [4 x %"class.std::unique_ptr"] }
%"class.std::unique_ptr" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
@LebedevRI
LebedevRI / comparison
Last active Jun 16, 2018
googlebench noise?
View comparison
$ ~/src/googlebenchmark/tools/compare.py -u benchmarks /tmp/run{0,1}.json
Comparing /tmp/run0.json to /tmp/run1.json
Benchmark Time CPU Time Old Time New CPU Old CPU New
---------------------------------------------------------------------------------------------------------------------------------
./_T012014.RW2/threads:8/real_time +0.0273 +0.0770 45 47 10 10
./_T012014.RW2/threads:8/real_time +0.0114 +0.0756 46 47 10 10
./_T012014.RW2/threads:8/real_time +0.0129 +0.0806 46 47 10 10
./_T012014.RW2/threads:8/real_time +0.0246 +0.0748 46 47 10 10
./_T012014.RW2/threads:8/real_time +0.0312 +0.0758 45 47 10
View gist:e06bdfbde47319d1c15f65bd1ebf1f47
This file has been truncated, but you can view the full file.
./src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/SonyArw2Decompressor.cpp.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <rawspeed::SonyArw2Decompressor::SonyArw2Decompressor(rawspeed::RawImage const&, rawspeed::ByteStream const&)>:
SonyArw2Decompressor():
/home/lebedevri/rawspeed/build-Clang-SANITIZE/../src/librawspeed/decompressors/SonyArw2Decompressor.cpp:36
View gist:cf01a82b3caead3d093ad7a75cbced28
This file has been truncated, but you can view the full file.
./src/CMakeFiles/rawspeed.dir/librawspeed/decompressors/SonyArw2Decompressor.cpp.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <rawspeed::SonyArw2Decompressor::SonyArw2Decompressor(rawspeed::RawImage const&, rawspeed::ByteStream const&)>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
View gist:429a410ea5f19e2abb0b77bd0710b9bd
#include <cassert>
#include <cstdlib>
#include <cstring>
using ushort16 = unsigned short;
class PentaxDecompressor {
enum class ThreadingModel {
// no threading whatsoever, need to do everything right here and now.
NoThreading = 0,
@LebedevRI
LebedevRI / rawspeed.c
Created Aug 10, 2017
some strange llvm miscompile?
View rawspeed.c
#include <assert.h>
int main () {
unsigned short dest[128];
int pred[2];
pred[0] = dest[0];
pred[1] = dest[1];
@LebedevRI
LebedevRI / auto-deploy.md
Created Apr 19, 2017 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis
View auto-deploy.md

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

You can’t perform that action at this time.