- The Architecture of Open Source Applications: LLVM
- Stanford Online: Compilers
- LLVM for Grad Students
- GETTING STARTED WITH LLVM/CLANG ON OS X
- Compilation Process (Slides)
- Resources for Amateur Compiler Writers
- Build a Modern Computer from First Principles: From Nand to Tetris
- Build a Modern Computer from First Principles: Nand to Tetris Part II
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys, os | |
from PyPDF2 import PdfFileReader, PdfFileWriter | |
inputname = sys.argv[1] | |
pdf = PdfFileReader(inputname) | |
numpages = pdf.getNumPages() | |
if numpages % 2 == 1: | |
numpages = numpages - 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var monk = require('monk'); | |
var promise = require('promise'); | |
function connect() { | |
return new promise( function (resolve, reject) { | |
monk('mongodb://localhost:27017/monk', function (error, db) { | |
if (error) { | |
console.log('about to reject'); | |
reject(error); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.c | |
// processes | |
// | |
// Created by AlexDenisov on 14.06.17. | |
// Copyright © 2017 Low Level Bits. All rights reserved. | |
// | |
#include <assert.h> | |
#include <signal.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alex@alex-VirtualBox ~/P/m/BuildNinja> lldb-3.9 ./tools/driver/mull-driver ~/Projects/CryptoSwift/config.yaml | |
(lldb) target create "./tools/driver/mull-driver" | |
Current executable set to './tools/driver/mull-driver' (x86_64). | |
(lldb) settings set -- target.run-args "/home/alex/Projects/CryptoSwift/config.yaml" | |
(lldb) r | |
Process 21754 launched: './tools/driver/mull-driver' (x86_64) | |
Config> | |
project_name: | |
test_framework: XCTest | |
distance: 128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = '/home/alex/Projects/CryptoSwift/.build/debug/CryptoSwiftPackageTests.xctest.ll' | |
source_filename = "/home/alex/Projects/CryptoSwift/.build/debug/CryptoSwiftPackageTests.xctest.ll" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%Vs5Int32 = type <{ i32 }> | |
%Sp = type <{ i8* }> | |
%struct._SwiftEmptyArrayStorage = type { %struct.HeapObject, %struct._SwiftArrayBodyStorage } | |
%struct.HeapObject = type { %struct.HeapMetadata*, %struct.StrongRefCount, %struct.WeakRefCount } | |
%struct.HeapMetadata = type opaque |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mbj [10:59 PM] | |
@alexdenisov Just a quick write down on mutation operators, conceptually I see the biggest separation into the following four classes that have different usefulness / roles for a mutation testing tool: | |
* Sematic reductions - These are almost always guaranteed to be "good" mutations the user definitively wants to kill as they expose unused semantics. Most trivial exampe is `a; b` (where both perform a not dependent side effect) to: `b`. Simple line and branch coverage would in case side effect `b` is measured give a 100% covered result, where the mutation would expose `a` is not covered in case the mutation is alive. Note that semantic reductions come in various alternative forms, many of them are language / intermediate specific. The thing to IMO recall on these is: They will as they expose untested semantics almost never equivalents as: If the semantics are unneded, they should be removed, and if they are untested a test should be added. Another good canonical example for semantic reduction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/1.ll b/1.ll | |
index 1932029..81d3e51 100644 | |
--- a/1.ll | |
+++ b/1.ll | |
@@ -35,10 +35,7 @@ if.end: ; preds = %if.then, %entry | |
sw.bb: ; preds = %if.end | |
%call = call zeroext i1 @_ZNK4llvm7APFloat10isNegativeEv(%"class.llvm::APFloat"* %this1), | |
- br i1 %call, label %if.end3, label %if.then2, | |
- |
The Correctness-Security Gap in Compiler Optimization - https://nebelwelt.net/publications/files/15LangSec.pdf
The Linux Scheduler: a Decade of Wasted Cores - https://www.ece.ubc.ca/~sasha/papers/eurosys16-final29.pdf
Simulating Physics with Computers - https://people.eecs.berkeley.edu/~christos/classics/Feynman.pdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'main.m' | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx10.11.0" | |
%0 = type opaque | |
%struct._class_t = type { %struct._class_t*, %struct._class_t*, %struct._objc_cache*, i8* (i8*, i8*)**, %struct._class_ro_t* } | |
%struct._objc_cache = type opaque | |
%struct._class_ro_t = type { i32, i32, i32, i8*, i8*, %struct.__method_list_t*, %struct._objc_protocol_list*, %struct._ivar_list_t*, i8*, %struct._prop_list_t* } | |
%struct.__method_list_t = type { i32, i32, [0 x %struct._objc_method] } | |
%struct._objc_method = type { i8*, i8*, i8* } |
NewerOlder