This file contains 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
#!/bin/bash | |
# See: https://llvm.org/docs/GettingStarted.html | |
# Download this script onto your home directory, ie. whatever is $HOME for you. | |
# outputs all the commands run to stdout | |
set -x | |
echo $HOME |
This file contains 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
static const char *const MnemonicTable = | |
"\003aaa\003aad\003aam\003aas\003adc\004adcb\004adcl\004adcq\004adcw\004" | |
"adcx\005adcxl\005adcxq\003add\004addb\004addl\005addpd\005addps\004addq" | |
"\005addsd\005addss\010addsubpd\010addsubps\004addw\004adox\005adoxl\005" | |
"adoxq\006aesdec\naesdeclast\006aesenc\naesenclast\006aesimc\017aeskeyge" | |
"nassist\003and\004andb\004andl\004andn\005andnl\006andnpd\006andnps\005" | |
"andnq\005andpd\005andps\004andq\004andw\004arpl\005bextr\006bextrl\006b" | |
"extrq\007blcfill\004blci\005blcic\006blcmsk\004blcs\007blendpd\007blend" | |
"ps\010blendvpd\010blendvps\007blsfill\004blsi\005blsic\005blsil\005blsi" | |
"q\006blsmsk\007blsmskl\007blsmskq\004blsr\005blsrl\005blsrq\005bndcl\005" |
This file contains 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
#include "X86.h" | |
#include "X86InstrInfo.h" | |
#include "llvm/CodeGen/MachineFunctionPass.h" | |
#include "llvm/CodeGen/MachineInstrBuilder.h" | |
#include "llvm/Target/TargetRegisterInfo.h" | |
using namespace llvm; | |
#define X86_MACHINEINSTR_PRINTER_PASS_NAME "Dummy X86 machineinstr printer pass" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
def parent(i): | |
return i/2 | |
def left(i): | |
return 2*i | |
def right(i): | |
return (2*i + 1) | |
class Heap: |
This file contains 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
global heap | |
global currSize | |
def parent(i): #returns parent index of ith index | |
return i/2 | |
def left(i): #returns left child of ith index | |
return 2*i | |
def right(i): #returns right child of ith index |