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
/* Minimal declarations for CUDA support. Testing purposes only. */ | |
#define __constant__ __attribute__((constant)) | |
#define __device__ __attribute__((device)) | |
#define __global__ extern "C" __attribute__((global)) | |
#define __host__ __attribute__((host)) | |
#define __shared__ __attribute__((shared)) | |
#define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__))) | |
#define __forceinline__ __attribute__((always_inline)) |
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/lib/CodeGen/CodeGenPrepare.cpp b/lib/CodeGen/CodeGenPrepare.cpp | |
index dc5f67b..6aa60c6 100644 | |
--- a/lib/CodeGen/CodeGenPrepare.cpp | |
+++ b/lib/CodeGen/CodeGenPrepare.cpp | |
@@ -1640,6 +1640,7 @@ bool AddressingModeMatcher::MatchScaledValue(Value *ScaleReg, int64_t Scale, | |
static bool MightBeFoldableInst(Instruction *I) { | |
switch (I->getOpcode()) { | |
case Instruction::BitCast: | |
+ case Instruction::AddrSpaceCast: | |
// Don't touch identity bitcasts. |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
// Lexer for the TableGen language. | |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"time" | |
"unicode/utf8" | |
) |
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
def foo(): # told you | |
y = 2 | |
file_input [2 children] | |
funcdef [5 children] | |
NAME('def') [lineno=1, column=0, prefix=''] | |
NAME('foo') [lineno=1, column=4, prefix=' '] | |
parameters [2 children] | |
LPAR('(') [lineno=1, column=7, prefix=''] | |
RPAR(')') [lineno=1, column=8, prefix=''] |
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
Input code: | |
x = 1 # told you | |
y = 2 | |
Breakdown of the lib2to3 parse tree. The thingies with [N children] are nodes. The rest are leaves. | |
file_input [3 children] |
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
const unsigned N = 400 * 1000 * 1000; | |
volatile unsigned long long counter = 0; | |
// Don't inline the benchmarking code into main | |
void __attribute__((noinline)) tightloop(); | |
void __attribute__((noinline)) loop_with_extra_call(); | |
void tightloop() { | |
unsigned j; |
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
import io | |
from test.support import import_fresh_module | |
import csv | |
csv_other = import_fresh_module('csv', fresh=['_csv', 'csv']) | |
f = io.StringIO('foo\x00,bar\nbaz,42') | |
reader = csv.reader(f) |
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
#------------------------------------------------------------------------------- | |
# lexer.py | |
# | |
# A generic regex-based Lexer/tokenizer tool. | |
# See the if __main__ section in the bottom for an example. | |
# | |
# Eli Bendersky ([email protected]) | |
# This code is in the public domain | |
# Last modified: August 2010 | |
#------------------------------------------------------------------------------- |
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
====> lli | |
lli | |
AsmParser | |
Core | |
Support | |
Support | |
BitReader | |
Core | |
Support | |
IRReader |