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
https://stackoverflow.com/questions/7262536/vim-count-lines-in-selected-range | |
In visual mode, press gC-g | |
Typical output: | |
Selected 7 of 22 Lines; 8 of 32 Words; 201 of 491 Chars; 201 of 497 Bytes-- VISUAL LINE -- |
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
LowerExtractVectorElement, generate subreg from origianl BIG/vector register. | |
combine subreg into multiple subregs which is suitable for an instruction. (swizzle) | |
combine instructions with compatible swizzle modifiers (modifier forwarding) | |
swizzle extend + arithmetic swizzle = arithmetic swizzle + extend |
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
Saving the file with no contents will abort any commit. | |
https://stackoverflow.com/questions/40906322/how-to-abort-git-commit-amend | |
1, cq, quite vim with an error code. | |
2, delete all content | |
3, comment out content with # |
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
https://math.stackexchange.com/questions/1545633/how-to-identify-lattice-in-given-hasse-diagrams | |
http://blog.ezyang.com/2011/04/hoopl-dataflow-lattices/ | |
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-820-fundamentals-of-program-analysis-fall-2015/lecture-notes/MIT6_820F15_L17.pdf | |
http://www.itu.dk/people/brabrand/static.pdf | |
https://www.google.co.uk/search?q=these+partial+orders+are+not+lattices&safe=strict&client=ubuntu&hs=OZs&source=lnms&tbm=isch&sa=X&ved=0ahUKEwj3spLc8dHdAhXmLcAKHWtAC2QQ_AUIDigB&biw=1356&bih=911#imgrc=vctJzNgpsjyfEM: |
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
work list algorithm | |
The subset construction is an example of a fixed-point computation, a par- | |
ticular style of computation that arises regularly in computer science. | |
These computations are characterized by the iterated application of a monotone | |
function to some collection of sets drawn from a domain whose structure is | |
known. These computations terminate when they reach a state where further | |
iteration produces the same answer—a “fixed point” in the space of succes- | |
sive iterates. Fixed-point computations play an important and recurring role |
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
loop rotate: loop canonicalization, LICM, simplifying trip count expressions. | |
loop inversion: loop inversion allows safe loop-invariant code motion. | |
https://en.wikipedia.org/wiki/Loop_inversion | |
loop splitting, loop peeling | |
https://en.wikipedia.org/wiki/Loop_splitting | |
Loop unswitching | |
https://en.wikipedia.org/wiki/Loop_unswitching |
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
clang front end static checker that, functions are properly called in given context. | |
e.g. some functions API cannot be called in ISR | |
OR functions called in ISR are user defined, but too long. | |
static code analysier, but C is too hard to process. |
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
"shortcut for word pattern count, regex is supported | |
command! -narg=1 CNT execute '%s%<args>%%gn' |
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
Color color = StringSwitch<Color>(argv[i]) | |
.Case("red", Red) | |
.Case("orange", Orange) | |
.Case("yellow", Yellow) | |
.Case("green", Green) | |
.Case("blue", Blue) | |
.Case("indigo", Indigo) | |
.Cases("violet", "purple", Violet) | |
.Default(UnknownColor); | |
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
//===- Hello.cpp - Example code from "Writing an LLVM Pass" ---------------===// | |
// | |
// The LLVM Compiler Infrastructure | |
// | |
// This file is distributed under the University of Illinois Open Source | |
// License. See LICENSE.TXT for details. | |
//===----------------------------------------------------------------------===// | |
#include "llvm/ADT/Statistic.h" | |
#include "llvm/ADT/MapVector.h" |