I hereby claim:
- I am bploeckelman on github.
- I am brianploeckelman (https://keybase.io/brianploeckelman) on keybase.
- I have a public key ASC_9yGm9h8UlJMrzyH7PAyZ0rrpwgduiviOVhoveCjpUwo
To claim this, I am signing this object:
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; | |
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; | |
/** | |
Launches the desktop (LWJGL3) application. | |
** Need to configure the OpenGL version here ** | |
*/ | |
public class Lwjgl3Launcher { | |
public static void main(String[] args) { | |
createApplication(); |
I hereby claim:
To claim this, I am signing this object:
bool CountBasicBlocks::runOnBasicBlock(BasicBlock &BB, Module &M) { | |
// Get the bbCounter GlobalVariable | |
GlobalVariable *bbCounter = M.getGlobalVariable("bbCounter"); | |
assert(bbCounter && "Error: unable to get BasicBlock counter"); | |
// Insert instructions at the end of this BasicBlock | |
TerminatorInst *InsertPos = BB.getTerminator(); | |
// Load, increment and store the value back | |
Value *OldVal = new LoadInst(bbCounter, "old.bb.count", InsertPos); |
bool CountBasicBlocks::initialize(Module &M) { | |
Function *Main = M.getFunction("main"); | |
assert(Main && "Error: count-bb requires a main function"); | |
Type *I64Ty = Type::getInt64Ty(M.getContext()); | |
// Create and insert a new GlobalVariable to track the number | |
// of basic blocks that are executed during the program's run | |
// int64 bbCounter = 0; | |
new GlobalVariable( |
#include <stdio.h> | |
int fib(int x) | |
{ | |
if (x < 0 ) return 0; | |
if (x == 0 || x == 1) | |
return x; | |
else | |
return fib(x - 1) + fib(x - 2); |
#include <stdio.h> | |
int main() | |
{ | |
printf("Hello llvm\n"); | |
return 0; | |
} |
#include <stdio.h> | |
#include <stdlib.h> | |
extern int bbCounter; | |
void exitfunc() | |
{ | |
printf("NUMBER OF BASIC BLOCKS EXECUTED := %d\n", bbCounter); | |
} |
//===- count-bb.cpp - Counts number of executed basic-blocks -------------===// | |
// | |
// This file implements an LLVM pass that counts the number of BasicBlocks | |
// that are executed by a program outputs the total count of executed | |
// BasicBlocks when the program terminates by using a separately defined | |
// function that is called atexit. | |
// | |
//===---------------------------------------------------------------------===// | |
#define DEBUG_TYPE "count-bb" |
#define DEBUG_TYPE "simple-stats" | |
#include "llvm/Pass.h" | |
#include "llvm/Module.h" | |
#include "llvm/Function.h" | |
#include "llvm/BasicBlock.h" | |
#include "llvm/ADT/Statistic.h" | |
STATISTIC(NumFunctions, "Number of functions in module"); | |
STATISTIC(NumBasicBlocks, "Number of basic blocks in module"); |