Skip to content

Instantly share code, notes, and snippets.

diff --git a/lib/Analysis/ScopInfo.cpp b/lib/Analysis/ScopInfo.cpp
index 18e8a89..da939e6 100644
--- a/lib/Analysis/ScopInfo.cpp
+++ b/lib/Analysis/ScopInfo.cpp
@@ -1584,12 +1584,104 @@ static bool buildConditionSets(
// to be set. The comparison is equal to a signed comparison under this
// assumption.
bool NonNeg = ICond->isUnsigned();
- LHS = getPwAff(S, BB, InvalidDomainMap,
- SE.getSCEVAtScope(ICond->getOperand(0), L), NonNeg);
@annanay25
annanay25 / isl_union_map_coalesce_inefficient.c
Last active July 21, 2017 07:08
isl_union_map_coalesce sub-optimally merges 4 pieces in 'test' to 2 pieces. A simpler 1 piece solution is 'orig_simplified'
#include <stdio.h>
#include <stdlib.h>
#include "isl/flow.h"
#include "isl/ctx.h"
#include "isl/val.h"
#include "isl/set.h"
#include "isl/map.h"
#include "isl/union_map.h"
#include "isl/union_set.h"
#include "isl/flow.h"
; ModuleID = 'cluster_2.ll'
source_filename = "__compute_module"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux_gnu"
@0 = private constant [1 x [28 x [28 x [1 x float]]]] [[28 x [28 x [1 x float]]] [[28 x [1 x float]] zeroinitializer, [28 x [1 x float]] zeroinitializer, [28 x [1 x float]] zeroinitializer, [28 x [1 x float]] zeroinitializer, [28 x [1 x float]] zeroinitializer, [28 x [1 x float]] zeroinitializer, [28 x [1 x float]] zeroinitializer, [28 x [1 x float]] [[1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] zeroinitializer, [1 x float] [float 0x3FD8585880000000], [1 x float] [float 0x3FD8181840000000], [1 x float] [float 0x3FD3535360000000], [1 x float] [float 0x3FDD9D9DC0000000], [1 x float] [float 0x3
@annanay25
annanay25 / ScheduleOptimizer.cpp
Last active August 3, 2017 15:33
Code excerpt for concept implementation of MatMul pattern recognition.
.
.
.
static isl_stat isMatMulOperand(__isl_take isl_basic_map *bmap,
void *user) {
int InPosPair[] = {-1, -1};
auto DimInPos = user ? static_cast<int *>(user) : InPosPair;
auto RefMap = isl_map_equate(isl_map_from_basic_map(bmap),
isl_dim_in, DimInPos[0], isl_dim_out, DimInPos[0]);
@annanay25
annanay25 / rnn-ir.ll
Created August 15, 2017 19:32
Apparently LLVM IR for an RNN kernel in TensorFlow
This file has been truncated, but you can view the full file.
; ModuleID = '__compute_module'
source_filename = "__compute_module"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux_gnu"
@0 = private constant float 1.000000e+00
@1 = private constant float 0.000000e+00
@2 = private constant float 1.000000e+00
define internal void @"sigmoid<float>.v7"(i8* align 8 dereferenceable(4) %retval, i8* noalias %run_options, i8** noalias %params, i8** noalias %temps, i64* noalias %prof_counters) {
@annanay25
annanay25 / polly_json
Created August 25, 2017 19:08
There's just one file in this directory - JSONExporter.cpp
cc_library(
name="polly_exchange",
srcs = glob ([
"tools/polly/lib/Exchange/*.cpp"
]),
hdrs = [
"include/llvm/Config/llvm-config.h",
"include/llvm/IR/Attributes.gen",
"include/llvm/Config/abi-breaking.h",
"include/llvm/IR/Intrinsics.gen",
@annanay25
annanay25 / instructions.md
Created April 3, 2018 07:15
Setup for getting a LLVM + Clang (Built from source) working with OpenMP on MacOSX.
mkdir code && cd code
git clone https://github.com/llvm-mirror/llvm.git
cd llvm/tools && git clone https://github.com/llvm-mirror/clang.git && cd ..
mkdir build && cd build
cmake .. && make -j4
brew install libomp

cd ~
dummp_omp_file.cpp

/code/llvm/build/bin/clang++ -fopenmp=libomp dummy_omp_file.cpp -o dummy

@annanay25
annanay25 / all-in-one-startup.log
Last active September 8, 2019 15:16
Jaeger all-in-one startup log without healthcheck server
2019/09/08 20:43:25 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined
{"level":"info","ts":1567955605.95627,"caller":"flags/service.go:115","msg":"Mounting metrics handler on admin server","route":"/metrics"}
{"level":"info","ts":1567955605.957014,"caller":"flags/admin.go:108","msg":"Mounting health check on admin server","route":"/"}
{"level":"info","ts":1567955605.9571252,"caller":"flags/admin.go:114","msg":"Starting admin HTTP server","http-port":14269}
{"level":"info","ts":1567955605.957162,"caller":"flags/admin.go:100","msg":"Admin server started","http-port":14269,"health-status":"unavailable"}
{"level":"info","ts":1567955605.962417,"caller":"memory/factory.go:56","msg":"Memory storage initialized","configuration":{"MaxTraces":0}}
{"level":"info","ts":1567955605.9626582,"caller":"static/strategy_store.go:79","msg":"No sampling strategies provided, using defaults"}
{"level":"info","ts":1567955605.970583,"caller":"grpc/builder.go:108","msg":"Agent requested insecure grpc connection to collector(s)"}
{"
@annanay25
annanay25 / main.go
Created January 28, 2020 13:03
Creating secure self signed certs in golang
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"errors"
@annanay25
annanay25 / jaeger-perf-test.yaml
Created February 12, 2020 10:47
Kubernetes yaml to setup and run Jaeger perf tests according to https://github.com/jkandasa/jaegerperf
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaegerqe-collector
spec:
replicas: 1
selector:
matchLabels:
name: jaegerqe-collector
template: