|
hear me o muse, cause like the introduction to a victorian novel we're preparing to execute all i need baby is a source a target and a host gimme that lithe sweet flexible intermediate form more more i need it https://twitter.com/jckarter/status/869214560279863301 what you call undefined behavior is the only way i know how to live mmm god lowering peepholes forwarding yes rjmccall fucked around with this message at 20:49 on Jun 27, 2017 |
# ? Jun 27, 2017 20:33 |
|
|
# ? Apr 18, 2024 14:58 |
|
you should compile some larger images, op
|
# ? Jun 27, 2017 20:36 |
|
what the gently caress, fixed
|
# ? Jun 27, 2017 20:49 |
|
the example killed me
|
# ? Jun 27, 2017 20:57 |
|
ssa form: cool and good?
|
# ? Jun 27, 2017 20:59 |
|
i just generate llvm ops from a cascade of bash scripts op
|
# ? Jun 27, 2017 21:00 |
|
JewKiller 3000 posted:ssa form: cool and good? arguments good, phi nodes bad
|
# ? Jun 27, 2017 21:04 |
|
have you considered using an interpreter instead OP?
|
# ? Jun 27, 2017 21:07 |
|
whats a good introductory book i can read as an electrical engineer that studied some computer (architecture) stuff but nothing useful about compilers
|
# ? Jun 27, 2017 21:08 |
|
how do we feel about jitters? are they true compilers or a dangerous heresy?
|
# ? Jun 27, 2017 21:21 |
|
--funroll-loops
|
# ? Jun 27, 2017 21:32 |
|
mods please change thread title to "language lawyers: the standard says I can format your hard drive"
|
# ? Jun 27, 2017 21:34 |
|
voted peephole, gas, and ban
|
# ? Jun 27, 2017 21:36 |
|
The Management posted:mods please change thread title to "language lawyers: the standard says I can format your hard drive" compilers: i casted from int* to short* and c.l.c turned my mom into a goat
|
# ? Jun 27, 2017 21:47 |
|
poty posted:whats a good introductory book i can read as an electrical engineer that studied some computer (architecture) stuff but nothing useful about compilers a lot of classic compilers books are really useless because they're actually all about lexing and parsing here's the main thing you need to understand about compilers as a hardware person. assembly language is typically specified in terms of its translation to machine code + object-file primitives: everything in an assembly file is an explicit directive which is supposed to correspond exactly to something in the output, and there isn't much room for variation. that is not true of "high-level" programming languages, including c, which are so-called because they introduce their own abstraction level: that is, they introduce an abstract machine with its own formal semantics, and the translation into an executable form like machine code is merely a (typically lenient) implementation mechanism for that abstract machine. so for a lot of things, you shouldn't just try to understand the compiler behaviorally, you really need to understand the formal semantics of the programming language a language implementation's relationship to its language specification is often a lot like a memory controller's relationship to the architecture's memory ordering rules. there are things that will work in practice for a specific system that are not guaranteed to work in general because there is always additional flexibility that is simply not yet being exploited by the implementation. a new implementation comes out that devirtualizes the right call / speculates the right load and suddenly the fact that the original code was never actually correct becomes important otherwise i don't have a specific book recommendation but maybe try to understand some specific optimization like copy propagation and how the compiler reasons about aliasing
|
# ? Jun 27, 2017 21:57 |
|
JewKiller 3000 posted:ssa form: cool and good? seafoam is cool and good
|
# ? Jun 27, 2017 22:17 |
|
https://fun.irq.dk/funroll-loops.org/
|
# ? Jun 27, 2017 22:28 |
|
Deep Dish Fuckfest posted:how do we feel about jitters? are they true compilers or a dangerous heresy? bad but required and useful in our hosed up gay world
|
# ? Jun 27, 2017 22:58 |
|
having a jit enables some really neat dynamic code generation and specialization tricks. i'd love to see more language implementations based on a sane language + execution environment that really take intelligent advantage of both static and dynamic information instead it feels like jits always spend the bulk of their effort (both in development and at runtime) working around stupidity in the language / runtime model. "i couldn't possibly statically inline this trivial getter, it's in a different class file"
|
# ? Jun 27, 2017 23:19 |
|
compilers are programs that take words and produce bits
|
# ? Jun 27, 2017 23:20 |
|
compiler? i hardly know 'er!
|
# ? Jun 27, 2017 23:44 |
|
whats a runtime
|
# ? Jun 27, 2017 23:45 |
|
JawnV6 posted:whats a runtime not much what's up with you
|
# ? Jun 27, 2017 23:48 |
|
RISCy Business posted:not much what's up with you p good, almost rumtime
|
# ? Jun 27, 2017 23:52 |
|
compile this dick
|
# ? Jun 28, 2017 00:00 |
|
JawnV6 posted:whats a runtime code which supports the execution of programs, e.g. to implement language features. at the very minimum it includes a loader. generally it also includes functions and variables that support various language features, either for performance (e.g. memcpy and memset) or complexity (e.g. soft division, c++ dynamic casts) or correctness (e.g. the non-lock-free cases of c11 _Atomic), as well as code to support library features that interact with basic behavior (e.g. setjmp, atexit). the line between "runtime" and "standard library" gets pretty vague
|
# ? Jun 28, 2017 00:11 |
|
how do you feel about the tendency to call compilers whose output is not assembly language "transpilers"
|
# ? Jun 28, 2017 00:33 |
|
eh. it's less awkward than "source to source compiler" or "source to source transformation" it's always to some kind of source code, though, i've never seen it used for e.g. javac
|
# ? Jun 28, 2017 00:36 |
|
alright those were all easy let's do a fun one. what optimization passes do you think are most dangerous? i'm not referring to how they interact with a buggy program, because that would vary based on the program, i mean the compiler code itself. which aggressive optimizations are most likely to accidentally generate incorrect code because they're hella complicated/old/unmaintained/no one sane ever uses them? and don't tell me none or i'll ask for a formal proof
|
# ? Jun 28, 2017 00:39 |
|
compiler dev is fun because you get to say and type sexp a lot
|
# ? Jun 28, 2017 00:52 |
|
JewKiller 3000 posted:how do you feel about the tendency to call compilers whose output is not assembly language "transpilers" "transpiler" just means "compiler that i sneer at" and js people are trying to claim it
|
# ? Jun 28, 2017 01:03 |
|
rjmccall posted:arguments good, phi nodes bad what are phi nodes? why are they bad?
|
# ? Jun 28, 2017 01:22 |
|
I prefer assemblers.
|
# ? Jun 28, 2017 01:25 |
|
i like how once a C compiler encounters undefined behaviour, not only is that behaviour and what follows undefined, but stuff before the undefined behaviour becomes undefined as well.
|
# ? Jun 28, 2017 01:59 |
|
DuckConference posted:i like how once a C compiler encounters undefined behaviour, not only is that behaviour and what follows undefined, but stuff before the undefined behaviour becomes undefined as well. later undefined behavior can loosen constraints on earlier behavior like fro m http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html "Knowing the multiplication "cannot" overflow (because doing so would be undefined) allows optimizing "X*2/2" to "X"." idk what the order of operations in c is and in what order x*2/2 should get evaluated but yeah
|
# ? Jun 28, 2017 02:11 |
|
Killer Low Life posted:compile this dick optimized out b/c never called
|
# ? Jun 28, 2017 02:28 |
|
fritz posted:optimized out b/c never called
|
# ? Jun 28, 2017 02:32 |
|
fritz posted:optimized out b/c never called
|
# ? Jun 28, 2017 02:47 |
|
Bloody posted:voted peephole, gas, and ban
|
# ? Jun 28, 2017 03:24 |
|
|
# ? Apr 18, 2024 14:58 |
|
fritz posted:optimized out b/c never called
|
# ? Jun 28, 2017 03:27 |