aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linearize.c
AgeCommit message (Expand)AuthorFilesLines
2018-06-23cast: make casts from pointer always size preservingLuc Van Oostenryck1-0/+2
2018-06-23cast: add support for -Wpointer-to-int-castLuc Van Oostenryck1-0/+5
2018-06-23cast: specialize cast from pointersLuc Van Oostenryck1-0/+7
2018-06-23cast: temporary simplify handling cast to/from void*Luc Van Oostenryck1-4/+15
2018-06-23cast: make pointer casts always size preservingLuc Van Oostenryck1-0/+2
2018-06-23cast: specialize casts from unsigned to pointersLuc Van Oostenryck1-1/+21
2018-06-23cast: specialize floats to integer conversionLuc Van Oostenryck1-0/+5
2018-06-23cast: handle NO-OP castsLuc Van Oostenryck1-0/+8
2018-06-23cast: specialize FPCAST into [USF]CVTFLuc Van Oostenryck1-3/+15
2018-06-23cast: prepare finer grained cast instructionsLuc Van Oostenryck1-15/+63
2018-06-22rename add_uniop() to add_unop()Luc Van Oostenryck1-3/+3
2018-06-22add_uniop() should take a type, not an expressionLuc Van Oostenryck1-5/+6
2018-05-26context: __context__(...) expect a constant expressionLuc Van Oostenryck1-5/+1
2018-05-06fix comment about PSEUDO_SYM usageLuc Van Oostenryck1-1/+1
2018-03-18avoid deadborn loads & storesLuc Van Oostenryck1-1/+11
2018-03-18fix-return: remove special case for single returnLuc Van Oostenryck1-6/+0
2018-03-18defer initialization of bb::contextLuc Van Oostenryck1-1/+0
2018-03-18small code reorg of add_store()Luc Van Oostenryck1-8/+9
2018-03-18extract alloc_phisrc() from alloc_phi()Luc Van Oostenryck1-10/+16
2018-03-18show_label: add (and use) show_label()Luc Van Oostenryck1-16/+25
2018-03-01IR: let OP_COMPUTEGOTO use .src instead of .targetLuc Van Oostenryck1-2/+2
2018-03-01IR: remove never-generated instructionsLuc Van Oostenryck1-8/+0
2018-03-01IR: remove now unused OP_LNOP & OP_SNOPLuc Van Oostenryck1-4/+2
2018-02-24move the optimization loop in its own fileLuc Van Oostenryck1-62/+2
2018-02-20ban use of 'true' or 'false'Luc Van Oostenryck1-6/+6
2018-02-20no need for signed & unsigned multiplicationLuc Van Oostenryck1-5/+4
2018-02-17rename base_type() to bitfield_base_type()Luc Van Oostenryck1-5/+5
2018-02-17let struct access_data use a single typeLuc Van Oostenryck1-23/+21
2018-02-17use show_pseudo() for OP_SYMADDR's symbolLuc Van Oostenryck1-16/+3
2018-02-17show_pseudo(): protect against NULL ->symLuc Van Oostenryck1-0/+4
2018-02-08Merge branches 'cse-setfval' and 'extract-eval' into tipLuc Van Oostenryck1-3/+1
2018-01-31remove warning "call with no type"Luc Van Oostenryck1-3/+1
2018-01-08add OP_SETFVALLuc Van Oostenryck1-5/+13
2018-01-07cleanup: make some functions staticLuc Van Oostenryck1-6/+6
2017-12-28fix crash on bad expression in linearize_switch()Luc Van Oostenryck1-0/+2
2017-12-21fix linearize (*fun)()Luc Van Oostenryck1-7/+3
2017-12-21simplify linearize_call_expression()Luc Van Oostenryck1-8/+3
2017-11-18add support of floating-point specific arithmetic opsLuc Van Oostenryck1-4/+15
2017-11-18fix support of floating-point compareLuc Van Oostenryck1-2/+19
2017-11-18fix linearize_inc_dec() with floatsLuc Van Oostenryck1-2/+16
2017-11-17add support for wider type in switch-caseLuc Van Oostenryck1-4/+4
2017-11-16give a type to OP_SWITCHsLuc Van Oostenryck1-2/+3
2017-11-16give a type to OP_SELs, alwaysLuc Van Oostenryck1-1/+1
2017-11-16give a type to OP_PHISOURCEsLuc Van Oostenryck1-9/+7
2017-11-16give a type to all function argumentsLuc Van Oostenryck1-6/+7
2017-11-16fix usage of inlined callsLuc Van Oostenryck1-1/+1
2017-11-16don't output value of anonymous symbol's pointerLuc Van Oostenryck1-2/+2
2017-11-16show OP_PHI without VOIDLuc Van Oostenryck1-0/+2
2017-11-13Merge branch 'dump-ir' into tipLuc Van Oostenryck1-5/+7
2017-11-13dump-ir: activate -fdump-ir=mem2regLuc Van Oostenryck1-0/+2
2017-11-13dump-ir: make it more flexibleLuc Van Oostenryck1-1/+1
2017-11-13dump-ir: rename -fdump-linearize to -fdump-irLuc Van Oostenryck1-1/+1
2017-11-13dump-ir: saner use of fdump_linearizeLuc Van Oostenryck1-4/+1
2017-11-13dump-ir: allow to skip the optimization pass(es)Luc Van Oostenryck1-0/+2
2017-11-12dump-ir: activate/deactive pass 'mem2reg'Luc Van Oostenryck1-1/+2
2017-09-17use a specific struct for asm operandsLuc Van Oostenryck1-38/+4
2017-07-31fix crash with sym->bb_target == NULLLuc Van Oostenryck1-1/+4
2017-07-31fix crash when ep->active is NULLLuc Van Oostenryck1-2/+7
2017-07-31fix ptrlist corruption while killing unreachable BBsLuc Van Oostenryck1-3/+0
2017-05-19Merge branches 'dump-macros-v2', 'fix-predefined-size', 'fix-bool-context', '...v0.5.1-rc1Luc Van Oostenryck1-19/+67
2017-05-19add support for a new flag: -fdump-linearize[=only]Luc Van Oostenryck1-0/+6
2017-05-19remove origval from struct access_dataLuc Van Oostenryck1-6/+0
2017-05-19remove alignment from struct access_dataLuc Van Oostenryck1-2/+1
2017-05-19fix implicit zero initializer.Luc Van Oostenryck1-0/+15
2017-05-19remove bit_size & bit_offset from struct access_dataLuc Van Oostenryck1-8/+8
2017-05-19fix: kill old branch in insert_branch()Luc Van Oostenryck1-1/+2
2017-05-12fix boolean context for OP_AND_BOOL & OP_OR_BOOLLuc Van Oostenryck1-2/+35
2017-05-12fix: kill unreachable BBs after killing a childLuc Van Oostenryck1-1/+4
2017-04-30Merge branches 'sent/float-expand-v2', 'sent/fix-kill-ttsb-v2', 'sent/fix-con...Luc Van Oostenryck1-0/+2
2017-03-31avoid crash with test-linearize -vvLuc Van Oostenryck1-0/+2
2017-03-27fix cast to pointer to floating-pointLuc Van Oostenryck1-2/+1
2017-03-06use VOID instead of directly using &void_pseudoLuc Van Oostenryck1-1/+1
2017-03-06split OP_BR between unconditional & conditional: OP_CBRLuc Van Oostenryck1-6/+8
2017-03-04fix size of loaded bitfieldsLuc Van Oostenryck1-1/+3
2017-02-13fix cast's target type infoLuc Van Oostenryck1-2/+2
2017-02-13fix value of label statementLuc Van Oostenryck1-2/+1
2017-02-13fix typing error in compound assignmentLuc Van Oostenryck1-4/+6
2017-02-13OP_SWITCH should use 'insn->cond' instead of 'insn->target'Luc Van Oostenryck1-1/+1
2017-02-13give comparable label's names to basic blocksLuc Van Oostenryck1-14/+16
2017-02-13fix discarded label statementLuc Van Oostenryck1-1/+1
2017-01-27linearize: Emit C99 declarations correctlyEmily Maier1-0/+4
2013-05-27Fix result type of relational and logical operatorsXi Wang1-2/+2
2012-02-04sparse, llvm: Make function declaration accessible to backendLinus Torvalds1-0/+8
2011-08-27Make 'linearize_return()' helper functionLinus Torvalds1-22/+26
2011-08-27Make 'linearize_switch()' helper functionLinus Torvalds1-61/+65
2011-08-27Make 'linearize_iterator()' helper functionLinus Torvalds1-40/+45
2011-04-26use ARRAY_SIZE() when possible (continued)Jan Pokorný1-1/+1
2010-03-28Fix incorrect linearization of "x && y && z"Daniel De Graaf1-1/+3
2009-07-29linearize.h: sanitize headerKamil Dudka1-3/+3
2008-12-24Revert the context tracking codeJohannes Berg1-15/+16
2008-12-18Add type information to struct instruction.David Given1-1/+3
2008-04-24fix bug in context tracking codeJohannes Berg1-1/+0
2008-04-24Fix cast instruction generationLinus Torvalds1-3/+3
2008-04-21sparse: simple conditional context trackingJohannes Berg1-16/+6
2008-04-21make sparse keep its promise about context trackingJohannes Berg1-0/+10
2007-07-10fix handling of address_space in casts and assignmentsAl Viro1-0/+1
2007-05-22Improved graph generation using subgraph clusters for functionsDan Sheridan1-0/+1
2007-05-22Use %td when printing a ptrdiff_t to avoid problems on 64-bit platformsJosh Triplett1-1/+1
2007-05-22Revert unintentional inclusion of warning fix in previous commit.Josh Triplett1-1/+1
2007-05-22Add test case for -Wno-old-initializerJosh Triplett1-1/+1
2007-04-20Fix the annotated inline call positionChristopher Li1-0/+4
2007-03-02Add annotation for inline function call.Christopher Li1-7/+37
2007-02-28Disable liveness "dead" instruction by default.Christopher Li1-1/+2
2007-02-26Coding style fix: use parentheses with sizeofJosh Triplett1-1/+1
2007-02-26Fix core dump on huge switchChristopher Li1-1/+4
2007-02-22Fix core dump on anonymous symbol.Christopher Li1-8/+10
2007-01-27Coding style fix: in a pointer type, * goes with the name, not the type.Josh Triplett1-2/+2
2007-01-16Add instruction to pseudo user tracking.Christopher Li1-35/+37
2007-01-16Change the symbol access list to a pseudo listChristopher Li1-5/+5
2006-08-30[PATCH] Parse and track multiple contexts by expressionJosh Triplett1-21/+28
2005-12-31Make local declarations be statements of their ownLinus Torvalds1-7/+15
2005-11-21[PATCH] Add a new opcode: OP_COPY.Luc Van Oostenryck1-0/+5
2005-08-15Clean up iterator handlingLinus Torvalds1-2/+3
2005-06-27[PATCH] makes some needlessly global code staticLuc Van Oostenryck1-6/+6
2005-06-26[PATCH] avoid segfault in add_asm_output() after a parse error in asm statementLuc Van Oostenryck1-1/+1
2005-06-26[PATCH] avoid segafult after parse errors in castsLuc Van Oostenryck1-0/+3
2005-06-26[PATCH] avoid segfault after parse errors in assignementsLuc Van Oostenryck1-0/+3
2005-06-26[PATCH] avoid segfault in linearize_asm_statement() after a parse error in as...Luc Van Oostenryck1-1/+1
2005-06-26[PATCH] Avoid segfault when code is present after a goto statementLuc Van Oostenryck1-2/+2
2005-06-21Be more careful about linearizing conditionalsLinus Torvalds1-3/+7
2005-06-20[PATCH] segfault on bad ternary conditionalLuc Van Oostenryck1-1/+5
2005-06-19Fix SIGSEGV on assignment to bad left side.Linus Torvalds1-2/+2
2005-04-07Add support for context checking functions.Linus Torvalds1-5/+13
2005-04-07Avoid SIGSEGV when linearizing bad expressions.Linus Torvalds1-1/+1
2005-04-07Make each instruction have a position of its own.Linus Torvalds1-0/+6
2005-04-07Add compile-time "range-check" infrastructure to sparseLinus Torvalds1-3/+21
2005-04-07Split OP_CAST into signed, unsigned and FP casts.Linus Torvalds1-0/+8
2005-04-07Make the example code generator do something half-way saneLinus Torvalds1-0/+1
2005-04-07Split the binops where signedness matters into unsigned and signed.Linus Torvalds1-14/+34
2005-04-07Make linearizer able to handle assignment ops where theLinus Torvalds1-41/+50
2005-04-07Linearize EXPR_POS initializers more carefully: they canLinus Torvalds1-4/+2
2005-04-07Get comparison sizes right.Linus Torvalds1-2/+2
2005-04-07Split OP_SETVAL into OP_SETVAL (fp expressions and labels) and OP_SYMADDRLinus Torvalds1-24/+29
2005-04-07Save off the asm parameter name too.Linus Torvalds1-14/+38
2005-04-07Make asm linearization not drop the constraints.Linus Torvalds1-25/+53
2005-04-07Add the argument pseudos to the "enter" instructionLinus Torvalds1-1/+5
2005-04-07Sort switch target listLinus Torvalds1-0/+27
2005-04-07Clean up linearizer output that got uglified by the show_instruction()Linus Torvalds1-4/+3
2005-04-07Make pretty helper functions for showing individual instructionsLinus Torvalds1-7/+7
2005-04-07Add "stream_name()" helper function, and use it.Linus Torvalds1-3/+3
2005-04-07Remove phi source merging.Linus Torvalds1-2/+0
2005-04-07Remove OP_SETVAL after symbol-pseudo simplification.Linus Torvalds1-1/+1
2005-04-07Fix undefined symbol linearization caseLinus Torvalds1-1/+1
2005-04-07Expose "show_bb()" for debugging, and make it do more appropriateLinus Torvalds1-1/+1
2005-04-07CSE may have caused more unreachable bb's, so do a secondLinus Torvalds1-0/+1
2005-04-07Make OP_PHISOURCE track the OP_PHI instructions that it defines.Linus Torvalds1-4/+9
2005-04-07Don't output code for static/toplevel symbols.Linus Torvalds1-0/+4
2005-04-07Linearize anonymous symbol initializers when we encounter them,Linus Torvalds1-11/+9
2005-04-07Clean up debug output from warning.Linus Torvalds1-1/+1
2005-04-07Fix silly asm input pseudo linearization.Linus Torvalds1-1/+1
2005-04-07Linearize inline asm statementsLinus Torvalds1-3/+81
2005-04-07Fix flow: we only remove one parent at a time. The same blockLinus Torvalds1-1/+1
2005-04-07Make the "entrypoint" be a special OP_ENTRY instruction instead ofLinus Torvalds1-7/+15
2005-04-07Expose "show_pseudo()" to the world.Linus Torvalds1-1/+1
2005-04-07Track argument pseudo lifetimes too.Linus Torvalds1-2/+2
2005-04-07Add pseudo death-note tracking.Linus Torvalds1-0/+7
2005-04-07Be more graceful about missing types and malformed expressions.Linus Torvalds1-4/+6
2005-04-07Be more careful with symbol sizes - don't SIGSEGV on undefined stuff.Linus Torvalds1-12/+17
2005-04-07Remove OP_SETCC, make OP_SEL bigger instead.Linus Torvalds1-30/+21
2005-04-07Fix embarrassing linearized bug with empty iterator post-conditions.Linus Torvalds1-9/+6
2005-04-07Duh! Remove a very very incorrect left-over flow simplification call.Linus Torvalds1-1/+0
2005-04-07Do real flow simplification only after liveness analysis.Linus Torvalds1-2/+15
2005-04-07Simplify trivial casts (and handle pointers specially).Linus Torvalds1-1/+25
2005-04-07Be more forgiving about missing types in linearization.Linus Torvalds1-12/+22
2005-04-07Rename "register.c" into "liveness.c". That's what it does.Linus Torvalds1-1/+1
2005-04-07Associate pseudos with the symbol name whose value they got.Linus Torvalds1-3/+15
2005-04-07Allow multiple levels of verbosity, and print out the _really_Linus Torvalds1-21/+24
2005-04-07Start tracking cross-basic-block pseudo usage.Linus Torvalds1-1/+18
2005-04-07Start using instruction sizes properly.Linus Torvalds1-197/+212
2005-04-07When replacing OP_SWITCH with OP_BR, make sure to removeLinus Torvalds1-1/+3
2005-04-07Add entrypoint pointer to each bb.Linus Torvalds1-18/+19
2005-04-07Add a flow verification thing.Linus Torvalds1-0/+2
2005-04-07Allow CSE to run after bb packing. Linus Torvalds1-6/+5
2005-04-07Make list-ptr remove/replace take a count.Linus Torvalds1-1/+1
2005-04-07Don't add the fake parent to the entryblock - we don't need it.Linus Torvalds1-3/+0
2005-04-07Make linearizer use the proper inc/dec operation value.Linus Torvalds1-1/+1
2005-04-07Add a semblance of sanity to structure member accesses.Linus Torvalds1-50/+37
2005-04-07Kill long-dead pseudo-reuse code.Linus Torvalds1-4/+1
2005-04-07Add a final pseudo usage tracking phase, which keepsLinus Torvalds1-0/+3
2005-04-07Fix pseudo->def on OP_PHI->OP_SEL conversion.Linus Torvalds1-1/+7
2005-04-07Clean up "linearize_symbol()" by making the function linearizerLinus Torvalds1-59/+65
2005-04-07Make the CSE "repeat" logic be more fine-grained than justLinus Torvalds1-4/+1
2005-04-07Clean up OP_STORE kill, and remove the use of the data.Linus Torvalds1-0/+12
2005-04-07More undefined symbol handling - don't oops on printout.Linus Torvalds1-0/+4
2005-04-07Change linearizer debug output syntax for call instructions.Linus Torvalds1-1/+3
2005-04-07Handle undefined symbols a bit more gracefully.Linus Torvalds1-1/+5
2005-04-07Do early CSE before even doing the symbol simplification.Linus Torvalds1-6/+15
2005-04-07Use cleaned-up ptr list removal for removing basic blocksLinus Torvalds1-9/+1
2005-04-07Be a lot more proper about rewriting end branches.Linus Torvalds1-11/+26
2005-04-07Simplify constant "conditional" branches and OP_SETCC/OP_SEL instructions.Linus Torvalds1-3/+9
2005-04-07Clean up rewriting a switch into a branch.Linus Torvalds1-3/+5
2005-04-07Make phi pseudos be a type of their own.Linus Torvalds1-7/+38
2005-04-07Fix up various pseudo usage list issues:Linus Torvalds1-1/+28
2005-04-07Oops. Forgot to add usage of a dominator list pseudo.Linus Torvalds1-12/+0
2005-04-07Don't print no-ops and unused instructions unless verbose.Linus Torvalds1-6/+12
2005-04-07Don't bother showing symbols that have been successfully removedLinus Torvalds1-0/+4
2005-04-07Don't show killed basic blocks.Linus Torvalds1-0/+2
2005-04-07Don't silently delete unnecessary phi_nodes that were generated by "return".Linus Torvalds1-1/+0
2005-04-07Oops. Clean up some left-overs from phi removal.Linus Torvalds1-8/+8
2005-04-07Remove "struct phi", replace with instruction that generates a pseudo.Linus Torvalds1-44/+43