| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656 |
- [INFO][runOnModule] Starting analysis for module: proprocess_output/combined_tagged.ll
- [INFO][buildCallGraph] Building complete call graph
- [INFO][buildCallGraph] Finished Building complete call graph
- [INFO][buildCallGraph] Building complete call graph
- [INFO][buildCallGraph] Finished Building complete call graph
- [INFO][generateProjectCallGraph] Generating project call graph
- ```mermaid
- graph TD
- %% Project Call Graph
- calculateCircleArea["calculateCircleArea\nCritical Points: 2"]
- calculateDistance["calculateDistance\nCritical Points: 2"]
- countSetBits["countSetBits\nCritical Points: 3"]:::target
- createDynamicArray["createDynamicArray\nCritical Points: 2"]
- createMatrix["createMatrix\nCritical Points: 2"]
- factorial["factorial\nCritical Points: 2"]
- findCentroid["findCentroid\nCritical Points: 2"]
- getErrorMessage["getErrorMessage\nCritical Points: 2"]
- insertNode["insertNode\nCritical Points: 2"]
- memoizedFib["memoizedFib\nCritical Points: 2"]:::target
- multiplyMatrices["multiplyMatrices\nCritical Points: 2"]
- performSimpleCalculations["performSimpleCalculations\nCritical Points: 7"]
- processMatrix["processMatrix\nCritical Points: 3"]:::target
- projectA_main["projectA_main\nCritical Points: 2"]
- projectB_main["projectB_main\nCritical Points: 5"]:::target
- pushBack["pushBack\nCritical Points: 2"]
- quickSort["quickSort\nCritical Points: 2"]
- removeDuplicates["removeDuplicates\nCritical Points: 2"]
- reverseString["reverseString\nCritical Points: 3"]:::target
- setErrorMessage["setErrorMessage\nCritical Points: 3"]
- testPoints["testPoints\nCritical Points: 3"]:::target
- validateMatrix["validateMatrix\nCritical Points: 2"]
- calculateCircleArea --> setErrorMessage
- calculateDistance --> setErrorMessage
- createDynamicArray --> setErrorMessage
- createMatrix --> setErrorMessage
- factorial --> factorial
- factorial --> setErrorMessage
- findCentroid --> setErrorMessage
- insertNode --> setErrorMessage
- memoizedFib --> memoizedFib
- multiplyMatrices --> createMatrix
- multiplyMatrices --> setErrorMessage
- processMatrix --> countSetBits
- projectA_main --> createDynamicArray
- projectA_main --> createMatrix
- projectA_main --> getErrorMessage
- projectA_main --> insertNode
- projectA_main --> multiplyMatrices
- projectA_main --> performSimpleCalculations
- projectA_main --> pushBack
- projectA_main --> setErrorMessage
- projectB_main --> countSetBits
- projectB_main --> memoizedFib
- projectB_main --> processMatrix
- projectB_main --> reverseString
- projectB_main --> testPoints
- pushBack --> setErrorMessage
- quickSort --> quickSort
- quickSort --> setErrorMessage
- removeDuplicates --> quickSort
- removeDuplicates --> setErrorMessage
- validateMatrix --> setErrorMessage
- classDef target fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][generateProjectCallGraph] Finished generating project call graph
- ```mermaid: getErrorMessage
- graph TD
- 0["Block 0:\n %1 = load i8*, i8** @globalErrorMessage, align 8\n %2 = icmp ne i8* %1, null\n br i1 %2, label %3, label %5\n"]:::critical
- 0 -->|true| 3
- 0 -->|false| 5
- 3["Block 3:\n %4 = load i8*, i8** @globalErrorMessage, align 8\n br label %6\n"]
- 3 --> 6
- 5["Block 5:\n br label %6\n"]
- 5 --> 6
- 6["Block 6:\n %7 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %5 ]\n ret i8* %7\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: setErrorMessage
- graph TD
- 1["Block 1:\n %2 = alloca i8*, align 8\n store i8* %0, i8** %2, align 8\n %3 = load i8*, i8** @globalErrorMessage, align 8\n %4 = icmp ne i8* %3, null\n br i1 %4, label %5, label %7\n"]:::critical
- 1 -->|true| 5
- 1 -->|false| 7
- 5["Block 5:\n %6 = load i8*, i8** @globalErrorMessage, align 8\n call void @free(i8* %6) #7\n br label %7\n"]
- 5 --> 7
- 7["Block 7:\n %8 = load i8*, i8** %2, align 8\n %9 = icmp ne i8* %8, null\n br i1 %9, label %10, label %19\n"]:::critical
- 7 -->|true| 10
- 7 -->|false| 19
- 10["Block 10:\n %11 = load i8*, i8** %2, align 8\n %12 = call noalias i8* @strdup(i8* %11) #7\n store i8* %12, i8** @globalErrorMessage, align 8\n %13 = load i8*, i8** @globalErrorMessage, align 8\n %14 = icmp eq i8* %13, null\n br i1 %14, label %15, label %18\n"]
- 10 -->|true| 15
- 10 -->|false| 18
- 15["Block 15:\n %16 = load %struct._IO_FILE*, %struct._IO_FILE** @stderr, align 8\n %17 = call i32 (%struct._IO_FILE*, i8*, ...) @fprintf(%struct._IO_FILE* %16, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))\n br label %18\n"]
- 15 --> 18
- 18["Block 18:\n br label %20\n"]
- 18 --> 20
- 19["Block 19:\n store i8* null, i8** @globalErrorMessage, align 8\n br label %20\n"]
- 19 --> 20
- 20["Block 20:\n ret void\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: factorial
- graph TD
- 1["Block 1:\n %2 = alloca i32, align 4\n %3 = alloca i32, align 4\n %4 = alloca i32, align 4\n %5 = alloca i32, align 4\n store i32 %0, i32* %3, align 4\n %6 = load i32, i32* @recursionDepth, align 4\n %7 = add nsw i32 %6, 1\n store i32 %7, i32* @recursionDepth, align 4\n %8 = icmp sgt i32 %7, 1000\n br i1 %8, label %9, label %12\n"]:::critical
- 1 -->|true| 9
- 1 -->|false| 12
- 9["Block 9:\n call void @setErrorMessage(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))\n %10 = load i32, i32* @recursionDepth, align 4\n %11 = add nsw i32 %10, -1\n store i32 %11, i32* @recursionDepth, align 4\n store i32 -1, i32* %2, align 4\n br label %53\n"]
- 9 --> 53
- 12["Block 12:\n %13 = load i32, i32* %3, align 4\n %14 = icmp slt i32 %13, 0\n br i1 %14, label %15, label %18\n"]
- 12 -->|true| 15
- 12 -->|false| 18
- 15["Block 15:\n call void @setErrorMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))\n %16 = load i32, i32* @recursionDepth, align 4\n %17 = add nsw i32 %16, -1\n store i32 %17, i32* @recursionDepth, align 4\n store i32 -1, i32* %2, align 4\n br label %53\n"]
- 15 --> 53
- 18["Block 18:\n %19 = load i32, i32* %3, align 4\n %20 = icmp sgt i32 %19, 20\n br i1 %20, label %21, label %24\n"]
- 18 -->|true| 21
- 18 -->|false| 24
- 21["Block 21:\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))\n %22 = load i32, i32* @recursionDepth, align 4\n %23 = add nsw i32 %22, -1\n store i32 %23, i32* @recursionDepth, align 4\n store i32 -1, i32* %2, align 4\n br label %53\n"]
- 21 --> 53
- 24["Block 24:\n %25 = load i32, i32* %3, align 4\n %26 = icmp sle i32 %25, 1\n br i1 %26, label %27, label %28\n"]
- 24 -->|true| 27
- 24 -->|false| 28
- 27["Block 27:\n store i32 1, i32* %4, align 4\n br label %49\n"]
- 27 --> 49
- 28["Block 28:\n %29 = load i32, i32* %3, align 4\n %30 = sub nsw i32 %29, 1\n %31 = call i32 @factorial(i32 %30)\n store i32 %31, i32* %5, align 4\n %32 = load i32, i32* %5, align 4\n %33 = icmp eq i32 %32, -1\n br i1 %33, label %34, label %37\n"]
- 28 -->|true| 34
- 28 -->|false| 37
- 34["Block 34:\n %35 = load i32, i32* @recursionDepth, align 4\n %36 = add nsw i32 %35, -1\n store i32 %36, i32* @recursionDepth, align 4\n store i32 -1, i32* %2, align 4\n br label %53\n"]
- 34 --> 53
- 37["Block 37:\n %38 = load i32, i32* %5, align 4\n %39 = load i32, i32* %3, align 4\n %40 = sdiv i32 2147483647, %39\n %41 = icmp sgt i32 %38, %40\n br i1 %41, label %42, label %45\n"]
- 37 -->|true| 42
- 37 -->|false| 45
- 42["Block 42:\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))\n %43 = load i32, i32* @recursionDepth, align 4\n %44 = add nsw i32 %43, -1\n store i32 %44, i32* @recursionDepth, align 4\n store i32 -1, i32* %2, align 4\n br label %53\n"]
- 42 --> 53
- 45["Block 45:\n %46 = load i32, i32* %3, align 4\n %47 = load i32, i32* %5, align 4\n %48 = mul nsw i32 %46, %47\n store i32 %48, i32* %4, align 4\n br label %49\n"]
- 45 --> 49
- 49["Block 49:\n %50 = load i32, i32* @recursionDepth, align 4\n %51 = add nsw i32 %50, -1\n store i32 %51, i32* @recursionDepth, align 4\n %52 = load i32, i32* %4, align 4\n store i32 %52, i32* %2, align 4\n br label %53\n"]
- 49 --> 53
- 53["Block 53:\n %54 = load i32, i32* %2, align 4\n ret i32 %54\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: createDynamicArray
- graph TD
- 1["Block 1:\n %2 = alloca %struct.DynamicArray*, align 8\n %3 = alloca i32, align 4\n %4 = alloca %struct.DynamicArray*, align 8\n store i32 %0, i32* %3, align 4\n %5 = load i32, i32* %3, align 4\n %6 = icmp sle i32 %5, 0\n br i1 %6, label %7, label %8\n"]:::critical
- 1 -->|true| 7
- 1 -->|false| 8
- 7["Block 7:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))\n store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8\n br label %44\n"]
- 7 --> 44
- 8["Block 8:\n %9 = load i32, i32* %3, align 4\n %10 = icmp sgt i32 %9, 1000\n br i1 %10, label %11, label %12\n"]
- 8 -->|true| 11
- 8 -->|false| 12
- 11["Block 11:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))\n store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8\n br label %44\n"]
- 11 --> 44
- 12["Block 12:\n %13 = call noalias i8* @malloc(i64 24) #7\n %14 = bitcast i8* %13 to %struct.DynamicArray*\n store %struct.DynamicArray* %14, %struct.DynamicArray** %4, align 8\n %15 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %16 = icmp ne %struct.DynamicArray* %15, null\n br i1 %16, label %18, label %17\n"]
- 12 -->|true| 18
- 12 -->|false| 17
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))\n store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8\n br label %44\n"]
- 17 --> 44
- 18["Block 18:\n %19 = load i32, i32* %3, align 4\n %20 = sext i32 %19 to i64\n %21 = mul i64 4, %20\n %22 = call noalias i8* @malloc(i64 %21) #7\n %23 = bitcast i8* %22 to i32*\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %25 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %24, i32 0, i32 0\n store i32* %23, i32** %25, align 8\n %26 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %27 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %26, i32 0, i32 0\n %28 = load i32*, i32** %27, align 8\n %29 = icmp ne i32* %28, null\n br i1 %29, label %33, label %30\n"]
- 18 -->|true| 33
- 18 -->|false| 30
- 30["Block 30:\n %31 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %32 = bitcast %struct.DynamicArray* %31 to i8*\n call void @free(i8* %32) #7\n call void @setErrorMessage(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))\n store %struct.DynamicArray* null, %struct.DynamicArray** %2, align 8\n br label %44\n"]
- 30 --> 44
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n store i32 0, i32* %35, align 8\n %36 = load i32, i32* %3, align 4\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2\n store i32 %36, i32* %38, align 4\n %39 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %40 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %39, i32 0, i32 3\n store i32 1, i32* %40, align 8\n %41 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n %42 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %41, i32 0, i32 4\n store i32 0, i32* %42, align 4\n %43 = load %struct.DynamicArray*, %struct.DynamicArray** %4, align 8\n store %struct.DynamicArray* %43, %struct.DynamicArray** %2, align 8\n br label %44\n"]
- 33 --> 44
- 44["Block 44:\n %45 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n ret %struct.DynamicArray* %45\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: pushBack
- graph TD
- 2["Block 2:\n %3 = alloca %struct.DynamicArray*, align 8\n %4 = alloca i32, align 4\n %5 = alloca i32, align 4\n %6 = alloca i32*, align 8\n store %struct.DynamicArray* %0, %struct.DynamicArray** %3, align 8\n store i32 %1, i32* %4, align 4\n %7 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %8 = icmp ne %struct.DynamicArray* %7, null\n br i1 %8, label %10, label %9\n"]:::critical
- 2 -->|true| 10
- 2 -->|false| 9
- 9["Block 9:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %91\n"]
- 9 --> 91
- 10["Block 10:\n %11 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %12 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %11, i32 0, i32 1\n %13 = load i32, i32* %12, align 8\n %14 = icmp sge i32 %13, 1000\n br i1 %14, label %15, label %16\n"]
- 10 -->|true| 15
- 10 -->|false| 16
- 15["Block 15:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %91\n"]
- 15 --> 91
- 16["Block 16:\n %17 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %18 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %17, i32 0, i32 1\n %19 = load i32, i32* %18, align 8\n %20 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %21 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %20, i32 0, i32 2\n %22 = load i32, i32* %21, align 4\n %23 = icmp sge i32 %19, %22\n br i1 %23, label %24, label %52\n"]
- 16 -->|true| 24
- 16 -->|false| 52
- 24["Block 24:\n %25 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %26 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %25, i32 0, i32 2\n %27 = load i32, i32* %26, align 4\n %28 = mul nsw i32 %27, 2\n store i32 %28, i32* %5, align 4\n %29 = load i32, i32* %5, align 4\n %30 = icmp sgt i32 %29, 1000\n br i1 %30, label %31, label %32\n"]
- 24 -->|true| 31
- 24 -->|false| 32
- 31["Block 31:\n store i32 1000, i32* %5, align 4\n br label %32\n"]
- 31 --> 32
- 32["Block 32:\n %33 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %34 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %33, i32 0, i32 0\n %35 = load i32*, i32** %34, align 8\n %36 = bitcast i32* %35 to i8*\n %37 = load i32, i32* %5, align 4\n %38 = sext i32 %37 to i64\n %39 = mul i64 4, %38\n %40 = call i8* @realloc(i8* %36, i64 %39) #7\n %41 = bitcast i8* %40 to i32*\n store i32* %41, i32** %6, align 8\n %42 = load i32*, i32** %6, align 8\n %43 = icmp ne i32* %42, null\n br i1 %43, label %45, label %44\n"]
- 32 -->|true| 45
- 32 -->|false| 44
- 44["Block 44:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %91\n"]
- 44 --> 91
- 45["Block 45:\n %46 = load i32*, i32** %6, align 8\n %47 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %48 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %47, i32 0, i32 0\n store i32* %46, i32** %48, align 8\n %49 = load i32, i32* %5, align 4\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %50, i32 0, i32 2\n store i32 %49, i32* %51, align 4\n br label %52\n"]
- 45 --> 52
- 52["Block 52:\n %53 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %54 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %53, i32 0, i32 3\n %55 = load i32, i32* %54, align 8\n %56 = icmp ne i32 %55, 0\n br i1 %56, label %57, label %78\n"]
- 52 -->|true| 57
- 52 -->|false| 78
- 57["Block 57:\n %58 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %59 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %58, i32 0, i32 1\n %60 = load i32, i32* %59, align 8\n %61 = icmp sgt i32 %60, 0\n br i1 %61, label %62, label %78\n"]
- 57 -->|true| 62
- 57 -->|false| 78
- 62["Block 62:\n %63 = load i32, i32* %4, align 4\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %64, i32 0, i32 0\n %66 = load i32*, i32** %65, align 8\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %67, i32 0, i32 1\n %69 = load i32, i32* %68, align 8\n %70 = sub nsw i32 %69, 1\n %71 = sext i32 %70 to i64\n %72 = getelementptr inbounds i32, i32* %66, i64 %71\n %73 = load i32, i32* %72, align 4\n %74 = icmp slt i32 %63, %73\n br i1 %74, label %75, label %78\n"]
- 62 -->|true| 75
- 62 -->|false| 78
- 75["Block 75:\n %76 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %77 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %76, i32 0, i32 3\n store i32 0, i32* %77, align 8\n br label %78\n"]
- 75 --> 78
- 78["Block 78:\n %79 = load i32, i32* %4, align 4\n %80 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %81 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %80, i32 0, i32 0\n %82 = load i32*, i32** %81, align 8\n %83 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %84 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %83, i32 0, i32 1\n %85 = load i32, i32* %84, align 8\n %86 = add nsw i32 %85, 1\n store i32 %86, i32* %84, align 8\n %87 = sext i32 %85 to i64\n %88 = getelementptr inbounds i32, i32* %82, i64 %87\n store i32 %79, i32* %88, align 4\n %89 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %90 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %89, i32 0, i32 4\n store i32 1, i32* %90, align 4\n br label %91\n"]
- 78 --> 91
- 91["Block 91:\n ret void\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: quickSort
- graph TD
- 4["Block 4:\n %5 = alloca i32*, align 8\n %6 = alloca i32, align 4\n %7 = alloca i32, align 4\n %8 = alloca i32*, align 8\n %9 = alloca i32, align 4\n %10 = alloca i32, align 4\n %11 = alloca i32, align 4\n %12 = alloca i32, align 4\n %13 = alloca i32, align 4\n %14 = alloca i32, align 4\n store i32* %0, i32** %5, align 8\n store i32 %1, i32* %6, align 4\n store i32 %2, i32* %7, align 4\n store i32* %3, i32** %8, align 8\n %15 = load i32, i32* @recursionDepth, align 4\n %16 = add nsw i32 %15, 1\n store i32 %16, i32* @recursionDepth, align 4\n %17 = icmp sgt i32 %16, 1000\n br i1 %17, label %18, label %22\n"]:::critical
- 4 -->|true| 18
- 4 -->|false| 22
- 18["Block 18:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0))\n %19 = load i32*, i32** %8, align 8\n store i32 1, i32* %19, align 4\n %20 = load i32, i32* @recursionDepth, align 4\n %21 = add nsw i32 %20, -1\n store i32 %21, i32* @recursionDepth, align 4\n br label %247\n"]
- 18 --> 247
- 22["Block 22:\n %23 = load i32*, i32** %5, align 8\n %24 = icmp ne i32* %23, null\n br i1 %24, label %29, label %25\n"]
- 22 -->|true| 29
- 22 -->|false| 25
- 25["Block 25:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))\n %26 = load i32*, i32** %8, align 8\n store i32 1, i32* %26, align 4\n %27 = load i32, i32* @recursionDepth, align 4\n %28 = add nsw i32 %27, -1\n store i32 %28, i32* @recursionDepth, align 4\n br label %247\n"]
- 25 --> 247
- 29["Block 29:\n %30 = load i32, i32* %6, align 4\n %31 = icmp slt i32 %30, 0\n br i1 %31, label %41, label %32\n"]
- 29 -->|true| 41
- 29 -->|false| 32
- 32["Block 32:\n %33 = load i32, i32* %7, align 4\n %34 = icmp slt i32 %33, 0\n br i1 %34, label %41, label %35\n"]
- 32 -->|true| 41
- 32 -->|false| 35
- 35["Block 35:\n %36 = load i32, i32* %6, align 4\n %37 = icmp sge i32 %36, 1000\n br i1 %37, label %41, label %38\n"]
- 35 -->|true| 41
- 35 -->|false| 38
- 38["Block 38:\n %39 = load i32, i32* %7, align 4\n %40 = icmp sge i32 %39, 1000\n br i1 %40, label %41, label %45\n"]
- 38 -->|true| 41
- 38 -->|false| 45
- 41["Block 41:\n call void @setErrorMessage(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))\n %42 = load i32*, i32** %8, align 8\n store i32 1, i32* %42, align 4\n %43 = load i32, i32* @recursionDepth, align 4\n %44 = add nsw i32 %43, -1\n store i32 %44, i32* @recursionDepth, align 4\n br label %247\n"]
- 41 --> 247
- 45["Block 45:\n %46 = load i32, i32* %6, align 4\n %47 = load i32, i32* %7, align 4\n %48 = icmp slt i32 %46, %47\n br i1 %48, label %49, label %244\n"]
- 45 -->|true| 49
- 45 -->|false| 244
- 49["Block 49:\n %50 = load i32, i32* %6, align 4\n %51 = load i32, i32* %7, align 4\n %52 = load i32, i32* %6, align 4\n %53 = sub nsw i32 %51, %52\n %54 = sdiv i32 %53, 2\n %55 = add nsw i32 %50, %54\n store i32 %55, i32* %9, align 4\n %56 = load i32*, i32** %5, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %57 to i64\n %59 = getelementptr inbounds i32, i32* %56, i64 %58\n %60 = load i32, i32* %59, align 4\n %61 = load i32*, i32** %5, align 8\n %62 = load i32, i32* %9, align 4\n %63 = sext i32 %62 to i64\n %64 = getelementptr inbounds i32, i32* %61, i64 %63\n %65 = load i32, i32* %64, align 4\n %66 = icmp sle i32 %60, %65\n br i1 %66, label %67, label %99\n"]
- 49 -->|true| 67
- 49 -->|false| 99
- 67["Block 67:\n %68 = load i32*, i32** %5, align 8\n %69 = load i32, i32* %9, align 4\n %70 = sext i32 %69 to i64\n %71 = getelementptr inbounds i32, i32* %68, i64 %70\n %72 = load i32, i32* %71, align 4\n %73 = load i32*, i32** %5, align 8\n %74 = load i32, i32* %7, align 4\n %75 = sext i32 %74 to i64\n %76 = getelementptr inbounds i32, i32* %73, i64 %75\n %77 = load i32, i32* %76, align 4\n %78 = icmp sle i32 %72, %77\n br i1 %78, label %79, label %81\n"]
- 67 -->|true| 79
- 67 -->|false| 81
- 79["Block 79:\n %80 = load i32, i32* %9, align 4\n store i32 %80, i32* %10, align 4\n br label %98\n"]
- 79 --> 98
- 81["Block 81:\n %82 = load i32*, i32** %5, align 8\n %83 = load i32, i32* %6, align 4\n %84 = sext i32 %83 to i64\n %85 = getelementptr inbounds i32, i32* %82, i64 %84\n %86 = load i32, i32* %85, align 4\n %87 = load i32*, i32** %5, align 8\n %88 = load i32, i32* %7, align 4\n %89 = sext i32 %88 to i64\n %90 = getelementptr inbounds i32, i32* %87, i64 %89\n %91 = load i32, i32* %90, align 4\n %92 = icmp sle i32 %86, %91\n br i1 %92, label %93, label %95\n"]
- 81 -->|true| 93
- 81 -->|false| 95
- 93["Block 93:\n %94 = load i32, i32* %7, align 4\n store i32 %94, i32* %10, align 4\n br label %97\n"]
- 93 --> 97
- 95["Block 95:\n %96 = load i32, i32* %6, align 4\n store i32 %96, i32* %10, align 4\n br label %97\n"]
- 95 --> 97
- 97["Block 97:\n br label %98\n"]
- 97 --> 98
- 98["Block 98:\n br label %131\n"]
- 98 --> 131
- 99["Block 99:\n %100 = load i32*, i32** %5, align 8\n %101 = load i32, i32* %6, align 4\n %102 = sext i32 %101 to i64\n %103 = getelementptr inbounds i32, i32* %100, i64 %102\n %104 = load i32, i32* %103, align 4\n %105 = load i32*, i32** %5, align 8\n %106 = load i32, i32* %7, align 4\n %107 = sext i32 %106 to i64\n %108 = getelementptr inbounds i32, i32* %105, i64 %107\n %109 = load i32, i32* %108, align 4\n %110 = icmp sle i32 %104, %109\n br i1 %110, label %111, label %113\n"]
- 99 -->|true| 111
- 99 -->|false| 113
- 111["Block 111:\n %112 = load i32, i32* %6, align 4\n store i32 %112, i32* %10, align 4\n br label %130\n"]
- 111 --> 130
- 113["Block 113:\n %114 = load i32*, i32** %5, align 8\n %115 = load i32, i32* %9, align 4\n %116 = sext i32 %115 to i64\n %117 = getelementptr inbounds i32, i32* %114, i64 %116\n %118 = load i32, i32* %117, align 4\n %119 = load i32*, i32** %5, align 8\n %120 = load i32, i32* %7, align 4\n %121 = sext i32 %120 to i64\n %122 = getelementptr inbounds i32, i32* %119, i64 %121\n %123 = load i32, i32* %122, align 4\n %124 = icmp sle i32 %118, %123\n br i1 %124, label %125, label %127\n"]
- 113 -->|true| 125
- 113 -->|false| 127
- 125["Block 125:\n %126 = load i32, i32* %7, align 4\n store i32 %126, i32* %10, align 4\n br label %129\n"]
- 125 --> 129
- 127["Block 127:\n %128 = load i32, i32* %9, align 4\n store i32 %128, i32* %10, align 4\n br label %129\n"]
- 127 --> 129
- 129["Block 129:\n br label %130\n"]
- 129 --> 130
- 130["Block 130:\n br label %131\n"]
- 130 --> 131
- 131["Block 131:\n %132 = load i32*, i32** %5, align 8\n %133 = load i32, i32* %7, align 4\n %134 = sext i32 %133 to i64\n %135 = getelementptr inbounds i32, i32* %132, i64 %134\n %136 = load i32, i32* %135, align 4\n store i32 %136, i32* %11, align 4\n %137 = load i32*, i32** %5, align 8\n %138 = load i32, i32* %10, align 4\n %139 = sext i32 %138 to i64\n %140 = getelementptr inbounds i32, i32* %137, i64 %139\n %141 = load i32, i32* %140, align 4\n %142 = load i32*, i32** %5, align 8\n %143 = load i32, i32* %7, align 4\n %144 = sext i32 %143 to i64\n %145 = getelementptr inbounds i32, i32* %142, i64 %144\n store i32 %141, i32* %145, align 4\n %146 = load i32, i32* %11, align 4\n %147 = load i32*, i32** %5, align 8\n %148 = load i32, i32* %10, align 4\n %149 = sext i32 %148 to i64\n %150 = getelementptr inbounds i32, i32* %147, i64 %149\n store i32 %146, i32* %150, align 4\n %151 = load i32*, i32** %5, align 8\n %152 = load i32, i32* %7, align 4\n %153 = sext i32 %152 to i64\n %154 = getelementptr inbounds i32, i32* %151, i64 %153\n %155 = load i32, i32* %154, align 4\n store i32 %155, i32* %12, align 4\n %156 = load i32, i32* %6, align 4\n %157 = sub nsw i32 %156, 1\n store i32 %157, i32* %13, align 4\n %158 = load i32, i32* %6, align 4\n store i32 %158, i32* %14, align 4\n br label %159\n"]
- 131 --> 159
- 159["Block 159:\n %160 = load i32, i32* %14, align 4\n %161 = load i32, i32* %7, align 4\n %162 = icmp slt i32 %160, %161\n br i1 %162, label %163, label %199\n"]
- 159 -->|true| 163
- 159 -->|false| 199
- 163["Block 163:\n %164 = load i32*, i32** %5, align 8\n %165 = load i32, i32* %14, align 4\n %166 = sext i32 %165 to i64\n %167 = getelementptr inbounds i32, i32* %164, i64 %166\n %168 = load i32, i32* %167, align 4\n %169 = load i32, i32* %12, align 4\n %170 = icmp sle i32 %168, %169\n br i1 %170, label %171, label %195\n"]
- 163 -->|true| 171
- 163 -->|false| 195
- 171["Block 171:\n %172 = load i32, i32* %13, align 4\n %173 = add nsw i32 %172, 1\n store i32 %173, i32* %13, align 4\n %174 = load i32*, i32** %5, align 8\n %175 = load i32, i32* %13, align 4\n %176 = sext i32 %175 to i64\n %177 = getelementptr inbounds i32, i32* %174, i64 %176\n %178 = load i32, i32* %177, align 4\n store i32 %178, i32* %11, align 4\n %179 = load i32*, i32** %5, align 8\n %180 = load i32, i32* %14, align 4\n %181 = sext i32 %180 to i64\n %182 = getelementptr inbounds i32, i32* %179, i64 %181\n %183 = load i32, i32* %182, align 4\n %184 = load i32*, i32** %5, align 8\n %185 = load i32, i32* %13, align 4\n %186 = sext i32 %185 to i64\n %187 = getelementptr inbounds i32, i32* %184, i64 %186\n store i32 %183, i32* %187, align 4\n %188 = load i32, i32* %11, align 4\n %189 = load i32*, i32** %5, align 8\n %190 = load i32, i32* %14, align 4\n %191 = sext i32 %190 to i64\n %192 = getelementptr inbounds i32, i32* %189, i64 %191\n store i32 %188, i32* %192, align 4\n %193 = load i32, i32* @globalCounter, align 4\n %194 = add nsw i32 %193, 1\n store i32 %194, i32* @globalCounter, align 4\n br label %195\n"]
- 171 --> 195
- 195["Block 195:\n br label %196\n"]
- 195 --> 196
- 196["Block 196:\n %197 = load i32, i32* %14, align 4\n %198 = add nsw i32 %197, 1\n store i32 %198, i32* %14, align 4\n br label %159\n"]
- 196 --> 159
- 199["Block 199:\n %200 = load i32*, i32** %5, align 8\n %201 = load i32, i32* %13, align 4\n %202 = add nsw i32 %201, 1\n %203 = sext i32 %202 to i64\n %204 = getelementptr inbounds i32, i32* %200, i64 %203\n %205 = load i32, i32* %204, align 4\n store i32 %205, i32* %11, align 4\n %206 = load i32*, i32** %5, align 8\n %207 = load i32, i32* %7, align 4\n %208 = sext i32 %207 to i64\n %209 = getelementptr inbounds i32, i32* %206, i64 %208\n %210 = load i32, i32* %209, align 4\n %211 = load i32*, i32** %5, align 8\n %212 = load i32, i32* %13, align 4\n %213 = add nsw i32 %212, 1\n %214 = sext i32 %213 to i64\n %215 = getelementptr inbounds i32, i32* %211, i64 %214\n store i32 %210, i32* %215, align 4\n %216 = load i32, i32* %11, align 4\n %217 = load i32*, i32** %5, align 8\n %218 = load i32, i32* %7, align 4\n %219 = sext i32 %218 to i64\n %220 = getelementptr inbounds i32, i32* %217, i64 %219\n store i32 %216, i32* %220, align 4\n %221 = load i32*, i32** %5, align 8\n %222 = load i32, i32* %6, align 4\n %223 = load i32, i32* %13, align 4\n %224 = load i32*, i32** %8, align 8\n call void @quickSort(i32* %221, i32 %222, i32 %223, i32* %224)\n %225 = load i32*, i32** %8, align 8\n %226 = load i32, i32* %225, align 4\n %227 = icmp ne i32 %226, 0\n br i1 %227, label %228, label %231\n"]
- 199 -->|true| 228
- 199 -->|false| 231
- 228["Block 228:\n %229 = load i32, i32* @recursionDepth, align 4\n %230 = add nsw i32 %229, -1\n store i32 %230, i32* @recursionDepth, align 4\n br label %247\n"]
- 228 --> 247
- 231["Block 231:\n %232 = load i32*, i32** %5, align 8\n %233 = load i32, i32* %13, align 4\n %234 = add nsw i32 %233, 2\n %235 = load i32, i32* %7, align 4\n %236 = load i32*, i32** %8, align 8\n call void @quickSort(i32* %232, i32 %234, i32 %235, i32* %236)\n %237 = load i32*, i32** %8, align 8\n %238 = load i32, i32* %237, align 4\n %239 = icmp ne i32 %238, 0\n br i1 %239, label %240, label %243\n"]
- 231 -->|true| 240
- 231 -->|false| 243
- 240["Block 240:\n %241 = load i32, i32* @recursionDepth, align 4\n %242 = add nsw i32 %241, -1\n store i32 %242, i32* @recursionDepth, align 4\n br label %247\n"]
- 240 --> 247
- 243["Block 243:\n br label %244\n"]
- 243 --> 244
- 244["Block 244:\n %245 = load i32, i32* @recursionDepth, align 4\n %246 = add nsw i32 %245, -1\n store i32 %246, i32* @recursionDepth, align 4\n br label %247\n"]
- 244 --> 247
- 247["Block 247:\n ret void\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: createMatrix
- graph TD
- 2["Block 2:\n %3 = alloca %struct.Matrix*, align 8\n %4 = alloca i32, align 4\n %5 = alloca i32, align 4\n %6 = alloca %struct.Matrix*, align 8\n %7 = alloca i32, align 4\n %8 = alloca i32, align 4\n store i32 %0, i32* %4, align 4\n store i32 %1, i32* %5, align 4\n %9 = load i32, i32* %4, align 4\n %10 = icmp slt i32 %9, 1\n br i1 %10, label %14, label %11\n"]:::critical
- 2 -->|true| 14
- 2 -->|false| 11
- 11["Block 11:\n %12 = load i32, i32* %5, align 4\n %13 = icmp slt i32 %12, 1\n br i1 %13, label %14, label %15\n"]
- 11 -->|true| 14
- 11 -->|false| 15
- 14["Block 14:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %111\n"]
- 14 --> 111
- 15["Block 15:\n %16 = load i32, i32* %4, align 4\n %17 = icmp sgt i32 %16, 100\n br i1 %17, label %21, label %18\n"]
- 15 -->|true| 21
- 15 -->|false| 18
- 18["Block 18:\n %19 = load i32, i32* %5, align 4\n %20 = icmp sgt i32 %19, 100\n br i1 %20, label %21, label %22\n"]
- 18 -->|true| 21
- 18 -->|false| 22
- 21["Block 21:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %111\n"]
- 21 --> 111
- 22["Block 22:\n %23 = call noalias i8* @malloc(i64 32) #7\n %24 = bitcast i8* %23 to %struct.Matrix*\n store %struct.Matrix* %24, %struct.Matrix** %6, align 8\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %25, null\n br i1 %26, label %28, label %27\n"]
- 22 -->|true| 28
- 22 -->|false| 27
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.18, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %111\n"]
- 27 --> 111
- 28["Block 28:\n %29 = load i32, i32* %4, align 4\n %30 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 1\n store i32 %29, i32* %31, align 8\n %32 = load i32, i32* %5, align 4\n %33 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %34 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %33, i32 0, i32 2\n store i32 %32, i32* %34, align 4\n %35 = load i32, i32* %4, align 4\n %36 = load i32, i32* %5, align 4\n %37 = icmp eq i32 %35, %36\n %38 = zext i1 %37 to i32\n %39 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %40 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %39, i32 0, i32 3\n store i32 %38, i32* %40, align 8\n %41 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 4\n store double 0.000000e+00, double* %42, align 8\n %43 = load i32, i32* %4, align 4\n %44 = sext i32 %43 to i64\n %45 = mul i64 %44, 8\n %46 = call noalias i8* @malloc(i64 %45) #7\n %47 = bitcast i8* %46 to i32**\n %48 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %49 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %48, i32 0, i32 0\n store i32** %47, i32*** %49, align 8\n %50 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %51 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %50, i32 0, i32 0\n %52 = load i32**, i32*** %51, align 8\n %53 = icmp ne i32** %52, null\n br i1 %53, label %57, label %54\n"]
- 28 -->|true| 57
- 28 -->|false| 54
- 54["Block 54:\n %55 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %56 = bitcast %struct.Matrix* %55 to i8*\n call void @free(i8* %56) #7\n call void @setErrorMessage(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.19, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %111\n"]
- 54 --> 111
- 57["Block 57:\n store i32 0, i32* %7, align 4\n br label %58\n"]
- 57 --> 58
- 58["Block 58:\n %59 = load i32, i32* %7, align 4\n %60 = load i32, i32* %4, align 4\n %61 = icmp slt i32 %59, %60\n br i1 %61, label %62, label %109\n"]
- 58 -->|true| 62
- 58 -->|false| 109
- 62["Block 62:\n %63 = load i32, i32* %5, align 4\n %64 = sext i32 %63 to i64\n %65 = call noalias i8* @calloc(i64 %64, i64 4) #7\n %66 = bitcast i8* %65 to i32*\n %67 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %68 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %67, i32 0, i32 0\n %69 = load i32**, i32*** %68, align 8\n %70 = load i32, i32* %7, align 4\n %71 = sext i32 %70 to i64\n %72 = getelementptr inbounds i32*, i32** %69, i64 %71\n store i32* %66, i32** %72, align 8\n %73 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 0\n %75 = load i32**, i32*** %74, align 8\n %76 = load i32, i32* %7, align 4\n %77 = sext i32 %76 to i64\n %78 = getelementptr inbounds i32*, i32** %75, i64 %77\n %79 = load i32*, i32** %78, align 8\n %80 = icmp ne i32* %79, null\n br i1 %80, label %105, label %81\n"]
- 62 -->|true| 105
- 62 -->|false| 81
- 81["Block 81:\n store i32 0, i32* %8, align 4\n br label %82\n"]
- 81 --> 82
- 82["Block 82:\n %83 = load i32, i32* %8, align 4\n %84 = load i32, i32* %7, align 4\n %85 = icmp slt i32 %83, %84\n br i1 %85, label %86, label %98\n"]
- 82 -->|true| 86
- 82 -->|false| 98
- 86["Block 86:\n %87 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 0\n %89 = load i32**, i32*** %88, align 8\n %90 = load i32, i32* %8, align 4\n %91 = sext i32 %90 to i64\n %92 = getelementptr inbounds i32*, i32** %89, i64 %91\n %93 = load i32*, i32** %92, align 8\n %94 = bitcast i32* %93 to i8*\n call void @free(i8* %94) #7\n br label %95\n"]
- 86 --> 95
- 95["Block 95:\n %96 = load i32, i32* %8, align 4\n %97 = add nsw i32 %96, 1\n store i32 %97, i32* %8, align 4\n br label %82\n"]
- 95 --> 82
- 98["Block 98:\n %99 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %100 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %99, i32 0, i32 0\n %101 = load i32**, i32*** %100, align 8\n %102 = bitcast i32** %101 to i8*\n call void @free(i8* %102) #7\n %103 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %104 = bitcast %struct.Matrix* %103 to i8*\n call void @free(i8* %104) #7\n call void @setErrorMessage(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %111\n"]
- 98 --> 111
- 105["Block 105:\n br label %106\n"]
- 105 --> 106
- 106["Block 106:\n %107 = load i32, i32* %7, align 4\n %108 = add nsw i32 %107, 1\n store i32 %108, i32* %7, align 4\n br label %58\n"]
- 106 --> 58
- 109["Block 109:\n %110 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n store %struct.Matrix* %110, %struct.Matrix** %3, align 8\n br label %111\n"]
- 109 --> 111
- 111["Block 111:\n %112 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n ret %struct.Matrix* %112\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: multiplyMatrices
- graph TD
- 2["Block 2:\n %3 = alloca %struct.Matrix*, align 8\n %4 = alloca %struct.Matrix*, align 8\n %5 = alloca %struct.Matrix*, align 8\n %6 = alloca %struct.Matrix*, align 8\n %7 = alloca i64, align 8\n %8 = alloca i32, align 4\n %9 = alloca i32, align 4\n %10 = alloca i64, align 8\n %11 = alloca i32, align 4\n %12 = alloca i64, align 8\n %13 = alloca i32, align 4\n store %struct.Matrix* %0, %struct.Matrix** %4, align 8\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n %14 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %15 = icmp ne %struct.Matrix* %14, null\n br i1 %15, label %16, label %19\n"]:::critical
- 2 -->|true| 16
- 2 -->|false| 19
- 16["Block 16:\n %17 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %18 = icmp ne %struct.Matrix* %17, null\n br i1 %18, label %20, label %19\n"]
- 16 -->|true| 20
- 16 -->|false| 19
- 19["Block 19:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %209\n"]
- 19 --> 209
- 20["Block 20:\n %21 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %22 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %21, i32 0, i32 0\n %23 = load i32**, i32*** %22, align 8\n %24 = icmp ne i32** %23, null\n br i1 %24, label %25, label %30\n"]
- 20 -->|true| 25
- 20 -->|false| 30
- 25["Block 25:\n %26 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %27 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %26, i32 0, i32 0\n %28 = load i32**, i32*** %27, align 8\n %29 = icmp ne i32** %28, null\n br i1 %29, label %31, label %30\n"]
- 25 -->|true| 31
- 25 -->|false| 30
- 30["Block 30:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %209\n"]
- 30 --> 209
- 31["Block 31:\n %32 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %33 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %32, i32 0, i32 2\n %34 = load i32, i32* %33, align 4\n %35 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %36 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %35, i32 0, i32 1\n %37 = load i32, i32* %36, align 8\n %38 = icmp ne i32 %34, %37\n br i1 %38, label %39, label %40\n"]
- 31 -->|true| 39
- 31 -->|false| 40
- 39["Block 39:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %209\n"]
- 39 --> 209
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2\n %43 = load i32, i32* %42, align 4\n %44 = icmp sgt i32 %43, 100\n br i1 %44, label %50, label %45\n"]
- 40 -->|true| 50
- 40 -->|false| 45
- 45["Block 45:\n %46 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %47 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %46, i32 0, i32 1\n %48 = load i32, i32* %47, align 8\n %49 = icmp sgt i32 %48, 100\n br i1 %49, label %50, label %51\n"]
- 45 -->|true| 50
- 45 -->|false| 51
- 50["Block 50:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %209\n"]
- 50 --> 209
- 51["Block 51:\n %52 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %53 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %52, i32 0, i32 1\n %54 = load i32, i32* %53, align 8\n %55 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %56 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %55, i32 0, i32 2\n %57 = load i32, i32* %56, align 4\n %58 = call %struct.Matrix* @createMatrix(i32 %54, i32 %57)\n store %struct.Matrix* %58, %struct.Matrix** %6, align 8\n %59 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %60 = icmp ne %struct.Matrix* %59, null\n br i1 %60, label %62, label %61\n"]
- 51 -->|true| 62
- 51 -->|false| 61
- 61["Block 61:\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %209\n"]
- 61 --> 209
- 62["Block 62:\n store i64 0, i64* %7, align 8\n store i32 0, i32* %8, align 4\n br label %63\n"]
- 62 --> 63
- 63["Block 63:\n %64 = load i32, i32* %8, align 4\n %65 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %66 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %65, i32 0, i32 1\n %67 = load i32, i32* %66, align 8\n %68 = icmp slt i32 %64, %67\n br i1 %68, label %69, label %197\n"]
- 63 -->|true| 69
- 63 -->|false| 197
- 69["Block 69:\n store i32 0, i32* %9, align 4\n br label %70\n"]
- 69 --> 70
- 70["Block 70:\n %71 = load i32, i32* %9, align 4\n %72 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %73 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %72, i32 0, i32 2\n %74 = load i32, i32* %73, align 4\n %75 = icmp slt i32 %71, %74\n br i1 %75, label %76, label %193\n"]
- 70 -->|true| 76
- 70 -->|false| 193
- 76["Block 76:\n store i64 0, i64* %10, align 8\n store i32 0, i32* %11, align 4\n br label %77\n"]
- 76 --> 77
- 77["Block 77:\n %78 = load i32, i32* %11, align 4\n %79 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %80 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %79, i32 0, i32 2\n %81 = load i32, i32* %80, align 4\n %82 = icmp slt i32 %78, %81\n br i1 %82, label %83, label %147\n"]
- 77 -->|true| 83
- 77 -->|false| 147
- 83["Block 83:\n %84 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %85 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %84, i32 0, i32 0\n %86 = load i32**, i32*** %85, align 8\n %87 = load i32, i32* %8, align 4\n %88 = sext i32 %87 to i64\n %89 = getelementptr inbounds i32*, i32** %86, i64 %88\n %90 = load i32*, i32** %89, align 8\n %91 = load i32, i32* %11, align 4\n %92 = sext i32 %91 to i64\n %93 = getelementptr inbounds i32, i32* %90, i64 %92\n %94 = load i32, i32* %93, align 4\n %95 = sext i32 %94 to i64\n %96 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %97 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %96, i32 0, i32 0\n %98 = load i32**, i32*** %97, align 8\n %99 = load i32, i32* %11, align 4\n %100 = sext i32 %99 to i64\n %101 = getelementptr inbounds i32*, i32** %98, i64 %100\n %102 = load i32*, i32** %101, align 8\n %103 = load i32, i32* %9, align 4\n %104 = sext i32 %103 to i64\n %105 = getelementptr inbounds i32, i32* %102, i64 %104\n %106 = load i32, i32* %105, align 4\n %107 = sext i32 %106 to i64\n %108 = mul nsw i64 %95, %107\n store i64 %108, i64* %12, align 8\n %109 = load i64, i64* %12, align 8\n %110 = load i64, i64* %10, align 8\n %111 = add nsw i64 %110, %109\n store i64 %111, i64* %10, align 8\n %112 = load i64, i64* %10, align 8\n %113 = icmp sgt i64 %112, 2147483647\n br i1 %113, label %117, label %114\n"]
- 83 -->|true| 117
- 83 -->|false| 114
- 114["Block 114:\n %115 = load i64, i64* %10, align 8\n %116 = icmp slt i64 %115, -2147483648\n br i1 %116, label %117, label %143\n"]
- 114 -->|true| 117
- 114 -->|false| 143
- 117["Block 117:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %13, align 4\n br label %118\n"]
- 117 --> 118
- 118["Block 118:\n %119 = load i32, i32* %13, align 4\n %120 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %121 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %120, i32 0, i32 1\n %122 = load i32, i32* %121, align 8\n %123 = icmp slt i32 %119, %122\n br i1 %123, label %124, label %136\n"]
- 118 -->|true| 124
- 118 -->|false| 136
- 124["Block 124:\n %125 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %126 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %125, i32 0, i32 0\n %127 = load i32**, i32*** %126, align 8\n %128 = load i32, i32* %13, align 4\n %129 = sext i32 %128 to i64\n %130 = getelementptr inbounds i32*, i32** %127, i64 %129\n %131 = load i32*, i32** %130, align 8\n %132 = bitcast i32* %131 to i8*\n call void @free(i8* %132) #7\n br label %133\n"]
- 124 --> 133
- 133["Block 133:\n %134 = load i32, i32* %13, align 4\n %135 = add nsw i32 %134, 1\n store i32 %135, i32* %13, align 4\n br label %118\n"]
- 133 --> 118
- 136["Block 136:\n %137 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %138 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %137, i32 0, i32 0\n %139 = load i32**, i32*** %138, align 8\n %140 = bitcast i32** %139 to i8*\n call void @free(i8* %140) #7\n %141 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %142 = bitcast %struct.Matrix* %141 to i8*\n call void @free(i8* %142) #7\n store %struct.Matrix* null, %struct.Matrix** %3, align 8\n br label %209\n"]
- 136 --> 209
- 143["Block 143:\n br label %144\n"]
- 143 --> 144
- 144["Block 144:\n %145 = load i32, i32* %11, align 4\n %146 = add nsw i32 %145, 1\n store i32 %146, i32* %11, align 4\n br label %77\n"]
- 144 --> 77
- 147["Block 147:\n %148 = load i64, i64* %10, align 8\n %149 = trunc i64 %148 to i32\n %150 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %151 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %150, i32 0, i32 0\n %152 = load i32**, i32*** %151, align 8\n %153 = load i32, i32* %8, align 4\n %154 = sext i32 %153 to i64\n %155 = getelementptr inbounds i32*, i32** %152, i64 %154\n %156 = load i32*, i32** %155, align 8\n %157 = load i32, i32* %9, align 4\n %158 = sext i32 %157 to i64\n %159 = getelementptr inbounds i32, i32* %156, i64 %158\n store i32 %149, i32* %159, align 4\n %160 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %161 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %160, i32 0, i32 0\n %162 = load i32**, i32*** %161, align 8\n %163 = load i32, i32* %8, align 4\n %164 = sext i32 %163 to i64\n %165 = getelementptr inbounds i32*, i32** %162, i64 %164\n %166 = load i32*, i32** %165, align 8\n %167 = load i32, i32* %9, align 4\n %168 = sext i32 %167 to i64\n %169 = getelementptr inbounds i32, i32* %166, i64 %168\n %170 = load i32, i32* %169, align 4\n %171 = call i32 @abs(i32 %170) #8\n %172 = sext i32 %171 to i64\n %173 = load i64, i64* %7, align 8\n %174 = icmp sgt i64 %172, %173\n br i1 %174, label %175, label %189\n"]
- 147 -->|true| 175
- 147 -->|false| 189
- 175["Block 175:\n %176 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %177 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %176, i32 0, i32 0\n %178 = load i32**, i32*** %177, align 8\n %179 = load i32, i32* %8, align 4\n %180 = sext i32 %179 to i64\n %181 = getelementptr inbounds i32*, i32** %178, i64 %180\n %182 = load i32*, i32** %181, align 8\n %183 = load i32, i32* %9, align 4\n %184 = sext i32 %183 to i64\n %185 = getelementptr inbounds i32, i32* %182, i64 %184\n %186 = load i32, i32* %185, align 4\n %187 = call i32 @abs(i32 %186) #8\n %188 = sext i32 %187 to i64\n store i64 %188, i64* %7, align 8\n br label %189\n"]
- 175 --> 189
- 189["Block 189:\n br label %190\n"]
- 189 --> 190
- 190["Block 190:\n %191 = load i32, i32* %9, align 4\n %192 = add nsw i32 %191, 1\n store i32 %192, i32* %9, align 4\n br label %70\n"]
- 190 --> 70
- 193["Block 193:\n br label %194\n"]
- 193 --> 194
- 194["Block 194:\n %195 = load i32, i32* %8, align 4\n %196 = add nsw i32 %195, 1\n store i32 %196, i32* %8, align 4\n br label %63\n"]
- 194 --> 63
- 197["Block 197:\n %198 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %199 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %198, i32 0, i32 1\n %200 = load i32, i32* %199, align 8\n %201 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %202 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %201, i32 0, i32 2\n %203 = load i32, i32* %202, align 4\n %204 = icmp eq i32 %200, %203\n %205 = zext i1 %204 to i32\n %206 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 3\n store i32 %205, i32* %207, align 8\n %208 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n store %struct.Matrix* %208, %struct.Matrix** %3, align 8\n br label %209\n"]
- 197 --> 209
- 209["Block 209:\n %210 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n ret %struct.Matrix* %210\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: insertNode
- graph TD
- 2["Block 2:\n %3 = alloca %struct.Node*, align 8\n %4 = alloca %struct.Node*, align 8\n %5 = alloca i32, align 4\n %6 = alloca %struct.Node*, align 8\n %7 = alloca %struct.Node*, align 8\n %8 = alloca %struct.Node*, align 8\n %9 = alloca i32, align 4\n store %struct.Node* %0, %struct.Node** %4, align 8\n store i32 %1, i32* %5, align 4\n %10 = call noalias i8* @malloc(i64 32) #7\n %11 = bitcast i8* %10 to %struct.Node*\n store %struct.Node* %11, %struct.Node** %6, align 8\n %12 = load %struct.Node*, %struct.Node** %6, align 8\n %13 = icmp ne %struct.Node* %12, null\n br i1 %13, label %16, label %14\n"]:::critical
- 2 -->|true| 16
- 2 -->|false| 14
- 14["Block 14:\n call void @setErrorMessage(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0))\n %15 = load %struct.Node*, %struct.Node** %4, align 8\n store %struct.Node* %15, %struct.Node** %3, align 8\n br label %92\n"]
- 14 --> 92
- 16["Block 16:\n %17 = load i32, i32* %5, align 4\n %18 = load %struct.Node*, %struct.Node** %6, align 8\n %19 = getelementptr inbounds %struct.Node, %struct.Node* %18, i32 0, i32 0\n store i32 %17, i32* %19, align 8\n %20 = load %struct.Node*, %struct.Node** %6, align 8\n %21 = getelementptr inbounds %struct.Node, %struct.Node* %20, i32 0, i32 1\n store %struct.Node* null, %struct.Node** %21, align 8\n %22 = load %struct.Node*, %struct.Node** %6, align 8\n %23 = getelementptr inbounds %struct.Node, %struct.Node* %22, i32 0, i32 2\n store %struct.Node* null, %struct.Node** %23, align 8\n %24 = load %struct.Node*, %struct.Node** %6, align 8\n %25 = getelementptr inbounds %struct.Node, %struct.Node* %24, i32 0, i32 3\n store i32 0, i32* %25, align 8\n %26 = load %struct.Node*, %struct.Node** %4, align 8\n %27 = icmp ne %struct.Node* %26, null\n br i1 %27, label %32, label %28\n"]
- 16 -->|true| 32
- 16 -->|false| 28
- 28["Block 28:\n %29 = load %struct.Node*, %struct.Node** %6, align 8\n %30 = getelementptr inbounds %struct.Node, %struct.Node* %29, i32 0, i32 4\n store i32 0, i32* %30, align 4\n store i32 0, i32* @insertNode.maxDepth, align 4\n %31 = load %struct.Node*, %struct.Node** %6, align 8\n store %struct.Node* %31, %struct.Node** %3, align 8\n br label %92\n"]
- 28 --> 92
- 32["Block 32:\n %33 = load %struct.Node*, %struct.Node** %4, align 8\n store %struct.Node* %33, %struct.Node** %7, align 8\n store %struct.Node* null, %struct.Node** %8, align 8\n store i32 0, i32* %9, align 4\n br label %34\n"]
- 32 --> 34
- 34["Block 34:\n %35 = load %struct.Node*, %struct.Node** %7, align 8\n %36 = icmp ne %struct.Node* %35, null\n br i1 %36, label %37, label %43\n"]
- 34 -->|true| 37
- 34 -->|false| 43
- 37["Block 37:\n %38 = load %struct.Node*, %struct.Node** %7, align 8\n %39 = getelementptr inbounds %struct.Node, %struct.Node* %38, i32 0, i32 0\n %40 = load i32, i32* %39, align 8\n %41 = load i32, i32* %5, align 4\n %42 = icmp slt i32 %40, %41\n br label %43\n"]
- 37 --> 43
- 43["Block 43:\n %44 = phi i1 [ false, %34 ], [ %42, %37 ]\n br i1 %44, label %45, label %59\n"]
- 43 -->|true| 45
- 43 -->|false| 59
- 45["Block 45:\n %46 = load %struct.Node*, %struct.Node** %7, align 8\n store %struct.Node* %46, %struct.Node** %8, align 8\n %47 = load %struct.Node*, %struct.Node** %7, align 8\n %48 = getelementptr inbounds %struct.Node, %struct.Node* %47, i32 0, i32 1\n %49 = load %struct.Node*, %struct.Node** %48, align 8\n store %struct.Node* %49, %struct.Node** %7, align 8\n %50 = load i32, i32* %9, align 4\n %51 = add nsw i32 %50, 1\n store i32 %51, i32* %9, align 4\n %52 = load i32, i32* %9, align 4\n %53 = icmp sgt i32 %52, 1000\n br i1 %53, label %54, label %58\n"]
- 45 -->|true| 54
- 45 -->|false| 58
- 54["Block 54:\n call void @setErrorMessage(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.26, i64 0, i64 0))\n %55 = load %struct.Node*, %struct.Node** %6, align 8\n %56 = bitcast %struct.Node* %55 to i8*\n call void @free(i8* %56) #7\n %57 = load %struct.Node*, %struct.Node** %4, align 8\n store %struct.Node* %57, %struct.Node** %3, align 8\n br label %92\n"]
- 54 --> 92
- 58["Block 58:\n br label %34\n"]
- 58 --> 34
- 59["Block 59:\n %60 = load i32, i32* %9, align 4\n %61 = load i32, i32* @insertNode.maxDepth, align 4\n %62 = icmp sgt i32 %60, %61\n br i1 %62, label %63, label %65\n"]
- 59 -->|true| 63
- 59 -->|false| 65
- 63["Block 63:\n %64 = load i32, i32* %9, align 4\n store i32 %64, i32* @insertNode.maxDepth, align 4\n br label %65\n"]
- 63 --> 65
- 65["Block 65:\n %66 = load i32, i32* %9, align 4\n %67 = load %struct.Node*, %struct.Node** %6, align 8\n %68 = getelementptr inbounds %struct.Node, %struct.Node* %67, i32 0, i32 4\n store i32 %66, i32* %68, align 4\n %69 = load %struct.Node*, %struct.Node** %7, align 8\n %70 = load %struct.Node*, %struct.Node** %6, align 8\n %71 = getelementptr inbounds %struct.Node, %struct.Node* %70, i32 0, i32 1\n store %struct.Node* %69, %struct.Node** %71, align 8\n %72 = load %struct.Node*, %struct.Node** %8, align 8\n %73 = icmp ne %struct.Node* %72, null\n br i1 %73, label %74, label %81\n"]
- 65 -->|true| 74
- 65 -->|false| 81
- 74["Block 74:\n %75 = load %struct.Node*, %struct.Node** %6, align 8\n %76 = load %struct.Node*, %struct.Node** %8, align 8\n %77 = getelementptr inbounds %struct.Node, %struct.Node* %76, i32 0, i32 1\n store %struct.Node* %75, %struct.Node** %77, align 8\n %78 = load %struct.Node*, %struct.Node** %8, align 8\n %79 = load %struct.Node*, %struct.Node** %6, align 8\n %80 = getelementptr inbounds %struct.Node, %struct.Node* %79, i32 0, i32 2\n store %struct.Node* %78, %struct.Node** %80, align 8\n br label %83\n"]
- 74 --> 83
- 81["Block 81:\n %82 = load %struct.Node*, %struct.Node** %6, align 8\n store %struct.Node* %82, %struct.Node** %3, align 8\n br label %92\n"]
- 81 --> 92
- 83["Block 83:\n %84 = load %struct.Node*, %struct.Node** %7, align 8\n %85 = icmp ne %struct.Node* %84, null\n br i1 %85, label %86, label %90\n"]
- 83 -->|true| 86
- 83 -->|false| 90
- 86["Block 86:\n %87 = load %struct.Node*, %struct.Node** %6, align 8\n %88 = load %struct.Node*, %struct.Node** %7, align 8\n %89 = getelementptr inbounds %struct.Node, %struct.Node* %88, i32 0, i32 2\n store %struct.Node* %87, %struct.Node** %89, align 8\n br label %90\n"]
- 86 --> 90
- 90["Block 90:\n %91 = load %struct.Node*, %struct.Node** %4, align 8\n store %struct.Node* %91, %struct.Node** %3, align 8\n br label %92\n"]
- 90 --> 92
- 92["Block 92:\n %93 = load %struct.Node*, %struct.Node** %3, align 8\n ret %struct.Node* %93\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: performSimpleCalculations
- graph TD
- 0["Block 0:\n %1 = alloca i32, align 4\n store i32 100, i32* %1, align 4\n %2 = load i32, i32* %1, align 4\n %3 = icmp sgt i32 %2, 50\n br i1 %3, label %4, label %9\n"]:::critical
- 0 -->|true| 4
- 0 -->|false| 9
- 4["Block 4:\n %5 = load i32, i32* %1, align 4\n %6 = mul nsw i32 %5, 2\n %7 = load i32, i32* @calculationResult, align 4\n %8 = add nsw i32 %7, %6\n store i32 %8, i32* @calculationResult, align 4\n br label %14\n"]
- 4 --> 14
- 9["Block 9:\n %10 = load i32, i32* %1, align 4\n %11 = sdiv i32 %10, 2\n %12 = load i32, i32* @calculationResult, align 4\n %13 = add nsw i32 %12, %11\n store i32 %13, i32* @calculationResult, align 4\n br label %14\n"]
- 9 --> 14
- 14["Block 14:\n %15 = load i32, i32* %1, align 4\n %16 = srem i32 %15, 3\n %17 = icmp eq i32 %16, 0\n br i1 %17, label %18, label %21\n"]:::critical
- 14 -->|true| 18
- 14 -->|false| 21
- 18["Block 18:\n %19 = load i32, i32* @calculationResult, align 4\n %20 = mul nsw i32 %19, 3\n store i32 %20, i32* @calculationResult, align 4\n br label %24\n"]
- 18 --> 24
- 21["Block 21:\n %22 = load i32, i32* @calculationResult, align 4\n %23 = add nsw i32 %22, 3\n store i32 %23, i32* @calculationResult, align 4\n br label %24\n"]
- 21 --> 24
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = icmp sge i32 %25, 150\n br i1 %26, label %27, label %33\n"]:::critical
- 24 -->|true| 27
- 24 -->|false| 33
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = icmp sle i32 %28, 300\n br i1 %29, label %30, label %33\n"]
- 27 -->|true| 30
- 27 -->|false| 33
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = sub nsw i32 %31, 50\n store i32 %32, i32* @calculationResult, align 4\n br label %36\n"]
- 30 --> 36
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = add nsw i32 %34, 50\n store i32 %35, i32* @calculationResult, align 4\n br label %36\n"]
- 33 --> 36
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = srem i32 %37, 2\n %39 = icmp eq i32 %38, 0\n br i1 %39, label %40, label %43\n"]:::critical
- 36 -->|true| 40
- 36 -->|false| 43
- 40["Block 40:\n %41 = load i32, i32* @calculationResult, align 4\n %42 = sdiv i32 %41, 2\n store i32 %42, i32* @calculationResult, align 4\n br label %46\n"]
- 40 --> 46
- 43["Block 43:\n %44 = load i32, i32* @calculationResult, align 4\n %45 = mul nsw i32 %44, 2\n store i32 %45, i32* @calculationResult, align 4\n br label %46\n"]
- 43 --> 46
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = srem i32 %47, 10\n %49 = icmp slt i32 %48, 5\n br i1 %49, label %50, label %53\n"]:::critical
- 46 -->|true| 50
- 46 -->|false| 53
- 50["Block 50:\n %51 = load i32, i32* @calculationResult, align 4\n %52 = add nsw i32 %51, 5\n store i32 %52, i32* @calculationResult, align 4\n br label %56\n"]
- 50 --> 56
- 53["Block 53:\n %54 = load i32, i32* @calculationResult, align 4\n %55 = sub nsw i32 %54, 5\n store i32 %55, i32* @calculationResult, align 4\n br label %56\n"]
- 53 --> 56
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = icmp sgt i32 %57, 1000\n br i1 %58, label %59, label %60\n"]:::critical
- 56 -->|true| 59
- 56 -->|false| 60
- 59["Block 59:\n store i32 1000, i32* @calculationResult, align 4\n br label %63\n"]
- 59 --> 63
- 60["Block 60:\n %61 = load i32, i32* @calculationResult, align 4\n %62 = add nsw i32 %61, 10\n store i32 %62, i32* @calculationResult, align 4\n br label %63\n"]
- 60 --> 63
- 63["Block 63:\n %64 = load i32, i32* @calculationResult, align 4\n %65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %64)\n ret void\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: projectA_main
- graph TD
- 0["Block 0:\n %1 = alloca i32, align 4\n %2 = alloca %struct.DynamicArray*, align 8\n %3 = alloca i32, align 4\n %4 = alloca %struct.Matrix*, align 8\n %5 = alloca %struct.Matrix*, align 8\n %6 = alloca i32, align 4\n %7 = alloca i32, align 4\n %8 = alloca %struct.Matrix*, align 8\n %9 = alloca i32, align 4\n %10 = alloca %struct.Node*, align 8\n %11 = alloca i32, align 4\n %12 = alloca i32, align 4\n %13 = alloca %struct.Node*, align 8\n %14 = alloca %struct.Node*, align 8\n %15 = alloca i32, align 4\n %16 = alloca %struct.Node*, align 8\n %17 = alloca i32, align 4\n %18 = alloca i32, align 4\n %19 = alloca %struct.Node*, align 8\n %20 = call i64 @time(i64* null) #7\n %21 = trunc i64 %20 to i32\n call void @srand(i32 %21) #7\n %22 = call %struct.DynamicArray* @createDynamicArray(i32 10)\n store %struct.DynamicArray* %22, %struct.DynamicArray** %2, align 8\n %23 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %24 = icmp ne %struct.DynamicArray* %23, null\n br i1 %24, label %28, label %25\n"]:::critical
- 0 -->|true| 28
- 0 -->|false| 25
- 25["Block 25:\n %26 = call i8* @getErrorMessage()\n %27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8* %26)\n store i32 -1, i32* %1, align 4\n br label %322\n"]
- 25 --> 322
- 28["Block 28:\n store i32 0, i32* %3, align 4\n br label %29\n"]
- 28 --> 29
- 29["Block 29:\n %30 = load i32, i32* %3, align 4\n %31 = icmp slt i32 %30, 15\n br i1 %31, label %32, label %45\n"]
- 29 -->|true| 32
- 29 -->|false| 45
- 32["Block 32:\n %33 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %34 = call i32 @rand() #7\n %35 = srem i32 %34, 100\n call void @pushBack(%struct.DynamicArray* %33, i32 %35)\n %36 = load i8*, i8** @globalErrorMessage, align 8\n %37 = icmp ne i8* %36, null\n br i1 %37, label %38, label %41\n"]
- 32 -->|true| 38
- 32 -->|false| 41
- 38["Block 38:\n %39 = call i8* @getErrorMessage()\n %40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.29, i64 0, i64 0), i8* %39)\n br label %45\n"]
- 38 --> 45
- 41["Block 41:\n br label %42\n"]
- 41 --> 42
- 42["Block 42:\n %43 = load i32, i32* %3, align 4\n %44 = add nsw i32 %43, 1\n store i32 %44, i32* %3, align 4\n br label %29\n"]
- 42 --> 29
- 45["Block 45:\n %46 = call %struct.Matrix* @createMatrix(i32 3, i32 3)\n store %struct.Matrix* %46, %struct.Matrix** %4, align 8\n %47 = call %struct.Matrix* @createMatrix(i32 3, i32 3)\n store %struct.Matrix* %47, %struct.Matrix** %5, align 8\n %48 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %49 = icmp ne %struct.Matrix* %48, null\n br i1 %49, label %50, label %53\n"]
- 45 -->|true| 50
- 45 -->|false| 53
- 50["Block 50:\n %51 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %52 = icmp ne %struct.Matrix* %51, null\n br i1 %52, label %74, label %53\n"]
- 50 -->|true| 74
- 50 -->|false| 53
- 53["Block 53:\n %54 = call i8* @getErrorMessage()\n %55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8* %54)\n %56 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %57 = icmp ne %struct.Matrix* %56, null\n br i1 %57, label %58, label %61\n"]
- 53 -->|true| 58
- 53 -->|false| 61
- 58["Block 58:\n %59 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %60 = bitcast %struct.Matrix* %59 to i8*\n call void @free(i8* %60) #7\n br label %61\n"]
- 58 --> 61
- 61["Block 61:\n %62 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %63 = icmp ne %struct.Matrix* %62, null\n br i1 %63, label %64, label %67\n"]
- 61 -->|true| 64
- 61 -->|false| 67
- 64["Block 64:\n %65 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %66 = bitcast %struct.Matrix* %65 to i8*\n call void @free(i8* %66) #7\n br label %67\n"]
- 64 --> 67
- 67["Block 67:\n %68 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %69 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %68, i32 0, i32 0\n %70 = load i32*, i32** %69, align 8\n %71 = bitcast i32* %70 to i8*\n call void @free(i8* %71) #7\n %72 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %73 = bitcast %struct.DynamicArray* %72 to i8*\n call void @free(i8* %73) #7\n store i32 -1, i32* %1, align 4\n br label %322\n"]
- 67 --> 322
- 74["Block 74:\n store i32 0, i32* %6, align 4\n br label %75\n"]
- 74 --> 75
- 75["Block 75:\n %76 = load i32, i32* %6, align 4\n %77 = icmp slt i32 %76, 3\n br i1 %77, label %78, label %114\n"]
- 75 -->|true| 78
- 75 -->|false| 114
- 78["Block 78:\n store i32 0, i32* %7, align 4\n br label %79\n"]
- 78 --> 79
- 79["Block 79:\n %80 = load i32, i32* %7, align 4\n %81 = icmp slt i32 %80, 3\n br i1 %81, label %82, label %110\n"]
- 79 -->|true| 82
- 79 -->|false| 110
- 82["Block 82:\n %83 = call i32 @rand() #7\n %84 = srem i32 %83, 10\n %85 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %86 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %85, i32 0, i32 0\n %87 = load i32**, i32*** %86, align 8\n %88 = load i32, i32* %6, align 4\n %89 = sext i32 %88 to i64\n %90 = getelementptr inbounds i32*, i32** %87, i64 %89\n %91 = load i32*, i32** %90, align 8\n %92 = load i32, i32* %7, align 4\n %93 = sext i32 %92 to i64\n %94 = getelementptr inbounds i32, i32* %91, i64 %93\n store i32 %84, i32* %94, align 4\n %95 = call i32 @rand() #7\n %96 = srem i32 %95, 10\n %97 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %98 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %97, i32 0, i32 0\n %99 = load i32**, i32*** %98, align 8\n %100 = load i32, i32* %6, align 4\n %101 = sext i32 %100 to i64\n %102 = getelementptr inbounds i32*, i32** %99, i64 %101\n %103 = load i32*, i32** %102, align 8\n %104 = load i32, i32* %7, align 4\n %105 = sext i32 %104 to i64\n %106 = getelementptr inbounds i32, i32* %103, i64 %105\n store i32 %96, i32* %106, align 4\n br label %107\n"]
- 82 --> 107
- 107["Block 107:\n %108 = load i32, i32* %7, align 4\n %109 = add nsw i32 %108, 1\n store i32 %109, i32* %7, align 4\n br label %79\n"]
- 107 --> 79
- 110["Block 110:\n br label %111\n"]
- 110 --> 111
- 111["Block 111:\n %112 = load i32, i32* %6, align 4\n %113 = add nsw i32 %112, 1\n store i32 %113, i32* %6, align 4\n br label %75\n"]
- 111 --> 75
- 114["Block 114:\n %115 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %116 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %117 = call %struct.Matrix* @multiplyMatrices(%struct.Matrix* %115, %struct.Matrix* %116)\n store %struct.Matrix* %117, %struct.Matrix** %8, align 8\n %118 = load %struct.Matrix*, %struct.Matrix** %8, align 8\n %119 = icmp ne %struct.Matrix* %118, null\n br i1 %119, label %168, label %120\n"]
- 114 -->|true| 168
- 114 -->|false| 120
- 120["Block 120:\n %121 = call i8* @getErrorMessage()\n %122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8* %121)\n store i32 0, i32* %9, align 4\n br label %123\n"]
- 120 --> 123
- 123["Block 123:\n %124 = load i32, i32* %9, align 4\n %125 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %126 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %125, i32 0, i32 1\n %127 = load i32, i32* %126, align 8\n %128 = icmp slt i32 %124, %127\n br i1 %128, label %129, label %149\n"]
- 123 -->|true| 129
- 123 -->|false| 149
- 129["Block 129:\n %130 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %131 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %130, i32 0, i32 0\n %132 = load i32**, i32*** %131, align 8\n %133 = load i32, i32* %9, align 4\n %134 = sext i32 %133 to i64\n %135 = getelementptr inbounds i32*, i32** %132, i64 %134\n %136 = load i32*, i32** %135, align 8\n %137 = bitcast i32* %136 to i8*\n call void @free(i8* %137) #7\n %138 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %139 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %138, i32 0, i32 0\n %140 = load i32**, i32*** %139, align 8\n %141 = load i32, i32* %9, align 4\n %142 = sext i32 %141 to i64\n %143 = getelementptr inbounds i32*, i32** %140, i64 %142\n %144 = load i32*, i32** %143, align 8\n %145 = bitcast i32* %144 to i8*\n call void @free(i8* %145) #7\n br label %146\n"]
- 129 --> 146
- 146["Block 146:\n %147 = load i32, i32* %9, align 4\n %148 = add nsw i32 %147, 1\n store i32 %148, i32* %9, align 4\n br label %123\n"]
- 146 --> 123
- 149["Block 149:\n %150 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %151 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %150, i32 0, i32 0\n %152 = load i32**, i32*** %151, align 8\n %153 = bitcast i32** %152 to i8*\n call void @free(i8* %153) #7\n %154 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %155 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %154, i32 0, i32 0\n %156 = load i32**, i32*** %155, align 8\n %157 = bitcast i32** %156 to i8*\n call void @free(i8* %157) #7\n %158 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %159 = bitcast %struct.Matrix* %158 to i8*\n call void @free(i8* %159) #7\n %160 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %161 = bitcast %struct.Matrix* %160 to i8*\n call void @free(i8* %161) #7\n %162 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %163 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %162, i32 0, i32 0\n %164 = load i32*, i32** %163, align 8\n %165 = bitcast i32* %164 to i8*\n call void @free(i8* %165) #7\n %166 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %167 = bitcast %struct.DynamicArray* %166 to i8*\n call void @free(i8* %167) #7\n store i32 -1, i32* %1, align 4\n br label %322\n"]
- 149 --> 322
- 168["Block 168:\n store %struct.Node* null, %struct.Node** %10, align 8\n store i32 0, i32* %11, align 4\n br label %169\n"]
- 168 --> 169
- 169["Block 169:\n %170 = load i32, i32* %11, align 4\n %171 = icmp slt i32 %170, 5\n br i1 %171, label %172, label %186\n"]
- 169 -->|true| 172
- 169 -->|false| 186
- 172["Block 172:\n %173 = load %struct.Node*, %struct.Node** %10, align 8\n %174 = call i32 @rand() #7\n %175 = srem i32 %174, 50\n %176 = call %struct.Node* @insertNode(%struct.Node* %173, i32 %175)\n store %struct.Node* %176, %struct.Node** %10, align 8\n %177 = load i8*, i8** @globalErrorMessage, align 8\n %178 = icmp ne i8* %177, null\n br i1 %178, label %179, label %182\n"]
- 172 -->|true| 179
- 172 -->|false| 182
- 179["Block 179:\n %180 = call i8* @getErrorMessage()\n %181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i8* %180)\n br label %186\n"]
- 179 --> 186
- 182["Block 182:\n br label %183\n"]
- 182 --> 183
- 183["Block 183:\n %184 = load i32, i32* %11, align 4\n %185 = add nsw i32 %184, 1\n store i32 %185, i32* %11, align 4\n br label %169\n"]
- 183 --> 169
- 186["Block 186:\n %187 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %188 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %187, i32 0, i32 0\n %189 = load i32*, i32** %188, align 8\n %190 = bitcast i32* %189 to i8*\n call void @free(i8* %190) #7\n %191 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %192 = bitcast %struct.DynamicArray* %191 to i8*\n call void @free(i8* %192) #7\n store i32 0, i32* %12, align 4\n br label %193\n"]
- 186 --> 193
- 193["Block 193:\n %194 = load i32, i32* %12, align 4\n %195 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %196 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %195, i32 0, i32 1\n %197 = load i32, i32* %196, align 8\n %198 = icmp slt i32 %194, %197\n br i1 %198, label %199, label %227\n"]
- 193 -->|true| 199
- 193 -->|false| 227
- 199["Block 199:\n %200 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %201 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %200, i32 0, i32 0\n %202 = load i32**, i32*** %201, align 8\n %203 = load i32, i32* %12, align 4\n %204 = sext i32 %203 to i64\n %205 = getelementptr inbounds i32*, i32** %202, i64 %204\n %206 = load i32*, i32** %205, align 8\n %207 = bitcast i32* %206 to i8*\n call void @free(i8* %207) #7\n %208 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %209 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %208, i32 0, i32 0\n %210 = load i32**, i32*** %209, align 8\n %211 = load i32, i32* %12, align 4\n %212 = sext i32 %211 to i64\n %213 = getelementptr inbounds i32*, i32** %210, i64 %212\n %214 = load i32*, i32** %213, align 8\n %215 = bitcast i32* %214 to i8*\n call void @free(i8* %215) #7\n %216 = load %struct.Matrix*, %struct.Matrix** %8, align 8\n %217 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %216, i32 0, i32 0\n %218 = load i32**, i32*** %217, align 8\n %219 = load i32, i32* %12, align 4\n %220 = sext i32 %219 to i64\n %221 = getelementptr inbounds i32*, i32** %218, i64 %220\n %222 = load i32*, i32** %221, align 8\n %223 = bitcast i32* %222 to i8*\n call void @free(i8* %223) #7\n br label %224\n"]
- 199 --> 224
- 224["Block 224:\n %225 = load i32, i32* %12, align 4\n %226 = add nsw i32 %225, 1\n store i32 %226, i32* %12, align 4\n br label %193\n"]
- 224 --> 193
- 227["Block 227:\n %228 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %229 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %228, i32 0, i32 0\n %230 = load i32**, i32*** %229, align 8\n %231 = bitcast i32** %230 to i8*\n call void @free(i8* %231) #7\n %232 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %233 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %232, i32 0, i32 0\n %234 = load i32**, i32*** %233, align 8\n %235 = bitcast i32** %234 to i8*\n call void @free(i8* %235) #7\n %236 = load %struct.Matrix*, %struct.Matrix** %8, align 8\n %237 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %236, i32 0, i32 0\n %238 = load i32**, i32*** %237, align 8\n %239 = bitcast i32** %238 to i8*\n call void @free(i8* %239) #7\n %240 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %241 = bitcast %struct.Matrix* %240 to i8*\n call void @free(i8* %241) #7\n %242 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %243 = bitcast %struct.Matrix* %242 to i8*\n call void @free(i8* %243) #7\n %244 = load %struct.Matrix*, %struct.Matrix** %8, align 8\n %245 = bitcast %struct.Matrix* %244 to i8*\n call void @free(i8* %245) #7\n %246 = load %struct.Node*, %struct.Node** %10, align 8\n %247 = icmp ne %struct.Node* %246, null\n br i1 %247, label %248, label %316\n"]
- 227 -->|true| 248
- 227 -->|false| 316
- 248["Block 248:\n %249 = load %struct.Node*, %struct.Node** %10, align 8\n store %struct.Node* %249, %struct.Node** %13, align 8\n %250 = load %struct.Node*, %struct.Node** %10, align 8\n store %struct.Node* %250, %struct.Node** %14, align 8\n store i32 0, i32* %15, align 4\n br label %251\n"]
- 248 --> 251
- 251["Block 251:\n %252 = load %struct.Node*, %struct.Node** %14, align 8\n %253 = icmp ne %struct.Node* %252, null\n br i1 %253, label %254, label %259\n"]
- 251 -->|true| 254
- 251 -->|false| 259
- 254["Block 254:\n %255 = load %struct.Node*, %struct.Node** %14, align 8\n %256 = getelementptr inbounds %struct.Node, %struct.Node* %255, i32 0, i32 1\n %257 = load %struct.Node*, %struct.Node** %256, align 8\n %258 = icmp ne %struct.Node* %257, null\n br label %259\n"]
- 254 --> 259
- 259["Block 259:\n %260 = phi i1 [ false, %251 ], [ %258, %254 ]\n br i1 %260, label %261, label %275\n"]
- 259 -->|true| 261
- 259 -->|false| 275
- 261["Block 261:\n %262 = load %struct.Node*, %struct.Node** %13, align 8\n %263 = getelementptr inbounds %struct.Node, %struct.Node* %262, i32 0, i32 1\n %264 = load %struct.Node*, %struct.Node** %263, align 8\n store %struct.Node* %264, %struct.Node** %13, align 8\n %265 = load %struct.Node*, %struct.Node** %14, align 8\n %266 = getelementptr inbounds %struct.Node, %struct.Node* %265, i32 0, i32 1\n %267 = load %struct.Node*, %struct.Node** %266, align 8\n %268 = getelementptr inbounds %struct.Node, %struct.Node* %267, i32 0, i32 1\n %269 = load %struct.Node*, %struct.Node** %268, align 8\n store %struct.Node* %269, %struct.Node** %14, align 8\n %270 = load %struct.Node*, %struct.Node** %13, align 8\n %271 = load %struct.Node*, %struct.Node** %14, align 8\n %272 = icmp eq %struct.Node* %270, %271\n br i1 %272, label %273, label %274\n"]
- 261 -->|true| 273
- 261 -->|false| 274
- 273["Block 273:\n store i32 1, i32* %15, align 4\n br label %275\n"]
- 273 --> 275
- 274["Block 274:\n br label %251\n"]
- 274 --> 251
- 275["Block 275:\n %276 = load i32, i32* %15, align 4\n %277 = icmp ne i32 %276, 0\n br i1 %277, label %278, label %304\n"]
- 275 -->|true| 278
- 275 -->|false| 304
- 278["Block 278:\n call void @setErrorMessage(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.31, i64 0, i64 0))\n %279 = load %struct.Node*, %struct.Node** %10, align 8\n store %struct.Node* %279, %struct.Node** %16, align 8\n store i32 1000, i32* %17, align 4\n store i32 0, i32* %18, align 4\n br label %280\n"]
- 278 --> 280
- 280["Block 280:\n %281 = load %struct.Node*, %struct.Node** %16, align 8\n %282 = icmp ne %struct.Node* %281, null\n br i1 %282, label %283, label %287\n"]
- 280 -->|true| 283
- 280 -->|false| 287
- 283["Block 283:\n %284 = load i32, i32* %18, align 4\n %285 = load i32, i32* %17, align 4\n %286 = icmp slt i32 %284, %285\n br label %287\n"]
- 283 --> 287
- 287["Block 287:\n %288 = phi i1 [ false, %280 ], [ %286, %283 ]\n br i1 %288, label %289, label %303\n"]
- 287 -->|true| 289
- 287 -->|false| 303
- 289["Block 289:\n %290 = load %struct.Node*, %struct.Node** %16, align 8\n %291 = getelementptr inbounds %struct.Node, %struct.Node* %290, i32 0, i32 3\n %292 = load i32, i32* %291, align 8\n %293 = icmp ne i32 %292, 0\n br i1 %293, label %294, label %295\n"]
- 289 -->|true| 294
- 289 -->|false| 295
- 294["Block 294:\n br label %303\n"]
- 294 --> 303
- 295["Block 295:\n %296 = load %struct.Node*, %struct.Node** %16, align 8\n %297 = getelementptr inbounds %struct.Node, %struct.Node* %296, i32 0, i32 3\n store i32 1, i32* %297, align 8\n %298 = load %struct.Node*, %struct.Node** %16, align 8\n %299 = getelementptr inbounds %struct.Node, %struct.Node* %298, i32 0, i32 1\n %300 = load %struct.Node*, %struct.Node** %299, align 8\n store %struct.Node* %300, %struct.Node** %16, align 8\n %301 = load i32, i32* %18, align 4\n %302 = add nsw i32 %301, 1\n store i32 %302, i32* %18, align 4\n br label %280\n"]
- 295 --> 280
- 303["Block 303:\n br label %304\n"]
- 303 --> 304
- 304["Block 304:\n br label %305\n"]
- 304 --> 305
- 305["Block 305:\n %306 = load %struct.Node*, %struct.Node** %10, align 8\n %307 = icmp ne %struct.Node* %306, null\n br i1 %307, label %308, label %315\n"]
- 305 -->|true| 308
- 305 -->|false| 315
- 308["Block 308:\n %309 = load %struct.Node*, %struct.Node** %10, align 8\n store %struct.Node* %309, %struct.Node** %19, align 8\n %310 = load %struct.Node*, %struct.Node** %10, align 8\n %311 = getelementptr inbounds %struct.Node, %struct.Node* %310, i32 0, i32 1\n %312 = load %struct.Node*, %struct.Node** %311, align 8\n store %struct.Node* %312, %struct.Node** %10, align 8\n %313 = load %struct.Node*, %struct.Node** %19, align 8\n %314 = bitcast %struct.Node* %313 to i8*\n call void @free(i8* %314) #7\n br label %305\n"]
- 308 --> 305
- 315["Block 315:\n br label %316\n"]
- 315 --> 316
- 316["Block 316:\n %317 = load i8*, i8** @globalErrorMessage, align 8\n %318 = icmp ne i8* %317, null\n br i1 %318, label %319, label %321\n"]
- 316 -->|true| 319
- 316 -->|false| 321
- 319["Block 319:\n %320 = load i8*, i8** @globalErrorMessage, align 8\n call void @free(i8* %320) #7\n br label %321\n"]
- 319 --> 321
- 321["Block 321:\n call void @performSimpleCalculations()\n store i32 0, i32* %1, align 4\n br label %322\n"]
- 321 --> 322
- 322["Block 322:\n %323 = load i32, i32* %1, align 4\n ret i32 %323\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: calculateDistance
- graph TD
- 3["Block 3:\n %4 = alloca double, align 8\n %5 = alloca i32*, align 8\n %6 = alloca double, align 8\n %7 = alloca double, align 8\n %8 = alloca double, align 8\n store i32* %2, i32** %5, align 8\n %9 = load i32*, i32** %5, align 8\n store i32 0, i32* %9, align 4\n %10 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 3\n %11 = load double, double* %10, align 8\n %12 = fcmp ole double %11, 0.000000e+00\n br i1 %12, label %17, label %13\n"]:::critical
- 3 -->|true| 17
- 3 -->|false| 13
- 13["Block 13:\n %14 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %15 = load double, double* %14, align 8\n %16 = fcmp ole double %15, 0.000000e+00\n br i1 %16, label %17, label %19\n"]
- 13 -->|true| 17
- 13 -->|false| 19
- 17["Block 17:\n %18 = load i32*, i32** %5, align 8\n store i32 1, i32* %18, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %4, align 8\n br label %101\n"]
- 17 --> 101
- 19["Block 19:\n %20 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 0\n %21 = load i32, i32* %20, align 8\n %22 = call i32 @abs(i32 %21) #7\n %23 = icmp sgt i32 %22, 1000\n br i1 %23, label %39, label %24\n"]
- 19 -->|true| 39
- 19 -->|false| 24
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 1\n %26 = load i32, i32* %25, align 4\n %27 = call i32 @abs(i32 %26) #7\n %28 = icmp sgt i32 %27, 1000\n br i1 %28, label %39, label %29\n"]
- 24 -->|true| 39
- 24 -->|false| 29
- 29["Block 29:\n %30 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %31 = load i32, i32* %30, align 8\n %32 = call i32 @abs(i32 %31) #7\n %33 = icmp sgt i32 %32, 1000\n br i1 %33, label %39, label %34\n"]
- 29 -->|true| 39
- 29 -->|false| 34
- 34["Block 34:\n %35 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %36 = load i32, i32* %35, align 4\n %37 = call i32 @abs(i32 %36) #7\n %38 = icmp sgt i32 %37, 1000\n br i1 %38, label %39, label %41\n"]
- 34 -->|true| 39
- 34 -->|false| 41
- 39["Block 39:\n %40 = load i32*, i32** %5, align 8\n store i32 3, i32* %40, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %4, align 8\n br label %101\n"]
- 39 --> 101
- 41["Block 41:\n %42 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %43 = load i32, i32* %42, align 8\n %44 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 0\n %45 = load i32, i32* %44, align 8\n %46 = sub nsw i32 %43, %45\n %47 = sitofp i32 %46 to double\n %48 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %49 = load double, double* %48, align 8\n %50 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 3\n %51 = load double, double* %50, align 8\n %52 = fdiv double %49, %51\n %53 = call double @sqrt(double %52) #8\n %54 = fmul double %47, %53\n store double %54, double* %6, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %56 = load i32, i32* %55, align 4\n %57 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 1\n %58 = load i32, i32* %57, align 4\n %59 = sub nsw i32 %56, %58\n %60 = sitofp i32 %59 to double\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %62 = load double, double* %61, align 8\n %63 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 3\n %64 = load double, double* %63, align 8\n %65 = fdiv double %62, %64\n %66 = call double @sqrt(double %65) #8\n %67 = fmul double %60, %66\n store double %67, double* %7, align 8\n %68 = load double, double* %6, align 8\n %69 = call double @llvm.fabs.f64(double %68)\n %70 = fcmp ogt double %69, 1.000000e+03\n br i1 %70, label %75, label %71\n"]
- 41 -->|true| 75
- 41 -->|false| 71
- 71["Block 71:\n %72 = load double, double* %7, align 8\n %73 = call double @llvm.fabs.f64(double %72)\n %74 = fcmp ogt double %73, 1.000000e+03\n br i1 %74, label %75, label %77\n"]
- 71 -->|true| 75
- 71 -->|false| 77
- 75["Block 75:\n %76 = load i32*, i32** %5, align 8\n store i32 5, i32* %76, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %4, align 8\n br label %101\n"]
- 75 --> 101
- 77["Block 77:\n %78 = load double, double* %6, align 8\n %79 = load double, double* %6, align 8\n %80 = fmul double %78, %79\n %81 = load double, double* %7, align 8\n %82 = load double, double* %7, align 8\n %83 = fmul double %81, %82\n %84 = fadd double %80, %83\n %85 = call double @sqrt(double %84) #8\n store double %85, double* %8, align 8\n %86 = load double, double* %8, align 8\n %87 = fcmp uno double %86, %86\n br i1 %87, label %97, label %88\n"]
- 77 -->|true| 97
- 77 -->|false| 88
- 88["Block 88:\n %89 = load double, double* %8, align 8\n %90 = call double @llvm.fabs.f64(double %89) #9\n %91 = fcmp oeq double %90, 0x7FF0000000000000\n %92 = bitcast double %89 to i64\n %93 = icmp slt i64 %92, 0\n %94 = select i1 %93, i32 -1, i32 1\n %95 = select i1 %91, i32 %94, i32 0\n %96 = icmp ne i32 %95, 0\n br i1 %96, label %97, label %99\n"]
- 88 -->|true| 97
- 88 -->|false| 99
- 97["Block 97:\n %98 = load i32*, i32** %5, align 8\n store i32 8, i32* %98, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %4, align 8\n br label %101\n"]
- 97 --> 101
- 99["Block 99:\n %100 = load double, double* %8, align 8\n store double %100, double* %4, align 8\n br label %101\n"]
- 99 --> 101
- 101["Block 101:\n %102 = load double, double* %4, align 8\n ret double %102\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: calculateCircleArea
- graph TD
- 2["Block 2:\n %3 = alloca double, align 8\n %4 = alloca i32*, align 8\n %5 = alloca double, align 8\n store i32* %1, i32** %4, align 8\n %6 = load i32*, i32** %4, align 8\n store i32 0, i32* %6, align 4\n %7 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 2\n %8 = load i32, i32* %7, align 8\n %9 = icmp ne i32 %8, 0\n br i1 %9, label %12, label %10\n"]:::critical
- 2 -->|true| 12
- 2 -->|false| 10
- 10["Block 10:\n %11 = load i32*, i32** %4, align 8\n store i32 1, i32* %11, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.36, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 10 --> 85
- 12["Block 12:\n %13 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1\n %14 = load double, double* %13, align 8\n %15 = fcmp ole double %14, 0.000000e+00\n br i1 %15, label %16, label %18\n"]
- 12 -->|true| 16
- 12 -->|false| 18
- 16["Block 16:\n %17 = load i32*, i32** %4, align 8\n store i32 1, i32* %17, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.37, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 16 --> 85
- 18["Block 18:\n %19 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1\n %20 = load double, double* %19, align 8\n %21 = fcmp ogt double %20, 1.000000e+03\n br i1 %21, label %22, label %24\n"]
- 18 -->|true| 22
- 18 -->|false| 24
- 22["Block 22:\n %23 = load i32*, i32** %4, align 8\n store i32 3, i32* %23, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.38, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 22 --> 85
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0\n %26 = getelementptr inbounds %struct.Point, %struct.Point* %25, i32 0, i32 0\n %27 = load i32, i32* %26, align 8\n %28 = call i32 @abs(i32 %27) #7\n %29 = icmp sgt i32 %28, 1000\n br i1 %29, label %36, label %30\n"]
- 24 -->|true| 36
- 24 -->|false| 30
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0\n %32 = getelementptr inbounds %struct.Point, %struct.Point* %31, i32 0, i32 1\n %33 = load i32, i32* %32, align 4\n %34 = call i32 @abs(i32 %33) #7\n %35 = icmp sgt i32 %34, 1000\n br i1 %35, label %36, label %38\n"]
- 30 -->|true| 36
- 30 -->|false| 38
- 36["Block 36:\n %37 = load i32*, i32** %4, align 8\n store i32 3, i32* %37, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.39, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 36 --> 85
- 38["Block 38:\n %39 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1\n %40 = load double, double* %39, align 8\n %41 = fmul double 3.141590e+00, %40\n %42 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 1\n %43 = load double, double* %42, align 8\n %44 = fmul double %41, %43\n store double %44, double* %5, align 8\n %45 = load double, double* %5, align 8\n %46 = fcmp uno double %45, %45\n br i1 %46, label %56, label %47\n"]
- 38 -->|true| 56
- 38 -->|false| 47
- 47["Block 47:\n %48 = load double, double* %5, align 8\n %49 = call double @llvm.fabs.f64(double %48) #8\n %50 = fcmp oeq double %49, 0x7FF0000000000000\n %51 = bitcast double %48 to i64\n %52 = icmp slt i64 %51, 0\n %53 = select i1 %52, i32 -1, i32 1\n %54 = select i1 %50, i32 %53, i32 0\n %55 = icmp ne i32 %54, 0\n br i1 %55, label %56, label %58\n"]
- 47 -->|true| 56
- 47 -->|false| 58
- 56["Block 56:\n %57 = load i32*, i32** %4, align 8\n store i32 5, i32* %57, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.40, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 56 --> 85
- 58["Block 58:\n %59 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 3\n %60 = getelementptr inbounds [256 x i8], [256 x i8]* %59, i64 0, i64 0\n %61 = call i32 @strcmp(i8* %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.41, i64 0, i64 0)) #9\n %62 = icmp eq i32 %61, 0\n br i1 %62, label %63, label %65\n"]
- 58 -->|true| 63
- 58 -->|false| 65
- 63["Block 63:\n %64 = load double, double* %5, align 8\n store double %64, double* %3, align 8\n br label %85\n"]
- 63 --> 85
- 65["Block 65:\n %66 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 3\n %67 = getelementptr inbounds [256 x i8], [256 x i8]* %66, i64 0, i64 0\n %68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.42, i64 0, i64 0)) #9\n %69 = icmp eq i32 %68, 0\n br i1 %69, label %70, label %83\n"]
- 65 -->|true| 70
- 65 -->|false| 83
- 70["Block 70:\n %71 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %71, i32 0, i32 3\n %73 = load double, double* %72, align 8\n %74 = fcmp ole double %73, 0.000000e+00\n br i1 %74, label %75, label %77\n"]
- 70 -->|true| 75
- 70 -->|false| 77
- 75["Block 75:\n %76 = load i32*, i32** %4, align 8\n store i32 1, i32* %76, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.43, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 75 --> 85
- 77["Block 77:\n %78 = load double, double* %5, align 8\n %79 = getelementptr inbounds %struct.Circle, %struct.Circle* %0, i32 0, i32 0\n %80 = getelementptr inbounds %struct.Point, %struct.Point* %79, i32 0, i32 3\n %81 = load double, double* %80, align 8\n %82 = fmul double %78, %81\n store double %82, double* %3, align 8\n br label %85\n"]
- 77 --> 85
- 83["Block 83:\n %84 = load i32*, i32** %4, align 8\n store i32 1, i32* %84, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.44, i64 0, i64 0))\n store double -1.000000e+00, double* %3, align 8\n br label %85\n"]
- 83 --> 85
- 85["Block 85:\n %86 = load double, double* %3, align 8\n ret double %86\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: validateMatrix
- graph TD
- 1["Block 1:\n %2 = alloca i32, align 4\n %3 = alloca %struct.Matrix*, align 8\n %4 = alloca i32, align 4\n store %struct.Matrix* %0, %struct.Matrix** %3, align 8\n %5 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %6 = icmp ne %struct.Matrix* %5, null\n br i1 %6, label %8, label %7\n"]:::critical
- 1 -->|true| 8
- 1 -->|false| 7
- 7["Block 7:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %2, align 4\n br label %72\n"]
- 7 --> 72
- 8["Block 8:\n %9 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %10 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %9, i32 0, i32 0\n %11 = load i32**, i32*** %10, align 8\n %12 = icmp ne i32** %11, null\n br i1 %12, label %14, label %13\n"]
- 8 -->|true| 14
- 8 -->|false| 13
- 13["Block 13:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %2, align 4\n br label %72\n"]
- 13 --> 72
- 14["Block 14:\n %15 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %16 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %15, i32 0, i32 1\n %17 = load i32, i32* %16, align 8\n %18 = icmp slt i32 %17, 1\n br i1 %18, label %24, label %19\n"]
- 14 -->|true| 24
- 14 -->|false| 19
- 19["Block 19:\n %20 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %21 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %20, i32 0, i32 2\n %22 = load i32, i32* %21, align 4\n %23 = icmp slt i32 %22, 1\n br i1 %23, label %24, label %25\n"]
- 19 -->|true| 24
- 19 -->|false| 25
- 24["Block 24:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %2, align 4\n br label %72\n"]
- 24 --> 72
- 25["Block 25:\n %26 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %27 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %26, i32 0, i32 1\n %28 = load i32, i32* %27, align 8\n %29 = icmp sgt i32 %28, 100\n br i1 %29, label %35, label %30\n"]
- 25 -->|true| 35
- 25 -->|false| 30
- 30["Block 30:\n %31 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %32 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %31, i32 0, i32 2\n %33 = load i32, i32* %32, align 4\n %34 = icmp sgt i32 %33, 100\n br i1 %34, label %35, label %36\n"]
- 30 -->|true| 35
- 30 -->|false| 36
- 35["Block 35:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %2, align 4\n br label %72\n"]
- 35 --> 72
- 36["Block 36:\n store i32 0, i32* %4, align 4\n br label %37\n"]
- 36 --> 37
- 37["Block 37:\n %38 = load i32, i32* %4, align 4\n %39 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %40 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %39, i32 0, i32 1\n %41 = load i32, i32* %40, align 8\n %42 = icmp slt i32 %38, %41\n br i1 %42, label %43, label %57\n"]
- 37 -->|true| 43
- 37 -->|false| 57
- 43["Block 43:\n %44 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %45 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %44, i32 0, i32 0\n %46 = load i32**, i32*** %45, align 8\n %47 = load i32, i32* %4, align 4\n %48 = sext i32 %47 to i64\n %49 = getelementptr inbounds i32*, i32** %46, i64 %48\n %50 = load i32*, i32** %49, align 8\n %51 = icmp ne i32* %50, null\n br i1 %51, label %53, label %52\n"]
- 43 -->|true| 53
- 43 -->|false| 52
- 52["Block 52:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %2, align 4\n br label %72\n"]
- 52 --> 72
- 53["Block 53:\n br label %54\n"]
- 53 --> 54
- 54["Block 54:\n %55 = load i32, i32* %4, align 4\n %56 = add nsw i32 %55, 1\n store i32 %56, i32* %4, align 4\n br label %37\n"]
- 54 --> 37
- 57["Block 57:\n %58 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %59 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %58, i32 0, i32 1\n %60 = load i32, i32* %59, align 8\n %61 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %62 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %61, i32 0, i32 2\n %63 = load i32, i32* %62, align 4\n %64 = icmp eq i32 %60, %63\n %65 = zext i1 %64 to i32\n %66 = load %struct.Matrix*, %struct.Matrix** %3, align 8\n %67 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %66, i32 0, i32 3\n %68 = load i32, i32* %67, align 8\n %69 = icmp ne i32 %65, %68\n br i1 %69, label %70, label %71\n"]
- 57 -->|true| 70
- 57 -->|false| 71
- 70["Block 70:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %2, align 4\n br label %72\n"]
- 70 --> 72
- 71["Block 71:\n store i32 0, i32* %2, align 4\n br label %72\n"]
- 71 --> 72
- 72["Block 72:\n %73 = load i32, i32* %2, align 4\n ret i32 %73\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: removeDuplicates
- graph TD
- 1["Block 1:\n %2 = alloca %struct.DynamicArray*, align 8\n %3 = alloca i32, align 4\n %4 = alloca i32, align 4\n %5 = alloca i32, align 4\n store %struct.DynamicArray* %0, %struct.DynamicArray** %2, align 8\n %6 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %7 = icmp ne %struct.DynamicArray* %6, null\n br i1 %7, label %8, label %13\n"]:::critical
- 1 -->|true| 8
- 1 -->|false| 13
- 8["Block 8:\n %9 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %10 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %9, i32 0, i32 0\n %11 = load i32*, i32** %10, align 8\n %12 = icmp ne i32* %11, null\n br i1 %12, label %14, label %13\n"]
- 8 -->|true| 14
- 8 -->|false| 13
- 13["Block 13:\n call void @setErrorMessage(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.49, i64 0, i64 0))\n br label %81\n"]
- 13 --> 81
- 14["Block 14:\n %15 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %16 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %15, i32 0, i32 1\n %17 = load i32, i32* %16, align 8\n %18 = icmp sle i32 %17, 1\n br i1 %18, label %19, label %20\n"]
- 14 -->|true| 19
- 14 -->|false| 20
- 19["Block 19:\n br label %81\n"]
- 19 --> 81
- 20["Block 20:\n store i32 0, i32* %3, align 4\n %21 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %22 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %21, i32 0, i32 0\n %23 = load i32*, i32** %22, align 8\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %25 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %24, i32 0, i32 1\n %26 = load i32, i32* %25, align 8\n %27 = sub nsw i32 %26, 1\n call void @quickSort(i32* %23, i32 0, i32 %27, i32* %3)\n %28 = load i32, i32* %3, align 4\n %29 = icmp ne i32 %28, 0\n br i1 %29, label %30, label %31\n"]
- 20 -->|true| 30
- 20 -->|false| 31
- 30["Block 30:\n br label %81\n"]
- 30 --> 81
- 31["Block 31:\n store i32 1, i32* %4, align 4\n store i32 1, i32* %5, align 4\n br label %32\n"]
- 31 --> 32
- 32["Block 32:\n %33 = load i32, i32* %5, align 4\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n %36 = load i32, i32* %35, align 8\n %37 = icmp slt i32 %33, %36\n br i1 %37, label %38, label %75\n"]
- 32 -->|true| 38
- 32 -->|false| 75
- 38["Block 38:\n %39 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %40 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %39, i32 0, i32 0\n %41 = load i32*, i32** %40, align 8\n %42 = load i32, i32* %5, align 4\n %43 = sext i32 %42 to i64\n %44 = getelementptr inbounds i32, i32* %41, i64 %43\n %45 = load i32, i32* %44, align 4\n %46 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %47 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %46, i32 0, i32 0\n %48 = load i32*, i32** %47, align 8\n %49 = load i32, i32* %5, align 4\n %50 = sub nsw i32 %49, 1\n %51 = sext i32 %50 to i64\n %52 = getelementptr inbounds i32, i32* %48, i64 %51\n %53 = load i32, i32* %52, align 4\n %54 = icmp ne i32 %45, %53\n br i1 %54, label %55, label %71\n"]
- 38 -->|true| 55
- 38 -->|false| 71
- 55["Block 55:\n %56 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %57 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %56, i32 0, i32 0\n %58 = load i32*, i32** %57, align 8\n %59 = load i32, i32* %5, align 4\n %60 = sext i32 %59 to i64\n %61 = getelementptr inbounds i32, i32* %58, i64 %60\n %62 = load i32, i32* %61, align 4\n %63 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %64 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %63, i32 0, i32 0\n %65 = load i32*, i32** %64, align 8\n %66 = load i32, i32* %4, align 4\n %67 = sext i32 %66 to i64\n %68 = getelementptr inbounds i32, i32* %65, i64 %67\n store i32 %62, i32* %68, align 4\n %69 = load i32, i32* %4, align 4\n %70 = add nsw i32 %69, 1\n store i32 %70, i32* %4, align 4\n br label %71\n"]
- 55 --> 71
- 71["Block 71:\n br label %72\n"]
- 71 --> 72
- 72["Block 72:\n %73 = load i32, i32* %5, align 4\n %74 = add nsw i32 %73, 1\n store i32 %74, i32* %5, align 4\n br label %32\n"]
- 72 --> 32
- 75["Block 75:\n %76 = load i32, i32* %4, align 4\n %77 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %78 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %77, i32 0, i32 1\n store i32 %76, i32* %78, align 8\n %79 = load %struct.DynamicArray*, %struct.DynamicArray** %2, align 8\n %80 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %79, i32 0, i32 3\n store i32 1, i32* %80, align 8\n br label %81\n"]
- 75 --> 81
- 81["Block 81:\n ret void\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: findCentroid
- graph TD
- 3["Block 3:\n %4 = alloca %struct.Point*, align 8\n %5 = alloca %struct.Point*, align 8\n %6 = alloca i32, align 4\n %7 = alloca i32*, align 8\n %8 = alloca %struct.Point*, align 8\n %9 = alloca double, align 8\n %10 = alloca double, align 8\n %11 = alloca double, align 8\n %12 = alloca i32, align 4\n store %struct.Point* %0, %struct.Point** %5, align 8\n store i32 %1, i32* %6, align 4\n store i32* %2, i32** %7, align 8\n %13 = load i32*, i32** %7, align 8\n store i32 0, i32* %13, align 4\n %14 = load %struct.Point*, %struct.Point** %5, align 8\n %15 = icmp ne %struct.Point* %14, null\n br i1 %15, label %16, label %19\n"]:::critical
- 3 -->|true| 16
- 3 -->|false| 19
- 16["Block 16:\n %17 = load i32, i32* %6, align 4\n %18 = icmp sle i32 %17, 0\n br i1 %18, label %19, label %21\n"]
- 16 -->|true| 19
- 16 -->|false| 21
- 19["Block 19:\n %20 = load i32*, i32** %7, align 8\n store i32 1, i32* %20, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.50, i64 0, i64 0))\n store %struct.Point* null, %struct.Point** %4, align 8\n br label %165\n"]
- 19 --> 165
- 21["Block 21:\n %22 = load i32, i32* %6, align 4\n %23 = icmp sgt i32 %22, 1000\n br i1 %23, label %24, label %26\n"]
- 21 -->|true| 24
- 21 -->|false| 26
- 24["Block 24:\n %25 = load i32*, i32** %7, align 8\n store i32 3, i32* %25, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.51, i64 0, i64 0))\n store %struct.Point* null, %struct.Point** %4, align 8\n br label %165\n"]
- 24 --> 165
- 26["Block 26:\n %27 = call noalias i8* @malloc(i64 272) #7\n %28 = bitcast i8* %27 to %struct.Point*\n store %struct.Point* %28, %struct.Point** %8, align 8\n %29 = load %struct.Point*, %struct.Point** %8, align 8\n %30 = icmp ne %struct.Point* %29, null\n br i1 %30, label %33, label %31\n"]
- 26 -->|true| 33
- 26 -->|false| 31
- 31["Block 31:\n %32 = load i32*, i32** %7, align 8\n store i32 2, i32* %32, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.52, i64 0, i64 0))\n store %struct.Point* null, %struct.Point** %4, align 8\n br label %165\n"]
- 31 --> 165
- 33["Block 33:\n store double 0.000000e+00, double* %9, align 8\n store double 0.000000e+00, double* %10, align 8\n store double 0.000000e+00, double* %11, align 8\n store i32 0, i32* %12, align 4\n br label %34\n"]
- 33 --> 34
- 34["Block 34:\n %35 = load i32, i32* %12, align 4\n %36 = load i32, i32* %6, align 4\n %37 = icmp slt i32 %35, %36\n br i1 %37, label %38, label %134\n"]
- 34 -->|true| 38
- 34 -->|false| 134
- 38["Block 38:\n %39 = load %struct.Point*, %struct.Point** %5, align 8\n %40 = load i32, i32* %12, align 4\n %41 = sext i32 %40 to i64\n %42 = getelementptr inbounds %struct.Point, %struct.Point* %39, i64 %41\n %43 = getelementptr inbounds %struct.Point, %struct.Point* %42, i32 0, i32 3\n %44 = load double, double* %43, align 8\n %45 = fcmp ole double %44, 0.000000e+00\n br i1 %45, label %46, label %50\n"]
- 38 -->|true| 46
- 38 -->|false| 50
- 46["Block 46:\n %47 = load i32*, i32** %7, align 8\n store i32 1, i32* %47, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.53, i64 0, i64 0))\n %48 = load %struct.Point*, %struct.Point** %8, align 8\n %49 = bitcast %struct.Point* %48 to i8*\n call void @free(i8* %49) #7\n store %struct.Point* null, %struct.Point** %4, align 8\n br label %165\n"]
- 46 --> 165
- 50["Block 50:\n %51 = load %struct.Point*, %struct.Point** %5, align 8\n %52 = load i32, i32* %12, align 4\n %53 = sext i32 %52 to i64\n %54 = getelementptr inbounds %struct.Point, %struct.Point* %51, i64 %53\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %54, i32 0, i32 3\n %56 = load double, double* %55, align 8\n %57 = load double, double* %9, align 8\n %58 = fadd double %57, %56\n store double %58, double* %9, align 8\n %59 = load %struct.Point*, %struct.Point** %5, align 8\n %60 = load i32, i32* %12, align 4\n %61 = sext i32 %60 to i64\n %62 = getelementptr inbounds %struct.Point, %struct.Point* %59, i64 %61\n %63 = getelementptr inbounds %struct.Point, %struct.Point* %62, i32 0, i32 0\n %64 = load i32, i32* %63, align 8\n %65 = sitofp i32 %64 to double\n %66 = load %struct.Point*, %struct.Point** %5, align 8\n %67 = load i32, i32* %12, align 4\n %68 = sext i32 %67 to i64\n %69 = getelementptr inbounds %struct.Point, %struct.Point* %66, i64 %68\n %70 = getelementptr inbounds %struct.Point, %struct.Point* %69, i32 0, i32 3\n %71 = load double, double* %70, align 8\n %72 = fmul double %65, %71\n %73 = load double, double* %10, align 8\n %74 = fadd double %73, %72\n store double %74, double* %10, align 8\n %75 = load %struct.Point*, %struct.Point** %5, align 8\n %76 = load i32, i32* %12, align 4\n %77 = sext i32 %76 to i64\n %78 = getelementptr inbounds %struct.Point, %struct.Point* %75, i64 %77\n %79 = getelementptr inbounds %struct.Point, %struct.Point* %78, i32 0, i32 1\n %80 = load i32, i32* %79, align 4\n %81 = sitofp i32 %80 to double\n %82 = load %struct.Point*, %struct.Point** %5, align 8\n %83 = load i32, i32* %12, align 4\n %84 = sext i32 %83 to i64\n %85 = getelementptr inbounds %struct.Point, %struct.Point* %82, i64 %84\n %86 = getelementptr inbounds %struct.Point, %struct.Point* %85, i32 0, i32 3\n %87 = load double, double* %86, align 8\n %88 = fmul double %81, %87\n %89 = load double, double* %11, align 8\n %90 = fadd double %89, %88\n store double %90, double* %11, align 8\n %91 = load double, double* %9, align 8\n %92 = fcmp uno double %91, %91\n br i1 %92, label %126, label %93\n"]
- 50 -->|true| 126
- 50 -->|false| 93
- 93["Block 93:\n %94 = load double, double* %10, align 8\n %95 = fcmp uno double %94, %94\n br i1 %95, label %126, label %96\n"]
- 93 -->|true| 126
- 93 -->|false| 96
- 96["Block 96:\n %97 = load double, double* %11, align 8\n %98 = fcmp uno double %97, %97\n br i1 %98, label %126, label %99\n"]
- 96 -->|true| 126
- 96 -->|false| 99
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %100) #8\n %102 = fcmp oeq double %101, 0x7FF0000000000000\n %103 = bitcast double %100 to i64\n %104 = icmp slt i64 %103, 0\n %105 = select i1 %104, i32 -1, i32 1\n %106 = select i1 %102, i32 %105, i32 0\n %107 = icmp ne i32 %106, 0\n br i1 %107, label %126, label %108\n"]
- 99 -->|true| 126
- 99 -->|false| 108
- 108["Block 108:\n %109 = load double, double* %10, align 8\n %110 = call double @llvm.fabs.f64(double %109) #8\n %111 = fcmp oeq double %110, 0x7FF0000000000000\n %112 = bitcast double %109 to i64\n %113 = icmp slt i64 %112, 0\n %114 = select i1 %113, i32 -1, i32 1\n %115 = select i1 %111, i32 %114, i32 0\n %116 = icmp ne i32 %115, 0\n br i1 %116, label %126, label %117\n"]
- 108 -->|true| 126
- 108 -->|false| 117
- 117["Block 117:\n %118 = load double, double* %11, align 8\n %119 = call double @llvm.fabs.f64(double %118) #8\n %120 = fcmp oeq double %119, 0x7FF0000000000000\n %121 = bitcast double %118 to i64\n %122 = icmp slt i64 %121, 0\n %123 = select i1 %122, i32 -1, i32 1\n %124 = select i1 %120, i32 %123, i32 0\n %125 = icmp ne i32 %124, 0\n br i1 %125, label %126, label %130\n"]
- 117 -->|true| 126
- 117 -->|false| 130
- 126["Block 126:\n %127 = load i32*, i32** %7, align 8\n store i32 5, i32* %127, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.54, i64 0, i64 0))\n %128 = load %struct.Point*, %struct.Point** %8, align 8\n %129 = bitcast %struct.Point* %128 to i8*\n call void @free(i8* %129) #7\n store %struct.Point* null, %struct.Point** %4, align 8\n br label %165\n"]
- 126 --> 165
- 130["Block 130:\n br label %131\n"]
- 130 --> 131
- 131["Block 131:\n %132 = load i32, i32* %12, align 4\n %133 = add nsw i32 %132, 1\n store i32 %133, i32* %12, align 4\n br label %34\n"]
- 131 --> 34
- 134["Block 134:\n %135 = load double, double* %9, align 8\n %136 = fcmp oeq double %135, 0.000000e+00\n br i1 %136, label %137, label %141\n"]
- 134 -->|true| 137
- 134 -->|false| 141
- 137["Block 137:\n %138 = load i32*, i32** %7, align 8\n store i32 1, i32* %138, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.55, i64 0, i64 0))\n %139 = load %struct.Point*, %struct.Point** %8, align 8\n %140 = bitcast %struct.Point* %139 to i8*\n call void @free(i8* %140) #7\n store %struct.Point* null, %struct.Point** %4, align 8\n br label %165\n"]
- 137 --> 165
- 141["Block 141:\n %142 = load double, double* %10, align 8\n %143 = load double, double* %9, align 8\n %144 = fdiv double %142, %143\n %145 = fptosi double %144 to i32\n %146 = load %struct.Point*, %struct.Point** %8, align 8\n %147 = getelementptr inbounds %struct.Point, %struct.Point* %146, i32 0, i32 0\n store i32 %145, i32* %147, align 8\n %148 = load double, double* %11, align 8\n %149 = load double, double* %9, align 8\n %150 = fdiv double %148, %149\n %151 = fptosi double %150 to i32\n %152 = load %struct.Point*, %struct.Point** %8, align 8\n %153 = getelementptr inbounds %struct.Point, %struct.Point* %152, i32 0, i32 1\n store i32 %151, i32* %153, align 4\n %154 = load double, double* %9, align 8\n %155 = load i32, i32* %6, align 4\n %156 = sitofp i32 %155 to double\n %157 = fdiv double %154, %156\n %158 = load %struct.Point*, %struct.Point** %8, align 8\n %159 = getelementptr inbounds %struct.Point, %struct.Point* %158, i32 0, i32 3\n store double %157, double* %159, align 8\n %160 = load %struct.Point*, %struct.Point** %8, align 8\n %161 = getelementptr inbounds %struct.Point, %struct.Point* %160, i32 0, i32 2\n %162 = getelementptr inbounds [256 x i8], [256 x i8]* %161, i64 0, i64 0\n %163 = call i8* @strcpy(i8* %162, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.56, i64 0, i64 0)) #7\n %164 = load %struct.Point*, %struct.Point** %8, align 8\n store %struct.Point* %164, %struct.Point** %4, align 8\n br label %165\n"]
- 141 --> 165
- 165["Block 165:\n %166 = load %struct.Point*, %struct.Point** %4, align 8\n ret %struct.Point* %166\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: reverseString
- graph TD
- 1["Block 1:\n %2 = alloca i8*, align 8\n %3 = alloca i32, align 4\n %4 = alloca i32, align 4\n %5 = alloca i8, align 1\n store i8* %0, i8** %2, align 8\n %6 = load i8*, i8** %2, align 8\n %7 = call i64 @strlen(i8* %6) #7\n %8 = trunc i64 %7 to i32\n store i32 %8, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %9\n"]:::critical
- 1 --> 9
- 9["Block 9:\n %10 = load i32, i32* %4, align 4\n %11 = load i32, i32* %3, align 4\n %12 = sdiv i32 %11, 2\n %13 = icmp slt i32 %10, %12\n br i1 %13, label %14, label %43\n"]:::critical
- 9 -->|true| 14
- 9 -->|false| 43
- 14["Block 14:\n %15 = load i8*, i8** %2, align 8\n %16 = load i32, i32* %4, align 4\n %17 = sext i32 %16 to i64\n %18 = getelementptr inbounds i8, i8* %15, i64 %17\n %19 = load i8, i8* %18, align 1\n store i8 %19, i8* %5, align 1\n %20 = load i8*, i8** %2, align 8\n %21 = load i32, i32* %3, align 4\n %22 = sub nsw i32 %21, 1\n %23 = load i32, i32* %4, align 4\n %24 = sub nsw i32 %22, %23\n %25 = sext i32 %24 to i64\n %26 = getelementptr inbounds i8, i8* %20, i64 %25\n %27 = load i8, i8* %26, align 1\n %28 = load i8*, i8** %2, align 8\n %29 = load i32, i32* %4, align 4\n %30 = sext i32 %29 to i64\n %31 = getelementptr inbounds i8, i8* %28, i64 %30\n store i8 %27, i8* %31, align 1\n %32 = load i8, i8* %5, align 1\n %33 = load i8*, i8** %2, align 8\n %34 = load i32, i32* %3, align 4\n %35 = sub nsw i32 %34, 1\n %36 = load i32, i32* %4, align 4\n %37 = sub nsw i32 %35, %36\n %38 = sext i32 %37 to i64\n %39 = getelementptr inbounds i8, i8* %33, i64 %38\n store i8 %32, i8* %39, align 1\n br label %40\n"]
- 14 --> 40
- 40["Block 40:\n %41 = load i32, i32* %4, align 4\n %42 = add nsw i32 %41, 1\n store i32 %42, i32* %4, align 4\n br label %9\n"]
- 40 --> 9
- 43["Block 43:\n ret void\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: testPoints
- graph TD
- 1["Block 1:\n %2 = alloca i32, align 4\n %3 = alloca i32, align 4\n %4 = alloca i32, align 4\n %5 = alloca i32, align 4\n store i32 %0, i32* %3, align 4\n store i32 0, i32* %4, align 4\n store i32 1, i32* %5, align 4\n br label %6\n"]:::critical
- 1 --> 6
- 6["Block 6:\n %7 = load i32, i32* %5, align 4\n %8 = icmp slt i32 %7, 5\n br i1 %8, label %9, label %19\n"]:::critical
- 6 -->|true| 9
- 6 -->|false| 19
- 9["Block 9:\n %10 = load i32, i32* %4, align 4\n %11 = add nsw i32 %10, 1\n store i32 %11, i32* %4, align 4\n %12 = load i32, i32* %3, align 4\n %13 = icmp sgt i32 %12, 2\n br i1 %13, label %14, label %15\n"]
- 9 -->|true| 14
- 9 -->|false| 15
- 14["Block 14:\n store i32 23, i32* %2, align 4\n br label %21\n"]
- 14 --> 21
- 15["Block 15:\n br label %16\n"]
- 15 --> 16
- 16["Block 16:\n %17 = load i32, i32* %5, align 4\n %18 = add nsw i32 %17, 1\n store i32 %18, i32* %5, align 4\n br label %6\n"]
- 16 --> 6
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n store i32 %20, i32* %2, align 4\n br label %21\n"]
- 19 --> 21
- 21["Block 21:\n %22 = load i32, i32* %2, align 4\n ret i32 %22\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: countSetBits
- graph TD
- 1["Block 1:\n %2 = alloca i32, align 4\n %3 = alloca i32, align 4\n store i32 %0, i32* %2, align 4\n store i32 0, i32* %3, align 4\n br label %4\n"]:::critical
- 1 --> 4
- 4["Block 4:\n %5 = load i32, i32* %2, align 4\n %6 = icmp ne i32 %5, 0\n br i1 %6, label %7, label %14\n"]:::critical
- 4 -->|true| 7
- 4 -->|false| 14
- 7["Block 7:\n %8 = load i32, i32* %2, align 4\n %9 = and i32 %8, 1\n %10 = load i32, i32* %3, align 4\n %11 = add nsw i32 %10, %9\n store i32 %11, i32* %3, align 4\n %12 = load i32, i32* %2, align 4\n %13 = ashr i32 %12, 1\n store i32 %13, i32* %2, align 4\n br label %4\n"]
- 7 --> 4
- 14["Block 14:\n %15 = load i32, i32* %3, align 4\n ret i32 %15\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: memoizedFib
- graph TD
- 1["Block 1:\n %2 = alloca i32, align 4\n %3 = alloca i32, align 4\n store i32 %0, i32* %3, align 4\n %4 = load i32, i32* %3, align 4\n %5 = sext i32 %4 to i64\n %6 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %5\n %7 = load i32, i32* %6, align 4\n %8 = icmp ne i32 %7, -1\n br i1 %8, label %9, label %14\n"]:::critical
- 1 -->|true| 9
- 1 -->|false| 14
- 9["Block 9:\n %10 = load i32, i32* %3, align 4\n %11 = sext i32 %10 to i64\n %12 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %11\n %13 = load i32, i32* %12, align 4\n store i32 %13, i32* %2, align 4\n br label %34\n"]
- 9 --> 34
- 14["Block 14:\n %15 = load i32, i32* %3, align 4\n %16 = icmp sle i32 %15, 1\n br i1 %16, label %17, label %19\n"]
- 14 -->|true| 17
- 14 -->|false| 19
- 17["Block 17:\n %18 = load i32, i32* %3, align 4\n store i32 %18, i32* %2, align 4\n br label %34\n"]
- 17 --> 34
- 19["Block 19:\n %20 = load i32, i32* %3, align 4\n %21 = sub nsw i32 %20, 1\n %22 = call i32 @memoizedFib(i32 %21)\n %23 = load i32, i32* %3, align 4\n %24 = sub nsw i32 %23, 2\n %25 = call i32 @memoizedFib(i32 %24)\n %26 = add nsw i32 %22, %25\n %27 = load i32, i32* %3, align 4\n %28 = sext i32 %27 to i64\n %29 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %28\n store i32 %26, i32* %29, align 4\n %30 = load i32, i32* %3, align 4\n %31 = sext i32 %30 to i64\n %32 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %31\n %33 = load i32, i32* %32, align 4\n store i32 %33, i32* %2, align 4\n br label %34\n"]
- 19 --> 34
- 34["Block 34:\n %35 = load i32, i32* %2, align 4\n ret i32 %35\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: processMatrix
- graph TD
- 2["Block 2:\n %3 = alloca [100 x i32]*, align 8\n %4 = alloca i32, align 4\n %5 = alloca i32, align 4\n %6 = alloca i32, align 4\n %7 = alloca i32, align 4\n store [100 x i32]* %0, [100 x i32]** %3, align 8\n store i32 %1, i32* %4, align 4\n store i32 0, i32* %5, align 4\n store i32 0, i32* %6, align 4\n br label %8\n"]:::critical
- 2 --> 8
- 8["Block 8:\n %9 = load i32, i32* %6, align 4\n %10 = load i32, i32* %4, align 4\n %11 = icmp slt i32 %9, %10\n br i1 %11, label %12, label %80\n"]:::critical
- 8 -->|true| 12
- 8 -->|false| 80
- 12["Block 12:\n store i32 0, i32* %7, align 4\n br label %13\n"]
- 12 --> 13
- 13["Block 13:\n %14 = load i32, i32* %7, align 4\n %15 = load i32, i32* %4, align 4\n %16 = icmp slt i32 %14, %15\n br i1 %16, label %17, label %76\n"]
- 13 -->|true| 17
- 13 -->|false| 76
- 17["Block 17:\n %18 = load i32, i32* %6, align 4\n %19 = load i32, i32* %7, align 4\n %20 = icmp eq i32 %18, %19\n br i1 %20, label %21, label %55\n"]
- 17 -->|true| 21
- 17 -->|false| 55
- 21["Block 21:\n %22 = load [100 x i32]*, [100 x i32]** %3, align 8\n %23 = load i32, i32* %6, align 4\n %24 = sext i32 %23 to i64\n %25 = getelementptr inbounds [100 x i32], [100 x i32]* %22, i64 %24\n %26 = load i32, i32* %7, align 4\n %27 = sext i32 %26 to i64\n %28 = getelementptr inbounds [100 x i32], [100 x i32]* %25, i64 0, i64 %27\n %29 = load i32, i32* %28, align 4\n %30 = srem i32 %29, 2\n %31 = icmp eq i32 %30, 0\n br i1 %31, label %32, label %43\n"]
- 21 -->|true| 32
- 21 -->|false| 43
- 32["Block 32:\n %33 = load [100 x i32]*, [100 x i32]** %3, align 8\n %34 = load i32, i32* %6, align 4\n %35 = sext i32 %34 to i64\n %36 = getelementptr inbounds [100 x i32], [100 x i32]* %33, i64 %35\n %37 = load i32, i32* %7, align 4\n %38 = sext i32 %37 to i64\n %39 = getelementptr inbounds [100 x i32], [100 x i32]* %36, i64 0, i64 %38\n %40 = load i32, i32* %39, align 4\n %41 = load i32, i32* %5, align 4\n %42 = add nsw i32 %41, %40\n store i32 %42, i32* %5, align 4\n br label %54\n"]
- 32 --> 54
- 43["Block 43:\n %44 = load [100 x i32]*, [100 x i32]** %3, align 8\n %45 = load i32, i32* %6, align 4\n %46 = sext i32 %45 to i64\n %47 = getelementptr inbounds [100 x i32], [100 x i32]* %44, i64 %46\n %48 = load i32, i32* %7, align 4\n %49 = sext i32 %48 to i64\n %50 = getelementptr inbounds [100 x i32], [100 x i32]* %47, i64 0, i64 %49\n %51 = load i32, i32* %50, align 4\n %52 = load i32, i32* %5, align 4\n %53 = sub nsw i32 %52, %51\n store i32 %53, i32* %5, align 4\n br label %54\n"]
- 43 --> 54
- 54["Block 54:\n br label %72\n"]
- 54 --> 72
- 55["Block 55:\n %56 = load i32, i32* %6, align 4\n %57 = load i32, i32* %7, align 4\n %58 = icmp slt i32 %56, %57\n br i1 %58, label %59, label %71\n"]
- 55 -->|true| 59
- 55 -->|false| 71
- 59["Block 59:\n %60 = load [100 x i32]*, [100 x i32]** %3, align 8\n %61 = load i32, i32* %6, align 4\n %62 = sext i32 %61 to i64\n %63 = getelementptr inbounds [100 x i32], [100 x i32]* %60, i64 %62\n %64 = load i32, i32* %7, align 4\n %65 = sext i32 %64 to i64\n %66 = getelementptr inbounds [100 x i32], [100 x i32]* %63, i64 0, i64 %65\n %67 = load i32, i32* %66, align 4\n %68 = call i32 @countSetBits(i32 %67)\n %69 = load i32, i32* %5, align 4\n %70 = add nsw i32 %69, %68\n store i32 %70, i32* %5, align 4\n br label %71\n"]
- 59 --> 71
- 71["Block 71:\n br label %72\n"]
- 71 --> 72
- 72["Block 72:\n br label %73\n"]
- 72 --> 73
- 73["Block 73:\n %74 = load i32, i32* %7, align 4\n %75 = add nsw i32 %74, 1\n store i32 %75, i32* %7, align 4\n br label %13\n"]
- 73 --> 13
- 76["Block 76:\n br label %77\n"]
- 76 --> 77
- 77["Block 77:\n %78 = load i32, i32* %6, align 4\n %79 = add nsw i32 %78, 1\n store i32 %79, i32* %6, align 4\n br label %8\n"]
- 77 --> 8
- 80["Block 80:\n %81 = load i32, i32* %5, align 4\n ret i32 %81\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- ```mermaid: projectB_main
- graph TD
- 0["Block 0:\n %1 = alloca [14 x i8], align 1\n %2 = alloca [8 x i32], align 16\n %3 = alloca i32, align 4\n %4 = alloca [100 x [100 x i32]], align 16\n %5 = alloca i32, align 4\n %6 = alloca i32, align 4\n %7 = alloca i32, align 4\n %8 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %9 = bitcast [14 x i8]* %1 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %9, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %10 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0\n call void @reverseString(i8* %10)\n %11 = bitcast [8 x i32]* %2 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %11, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %3, align 4\n %12 = bitcast [100 x [100 x i32]]* %4 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %12, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %13 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %4, i64 0, i64 0\n %14 = call i32 @processMatrix([100 x i32]* %13, i32 3)\n store i32 %14, i32* %5, align 4\n store i32 0, i32* %6, align 4\n br label %15\n"]:::critical
- 0 --> 15
- 15["Block 15:\n %16 = load i32, i32* %6, align 4\n %17 = call i32 @memoizedFib(i32 %16)\n %18 = load i32, i32* %6, align 4\n %19 = add nsw i32 %18, 1\n store i32 %19, i32* %6, align 4\n br label %20\n"]:::critical
- 15 --> 20
- 20["Block 20:\n %21 = load i32, i32* %6, align 4\n %22 = icmp slt i32 %21, 10\n br i1 %22, label %15, label %23\n"]:::critical
- 20 -->|true| 15
- 20 -->|false| 23
- 23["Block 23:\n %24 = load i32, i32* %5, align 4\n %25 = icmp sgt i32 %24, 0\n br i1 %25, label %26, label %28\n"]:::critical
- 23 -->|true| 26
- 23 -->|false| 28
- 26["Block 26:\n %27 = call i32 @memoizedFib(i32 7)\n store i32 %27, i32* %7, align 4\n br label %31\n"]
- 26 --> 31
- 28["Block 28:\n %29 = load i32, i32* %5, align 4\n %30 = call i32 @countSetBits(i32 %29)\n store i32 %30, i32* %7, align 4\n br label %31\n"]
- 28 --> 31
- 31["Block 31:\n %32 = load i32, i32* %7, align 4\n ret i32 %32\n"]:::critical
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][runOnModule] Creating slices for target functions
- [INFO][runOnModule] targetFuncName: countSetBits
- [INFO][runOnModule] targetFuncName: memoizedFib
- [INFO][runOnModule] targetFuncName: processMatrix
- [INFO][runOnModule] targetFuncName: projectB_main
- [INFO][runOnModule] targetFuncName: reverseString
- [INFO][runOnModule] targetFuncName: testPoints
- [INFO][runOnModule] Creating fusion points for bunker functions
- [INFO][runOnModule] bunkerFuncName: calculateCircleArea
- [INFO][runOnModule] bunkerFuncName: calculateDistance
- [INFO][runOnModule] bunkerFuncName: createDynamicArray
- [INFO][runOnModule] bunkerFuncName: createMatrix
- [INFO][runOnModule] bunkerFuncName: factorial
- [INFO][runOnModule] bunkerFuncName: findCentroid
- [INFO][runOnModule] bunkerFuncName: getErrorMessage
- [INFO][runOnModule] bunkerFuncName: insertNode
- [INFO][runOnModule] bunkerFuncName: multiplyMatrices
- [INFO][runOnModule] bunkerFuncName: performSimpleCalculations
- [INFO][runOnModule] bunkerFuncName: projectA_main
- [INFO][runOnModule] bunkerFuncName: pushBack
- [INFO][runOnModule] bunkerFuncName: quickSort
- [INFO][runOnModule] bunkerFuncName: removeDuplicates
- [INFO][runOnModule] bunkerFuncName: setErrorMessage
- [INFO][runOnModule] bunkerFuncName: validateMatrix
- [INFO][matchFunctionsForFusion] Starting function matching process
- [INFO][matchFunctionsForFusion] Matched target countSetBits (2 slices) with bunker projectA_main (2 fusion points)
- [INFO][matchFunctionsForFusion] Matched target memoizedFib (2 slices) with bunker createDynamicArray (2 fusion points)
- [INFO][matchFunctionsForFusion] Matched target processMatrix (2 slices) with bunker validateMatrix (2 fusion points)
- [INFO][matchFunctionsForFusion] Matched target projectB_main (2 slices) with bunker quickSort (2 fusion points)
- [INFO][matchFunctionsForFusion] Matched target reverseString (2 slices) with bunker insertNode (2 fusion points)
- [INFO][matchFunctionsForFusion] Matched target testPoints (2 slices) with bunker projectA_main (2 fusion points)
- [INFO][generateFusionMatchGraph] Generating fusion match visualization
- ```mermaid
- graph LR
- %% Fusion Match Graph
- %% Left side: Target Project, Right side: Bunker Project
- subgraph Target["Target Project"]
- direction TB
- countSetBits["countSetBits\nSliceNum: 2"]:::target
- memoizedFib["memoizedFib\nSliceNum: 2"]:::target
- processMatrix["processMatrix\nSliceNum: 2"]:::target
- projectB_main["projectB_main\nSliceNum: 2"]:::target
- reverseString["reverseString\nSliceNum: 2"]:::target
- testPoints["testPoints\nSliceNum: 2"]:::target
- end
- subgraph Bunker["Bunker Project"]
- direction TB
- calculateCircleArea["calculateCircleArea\nCritical Points: 2"]:::bunker
- calculateDistance["calculateDistance\nCritical Points: 2"]:::bunker
- createDynamicArray["createDynamicArray\nCritical Points: 2"]:::bunker
- createMatrix["createMatrix\nCritical Points: 2"]:::bunker
- factorial["factorial\nCritical Points: 2"]:::bunker
- findCentroid["findCentroid\nCritical Points: 2"]:::bunker
- getErrorMessage["getErrorMessage\nCritical Points: 2"]:::bunker
- insertNode["insertNode\nCritical Points: 2"]:::bunker
- multiplyMatrices["multiplyMatrices\nCritical Points: 2"]:::bunker
- performSimpleCalculations["performSimpleCalculations\nCritical Points: 2"]:::bunker
- projectA_main["projectA_main\nCritical Points: 2"]:::bunker
- pushBack["pushBack\nCritical Points: 2"]:::bunker
- quickSort["quickSort\nCritical Points: 2"]:::bunker
- removeDuplicates["removeDuplicates\nCritical Points: 2"]:::bunker
- setErrorMessage["setErrorMessage\nCritical Points: 2"]:::bunker
- validateMatrix["validateMatrix\nCritical Points: 2"]:::bunker
- end
- %% Fusion Matches
- countSetBits ==>|fusion| performSimpleCalculations
- memoizedFib ==>|fusion| calculateDistance
- processMatrix ==>|fusion| validateMatrix
- projectB_main ==>|fusion| pushBack
- reverseString ==>|fusion| getErrorMessage
- testPoints ==>|fusion| multiplyMatrices
- %% Styles
- classDef target fill:#f96,stroke:#333,stroke-width:2px
- classDef bunker fill:#9cf,stroke:#333,stroke-width:2px
- style Target fill:#fff,stroke:#f96,stroke-width:2px
- style Bunker fill:#fff,stroke:#9cf,stroke-width:2px
- ```
- [INFO][generateFusionMatchGraph] Generated visualization with 6 target functions and 16 bunker functions
- [INFO][generateFusionMatchGraph] Total fusion matches: 6
- [INFO][performCodeFusion] Starting code fusion
- [INFO][performCodeFusion] Total fusion pairs: 6
- [INFO][performCodeFusion] Fusion pair: target=countSetBits, bunker=performSimpleCalculations
- [INFO][performCodeFusion] Fusion pair: target=memoizedFib, bunker=calculateDistance
- [INFO][performCodeFusion] Fusion pair: target=processMatrix, bunker=validateMatrix
- [INFO][performCodeFusion] Fusion pair: target=projectB_main, bunker=pushBack
- [INFO][performCodeFusion] Fusion pair: target=reverseString, bunker=getErrorMessage
- [INFO][performCodeFusion] Fusion pair: target=testPoints, bunker=multiplyMatrices
- [INFO][performCodeFusion] Processing function pair: target=countSetBits, bunker=performSimpleCalculations
- [INFO][performCodeFusion] [After clone]Generated control flow graph for fused function:
- ```mermaid: fused_performSimpleCalculations
- graph TD
- entry["Block entry:\n %2 = alloca i32\n %3 = alloca i32\n %4 = alloca i32\n %5 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %6, label %target_skip_0\n"]
- target_cond_0 -->|true| 6
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 6["Block 6:\n store i32 %0, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 6 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %5, label %7, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 7
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 7["Block 7:\n store i32 100, i32* %2, align 4\n %8 = load i32, i32* %2, align 4\n %9 = icmp sgt i32 %1, 50\n br i1 %2, label %3, label %8\n"]
- 7 -->|true| 3
- 7 -->|false| 8
- 10["Block 10:\n %11 = load i32, i32* %2, align 4\n %12 = mul nsw i32 %4, 2\n %13 = load i32, i32* @calculationResult, align 4\n %14 = add nsw i32 %6, %5\n store i32 %7, i32* @calculationResult, align 4\n br label %13\n"]
- 10 --> 13
- 15["Block 15:\n %16 = load i32, i32* %2, align 4\n %17 = sdiv i32 %9, 2\n %18 = load i32, i32* @calculationResult, align 4\n %19 = add nsw i32 %11, %10\n store i32 %12, i32* @calculationResult, align 4\n br label %13\n"]
- 15 --> 13
- 20["Block 20:\n %21 = load i32, i32* %2, align 4\n %22 = srem i32 %14, 3\n %23 = icmp eq i32 %15, 0\n br i1 %16, label %17, label %20\n"]
- 20 -->|true| 17
- 20 -->|false| 20
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = mul nsw i32 %18, 3\n store i32 %19, i32* @calculationResult, align 4\n br label %23\n"]
- 24 --> 23
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = add nsw i32 %21, 3\n store i32 %22, i32* @calculationResult, align 4\n br label %23\n"]
- 27 --> 23
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = icmp sge i32 %24, 150\n br i1 %25, label %26, label %32\n"]
- 30 -->|true| 26
- 30 -->|false| 32
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = icmp sle i32 %27, 300\n br i1 %28, label %29, label %32\n"]
- 33 -->|true| 29
- 33 -->|false| 32
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = sub nsw i32 %30, 50\n store i32 %31, i32* @calculationResult, align 4\n br label %35\n"]
- 36 --> 35
- 39["Block 39:\n %40 = load i32, i32* @calculationResult, align 4\n %41 = add nsw i32 %33, 50\n store i32 %34, i32* @calculationResult, align 4\n br label %35\n"]
- 39 --> 35
- 42["Block 42:\n %43 = load i32, i32* @calculationResult, align 4\n %44 = srem i32 %36, 2\n %45 = icmp eq i32 %37, 0\n br i1 %38, label %39, label %42\n"]
- 42 -->|true| 39
- 42 -->|false| 42
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = sdiv i32 %40, 2\n store i32 %41, i32* @calculationResult, align 4\n br label %45\n"]
- 46 --> 45
- 49["Block 49:\n %50 = load i32, i32* @calculationResult, align 4\n %51 = mul nsw i32 %43, 2\n store i32 %44, i32* @calculationResult, align 4\n br label %45\n"]
- 49 --> 45
- 52["Block 52:\n %53 = load i32, i32* @calculationResult, align 4\n %54 = srem i32 %46, 10\n %55 = icmp slt i32 %47, 5\n br i1 %48, label %49, label %52\n"]
- 52 -->|true| 49
- 52 -->|false| 52
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = add nsw i32 %50, 5\n store i32 %51, i32* @calculationResult, align 4\n br label %55\n"]
- 56 --> 55
- 59["Block 59:\n %60 = load i32, i32* @calculationResult, align 4\n %61 = sub nsw i32 %53, 5\n store i32 %54, i32* @calculationResult, align 4\n br label %55\n"]
- 59 --> 55
- 62["Block 62:\n %63 = load i32, i32* @calculationResult, align 4\n %64 = icmp sgt i32 %56, 1000\n br i1 %57, label %58, label %59\n"]
- 62 -->|true| 58
- 62 -->|false| 59
- 65["Block 65:\n store i32 1000, i32* @calculationResult, align 4\n br label %62\n"]
- 65 --> 62
- 66["Block 66:\n %67 = load i32, i32* @calculationResult, align 4\n %68 = add nsw i32 %60, 10\n store i32 %61, i32* @calculationResult, align 4\n br label %62\n"]
- 66 --> 62
- 69["Block 69:\n %70 = load i32, i32* @calculationResult, align 4\n %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %63)\n ret void\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %72, label %target_skip_1\n"]
- target_cond_1 -->|true| 72
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 72["Block 72:\n %73 = load i32, i32* %3, align 4\n %74 = icmp ne i32 %3, 0\n br i1 %4, label %5, label %12\n"]
- 72 -->|true| 5
- 72 -->|false| 12
- 75["Block 75:\n %76 = load i32, i32* %3, align 4\n %77 = and i32 %6, 1\n %78 = load i32, i32* %4, align 4\n %79 = add nsw i32 %8, %7\n store i32 %9, i32* %4, align 4\n %80 = load i32, i32* %3, align 4\n %81 = ashr i32 %10, 1\n store i32 %11, i32* %3, align 4\n br label %2\n"]
- 75 --> 2
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %13\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing return instruction in block %69
- [INFO][performCodeFusion] Fixing return instruction in block %82
- [WARNING][performCodeFusion] No terminator found in block: target_phi_1
- [INFO][performCodeFusion] [After fix]Generated control flow graph for fused function:
- ```mermaid: fused_performSimpleCalculations
- graph TD
- entry["Block entry:\n %2 = alloca i32\n %3 = alloca i32\n %4 = alloca i32\n %5 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %6, label %target_skip_0\n"]
- target_cond_0 -->|true| 6
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 6["Block 6:\n store i32 %1, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 6 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %5, label %7, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 7
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 7["Block 7:\n store i32 100, i32* %2, align 4\n %8 = load i32, i32* %2, align 4\n %9 = icmp sgt i32 %8, 50\n br i1 %9, label %10, label %15\n"]
- 7 -->|true| 10
- 7 -->|false| 15
- 10["Block 10:\n %11 = load i32, i32* %2, align 4\n %12 = mul nsw i32 %11, 2\n %13 = load i32, i32* @calculationResult, align 4\n %14 = add nsw i32 %13, %12\n store i32 %14, i32* @calculationResult, align 4\n br label %20\n"]
- 10 --> 20
- 15["Block 15:\n %16 = load i32, i32* %2, align 4\n %17 = sdiv i32 %16, 2\n %18 = load i32, i32* @calculationResult, align 4\n %19 = add nsw i32 %18, %17\n store i32 %19, i32* @calculationResult, align 4\n br label %20\n"]
- 15 --> 20
- 20["Block 20:\n %21 = load i32, i32* %2, align 4\n %22 = srem i32 %21, 3\n %23 = icmp eq i32 %22, 0\n br i1 %23, label %24, label %27\n"]
- 20 -->|true| 24
- 20 -->|false| 27
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = mul nsw i32 %25, 3\n store i32 %26, i32* @calculationResult, align 4\n br label %30\n"]
- 24 --> 30
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = add nsw i32 %28, 3\n store i32 %29, i32* @calculationResult, align 4\n br label %30\n"]
- 27 --> 30
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = icmp sge i32 %31, 150\n br i1 %32, label %33, label %39\n"]
- 30 -->|true| 33
- 30 -->|false| 39
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = icmp sle i32 %34, 300\n br i1 %35, label %36, label %39\n"]
- 33 -->|true| 36
- 33 -->|false| 39
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = sub nsw i32 %37, 50\n store i32 %38, i32* @calculationResult, align 4\n br label %42\n"]
- 36 --> 42
- 39["Block 39:\n %40 = load i32, i32* @calculationResult, align 4\n %41 = add nsw i32 %40, 50\n store i32 %41, i32* @calculationResult, align 4\n br label %42\n"]
- 39 --> 42
- 42["Block 42:\n %43 = load i32, i32* @calculationResult, align 4\n %44 = srem i32 %43, 2\n %45 = icmp eq i32 %44, 0\n br i1 %45, label %46, label %49\n"]
- 42 -->|true| 46
- 42 -->|false| 49
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = sdiv i32 %47, 2\n store i32 %48, i32* @calculationResult, align 4\n br label %52\n"]
- 46 --> 52
- 49["Block 49:\n %50 = load i32, i32* @calculationResult, align 4\n %51 = mul nsw i32 %50, 2\n store i32 %51, i32* @calculationResult, align 4\n br label %52\n"]
- 49 --> 52
- 52["Block 52:\n %53 = load i32, i32* @calculationResult, align 4\n %54 = srem i32 %53, 10\n %55 = icmp slt i32 %54, 5\n br i1 %55, label %56, label %59\n"]
- 52 -->|true| 56
- 52 -->|false| 59
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = add nsw i32 %57, 5\n store i32 %58, i32* @calculationResult, align 4\n br label %62\n"]
- 56 --> 62
- 59["Block 59:\n %60 = load i32, i32* @calculationResult, align 4\n %61 = sub nsw i32 %60, 5\n store i32 %61, i32* @calculationResult, align 4\n br label %62\n"]
- 59 --> 62
- 62["Block 62:\n %63 = load i32, i32* @calculationResult, align 4\n %64 = icmp sgt i32 %63, 1000\n br i1 %64, label %65, label %66\n"]
- 62 -->|true| 65
- 62 -->|false| 66
- 65["Block 65:\n store i32 1000, i32* @calculationResult, align 4\n br label %69\n"]
- 65 --> 69
- 66["Block 66:\n %67 = load i32, i32* @calculationResult, align 4\n %68 = add nsw i32 %67, 10\n store i32 %68, i32* @calculationResult, align 4\n br label %69\n"]
- 66 --> 69
- 69["Block 69:\n %70 = load i32, i32* @calculationResult, align 4\n %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %70)\n ret void\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %72, label %target_skip_1\n"]
- target_cond_1 -->|true| 72
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 72["Block 72:\n %73 = load i32, i32* %3, align 4\n %74 = icmp ne i32 %73, 0\n br i1 %74, label %75, label %82\n"]
- 72 -->|true| 75
- 72 -->|false| 82
- 75["Block 75:\n %76 = load i32, i32* %3, align 4\n %77 = and i32 %76, 1\n %78 = load i32, i32* %4, align 4\n %79 = add nsw i32 %78, %77\n store i32 %79, i32* %4, align 4\n %80 = load i32, i32* %3, align 4\n %81 = ashr i32 %80, 1\n store i32 %81, i32* %3, align 4\n br label %72\n"]
- 75 --> 72
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %83\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Processing non-struct return type: i32
- [INFO][performCodeFusion] Processing bunker block: %20
- [INFO][performCodeFusion] Processing bunker block: %7
- [INFO][performCodeFusion] Processing bunker block: %10
- [INFO][performCodeFusion] Processing bunker block: %15
- [INFO][performCodeFusion] Processing bunker block: %46
- [INFO][performCodeFusion] Processing bunker block: %49
- [INFO][performCodeFusion] Processing bunker block: %52
- [INFO][performCodeFusion] Processing bunker block: %24
- [INFO][performCodeFusion] Processing bunker block: %27
- [INFO][performCodeFusion] Processing bunker block: %30
- [INFO][performCodeFusion] Processing bunker block: %33
- [INFO][performCodeFusion] Processing bunker block: %36
- [INFO][performCodeFusion] Processing bunker block: %39
- [INFO][performCodeFusion] Processing bunker block: %42
- [INFO][performCodeFusion] Processing bunker block: %56
- [INFO][performCodeFusion] Processing bunker block: %59
- [INFO][performCodeFusion] Processing bunker block: %62
- [INFO][performCodeFusion] Processing bunker block: %65
- [INFO][performCodeFusion] Processing bunker block: %66
- [INFO][performCodeFusion] Processing bunker block: %69
- [INFO][performCodeFusion] Found void return instruction in bunker block %69
- [INFO][performCodeFusion] Return type mismatch in bunker block %69. Expected: i32, Found: void
- [INFO][performCodeFusion] Created new return instruction with default value in block %69
- [INFO][performCodeFusion] Processing target block: %6
- [INFO][performCodeFusion] Processing target block: %72
- [INFO][performCodeFusion] Processing target block: %75
- [INFO][performCodeFusion] Processing target block: %82
- [INFO][performCodeFusion] Found return instruction in target block %82. Return value type: i32
- [INFO][performCodeFusion] [After fix return]Generated control flow graph for fused function:
- ```mermaid: fused_performSimpleCalculations
- graph TD
- entry["Block entry:\n %2 = alloca i32\n %3 = alloca i32\n %4 = alloca i32\n %5 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %6, label %target_skip_0\n"]
- target_cond_0 -->|true| 6
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 6["Block 6:\n store i32 %1, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 6 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %5, label %7, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 7
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 7["Block 7:\n store i32 100, i32* %2, align 4\n %8 = load i32, i32* %2, align 4\n %9 = icmp sgt i32 %8, 50\n br i1 %9, label %10, label %15\n"]
- 7 -->|true| 10
- 7 -->|false| 15
- 10["Block 10:\n %11 = load i32, i32* %2, align 4\n %12 = mul nsw i32 %11, 2\n %13 = load i32, i32* @calculationResult, align 4\n %14 = add nsw i32 %13, %12\n store i32 %14, i32* @calculationResult, align 4\n br label %20\n"]
- 10 --> 20
- 15["Block 15:\n %16 = load i32, i32* %2, align 4\n %17 = sdiv i32 %16, 2\n %18 = load i32, i32* @calculationResult, align 4\n %19 = add nsw i32 %18, %17\n store i32 %19, i32* @calculationResult, align 4\n br label %20\n"]
- 15 --> 20
- 20["Block 20:\n %21 = load i32, i32* %2, align 4\n %22 = srem i32 %21, 3\n %23 = icmp eq i32 %22, 0\n br i1 %23, label %24, label %27\n"]
- 20 -->|true| 24
- 20 -->|false| 27
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = mul nsw i32 %25, 3\n store i32 %26, i32* @calculationResult, align 4\n br label %30\n"]
- 24 --> 30
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = add nsw i32 %28, 3\n store i32 %29, i32* @calculationResult, align 4\n br label %30\n"]
- 27 --> 30
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = icmp sge i32 %31, 150\n br i1 %32, label %33, label %39\n"]
- 30 -->|true| 33
- 30 -->|false| 39
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = icmp sle i32 %34, 300\n br i1 %35, label %36, label %39\n"]
- 33 -->|true| 36
- 33 -->|false| 39
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = sub nsw i32 %37, 50\n store i32 %38, i32* @calculationResult, align 4\n br label %42\n"]
- 36 --> 42
- 39["Block 39:\n %40 = load i32, i32* @calculationResult, align 4\n %41 = add nsw i32 %40, 50\n store i32 %41, i32* @calculationResult, align 4\n br label %42\n"]
- 39 --> 42
- 42["Block 42:\n %43 = load i32, i32* @calculationResult, align 4\n %44 = srem i32 %43, 2\n %45 = icmp eq i32 %44, 0\n br i1 %45, label %46, label %49\n"]
- 42 -->|true| 46
- 42 -->|false| 49
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = sdiv i32 %47, 2\n store i32 %48, i32* @calculationResult, align 4\n br label %52\n"]
- 46 --> 52
- 49["Block 49:\n %50 = load i32, i32* @calculationResult, align 4\n %51 = mul nsw i32 %50, 2\n store i32 %51, i32* @calculationResult, align 4\n br label %52\n"]
- 49 --> 52
- 52["Block 52:\n %53 = load i32, i32* @calculationResult, align 4\n %54 = srem i32 %53, 10\n %55 = icmp slt i32 %54, 5\n br i1 %55, label %56, label %59\n"]
- 52 -->|true| 56
- 52 -->|false| 59
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = add nsw i32 %57, 5\n store i32 %58, i32* @calculationResult, align 4\n br label %62\n"]
- 56 --> 62
- 59["Block 59:\n %60 = load i32, i32* @calculationResult, align 4\n %61 = sub nsw i32 %60, 5\n store i32 %61, i32* @calculationResult, align 4\n br label %62\n"]
- 59 --> 62
- 62["Block 62:\n %63 = load i32, i32* @calculationResult, align 4\n %64 = icmp sgt i32 %63, 1000\n br i1 %64, label %65, label %66\n"]
- 62 -->|true| 65
- 62 -->|false| 66
- 65["Block 65:\n store i32 1000, i32* @calculationResult, align 4\n br label %69\n"]
- 65 --> 69
- 66["Block 66:\n %67 = load i32, i32* @calculationResult, align 4\n %68 = add nsw i32 %67, 10\n store i32 %68, i32* @calculationResult, align 4\n br label %69\n"]
- 66 --> 69
- 69["Block 69:\n %70 = load i32, i32* @calculationResult, align 4\n %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %70)\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %72, label %target_skip_1\n"]
- target_cond_1 -->|true| 72
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 72["Block 72:\n %73 = load i32, i32* %3, align 4\n %74 = icmp ne i32 %73, 0\n br i1 %74, label %75, label %82\n"]
- 72 -->|true| 75
- 72 -->|false| 82
- 75["Block 75:\n %76 = load i32, i32* %3, align 4\n %77 = and i32 %76, 1\n %78 = load i32, i32* %4, align 4\n %79 = add nsw i32 %78, %77\n store i32 %79, i32* %4, align 4\n %80 = load i32, i32* %3, align 4\n %81 = ashr i32 %80, 1\n store i32 %81, i32* %3, align 4\n br label %72\n"]
- 75 --> 72
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %83\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [DEBUG][updateCallSite] Original call instruction:
- call void @performSimpleCalculations()
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i32
- [DEBUG][updateCallSite] New call instruction:
- %322 = call i32 @fused_performSimpleCalculations(i1 false, i32 0)
- [DEBUG][updateCallSite] Void return type, no value processing needed
- [INFO][updateCallSite] Successfully updated call site from call void @performSimpleCalculations() to %322 = call i32 @fused_performSimpleCalculations(i1 false, i32 0)
- [DEBUG][updateCallSite] Original call instruction:
- %30 = call i32 @countSetBits(i32 %29)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %30 = call i32 @fused_performSimpleCalculations(i1 true, i32 %29)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %30 = call i32 @countSetBits(i32 %29) to %30 = call i32 @fused_performSimpleCalculations(i1 true, i32 %29)
- [DEBUG][updateCallSite] Original call instruction:
- %68 = call i32 @countSetBits(i32 %67)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %68 = call i32 @fused_performSimpleCalculations(i1 true, i32 %67)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %68 = call i32 @countSetBits(i32 %67) to %68 = call i32 @fused_performSimpleCalculations(i1 true, i32 %67)
- [INFO][performCodeFusion] [After update call site]Generated control flow graph for fused function:
- ```mermaid: fused_performSimpleCalculations
- graph TD
- entry["Block entry:\n %2 = alloca i32\n %3 = alloca i32\n %4 = alloca i32\n %5 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %6, label %target_skip_0\n"]
- target_cond_0 -->|true| 6
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 6["Block 6:\n store i32 %1, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 6 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %5, label %7, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 7
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 7["Block 7:\n store i32 100, i32* %2, align 4\n %8 = load i32, i32* %2, align 4\n %9 = icmp sgt i32 %8, 50\n br i1 %9, label %10, label %15\n"]
- 7 -->|true| 10
- 7 -->|false| 15
- 10["Block 10:\n %11 = load i32, i32* %2, align 4\n %12 = mul nsw i32 %11, 2\n %13 = load i32, i32* @calculationResult, align 4\n %14 = add nsw i32 %13, %12\n store i32 %14, i32* @calculationResult, align 4\n br label %20\n"]
- 10 --> 20
- 15["Block 15:\n %16 = load i32, i32* %2, align 4\n %17 = sdiv i32 %16, 2\n %18 = load i32, i32* @calculationResult, align 4\n %19 = add nsw i32 %18, %17\n store i32 %19, i32* @calculationResult, align 4\n br label %20\n"]
- 15 --> 20
- 20["Block 20:\n %21 = load i32, i32* %2, align 4\n %22 = srem i32 %21, 3\n %23 = icmp eq i32 %22, 0\n br i1 %23, label %24, label %27\n"]
- 20 -->|true| 24
- 20 -->|false| 27
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = mul nsw i32 %25, 3\n store i32 %26, i32* @calculationResult, align 4\n br label %30\n"]
- 24 --> 30
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = add nsw i32 %28, 3\n store i32 %29, i32* @calculationResult, align 4\n br label %30\n"]
- 27 --> 30
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = icmp sge i32 %31, 150\n br i1 %32, label %33, label %39\n"]
- 30 -->|true| 33
- 30 -->|false| 39
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = icmp sle i32 %34, 300\n br i1 %35, label %36, label %39\n"]
- 33 -->|true| 36
- 33 -->|false| 39
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = sub nsw i32 %37, 50\n store i32 %38, i32* @calculationResult, align 4\n br label %42\n"]
- 36 --> 42
- 39["Block 39:\n %40 = load i32, i32* @calculationResult, align 4\n %41 = add nsw i32 %40, 50\n store i32 %41, i32* @calculationResult, align 4\n br label %42\n"]
- 39 --> 42
- 42["Block 42:\n %43 = load i32, i32* @calculationResult, align 4\n %44 = srem i32 %43, 2\n %45 = icmp eq i32 %44, 0\n br i1 %45, label %46, label %49\n"]
- 42 -->|true| 46
- 42 -->|false| 49
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = sdiv i32 %47, 2\n store i32 %48, i32* @calculationResult, align 4\n br label %52\n"]
- 46 --> 52
- 49["Block 49:\n %50 = load i32, i32* @calculationResult, align 4\n %51 = mul nsw i32 %50, 2\n store i32 %51, i32* @calculationResult, align 4\n br label %52\n"]
- 49 --> 52
- 52["Block 52:\n %53 = load i32, i32* @calculationResult, align 4\n %54 = srem i32 %53, 10\n %55 = icmp slt i32 %54, 5\n br i1 %55, label %56, label %59\n"]
- 52 -->|true| 56
- 52 -->|false| 59
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = add nsw i32 %57, 5\n store i32 %58, i32* @calculationResult, align 4\n br label %62\n"]
- 56 --> 62
- 59["Block 59:\n %60 = load i32, i32* @calculationResult, align 4\n %61 = sub nsw i32 %60, 5\n store i32 %61, i32* @calculationResult, align 4\n br label %62\n"]
- 59 --> 62
- 62["Block 62:\n %63 = load i32, i32* @calculationResult, align 4\n %64 = icmp sgt i32 %63, 1000\n br i1 %64, label %65, label %66\n"]
- 62 -->|true| 65
- 62 -->|false| 66
- 65["Block 65:\n store i32 1000, i32* @calculationResult, align 4\n br label %69\n"]
- 65 --> 69
- 66["Block 66:\n %67 = load i32, i32* @calculationResult, align 4\n %68 = add nsw i32 %67, 10\n store i32 %68, i32* @calculationResult, align 4\n br label %69\n"]
- 66 --> 69
- 69["Block 69:\n %70 = load i32, i32* @calculationResult, align 4\n %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %70)\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %72, label %target_skip_1\n"]
- target_cond_1 -->|true| 72
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 72["Block 72:\n %73 = load i32, i32* %3, align 4\n %74 = icmp ne i32 %73, 0\n br i1 %74, label %75, label %82\n"]
- 72 -->|true| 75
- 72 -->|false| 82
- 75["Block 75:\n %76 = load i32, i32* %3, align 4\n %77 = and i32 %76, 1\n %78 = load i32, i32* %4, align 4\n %79 = add nsw i32 %78, %77\n store i32 %79, i32* %4, align 4\n %80 = load i32, i32* %3, align 4\n %81 = ashr i32 %80, 1\n store i32 %81, i32* %3, align 4\n br label %72\n"]
- 75 --> 72
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %83\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing blocks without terminators...
- [INFO][performCodeFusion] Added return with default value to block: target_phi_1
- [INFO][performCodeFusion] Starting PHI node repair
- [INFO][performCodeFusion] [After fix PHI]Generated control flow graph for fused function:
- ```mermaid: fused_performSimpleCalculations
- graph TD
- entry["Block entry:\n %2 = alloca i32\n %3 = alloca i32\n %4 = alloca i32\n %5 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %6, label %target_skip_0\n"]
- target_cond_0 -->|true| 6
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 6["Block 6:\n store i32 %1, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 6 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %5, label %7, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 7
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 7["Block 7:\n store i32 100, i32* %2, align 4\n %8 = load i32, i32* %2, align 4\n %9 = icmp sgt i32 %8, 50\n br i1 %9, label %10, label %15\n"]
- 7 -->|true| 10
- 7 -->|false| 15
- 10["Block 10:\n %11 = load i32, i32* %2, align 4\n %12 = mul nsw i32 %11, 2\n %13 = load i32, i32* @calculationResult, align 4\n %14 = add nsw i32 %13, %12\n store i32 %14, i32* @calculationResult, align 4\n br label %20\n"]
- 10 --> 20
- 15["Block 15:\n %16 = load i32, i32* %2, align 4\n %17 = sdiv i32 %16, 2\n %18 = load i32, i32* @calculationResult, align 4\n %19 = add nsw i32 %18, %17\n store i32 %19, i32* @calculationResult, align 4\n br label %20\n"]
- 15 --> 20
- 20["Block 20:\n %21 = load i32, i32* %2, align 4\n %22 = srem i32 %21, 3\n %23 = icmp eq i32 %22, 0\n br i1 %23, label %24, label %27\n"]
- 20 -->|true| 24
- 20 -->|false| 27
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = mul nsw i32 %25, 3\n store i32 %26, i32* @calculationResult, align 4\n br label %30\n"]
- 24 --> 30
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = add nsw i32 %28, 3\n store i32 %29, i32* @calculationResult, align 4\n br label %30\n"]
- 27 --> 30
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = icmp sge i32 %31, 150\n br i1 %32, label %33, label %39\n"]
- 30 -->|true| 33
- 30 -->|false| 39
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = icmp sle i32 %34, 300\n br i1 %35, label %36, label %39\n"]
- 33 -->|true| 36
- 33 -->|false| 39
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = sub nsw i32 %37, 50\n store i32 %38, i32* @calculationResult, align 4\n br label %42\n"]
- 36 --> 42
- 39["Block 39:\n %40 = load i32, i32* @calculationResult, align 4\n %41 = add nsw i32 %40, 50\n store i32 %41, i32* @calculationResult, align 4\n br label %42\n"]
- 39 --> 42
- 42["Block 42:\n %43 = load i32, i32* @calculationResult, align 4\n %44 = srem i32 %43, 2\n %45 = icmp eq i32 %44, 0\n br i1 %45, label %46, label %49\n"]
- 42 -->|true| 46
- 42 -->|false| 49
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = sdiv i32 %47, 2\n store i32 %48, i32* @calculationResult, align 4\n br label %52\n"]
- 46 --> 52
- 49["Block 49:\n %50 = load i32, i32* @calculationResult, align 4\n %51 = mul nsw i32 %50, 2\n store i32 %51, i32* @calculationResult, align 4\n br label %52\n"]
- 49 --> 52
- 52["Block 52:\n %53 = load i32, i32* @calculationResult, align 4\n %54 = srem i32 %53, 10\n %55 = icmp slt i32 %54, 5\n br i1 %55, label %56, label %59\n"]
- 52 -->|true| 56
- 52 -->|false| 59
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = add nsw i32 %57, 5\n store i32 %58, i32* @calculationResult, align 4\n br label %62\n"]
- 56 --> 62
- 59["Block 59:\n %60 = load i32, i32* @calculationResult, align 4\n %61 = sub nsw i32 %60, 5\n store i32 %61, i32* @calculationResult, align 4\n br label %62\n"]
- 59 --> 62
- 62["Block 62:\n %63 = load i32, i32* @calculationResult, align 4\n %64 = icmp sgt i32 %63, 1000\n br i1 %64, label %65, label %66\n"]
- 62 -->|true| 65
- 62 -->|false| 66
- 65["Block 65:\n store i32 1000, i32* @calculationResult, align 4\n br label %69\n"]
- 65 --> 69
- 66["Block 66:\n %67 = load i32, i32* @calculationResult, align 4\n %68 = add nsw i32 %67, 10\n store i32 %68, i32* @calculationResult, align 4\n br label %69\n"]
- 66 --> 69
- 69["Block 69:\n %70 = load i32, i32* @calculationResult, align 4\n %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %70)\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %72, label %target_skip_1\n"]
- target_cond_1 -->|true| 72
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret i32 0\n"]
- 72["Block 72:\n %73 = load i32, i32* %3, align 4\n %74 = icmp ne i32 %73, 0\n br i1 %74, label %75, label %82\n"]
- 72 -->|true| 75
- 72 -->|false| 82
- 75["Block 75:\n %76 = load i32, i32* %3, align 4\n %77 = and i32 %76, 1\n %78 = load i32, i32* %4, align 4\n %79 = add nsw i32 %78, %77\n store i32 %79, i32* %4, align 4\n %80 = load i32, i32* %3, align 4\n %81 = ashr i32 %80, 1\n store i32 %81, i32* %3, align 4\n br label %72\n"]
- 75 --> 72
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %83\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Attempting to delete original functions...
- [INFO][performCodeFusion] [After erase]Generated control flow graph for fused function:
- ```mermaid: fused_performSimpleCalculations
- graph TD
- entry["Block entry:\n %2 = alloca i32\n %3 = alloca i32\n %4 = alloca i32\n %5 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %6, label %target_skip_0\n"]
- target_cond_0 -->|true| 6
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 6["Block 6:\n store i32 %1, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 6 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %5, label %7, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 7
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 7["Block 7:\n store i32 100, i32* %2, align 4\n %8 = load i32, i32* %2, align 4\n %9 = icmp sgt i32 %8, 50\n br i1 %9, label %10, label %15\n"]
- 7 -->|true| 10
- 7 -->|false| 15
- 10["Block 10:\n %11 = load i32, i32* %2, align 4\n %12 = mul nsw i32 %11, 2\n %13 = load i32, i32* @calculationResult, align 4\n %14 = add nsw i32 %13, %12\n store i32 %14, i32* @calculationResult, align 4\n br label %20\n"]
- 10 --> 20
- 15["Block 15:\n %16 = load i32, i32* %2, align 4\n %17 = sdiv i32 %16, 2\n %18 = load i32, i32* @calculationResult, align 4\n %19 = add nsw i32 %18, %17\n store i32 %19, i32* @calculationResult, align 4\n br label %20\n"]
- 15 --> 20
- 20["Block 20:\n %21 = load i32, i32* %2, align 4\n %22 = srem i32 %21, 3\n %23 = icmp eq i32 %22, 0\n br i1 %23, label %24, label %27\n"]
- 20 -->|true| 24
- 20 -->|false| 27
- 24["Block 24:\n %25 = load i32, i32* @calculationResult, align 4\n %26 = mul nsw i32 %25, 3\n store i32 %26, i32* @calculationResult, align 4\n br label %30\n"]
- 24 --> 30
- 27["Block 27:\n %28 = load i32, i32* @calculationResult, align 4\n %29 = add nsw i32 %28, 3\n store i32 %29, i32* @calculationResult, align 4\n br label %30\n"]
- 27 --> 30
- 30["Block 30:\n %31 = load i32, i32* @calculationResult, align 4\n %32 = icmp sge i32 %31, 150\n br i1 %32, label %33, label %39\n"]
- 30 -->|true| 33
- 30 -->|false| 39
- 33["Block 33:\n %34 = load i32, i32* @calculationResult, align 4\n %35 = icmp sle i32 %34, 300\n br i1 %35, label %36, label %39\n"]
- 33 -->|true| 36
- 33 -->|false| 39
- 36["Block 36:\n %37 = load i32, i32* @calculationResult, align 4\n %38 = sub nsw i32 %37, 50\n store i32 %38, i32* @calculationResult, align 4\n br label %42\n"]
- 36 --> 42
- 39["Block 39:\n %40 = load i32, i32* @calculationResult, align 4\n %41 = add nsw i32 %40, 50\n store i32 %41, i32* @calculationResult, align 4\n br label %42\n"]
- 39 --> 42
- 42["Block 42:\n %43 = load i32, i32* @calculationResult, align 4\n %44 = srem i32 %43, 2\n %45 = icmp eq i32 %44, 0\n br i1 %45, label %46, label %49\n"]
- 42 -->|true| 46
- 42 -->|false| 49
- 46["Block 46:\n %47 = load i32, i32* @calculationResult, align 4\n %48 = sdiv i32 %47, 2\n store i32 %48, i32* @calculationResult, align 4\n br label %52\n"]
- 46 --> 52
- 49["Block 49:\n %50 = load i32, i32* @calculationResult, align 4\n %51 = mul nsw i32 %50, 2\n store i32 %51, i32* @calculationResult, align 4\n br label %52\n"]
- 49 --> 52
- 52["Block 52:\n %53 = load i32, i32* @calculationResult, align 4\n %54 = srem i32 %53, 10\n %55 = icmp slt i32 %54, 5\n br i1 %55, label %56, label %59\n"]
- 52 -->|true| 56
- 52 -->|false| 59
- 56["Block 56:\n %57 = load i32, i32* @calculationResult, align 4\n %58 = add nsw i32 %57, 5\n store i32 %58, i32* @calculationResult, align 4\n br label %62\n"]
- 56 --> 62
- 59["Block 59:\n %60 = load i32, i32* @calculationResult, align 4\n %61 = sub nsw i32 %60, 5\n store i32 %61, i32* @calculationResult, align 4\n br label %62\n"]
- 59 --> 62
- 62["Block 62:\n %63 = load i32, i32* @calculationResult, align 4\n %64 = icmp sgt i32 %63, 1000\n br i1 %64, label %65, label %66\n"]
- 62 -->|true| 65
- 62 -->|false| 66
- 65["Block 65:\n store i32 1000, i32* @calculationResult, align 4\n br label %69\n"]
- 65 --> 69
- 66["Block 66:\n %67 = load i32, i32* @calculationResult, align 4\n %68 = add nsw i32 %67, 10\n store i32 %68, i32* @calculationResult, align 4\n br label %69\n"]
- 66 --> 69
- 69["Block 69:\n %70 = load i32, i32* @calculationResult, align 4\n %71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i32 %70)\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %72, label %target_skip_1\n"]
- target_cond_1 -->|true| 72
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret i32 0\n"]
- 72["Block 72:\n %73 = load i32, i32* %3, align 4\n %74 = icmp ne i32 %73, 0\n br i1 %74, label %75, label %82\n"]
- 72 -->|true| 75
- 72 -->|false| 82
- 75["Block 75:\n %76 = load i32, i32* %3, align 4\n %77 = and i32 %76, 1\n %78 = load i32, i32* %4, align 4\n %79 = add nsw i32 %78, %77\n store i32 %79, i32* %4, align 4\n %80 = load i32, i32* %3, align 4\n %81 = ashr i32 %80, 1\n store i32 %81, i32* %3, align 4\n br label %72\n"]
- 75 --> 72
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %83\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Completed function fusion: fused_performSimpleCalculations
- [INFO][performCodeFusion] Processing function pair: target=memoizedFib, bunker=calculateDistance
- [INFO][performCodeFusion] [After clone]Generated control flow graph for fused function:
- ```mermaid: fused_calculateDistance
- graph TD
- entry["Block entry:\n %5 = alloca double\n %6 = alloca i32*\n %7 = alloca double\n %8 = alloca double\n %9 = alloca double\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store i32 %0, i32* %11, align 4\n %14 = load i32, i32* %11, align 4\n %15 = sext i32 %2 to i64\n %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %3\n %17 = load i32, i32* %4, align 4\n %18 = icmp ne i32 %5, -1\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %19, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 19
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 19["Block 19:\n store i32* %2, i32** %6, align 8\n %20 = load i32*, i32** %6, align 8\n store i32 0, i32* %4, align 4\n %21 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 3\n %22 = load double, double* %5, align 8\n %23 = fcmp ole double %6, 0.000000e+00\n br i1 %7, label %12, label %8\n"]
- 19 -->|true| 12
- 19 -->|false| 8
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %26 = load double, double* %9, align 8\n %27 = fcmp ole double %10, 0.000000e+00\n br i1 %11, label %12, label %14\n"]
- 24 -->|true| 12
- 24 -->|false| 14
- 28["Block 28:\n %29 = load i32*, i32** %6, align 8\n store i32 1, i32* %13, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %96\n"]
- 28 --> 96
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 0\n %32 = load i32, i32* %15, align 8\n %33 = call i32 @abs(i32 %16) #7\n %34 = icmp sgt i32 %17, 1000\n br i1 %18, label %34, label %19\n"]
- 30 -->|true| 34
- 30 -->|false| 19
- 35["Block 35:\n %36 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 1\n %37 = load i32, i32* %20, align 4\n %38 = call i32 @abs(i32 %21) #7\n %39 = icmp sgt i32 %22, 1000\n br i1 %23, label %34, label %24\n"]
- 35 -->|true| 34
- 35 -->|false| 24
- 40["Block 40:\n %41 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %42 = load i32, i32* %25, align 8\n %43 = call i32 @abs(i32 %26) #7\n %44 = icmp sgt i32 %27, 1000\n br i1 %28, label %34, label %29\n"]
- 40 -->|true| 34
- 40 -->|false| 29
- 45["Block 45:\n %46 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %47 = load i32, i32* %30, align 4\n %48 = call i32 @abs(i32 %31) #7\n %49 = icmp sgt i32 %32, 1000\n br i1 %33, label %34, label %36\n"]
- 45 -->|true| 34
- 45 -->|false| 36
- 50["Block 50:\n %51 = load i32*, i32** %6, align 8\n store i32 3, i32* %35, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %96\n"]
- 50 --> 96
- 52["Block 52:\n %53 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %54 = load i32, i32* %37, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 0\n %56 = load i32, i32* %39, align 8\n %57 = sub nsw i32 %38, %40\n %58 = sitofp i32 %41 to double\n %59 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %60 = load double, double* %43, align 8\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 3\n %62 = load double, double* %45, align 8\n %63 = fdiv double %44, %46\n %64 = call double @sqrt(double %47) #8\n %65 = fmul double %42, %48\n store double %49, double* %7, align 8\n %66 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %67 = load i32, i32* %50, align 4\n %68 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 1\n %69 = load i32, i32* %52, align 4\n %70 = sub nsw i32 %51, %53\n %71 = sitofp i32 %54 to double\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %73 = load double, double* %56, align 8\n %74 = getelementptr inbounds %struct.Point, %struct.Point* %0, i32 0, i32 3\n %75 = load double, double* %58, align 8\n %76 = fdiv double %57, %59\n %77 = call double @sqrt(double %60) #8\n %78 = fmul double %55, %61\n store double %62, double* %8, align 8\n %79 = load double, double* %7, align 8\n %80 = call double @llvm.fabs.f64(double %63)\n %81 = fcmp ogt double %64, 1.000000e+03\n br i1 %65, label %70, label %66\n"]
- 52 -->|true| 70
- 52 -->|false| 66
- 82["Block 82:\n %83 = load double, double* %8, align 8\n %84 = call double @llvm.fabs.f64(double %67)\n %85 = fcmp ogt double %68, 1.000000e+03\n br i1 %69, label %70, label %72\n"]
- 82 -->|true| 70
- 82 -->|false| 72
- 86["Block 86:\n %87 = load i32*, i32** %6, align 8\n store i32 5, i32* %71, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %96\n"]
- 86 --> 96
- 88["Block 88:\n %89 = load double, double* %7, align 8\n %90 = load double, double* %7, align 8\n %91 = fmul double %73, %74\n %92 = load double, double* %8, align 8\n %93 = load double, double* %8, align 8\n %94 = fmul double %76, %77\n %95 = fadd double %75, %78\n %96 = call double @sqrt(double %79) #8\n store double %80, double* %9, align 8\n %97 = load double, double* %9, align 8\n %98 = fcmp uno double %81, %81\n br i1 %82, label %92, label %83\n"]
- 88 -->|true| 92
- 88 -->|false| 83
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %84) #9\n %102 = fcmp oeq double %85, 0x7FF0000000000000\n %103 = bitcast double %84 to i64\n %104 = icmp slt i64 %87, 0\n %105 = select i1 %88, i32 -1, i32 1\n %106 = select i1 %86, i32 %89, i32 0\n %107 = icmp ne i32 %90, 0\n br i1 %91, label %92, label %94\n"]
- 99 -->|true| 92
- 99 -->|false| 94
- 108["Block 108:\n %109 = load i32*, i32** %6, align 8\n store i32 8, i32* %93, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %96\n"]
- 108 --> 96
- 110["Block 110:\n %111 = load double, double* %9, align 8\n store double %95, double* %5, align 8\n br label %96\n"]
- 110 --> 96
- 112["Block 112:\n %113 = load double, double* %5, align 8\n ret double %97\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %114, label %target_skip_1\n"]
- target_cond_1 -->|true| 114
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 114["Block 114:\n %115 = load i32, i32* %10, align 4\n ret i32 %33\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing return instruction in block %112
- [INFO][performCodeFusion] Fixing return instruction in block %114
- [WARNING][performCodeFusion] No terminator found in block: target_phi_1
- [INFO][performCodeFusion] [After fix]Generated control flow graph for fused function:
- ```mermaid: fused_calculateDistance
- graph TD
- entry["Block entry:\n %5 = alloca double\n %6 = alloca i32*\n %7 = alloca double\n %8 = alloca double\n %9 = alloca double\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store i32 %4, i32* %11, align 4\n %14 = load i32, i32* %11, align 4\n %15 = sext i32 %14 to i64\n %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %15\n %17 = load i32, i32* %16, align 4\n %18 = icmp ne i32 %17, -1\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %19, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 19
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 19["Block 19:\n store i32* %3, i32** %6, align 8\n %20 = load i32*, i32** %6, align 8\n store i32 0, i32* %20, align 4\n %21 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %22 = load double, double* %21, align 8\n %23 = fcmp ole double %22, 0.000000e+00\n br i1 %23, label %28, label %24\n"]
- 19 -->|true| 28
- 19 -->|false| 24
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %26 = load double, double* %25, align 8\n %27 = fcmp ole double %26, 0.000000e+00\n br i1 %27, label %28, label %30\n"]
- 24 -->|true| 28
- 24 -->|false| 30
- 28["Block 28:\n %29 = load i32*, i32** %6, align 8\n store i32 1, i32* %29, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 28 --> 112
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %32 = load i32, i32* %31, align 8\n %33 = call i32 @abs(i32 %32) #7\n %34 = icmp sgt i32 %33, 1000\n br i1 %34, label %50, label %35\n"]
- 30 -->|true| 50
- 30 -->|false| 35
- 35["Block 35:\n %36 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %37 = load i32, i32* %36, align 4\n %38 = call i32 @abs(i32 %37) #7\n %39 = icmp sgt i32 %38, 1000\n br i1 %39, label %50, label %40\n"]
- 35 -->|true| 50
- 35 -->|false| 40
- 40["Block 40:\n %41 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %42 = load i32, i32* %41, align 8\n %43 = call i32 @abs(i32 %42) #7\n %44 = icmp sgt i32 %43, 1000\n br i1 %44, label %50, label %45\n"]
- 40 -->|true| 50
- 40 -->|false| 45
- 45["Block 45:\n %46 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %47 = load i32, i32* %46, align 4\n %48 = call i32 @abs(i32 %47) #7\n %49 = icmp sgt i32 %48, 1000\n br i1 %49, label %50, label %52\n"]
- 45 -->|true| 50
- 45 -->|false| 52
- 50["Block 50:\n %51 = load i32*, i32** %6, align 8\n store i32 3, i32* %51, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 50 --> 112
- 52["Block 52:\n %53 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %54 = load i32, i32* %53, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %56 = load i32, i32* %55, align 8\n %57 = sub nsw i32 %54, %56\n %58 = sitofp i32 %57 to double\n %59 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %60 = load double, double* %59, align 8\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %62 = load double, double* %61, align 8\n %63 = fdiv double %60, %62\n %64 = call double @sqrt(double %63) #8\n %65 = fmul double %58, %64\n store double %65, double* %7, align 8\n %66 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %67 = load i32, i32* %66, align 4\n %68 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %69 = load i32, i32* %68, align 4\n %70 = sub nsw i32 %67, %69\n %71 = sitofp i32 %70 to double\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %73 = load double, double* %72, align 8\n %74 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %75 = load double, double* %74, align 8\n %76 = fdiv double %73, %75\n %77 = call double @sqrt(double %76) #8\n %78 = fmul double %71, %77\n store double %78, double* %8, align 8\n %79 = load double, double* %7, align 8\n %80 = call double @llvm.fabs.f64(double %79)\n %81 = fcmp ogt double %80, 1.000000e+03\n br i1 %81, label %86, label %82\n"]
- 52 -->|true| 86
- 52 -->|false| 82
- 82["Block 82:\n %83 = load double, double* %8, align 8\n %84 = call double @llvm.fabs.f64(double %83)\n %85 = fcmp ogt double %84, 1.000000e+03\n br i1 %85, label %86, label %88\n"]
- 82 -->|true| 86
- 82 -->|false| 88
- 86["Block 86:\n %87 = load i32*, i32** %6, align 8\n store i32 5, i32* %87, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 86 --> 112
- 88["Block 88:\n %89 = load double, double* %7, align 8\n %90 = load double, double* %7, align 8\n %91 = fmul double %89, %90\n %92 = load double, double* %8, align 8\n %93 = load double, double* %8, align 8\n %94 = fmul double %92, %93\n %95 = fadd double %91, %94\n %96 = call double @sqrt(double %95) #8\n store double %96, double* %9, align 8\n %97 = load double, double* %9, align 8\n %98 = fcmp uno double %97, %97\n br i1 %98, label %108, label %99\n"]
- 88 -->|true| 108
- 88 -->|false| 99
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %100) #9\n %102 = fcmp oeq double %101, 0x7FF0000000000000\n %103 = bitcast double %100 to i64\n %104 = icmp slt i64 %103, 0\n %105 = select i1 %104, i32 -1, i32 1\n %106 = select i1 %102, i32 %105, i32 0\n %107 = icmp ne i32 %106, 0\n br i1 %107, label %108, label %110\n"]
- 99 -->|true| 108
- 99 -->|false| 110
- 108["Block 108:\n %109 = load i32*, i32** %6, align 8\n store i32 8, i32* %109, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 108 --> 112
- 110["Block 110:\n %111 = load double, double* %9, align 8\n store double %111, double* %5, align 8\n br label %112\n"]
- 110 --> 112
- 112["Block 112:\n %113 = load double, double* %5, align 8\n ret double %113\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %114, label %target_skip_1\n"]
- target_cond_1 -->|true| 114
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 114["Block 114:\n %115 = load i32, i32* %10, align 4\n ret i32 %115\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Processing struct return type
- [INFO][performCodeFusion] [After fix return]Generated control flow graph for fused function:
- ```mermaid: fused_calculateDistance
- graph TD
- entry["Block entry:\n %5 = alloca double\n %6 = alloca i32*\n %7 = alloca double\n %8 = alloca double\n %9 = alloca double\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store i32 %4, i32* %11, align 4\n %14 = load i32, i32* %11, align 4\n %15 = sext i32 %14 to i64\n %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %15\n %17 = load i32, i32* %16, align 4\n %18 = icmp ne i32 %17, -1\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %19, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 19
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 19["Block 19:\n store i32* %3, i32** %6, align 8\n %20 = load i32*, i32** %6, align 8\n store i32 0, i32* %20, align 4\n %21 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %22 = load double, double* %21, align 8\n %23 = fcmp ole double %22, 0.000000e+00\n br i1 %23, label %28, label %24\n"]
- 19 -->|true| 28
- 19 -->|false| 24
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %26 = load double, double* %25, align 8\n %27 = fcmp ole double %26, 0.000000e+00\n br i1 %27, label %28, label %30\n"]
- 24 -->|true| 28
- 24 -->|false| 30
- 28["Block 28:\n %29 = load i32*, i32** %6, align 8\n store i32 1, i32* %29, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 28 --> 112
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %32 = load i32, i32* %31, align 8\n %33 = call i32 @abs(i32 %32) #7\n %34 = icmp sgt i32 %33, 1000\n br i1 %34, label %50, label %35\n"]
- 30 -->|true| 50
- 30 -->|false| 35
- 35["Block 35:\n %36 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %37 = load i32, i32* %36, align 4\n %38 = call i32 @abs(i32 %37) #7\n %39 = icmp sgt i32 %38, 1000\n br i1 %39, label %50, label %40\n"]
- 35 -->|true| 50
- 35 -->|false| 40
- 40["Block 40:\n %41 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %42 = load i32, i32* %41, align 8\n %43 = call i32 @abs(i32 %42) #7\n %44 = icmp sgt i32 %43, 1000\n br i1 %44, label %50, label %45\n"]
- 40 -->|true| 50
- 40 -->|false| 45
- 45["Block 45:\n %46 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %47 = load i32, i32* %46, align 4\n %48 = call i32 @abs(i32 %47) #7\n %49 = icmp sgt i32 %48, 1000\n br i1 %49, label %50, label %52\n"]
- 45 -->|true| 50
- 45 -->|false| 52
- 50["Block 50:\n %51 = load i32*, i32** %6, align 8\n store i32 3, i32* %51, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 50 --> 112
- 52["Block 52:\n %53 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %54 = load i32, i32* %53, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %56 = load i32, i32* %55, align 8\n %57 = sub nsw i32 %54, %56\n %58 = sitofp i32 %57 to double\n %59 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %60 = load double, double* %59, align 8\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %62 = load double, double* %61, align 8\n %63 = fdiv double %60, %62\n %64 = call double @sqrt(double %63) #8\n %65 = fmul double %58, %64\n store double %65, double* %7, align 8\n %66 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %67 = load i32, i32* %66, align 4\n %68 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %69 = load i32, i32* %68, align 4\n %70 = sub nsw i32 %67, %69\n %71 = sitofp i32 %70 to double\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %73 = load double, double* %72, align 8\n %74 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %75 = load double, double* %74, align 8\n %76 = fdiv double %73, %75\n %77 = call double @sqrt(double %76) #8\n %78 = fmul double %71, %77\n store double %78, double* %8, align 8\n %79 = load double, double* %7, align 8\n %80 = call double @llvm.fabs.f64(double %79)\n %81 = fcmp ogt double %80, 1.000000e+03\n br i1 %81, label %86, label %82\n"]
- 52 -->|true| 86
- 52 -->|false| 82
- 82["Block 82:\n %83 = load double, double* %8, align 8\n %84 = call double @llvm.fabs.f64(double %83)\n %85 = fcmp ogt double %84, 1.000000e+03\n br i1 %85, label %86, label %88\n"]
- 82 -->|true| 86
- 82 -->|false| 88
- 86["Block 86:\n %87 = load i32*, i32** %6, align 8\n store i32 5, i32* %87, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 86 --> 112
- 88["Block 88:\n %89 = load double, double* %7, align 8\n %90 = load double, double* %7, align 8\n %91 = fmul double %89, %90\n %92 = load double, double* %8, align 8\n %93 = load double, double* %8, align 8\n %94 = fmul double %92, %93\n %95 = fadd double %91, %94\n %96 = call double @sqrt(double %95) #8\n store double %96, double* %9, align 8\n %97 = load double, double* %9, align 8\n %98 = fcmp uno double %97, %97\n br i1 %98, label %108, label %99\n"]
- 88 -->|true| 108
- 88 -->|false| 99
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %100) #9\n %102 = fcmp oeq double %101, 0x7FF0000000000000\n %103 = bitcast double %100 to i64\n %104 = icmp slt i64 %103, 0\n %105 = select i1 %104, i32 -1, i32 1\n %106 = select i1 %102, i32 %105, i32 0\n %107 = icmp ne i32 %106, 0\n br i1 %107, label %108, label %110\n"]
- 99 -->|true| 108
- 99 -->|false| 110
- 108["Block 108:\n %109 = load i32*, i32** %6, align 8\n store i32 8, i32* %109, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 108 --> 112
- 110["Block 110:\n %111 = load double, double* %9, align 8\n store double %111, double* %5, align 8\n br label %112\n"]
- 110 --> 112
- 112["Block 112:\n %113 = load double, double* %5, align 8\n %114 = insertvalue %fused_return_calculateDistance_memoizedFib { i32 0, double undef }, double %113, 1\n ret %fused_return_calculateDistance_memoizedFib %114\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %115, label %target_skip_1\n"]
- target_cond_1 -->|true| 115
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 115["Block 115:\n %116 = load i32, i32* %10, align 4\n %117 = insertvalue %fused_return_calculateDistance_memoizedFib undef, i32 %116, 0\n %118 = insertvalue %fused_return_calculateDistance_memoizedFib %117, double 0.000000e+00, 1\n ret %fused_return_calculateDistance_memoizedFib %118\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [DEBUG][updateCallSite] Original call instruction:
- %27 = call i32 @memoizedFib(i32 7)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: i32*
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %27 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: i32
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %27 = call i32 @memoizedFib(i32 7) to %27 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)
- [DEBUG][updateCallSite] Original call instruction:
- %17 = call i32 @memoizedFib(i32 %16)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: i32*
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %17 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %16)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: i32
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %17 = call i32 @memoizedFib(i32 %16) to %17 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %16)
- [DEBUG][updateCallSite] Original call instruction:
- %23 = call i32 @memoizedFib(i32 %22)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: i32*
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %23 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %22)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: i32
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %23 = call i32 @memoizedFib(i32 %22) to %23 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %22)
- [DEBUG][updateCallSite] Original call instruction:
- %20 = call i32 @memoizedFib(i32 %19)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: struct.struct.Point*
- [DEBUG][updateCallSite] Parameter type: i32*
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %20 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %19)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: i32
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %20 = call i32 @memoizedFib(i32 %19) to %20 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %19)
- [INFO][performCodeFusion] [After update call site]Generated control flow graph for fused function:
- ```mermaid: fused_calculateDistance
- graph TD
- entry["Block entry:\n %5 = alloca double\n %6 = alloca i32*\n %7 = alloca double\n %8 = alloca double\n %9 = alloca double\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store i32 %4, i32* %11, align 4\n %14 = load i32, i32* %11, align 4\n %15 = sext i32 %14 to i64\n %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %15\n %17 = load i32, i32* %16, align 4\n %18 = icmp ne i32 %17, -1\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %19, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 19
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 19["Block 19:\n store i32* %3, i32** %6, align 8\n %20 = load i32*, i32** %6, align 8\n store i32 0, i32* %20, align 4\n %21 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %22 = load double, double* %21, align 8\n %23 = fcmp ole double %22, 0.000000e+00\n br i1 %23, label %28, label %24\n"]
- 19 -->|true| 28
- 19 -->|false| 24
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %26 = load double, double* %25, align 8\n %27 = fcmp ole double %26, 0.000000e+00\n br i1 %27, label %28, label %30\n"]
- 24 -->|true| 28
- 24 -->|false| 30
- 28["Block 28:\n %29 = load i32*, i32** %6, align 8\n store i32 1, i32* %29, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 28 --> 112
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %32 = load i32, i32* %31, align 8\n %33 = call i32 @abs(i32 %32) #7\n %34 = icmp sgt i32 %33, 1000\n br i1 %34, label %50, label %35\n"]
- 30 -->|true| 50
- 30 -->|false| 35
- 35["Block 35:\n %36 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %37 = load i32, i32* %36, align 4\n %38 = call i32 @abs(i32 %37) #7\n %39 = icmp sgt i32 %38, 1000\n br i1 %39, label %50, label %40\n"]
- 35 -->|true| 50
- 35 -->|false| 40
- 40["Block 40:\n %41 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %42 = load i32, i32* %41, align 8\n %43 = call i32 @abs(i32 %42) #7\n %44 = icmp sgt i32 %43, 1000\n br i1 %44, label %50, label %45\n"]
- 40 -->|true| 50
- 40 -->|false| 45
- 45["Block 45:\n %46 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %47 = load i32, i32* %46, align 4\n %48 = call i32 @abs(i32 %47) #7\n %49 = icmp sgt i32 %48, 1000\n br i1 %49, label %50, label %52\n"]
- 45 -->|true| 50
- 45 -->|false| 52
- 50["Block 50:\n %51 = load i32*, i32** %6, align 8\n store i32 3, i32* %51, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 50 --> 112
- 52["Block 52:\n %53 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %54 = load i32, i32* %53, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %56 = load i32, i32* %55, align 8\n %57 = sub nsw i32 %54, %56\n %58 = sitofp i32 %57 to double\n %59 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %60 = load double, double* %59, align 8\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %62 = load double, double* %61, align 8\n %63 = fdiv double %60, %62\n %64 = call double @sqrt(double %63) #8\n %65 = fmul double %58, %64\n store double %65, double* %7, align 8\n %66 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %67 = load i32, i32* %66, align 4\n %68 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %69 = load i32, i32* %68, align 4\n %70 = sub nsw i32 %67, %69\n %71 = sitofp i32 %70 to double\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %73 = load double, double* %72, align 8\n %74 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %75 = load double, double* %74, align 8\n %76 = fdiv double %73, %75\n %77 = call double @sqrt(double %76) #8\n %78 = fmul double %71, %77\n store double %78, double* %8, align 8\n %79 = load double, double* %7, align 8\n %80 = call double @llvm.fabs.f64(double %79)\n %81 = fcmp ogt double %80, 1.000000e+03\n br i1 %81, label %86, label %82\n"]
- 52 -->|true| 86
- 52 -->|false| 82
- 82["Block 82:\n %83 = load double, double* %8, align 8\n %84 = call double @llvm.fabs.f64(double %83)\n %85 = fcmp ogt double %84, 1.000000e+03\n br i1 %85, label %86, label %88\n"]
- 82 -->|true| 86
- 82 -->|false| 88
- 86["Block 86:\n %87 = load i32*, i32** %6, align 8\n store i32 5, i32* %87, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 86 --> 112
- 88["Block 88:\n %89 = load double, double* %7, align 8\n %90 = load double, double* %7, align 8\n %91 = fmul double %89, %90\n %92 = load double, double* %8, align 8\n %93 = load double, double* %8, align 8\n %94 = fmul double %92, %93\n %95 = fadd double %91, %94\n %96 = call double @sqrt(double %95) #8\n store double %96, double* %9, align 8\n %97 = load double, double* %9, align 8\n %98 = fcmp uno double %97, %97\n br i1 %98, label %108, label %99\n"]
- 88 -->|true| 108
- 88 -->|false| 99
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %100) #9\n %102 = fcmp oeq double %101, 0x7FF0000000000000\n %103 = bitcast double %100 to i64\n %104 = icmp slt i64 %103, 0\n %105 = select i1 %104, i32 -1, i32 1\n %106 = select i1 %102, i32 %105, i32 0\n %107 = icmp ne i32 %106, 0\n br i1 %107, label %108, label %110\n"]
- 99 -->|true| 108
- 99 -->|false| 110
- 108["Block 108:\n %109 = load i32*, i32** %6, align 8\n store i32 8, i32* %109, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 108 --> 112
- 110["Block 110:\n %111 = load double, double* %9, align 8\n store double %111, double* %5, align 8\n br label %112\n"]
- 110 --> 112
- 112["Block 112:\n %113 = load double, double* %5, align 8\n %114 = insertvalue %fused_return_calculateDistance_memoizedFib { i32 0, double undef }, double %113, 1\n ret %fused_return_calculateDistance_memoizedFib %114\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %115, label %target_skip_1\n"]
- target_cond_1 -->|true| 115
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 115["Block 115:\n %116 = load i32, i32* %10, align 4\n %117 = insertvalue %fused_return_calculateDistance_memoizedFib undef, i32 %116, 0\n %118 = insertvalue %fused_return_calculateDistance_memoizedFib %117, double 0.000000e+00, 1\n ret %fused_return_calculateDistance_memoizedFib %118\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing blocks without terminators...
- [INFO][performCodeFusion] Added return with default value to block: target_phi_1
- [INFO][performCodeFusion] Starting PHI node repair
- [INFO][performCodeFusion] [After fix PHI]Generated control flow graph for fused function:
- ```mermaid: fused_calculateDistance
- graph TD
- entry["Block entry:\n %5 = alloca double\n %6 = alloca i32*\n %7 = alloca double\n %8 = alloca double\n %9 = alloca double\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store i32 %4, i32* %11, align 4\n %14 = load i32, i32* %11, align 4\n %15 = sext i32 %14 to i64\n %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %15\n %17 = load i32, i32* %16, align 4\n %18 = icmp ne i32 %17, -1\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %19, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 19
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 19["Block 19:\n store i32* %3, i32** %6, align 8\n %20 = load i32*, i32** %6, align 8\n store i32 0, i32* %20, align 4\n %21 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %22 = load double, double* %21, align 8\n %23 = fcmp ole double %22, 0.000000e+00\n br i1 %23, label %28, label %24\n"]
- 19 -->|true| 28
- 19 -->|false| 24
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %26 = load double, double* %25, align 8\n %27 = fcmp ole double %26, 0.000000e+00\n br i1 %27, label %28, label %30\n"]
- 24 -->|true| 28
- 24 -->|false| 30
- 28["Block 28:\n %29 = load i32*, i32** %6, align 8\n store i32 1, i32* %29, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 28 --> 112
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %32 = load i32, i32* %31, align 8\n %33 = call i32 @abs(i32 %32) #7\n %34 = icmp sgt i32 %33, 1000\n br i1 %34, label %50, label %35\n"]
- 30 -->|true| 50
- 30 -->|false| 35
- 35["Block 35:\n %36 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %37 = load i32, i32* %36, align 4\n %38 = call i32 @abs(i32 %37) #7\n %39 = icmp sgt i32 %38, 1000\n br i1 %39, label %50, label %40\n"]
- 35 -->|true| 50
- 35 -->|false| 40
- 40["Block 40:\n %41 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %42 = load i32, i32* %41, align 8\n %43 = call i32 @abs(i32 %42) #7\n %44 = icmp sgt i32 %43, 1000\n br i1 %44, label %50, label %45\n"]
- 40 -->|true| 50
- 40 -->|false| 45
- 45["Block 45:\n %46 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %47 = load i32, i32* %46, align 4\n %48 = call i32 @abs(i32 %47) #7\n %49 = icmp sgt i32 %48, 1000\n br i1 %49, label %50, label %52\n"]
- 45 -->|true| 50
- 45 -->|false| 52
- 50["Block 50:\n %51 = load i32*, i32** %6, align 8\n store i32 3, i32* %51, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 50 --> 112
- 52["Block 52:\n %53 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %54 = load i32, i32* %53, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %56 = load i32, i32* %55, align 8\n %57 = sub nsw i32 %54, %56\n %58 = sitofp i32 %57 to double\n %59 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %60 = load double, double* %59, align 8\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %62 = load double, double* %61, align 8\n %63 = fdiv double %60, %62\n %64 = call double @sqrt(double %63) #8\n %65 = fmul double %58, %64\n store double %65, double* %7, align 8\n %66 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %67 = load i32, i32* %66, align 4\n %68 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %69 = load i32, i32* %68, align 4\n %70 = sub nsw i32 %67, %69\n %71 = sitofp i32 %70 to double\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %73 = load double, double* %72, align 8\n %74 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %75 = load double, double* %74, align 8\n %76 = fdiv double %73, %75\n %77 = call double @sqrt(double %76) #8\n %78 = fmul double %71, %77\n store double %78, double* %8, align 8\n %79 = load double, double* %7, align 8\n %80 = call double @llvm.fabs.f64(double %79)\n %81 = fcmp ogt double %80, 1.000000e+03\n br i1 %81, label %86, label %82\n"]
- 52 -->|true| 86
- 52 -->|false| 82
- 82["Block 82:\n %83 = load double, double* %8, align 8\n %84 = call double @llvm.fabs.f64(double %83)\n %85 = fcmp ogt double %84, 1.000000e+03\n br i1 %85, label %86, label %88\n"]
- 82 -->|true| 86
- 82 -->|false| 88
- 86["Block 86:\n %87 = load i32*, i32** %6, align 8\n store i32 5, i32* %87, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 86 --> 112
- 88["Block 88:\n %89 = load double, double* %7, align 8\n %90 = load double, double* %7, align 8\n %91 = fmul double %89, %90\n %92 = load double, double* %8, align 8\n %93 = load double, double* %8, align 8\n %94 = fmul double %92, %93\n %95 = fadd double %91, %94\n %96 = call double @sqrt(double %95) #8\n store double %96, double* %9, align 8\n %97 = load double, double* %9, align 8\n %98 = fcmp uno double %97, %97\n br i1 %98, label %108, label %99\n"]
- 88 -->|true| 108
- 88 -->|false| 99
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %100) #9\n %102 = fcmp oeq double %101, 0x7FF0000000000000\n %103 = bitcast double %100 to i64\n %104 = icmp slt i64 %103, 0\n %105 = select i1 %104, i32 -1, i32 1\n %106 = select i1 %102, i32 %105, i32 0\n %107 = icmp ne i32 %106, 0\n br i1 %107, label %108, label %110\n"]
- 99 -->|true| 108
- 99 -->|false| 110
- 108["Block 108:\n %109 = load i32*, i32** %6, align 8\n store i32 8, i32* %109, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 108 --> 112
- 110["Block 110:\n %111 = load double, double* %9, align 8\n store double %111, double* %5, align 8\n br label %112\n"]
- 110 --> 112
- 112["Block 112:\n %113 = load double, double* %5, align 8\n %114 = insertvalue %fused_return_calculateDistance_memoizedFib { i32 0, double undef }, double %113, 1\n ret %fused_return_calculateDistance_memoizedFib %114\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %115, label %target_skip_1\n"]
- target_cond_1 -->|true| 115
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret %fused_return_calculateDistance_memoizedFib zeroinitializer\n"]
- 115["Block 115:\n %116 = load i32, i32* %10, align 4\n %117 = insertvalue %fused_return_calculateDistance_memoizedFib undef, i32 %116, 0\n %118 = insertvalue %fused_return_calculateDistance_memoizedFib %117, double 0.000000e+00, 1\n ret %fused_return_calculateDistance_memoizedFib %118\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Attempting to delete original functions...
- [INFO][performCodeFusion] [After erase]Generated control flow graph for fused function:
- ```mermaid: fused_calculateDistance
- graph TD
- entry["Block entry:\n %5 = alloca double\n %6 = alloca i32*\n %7 = alloca double\n %8 = alloca double\n %9 = alloca double\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store i32 %4, i32* %11, align 4\n %14 = load i32, i32* %11, align 4\n %15 = sext i32 %14 to i64\n %16 = getelementptr inbounds [100 x i32], [100 x i32]* @cache, i64 0, i64 %15\n %17 = load i32, i32* %16, align 4\n %18 = icmp ne i32 %17, -1\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %19, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 19
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 19["Block 19:\n store i32* %3, i32** %6, align 8\n %20 = load i32*, i32** %6, align 8\n store i32 0, i32* %20, align 4\n %21 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %22 = load double, double* %21, align 8\n %23 = fcmp ole double %22, 0.000000e+00\n br i1 %23, label %28, label %24\n"]
- 19 -->|true| 28
- 19 -->|false| 24
- 24["Block 24:\n %25 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %26 = load double, double* %25, align 8\n %27 = fcmp ole double %26, 0.000000e+00\n br i1 %27, label %28, label %30\n"]
- 24 -->|true| 28
- 24 -->|false| 30
- 28["Block 28:\n %29 = load i32*, i32** %6, align 8\n store i32 1, i32* %29, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.32, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 28 --> 112
- 30["Block 30:\n %31 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %32 = load i32, i32* %31, align 8\n %33 = call i32 @abs(i32 %32) #7\n %34 = icmp sgt i32 %33, 1000\n br i1 %34, label %50, label %35\n"]
- 30 -->|true| 50
- 30 -->|false| 35
- 35["Block 35:\n %36 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %37 = load i32, i32* %36, align 4\n %38 = call i32 @abs(i32 %37) #7\n %39 = icmp sgt i32 %38, 1000\n br i1 %39, label %50, label %40\n"]
- 35 -->|true| 50
- 35 -->|false| 40
- 40["Block 40:\n %41 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %42 = load i32, i32* %41, align 8\n %43 = call i32 @abs(i32 %42) #7\n %44 = icmp sgt i32 %43, 1000\n br i1 %44, label %50, label %45\n"]
- 40 -->|true| 50
- 40 -->|false| 45
- 45["Block 45:\n %46 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %47 = load i32, i32* %46, align 4\n %48 = call i32 @abs(i32 %47) #7\n %49 = icmp sgt i32 %48, 1000\n br i1 %49, label %50, label %52\n"]
- 45 -->|true| 50
- 45 -->|false| 52
- 50["Block 50:\n %51 = load i32*, i32** %6, align 8\n store i32 3, i32* %51, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 50 --> 112
- 52["Block 52:\n %53 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 0\n %54 = load i32, i32* %53, align 8\n %55 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 0\n %56 = load i32, i32* %55, align 8\n %57 = sub nsw i32 %54, %56\n %58 = sitofp i32 %57 to double\n %59 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %60 = load double, double* %59, align 8\n %61 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %62 = load double, double* %61, align 8\n %63 = fdiv double %60, %62\n %64 = call double @sqrt(double %63) #8\n %65 = fmul double %58, %64\n store double %65, double* %7, align 8\n %66 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 1\n %67 = load i32, i32* %66, align 4\n %68 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 1\n %69 = load i32, i32* %68, align 4\n %70 = sub nsw i32 %67, %69\n %71 = sitofp i32 %70 to double\n %72 = getelementptr inbounds %struct.Point, %struct.Point* %2, i32 0, i32 3\n %73 = load double, double* %72, align 8\n %74 = getelementptr inbounds %struct.Point, %struct.Point* %1, i32 0, i32 3\n %75 = load double, double* %74, align 8\n %76 = fdiv double %73, %75\n %77 = call double @sqrt(double %76) #8\n %78 = fmul double %71, %77\n store double %78, double* %8, align 8\n %79 = load double, double* %7, align 8\n %80 = call double @llvm.fabs.f64(double %79)\n %81 = fcmp ogt double %80, 1.000000e+03\n br i1 %81, label %86, label %82\n"]
- 52 -->|true| 86
- 52 -->|false| 82
- 82["Block 82:\n %83 = load double, double* %8, align 8\n %84 = call double @llvm.fabs.f64(double %83)\n %85 = fcmp ogt double %84, 1.000000e+03\n br i1 %85, label %86, label %88\n"]
- 82 -->|true| 86
- 82 -->|false| 88
- 86["Block 86:\n %87 = load i32*, i32** %6, align 8\n store i32 5, i32* %87, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.34, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 86 --> 112
- 88["Block 88:\n %89 = load double, double* %7, align 8\n %90 = load double, double* %7, align 8\n %91 = fmul double %89, %90\n %92 = load double, double* %8, align 8\n %93 = load double, double* %8, align 8\n %94 = fmul double %92, %93\n %95 = fadd double %91, %94\n %96 = call double @sqrt(double %95) #8\n store double %96, double* %9, align 8\n %97 = load double, double* %9, align 8\n %98 = fcmp uno double %97, %97\n br i1 %98, label %108, label %99\n"]
- 88 -->|true| 108
- 88 -->|false| 99
- 99["Block 99:\n %100 = load double, double* %9, align 8\n %101 = call double @llvm.fabs.f64(double %100) #9\n %102 = fcmp oeq double %101, 0x7FF0000000000000\n %103 = bitcast double %100 to i64\n %104 = icmp slt i64 %103, 0\n %105 = select i1 %104, i32 -1, i32 1\n %106 = select i1 %102, i32 %105, i32 0\n %107 = icmp ne i32 %106, 0\n br i1 %107, label %108, label %110\n"]
- 99 -->|true| 108
- 99 -->|false| 110
- 108["Block 108:\n %109 = load i32*, i32** %6, align 8\n store i32 8, i32* %109, align 4\n call void @setErrorMessage(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.35, i64 0, i64 0))\n store double -1.000000e+00, double* %5, align 8\n br label %112\n"]
- 108 --> 112
- 110["Block 110:\n %111 = load double, double* %9, align 8\n store double %111, double* %5, align 8\n br label %112\n"]
- 110 --> 112
- 112["Block 112:\n %113 = load double, double* %5, align 8\n %114 = insertvalue %fused_return_calculateDistance_memoizedFib { i32 0, double undef }, double %113, 1\n ret %fused_return_calculateDistance_memoizedFib %114\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %115, label %target_skip_1\n"]
- target_cond_1 -->|true| 115
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret %fused_return_calculateDistance_memoizedFib zeroinitializer\n"]
- 115["Block 115:\n %116 = load i32, i32* %10, align 4\n %117 = insertvalue %fused_return_calculateDistance_memoizedFib undef, i32 %116, 0\n %118 = insertvalue %fused_return_calculateDistance_memoizedFib %117, double 0.000000e+00, 1\n ret %fused_return_calculateDistance_memoizedFib %118\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Completed function fusion: fused_calculateDistance
- [INFO][performCodeFusion] Processing function pair: target=processMatrix, bunker=validateMatrix
- [INFO][performCodeFusion] [After clone]Generated control flow graph for fused function:
- ```mermaid: fused_validateMatrix
- graph TD
- entry["Block entry:\n %4 = alloca i32\n %5 = alloca %struct.Matrix*\n %6 = alloca i32\n %7 = alloca [100 x i32]*\n %8 = alloca i32\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store [100 x i32]* %0, [100 x i32]** %7, align 8\n store i32 %1, i32* %8, align 4\n store i32 0, i32* %9, align 4\n store i32 0, i32* %10, align 4\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %14, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 14
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 14["Block 14:\n store %struct.Matrix* %0, %struct.Matrix** %5, align 8\n %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %16 = icmp ne %struct.Matrix* %2, null\n br i1 %3, label %5, label %4\n"]
- 14 -->|true| 5
- 14 -->|false| 4
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %69\n"]
- 17 --> 69
- 18["Block 18:\n %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %6, i32 0, i32 0\n %21 = load i32**, i32*** %7, align 8\n %22 = icmp ne i32** %8, null\n br i1 %9, label %11, label %10\n"]
- 18 -->|true| 11
- 18 -->|false| 10
- 23["Block 23:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %69\n"]
- 23 --> 69
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %12, i32 0, i32 1\n %27 = load i32, i32* %13, align 8\n %28 = icmp slt i32 %14, 1\n br i1 %15, label %21, label %16\n"]
- 24 -->|true| 21
- 24 -->|false| 16
- 29["Block 29:\n %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %17, i32 0, i32 2\n %32 = load i32, i32* %18, align 4\n %33 = icmp slt i32 %19, 1\n br i1 %20, label %21, label %22\n"]
- 29 -->|true| 21
- 29 -->|false| 22
- 34["Block 34:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %69\n"]
- 34 --> 69
- 35["Block 35:\n %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %23, i32 0, i32 1\n %38 = load i32, i32* %24, align 8\n %39 = icmp sgt i32 %25, 100\n br i1 %26, label %32, label %27\n"]
- 35 -->|true| 32
- 35 -->|false| 27
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %28, i32 0, i32 2\n %43 = load i32, i32* %29, align 4\n %44 = icmp sgt i32 %30, 100\n br i1 %31, label %32, label %33\n"]
- 40 -->|true| 32
- 40 -->|false| 33
- 45["Block 45:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %4, align 4\n br label %69\n"]
- 45 --> 69
- 46["Block 46:\n store i32 0, i32* %6, align 4\n br label %34\n"]
- 46 --> 34
- 47["Block 47:\n %48 = load i32, i32* %6, align 4\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1\n %51 = load i32, i32* %37, align 8\n %52 = icmp slt i32 %35, %38\n br i1 %39, label %40, label %54\n"]
- 47 -->|true| 40
- 47 -->|false| 54
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 0\n %56 = load i32**, i32*** %42, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %44 to i64\n %59 = getelementptr inbounds i32*, i32** %43, i64 %45\n %60 = load i32*, i32** %46, align 8\n %61 = icmp ne i32* %47, null\n br i1 %48, label %50, label %49\n"]
- 53 -->|true| 50
- 53 -->|false| 49
- 62["Block 62:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %69\n"]
- 62 --> 69
- 63["Block 63:\n br label %51\n"]
- 63 --> 51
- 64["Block 64:\n %65 = load i32, i32* %6, align 4\n %66 = add nsw i32 %52, 1\n store i32 %53, i32* %6, align 4\n br label %34\n"]
- 64 --> 34
- 67["Block 67:\n %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %55, i32 0, i32 1\n %70 = load i32, i32* %56, align 8\n %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %58, i32 0, i32 2\n %73 = load i32, i32* %59, align 4\n %74 = icmp eq i32 %57, %60\n %75 = zext i1 %61 to i32\n %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 3\n %78 = load i32, i32* %64, align 8\n %79 = icmp ne i32 %62, %65\n br i1 %66, label %67, label %68\n"]
- 67 -->|true| 67
- 67 -->|false| 68
- 80["Block 80:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %69\n"]
- 80 --> 69
- 81["Block 81:\n store i32 0, i32* %4, align 4\n br label %69\n"]
- 81 --> 69
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %70\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %84, label %target_skip_1\n"]
- target_cond_1 -->|true| 84
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 84["Block 84:\n store i32 0, i32* %11, align 4\n br label %8\n"]
- 84 --> 8
- 85["Block 85:\n %86 = load i32, i32* %10, align 4\n %87 = load i32, i32* %8, align 4\n %88 = icmp slt i32 %4, %5\n br i1 %6, label %7, label %75\n"]
- 85 -->|true| 7
- 85 -->|false| 75
- 89["Block 89:\n %90 = load i32, i32* %9, align 4\n ret i32 %76\n"]
- 91["Block 91:\n %92 = load i32, i32* %11, align 4\n %93 = load i32, i32* %8, align 4\n %94 = icmp slt i32 %9, %10\n br i1 %11, label %12, label %71\n"]
- 91 -->|true| 12
- 91 -->|false| 71
- 95["Block 95:\n %96 = load i32, i32* %10, align 4\n %97 = load i32, i32* %11, align 4\n %98 = icmp eq i32 %13, %14\n br i1 %15, label %16, label %50\n"]
- 95 -->|true| 16
- 95 -->|false| 50
- 99["Block 99:\n br label %72\n"]
- 99 --> 72
- 100["Block 100:\n %101 = load [100 x i32]*, [100 x i32]** %7, align 8\n %102 = load i32, i32* %10, align 4\n %103 = sext i32 %18 to i64\n %104 = getelementptr inbounds [100 x i32], [100 x i32]* %17, i64 %19\n %105 = load i32, i32* %11, align 4\n %106 = sext i32 %21 to i64\n %107 = getelementptr inbounds [100 x i32], [100 x i32]* %20, i64 0, i64 %22\n %108 = load i32, i32* %23, align 4\n %109 = srem i32 %24, 2\n %110 = icmp eq i32 %25, 0\n br i1 %26, label %27, label %38\n"]
- 100 -->|true| 27
- 100 -->|false| 38
- 111["Block 111:\n %112 = load i32, i32* %10, align 4\n %113 = load i32, i32* %11, align 4\n %114 = icmp slt i32 %51, %52\n br i1 %53, label %54, label %66\n"]
- 111 -->|true| 54
- 111 -->|false| 66
- 115["Block 115:\n %116 = load [100 x i32]*, [100 x i32]** %7, align 8\n %117 = load i32, i32* %10, align 4\n %118 = sext i32 %29 to i64\n %119 = getelementptr inbounds [100 x i32], [100 x i32]* %28, i64 %30\n %120 = load i32, i32* %11, align 4\n %121 = sext i32 %32 to i64\n %122 = getelementptr inbounds [100 x i32], [100 x i32]* %31, i64 0, i64 %33\n %123 = load i32, i32* %34, align 4\n %124 = load i32, i32* %9, align 4\n %125 = add nsw i32 %36, %35\n store i32 %37, i32* %9, align 4\n br label %49\n"]
- 115 --> 49
- 126["Block 126:\n %127 = load [100 x i32]*, [100 x i32]** %7, align 8\n %128 = load i32, i32* %10, align 4\n %129 = sext i32 %40 to i64\n %130 = getelementptr inbounds [100 x i32], [100 x i32]* %39, i64 %41\n %131 = load i32, i32* %11, align 4\n %132 = sext i32 %43 to i64\n %133 = getelementptr inbounds [100 x i32], [100 x i32]* %42, i64 0, i64 %44\n %134 = load i32, i32* %45, align 4\n %135 = load i32, i32* %9, align 4\n %136 = sub nsw i32 %47, %46\n store i32 %48, i32* %9, align 4\n br label %49\n"]
- 126 --> 49
- 137["Block 137:\n br label %67\n"]
- 137 --> 67
- 138["Block 138:\n br label %68\n"]
- 138 --> 68
- 139["Block 139:\n %140 = load [100 x i32]*, [100 x i32]** %7, align 8\n %141 = load i32, i32* %10, align 4\n %142 = sext i32 %56 to i64\n %143 = getelementptr inbounds [100 x i32], [100 x i32]* %55, i64 %57\n %144 = load i32, i32* %11, align 4\n %145 = sext i32 %59 to i64\n %146 = getelementptr inbounds [100 x i32], [100 x i32]* %58, i64 0, i64 %60\n %147 = load i32, i32* %61, align 4\n %148 = call i32 @fused_performSimpleCalculations(i1 true, i32 %62)\n %149 = load i32, i32* %9, align 4\n %150 = add nsw i32 %64, %63\n store i32 %65, i32* %9, align 4\n br label %66\n"]
- 139 --> 66
- 151["Block 151:\n br label %67\n"]
- 151 --> 67
- 152["Block 152:\n %153 = load i32, i32* %11, align 4\n %154 = add nsw i32 %69, 1\n store i32 %70, i32* %11, align 4\n br label %8\n"]
- 152 --> 8
- 155["Block 155:\n %156 = load i32, i32* %10, align 4\n %157 = add nsw i32 %73, 1\n store i32 %74, i32* %10, align 4\n br label %target_phi_1\n"]
- 155 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing return instruction in block %82
- [INFO][performCodeFusion] Fixing return instruction in block %89
- [WARNING][performCodeFusion] No terminator found in block: target_phi_1
- [INFO][performCodeFusion] [After fix]Generated control flow graph for fused function:
- ```mermaid: fused_validateMatrix
- graph TD
- entry["Block entry:\n %4 = alloca i32\n %5 = alloca %struct.Matrix*\n %6 = alloca i32\n %7 = alloca [100 x i32]*\n %8 = alloca i32\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store [100 x i32]* %2, [100 x i32]** %7, align 8\n store i32 %3, i32* %8, align 4\n store i32 0, i32* %9, align 4\n store i32 0, i32* %10, align 4\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %14, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 14
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 14["Block 14:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %16 = icmp ne %struct.Matrix* %15, null\n br i1 %16, label %18, label %17\n"]
- 14 -->|true| 18
- 14 -->|false| 17
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 17 --> 82
- 18["Block 18:\n %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %19, i32 0, i32 0\n %21 = load i32**, i32*** %20, align 8\n %22 = icmp ne i32** %21, null\n br i1 %22, label %24, label %23\n"]
- 18 -->|true| 24
- 18 -->|false| 23
- 23["Block 23:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 23 --> 82
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %25, i32 0, i32 1\n %27 = load i32, i32* %26, align 8\n %28 = icmp slt i32 %27, 1\n br i1 %28, label %34, label %29\n"]
- 24 -->|true| 34
- 24 -->|false| 29
- 29["Block 29:\n %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2\n %32 = load i32, i32* %31, align 4\n %33 = icmp slt i32 %32, 1\n br i1 %33, label %34, label %35\n"]
- 29 -->|true| 34
- 29 -->|false| 35
- 34["Block 34:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 34 --> 82
- 35["Block 35:\n %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1\n %38 = load i32, i32* %37, align 8\n %39 = icmp sgt i32 %38, 100\n br i1 %39, label %45, label %40\n"]
- 35 -->|true| 45
- 35 -->|false| 40
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2\n %43 = load i32, i32* %42, align 4\n %44 = icmp sgt i32 %43, 100\n br i1 %44, label %45, label %46\n"]
- 40 -->|true| 45
- 40 -->|false| 46
- 45["Block 45:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %4, align 4\n br label %82\n"]
- 45 --> 82
- 46["Block 46:\n store i32 0, i32* %6, align 4\n br label %47\n"]
- 46 --> 47
- 47["Block 47:\n %48 = load i32, i32* %6, align 4\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 1\n %51 = load i32, i32* %50, align 8\n %52 = icmp slt i32 %48, %51\n br i1 %52, label %53, label %67\n"]
- 47 -->|true| 53
- 47 -->|false| 67
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 0\n %56 = load i32**, i32*** %55, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %57 to i64\n %59 = getelementptr inbounds i32*, i32** %56, i64 %58\n %60 = load i32*, i32** %59, align 8\n %61 = icmp ne i32* %60, null\n br i1 %61, label %63, label %62\n"]
- 53 -->|true| 63
- 53 -->|false| 62
- 62["Block 62:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 62 --> 82
- 63["Block 63:\n br label %64\n"]
- 63 --> 64
- 64["Block 64:\n %65 = load i32, i32* %6, align 4\n %66 = add nsw i32 %65, 1\n store i32 %66, i32* %6, align 4\n br label %47\n"]
- 64 --> 47
- 67["Block 67:\n %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 1\n %70 = load i32, i32* %69, align 8\n %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %71, i32 0, i32 2\n %73 = load i32, i32* %72, align 4\n %74 = icmp eq i32 %70, %73\n %75 = zext i1 %74 to i32\n %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %76, i32 0, i32 3\n %78 = load i32, i32* %77, align 8\n %79 = icmp ne i32 %75, %78\n br i1 %79, label %80, label %81\n"]
- 67 -->|true| 80
- 67 -->|false| 81
- 80["Block 80:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 80 --> 82
- 81["Block 81:\n store i32 0, i32* %4, align 4\n br label %82\n"]
- 81 --> 82
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n ret i32 %83\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %84, label %target_skip_1\n"]
- target_cond_1 -->|true| 84
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 84["Block 84:\n store i32 0, i32* %11, align 4\n br label %91\n"]
- 84 --> 91
- 85["Block 85:\n %86 = load i32, i32* %10, align 4\n %87 = load i32, i32* %8, align 4\n %88 = icmp slt i32 %86, %87\n br i1 %88, label %84, label %89\n"]
- 85 -->|true| 84
- 85 -->|false| 89
- 89["Block 89:\n %90 = load i32, i32* %9, align 4\n ret i32 %90\n"]
- 91["Block 91:\n %92 = load i32, i32* %11, align 4\n %93 = load i32, i32* %8, align 4\n %94 = icmp slt i32 %92, %93\n br i1 %94, label %95, label %99\n"]
- 91 -->|true| 95
- 91 -->|false| 99
- 95["Block 95:\n %96 = load i32, i32* %10, align 4\n %97 = load i32, i32* %11, align 4\n %98 = icmp eq i32 %96, %97\n br i1 %98, label %100, label %111\n"]
- 95 -->|true| 100
- 95 -->|false| 111
- 99["Block 99:\n br label %155\n"]
- 99 --> 155
- 100["Block 100:\n %101 = load [100 x i32]*, [100 x i32]** %7, align 8\n %102 = load i32, i32* %10, align 4\n %103 = sext i32 %102 to i64\n %104 = getelementptr inbounds [100 x i32], [100 x i32]* %101, i64 %103\n %105 = load i32, i32* %11, align 4\n %106 = sext i32 %105 to i64\n %107 = getelementptr inbounds [100 x i32], [100 x i32]* %104, i64 0, i64 %106\n %108 = load i32, i32* %107, align 4\n %109 = srem i32 %108, 2\n %110 = icmp eq i32 %109, 0\n br i1 %110, label %115, label %126\n"]
- 100 -->|true| 115
- 100 -->|false| 126
- 111["Block 111:\n %112 = load i32, i32* %10, align 4\n %113 = load i32, i32* %11, align 4\n %114 = icmp slt i32 %112, %113\n br i1 %114, label %139, label %151\n"]
- 111 -->|true| 139
- 111 -->|false| 151
- 115["Block 115:\n %116 = load [100 x i32]*, [100 x i32]** %7, align 8\n %117 = load i32, i32* %10, align 4\n %118 = sext i32 %117 to i64\n %119 = getelementptr inbounds [100 x i32], [100 x i32]* %116, i64 %118\n %120 = load i32, i32* %11, align 4\n %121 = sext i32 %120 to i64\n %122 = getelementptr inbounds [100 x i32], [100 x i32]* %119, i64 0, i64 %121\n %123 = load i32, i32* %122, align 4\n %124 = load i32, i32* %9, align 4\n %125 = add nsw i32 %124, %123\n store i32 %125, i32* %9, align 4\n br label %137\n"]
- 115 --> 137
- 126["Block 126:\n %127 = load [100 x i32]*, [100 x i32]** %7, align 8\n %128 = load i32, i32* %10, align 4\n %129 = sext i32 %128 to i64\n %130 = getelementptr inbounds [100 x i32], [100 x i32]* %127, i64 %129\n %131 = load i32, i32* %11, align 4\n %132 = sext i32 %131 to i64\n %133 = getelementptr inbounds [100 x i32], [100 x i32]* %130, i64 0, i64 %132\n %134 = load i32, i32* %133, align 4\n %135 = load i32, i32* %9, align 4\n %136 = sub nsw i32 %135, %134\n store i32 %136, i32* %9, align 4\n br label %137\n"]
- 126 --> 137
- 137["Block 137:\n br label %138\n"]
- 137 --> 138
- 138["Block 138:\n br label %152\n"]
- 138 --> 152
- 139["Block 139:\n %140 = load [100 x i32]*, [100 x i32]** %7, align 8\n %141 = load i32, i32* %10, align 4\n %142 = sext i32 %141 to i64\n %143 = getelementptr inbounds [100 x i32], [100 x i32]* %140, i64 %142\n %144 = load i32, i32* %11, align 4\n %145 = sext i32 %144 to i64\n %146 = getelementptr inbounds [100 x i32], [100 x i32]* %143, i64 0, i64 %145\n %147 = load i32, i32* %146, align 4\n %148 = call i32 @fused_performSimpleCalculations(i1 true, i32 %147)\n %149 = load i32, i32* %9, align 4\n %150 = add nsw i32 %149, %148\n store i32 %150, i32* %9, align 4\n br label %151\n"]
- 139 --> 151
- 151["Block 151:\n br label %138\n"]
- 151 --> 138
- 152["Block 152:\n %153 = load i32, i32* %11, align 4\n %154 = add nsw i32 %153, 1\n store i32 %154, i32* %11, align 4\n br label %91\n"]
- 152 --> 91
- 155["Block 155:\n %156 = load i32, i32* %10, align 4\n %157 = add nsw i32 %156, 1\n store i32 %157, i32* %10, align 4\n br label %target_phi_1\n"]
- 155 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Processing struct return type
- [INFO][performCodeFusion] [After fix return]Generated control flow graph for fused function:
- ```mermaid: fused_validateMatrix
- graph TD
- entry["Block entry:\n %4 = alloca i32\n %5 = alloca %struct.Matrix*\n %6 = alloca i32\n %7 = alloca [100 x i32]*\n %8 = alloca i32\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store [100 x i32]* %2, [100 x i32]** %7, align 8\n store i32 %3, i32* %8, align 4\n store i32 0, i32* %9, align 4\n store i32 0, i32* %10, align 4\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %14, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 14
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 14["Block 14:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %16 = icmp ne %struct.Matrix* %15, null\n br i1 %16, label %18, label %17\n"]
- 14 -->|true| 18
- 14 -->|false| 17
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 17 --> 82
- 18["Block 18:\n %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %19, i32 0, i32 0\n %21 = load i32**, i32*** %20, align 8\n %22 = icmp ne i32** %21, null\n br i1 %22, label %24, label %23\n"]
- 18 -->|true| 24
- 18 -->|false| 23
- 23["Block 23:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 23 --> 82
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %25, i32 0, i32 1\n %27 = load i32, i32* %26, align 8\n %28 = icmp slt i32 %27, 1\n br i1 %28, label %34, label %29\n"]
- 24 -->|true| 34
- 24 -->|false| 29
- 29["Block 29:\n %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2\n %32 = load i32, i32* %31, align 4\n %33 = icmp slt i32 %32, 1\n br i1 %33, label %34, label %35\n"]
- 29 -->|true| 34
- 29 -->|false| 35
- 34["Block 34:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 34 --> 82
- 35["Block 35:\n %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1\n %38 = load i32, i32* %37, align 8\n %39 = icmp sgt i32 %38, 100\n br i1 %39, label %45, label %40\n"]
- 35 -->|true| 45
- 35 -->|false| 40
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2\n %43 = load i32, i32* %42, align 4\n %44 = icmp sgt i32 %43, 100\n br i1 %44, label %45, label %46\n"]
- 40 -->|true| 45
- 40 -->|false| 46
- 45["Block 45:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %4, align 4\n br label %82\n"]
- 45 --> 82
- 46["Block 46:\n store i32 0, i32* %6, align 4\n br label %47\n"]
- 46 --> 47
- 47["Block 47:\n %48 = load i32, i32* %6, align 4\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 1\n %51 = load i32, i32* %50, align 8\n %52 = icmp slt i32 %48, %51\n br i1 %52, label %53, label %67\n"]
- 47 -->|true| 53
- 47 -->|false| 67
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 0\n %56 = load i32**, i32*** %55, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %57 to i64\n %59 = getelementptr inbounds i32*, i32** %56, i64 %58\n %60 = load i32*, i32** %59, align 8\n %61 = icmp ne i32* %60, null\n br i1 %61, label %63, label %62\n"]
- 53 -->|true| 63
- 53 -->|false| 62
- 62["Block 62:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 62 --> 82
- 63["Block 63:\n br label %64\n"]
- 63 --> 64
- 64["Block 64:\n %65 = load i32, i32* %6, align 4\n %66 = add nsw i32 %65, 1\n store i32 %66, i32* %6, align 4\n br label %47\n"]
- 64 --> 47
- 67["Block 67:\n %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 1\n %70 = load i32, i32* %69, align 8\n %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %71, i32 0, i32 2\n %73 = load i32, i32* %72, align 4\n %74 = icmp eq i32 %70, %73\n %75 = zext i1 %74 to i32\n %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %76, i32 0, i32 3\n %78 = load i32, i32* %77, align 8\n %79 = icmp ne i32 %75, %78\n br i1 %79, label %80, label %81\n"]
- 67 -->|true| 80
- 67 -->|false| 81
- 80["Block 80:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 80 --> 82
- 81["Block 81:\n store i32 0, i32* %4, align 4\n br label %82\n"]
- 81 --> 82
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n %84 = insertvalue %fused_return_validateMatrix_processMatrix { i32 0, i32 undef }, i32 %83, 1\n ret %fused_return_validateMatrix_processMatrix %84\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %85, label %target_skip_1\n"]
- target_cond_1 -->|true| 85
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 85["Block 85:\n store i32 0, i32* %11, align 4\n br label %94\n"]
- 85 --> 94
- 86["Block 86:\n %87 = load i32, i32* %10, align 4\n %88 = load i32, i32* %8, align 4\n %89 = icmp slt i32 %87, %88\n br i1 %89, label %85, label %90\n"]
- 86 -->|true| 85
- 86 -->|false| 90
- 90["Block 90:\n %91 = load i32, i32* %9, align 4\n %92 = insertvalue %fused_return_validateMatrix_processMatrix undef, i32 %91, 0\n %93 = insertvalue %fused_return_validateMatrix_processMatrix %92, i32 0, 1\n ret %fused_return_validateMatrix_processMatrix %93\n"]
- 94["Block 94:\n %95 = load i32, i32* %11, align 4\n %96 = load i32, i32* %8, align 4\n %97 = icmp slt i32 %95, %96\n br i1 %97, label %98, label %102\n"]
- 94 -->|true| 98
- 94 -->|false| 102
- 98["Block 98:\n %99 = load i32, i32* %10, align 4\n %100 = load i32, i32* %11, align 4\n %101 = icmp eq i32 %99, %100\n br i1 %101, label %103, label %114\n"]
- 98 -->|true| 103
- 98 -->|false| 114
- 102["Block 102:\n br label %158\n"]
- 102 --> 158
- 103["Block 103:\n %104 = load [100 x i32]*, [100 x i32]** %7, align 8\n %105 = load i32, i32* %10, align 4\n %106 = sext i32 %105 to i64\n %107 = getelementptr inbounds [100 x i32], [100 x i32]* %104, i64 %106\n %108 = load i32, i32* %11, align 4\n %109 = sext i32 %108 to i64\n %110 = getelementptr inbounds [100 x i32], [100 x i32]* %107, i64 0, i64 %109\n %111 = load i32, i32* %110, align 4\n %112 = srem i32 %111, 2\n %113 = icmp eq i32 %112, 0\n br i1 %113, label %118, label %129\n"]
- 103 -->|true| 118
- 103 -->|false| 129
- 114["Block 114:\n %115 = load i32, i32* %10, align 4\n %116 = load i32, i32* %11, align 4\n %117 = icmp slt i32 %115, %116\n br i1 %117, label %142, label %154\n"]
- 114 -->|true| 142
- 114 -->|false| 154
- 118["Block 118:\n %119 = load [100 x i32]*, [100 x i32]** %7, align 8\n %120 = load i32, i32* %10, align 4\n %121 = sext i32 %120 to i64\n %122 = getelementptr inbounds [100 x i32], [100 x i32]* %119, i64 %121\n %123 = load i32, i32* %11, align 4\n %124 = sext i32 %123 to i64\n %125 = getelementptr inbounds [100 x i32], [100 x i32]* %122, i64 0, i64 %124\n %126 = load i32, i32* %125, align 4\n %127 = load i32, i32* %9, align 4\n %128 = add nsw i32 %127, %126\n store i32 %128, i32* %9, align 4\n br label %140\n"]
- 118 --> 140
- 129["Block 129:\n %130 = load [100 x i32]*, [100 x i32]** %7, align 8\n %131 = load i32, i32* %10, align 4\n %132 = sext i32 %131 to i64\n %133 = getelementptr inbounds [100 x i32], [100 x i32]* %130, i64 %132\n %134 = load i32, i32* %11, align 4\n %135 = sext i32 %134 to i64\n %136 = getelementptr inbounds [100 x i32], [100 x i32]* %133, i64 0, i64 %135\n %137 = load i32, i32* %136, align 4\n %138 = load i32, i32* %9, align 4\n %139 = sub nsw i32 %138, %137\n store i32 %139, i32* %9, align 4\n br label %140\n"]
- 129 --> 140
- 140["Block 140:\n br label %141\n"]
- 140 --> 141
- 141["Block 141:\n br label %155\n"]
- 141 --> 155
- 142["Block 142:\n %143 = load [100 x i32]*, [100 x i32]** %7, align 8\n %144 = load i32, i32* %10, align 4\n %145 = sext i32 %144 to i64\n %146 = getelementptr inbounds [100 x i32], [100 x i32]* %143, i64 %145\n %147 = load i32, i32* %11, align 4\n %148 = sext i32 %147 to i64\n %149 = getelementptr inbounds [100 x i32], [100 x i32]* %146, i64 0, i64 %148\n %150 = load i32, i32* %149, align 4\n %151 = call i32 @fused_performSimpleCalculations(i1 true, i32 %150)\n %152 = load i32, i32* %9, align 4\n %153 = add nsw i32 %152, %151\n store i32 %153, i32* %9, align 4\n br label %154\n"]
- 142 --> 154
- 154["Block 154:\n br label %141\n"]
- 154 --> 141
- 155["Block 155:\n %156 = load i32, i32* %11, align 4\n %157 = add nsw i32 %156, 1\n store i32 %157, i32* %11, align 4\n br label %94\n"]
- 155 --> 94
- 158["Block 158:\n %159 = load i32, i32* %10, align 4\n %160 = add nsw i32 %159, 1\n store i32 %160, i32* %10, align 4\n br label %target_phi_1\n"]
- 158 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [DEBUG][updateCallSite] Original call instruction:
- %14 = call i32 @processMatrix([100 x i32]* %13, i32 3)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Parameter type: struct.struct.Matrix*
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=[100 x i32]*
- [DEBUG][updateCallSite] Argument 1: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %14 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %13, i32 3)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: i32
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %14 = call i32 @processMatrix([100 x i32]* %13, i32 3) to %14 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %13, i32 3)
- [INFO][performCodeFusion] [After update call site]Generated control flow graph for fused function:
- ```mermaid: fused_validateMatrix
- graph TD
- entry["Block entry:\n %4 = alloca i32\n %5 = alloca %struct.Matrix*\n %6 = alloca i32\n %7 = alloca [100 x i32]*\n %8 = alloca i32\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store [100 x i32]* %2, [100 x i32]** %7, align 8\n store i32 %3, i32* %8, align 4\n store i32 0, i32* %9, align 4\n store i32 0, i32* %10, align 4\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %14, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 14
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 14["Block 14:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %16 = icmp ne %struct.Matrix* %15, null\n br i1 %16, label %18, label %17\n"]
- 14 -->|true| 18
- 14 -->|false| 17
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 17 --> 82
- 18["Block 18:\n %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %19, i32 0, i32 0\n %21 = load i32**, i32*** %20, align 8\n %22 = icmp ne i32** %21, null\n br i1 %22, label %24, label %23\n"]
- 18 -->|true| 24
- 18 -->|false| 23
- 23["Block 23:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 23 --> 82
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %25, i32 0, i32 1\n %27 = load i32, i32* %26, align 8\n %28 = icmp slt i32 %27, 1\n br i1 %28, label %34, label %29\n"]
- 24 -->|true| 34
- 24 -->|false| 29
- 29["Block 29:\n %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2\n %32 = load i32, i32* %31, align 4\n %33 = icmp slt i32 %32, 1\n br i1 %33, label %34, label %35\n"]
- 29 -->|true| 34
- 29 -->|false| 35
- 34["Block 34:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 34 --> 82
- 35["Block 35:\n %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1\n %38 = load i32, i32* %37, align 8\n %39 = icmp sgt i32 %38, 100\n br i1 %39, label %45, label %40\n"]
- 35 -->|true| 45
- 35 -->|false| 40
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2\n %43 = load i32, i32* %42, align 4\n %44 = icmp sgt i32 %43, 100\n br i1 %44, label %45, label %46\n"]
- 40 -->|true| 45
- 40 -->|false| 46
- 45["Block 45:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %4, align 4\n br label %82\n"]
- 45 --> 82
- 46["Block 46:\n store i32 0, i32* %6, align 4\n br label %47\n"]
- 46 --> 47
- 47["Block 47:\n %48 = load i32, i32* %6, align 4\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 1\n %51 = load i32, i32* %50, align 8\n %52 = icmp slt i32 %48, %51\n br i1 %52, label %53, label %67\n"]
- 47 -->|true| 53
- 47 -->|false| 67
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 0\n %56 = load i32**, i32*** %55, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %57 to i64\n %59 = getelementptr inbounds i32*, i32** %56, i64 %58\n %60 = load i32*, i32** %59, align 8\n %61 = icmp ne i32* %60, null\n br i1 %61, label %63, label %62\n"]
- 53 -->|true| 63
- 53 -->|false| 62
- 62["Block 62:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 62 --> 82
- 63["Block 63:\n br label %64\n"]
- 63 --> 64
- 64["Block 64:\n %65 = load i32, i32* %6, align 4\n %66 = add nsw i32 %65, 1\n store i32 %66, i32* %6, align 4\n br label %47\n"]
- 64 --> 47
- 67["Block 67:\n %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 1\n %70 = load i32, i32* %69, align 8\n %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %71, i32 0, i32 2\n %73 = load i32, i32* %72, align 4\n %74 = icmp eq i32 %70, %73\n %75 = zext i1 %74 to i32\n %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %76, i32 0, i32 3\n %78 = load i32, i32* %77, align 8\n %79 = icmp ne i32 %75, %78\n br i1 %79, label %80, label %81\n"]
- 67 -->|true| 80
- 67 -->|false| 81
- 80["Block 80:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 80 --> 82
- 81["Block 81:\n store i32 0, i32* %4, align 4\n br label %82\n"]
- 81 --> 82
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n %84 = insertvalue %fused_return_validateMatrix_processMatrix { i32 0, i32 undef }, i32 %83, 1\n ret %fused_return_validateMatrix_processMatrix %84\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %85, label %target_skip_1\n"]
- target_cond_1 -->|true| 85
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 85["Block 85:\n store i32 0, i32* %11, align 4\n br label %94\n"]
- 85 --> 94
- 86["Block 86:\n %87 = load i32, i32* %10, align 4\n %88 = load i32, i32* %8, align 4\n %89 = icmp slt i32 %87, %88\n br i1 %89, label %85, label %90\n"]
- 86 -->|true| 85
- 86 -->|false| 90
- 90["Block 90:\n %91 = load i32, i32* %9, align 4\n %92 = insertvalue %fused_return_validateMatrix_processMatrix undef, i32 %91, 0\n %93 = insertvalue %fused_return_validateMatrix_processMatrix %92, i32 0, 1\n ret %fused_return_validateMatrix_processMatrix %93\n"]
- 94["Block 94:\n %95 = load i32, i32* %11, align 4\n %96 = load i32, i32* %8, align 4\n %97 = icmp slt i32 %95, %96\n br i1 %97, label %98, label %102\n"]
- 94 -->|true| 98
- 94 -->|false| 102
- 98["Block 98:\n %99 = load i32, i32* %10, align 4\n %100 = load i32, i32* %11, align 4\n %101 = icmp eq i32 %99, %100\n br i1 %101, label %103, label %114\n"]
- 98 -->|true| 103
- 98 -->|false| 114
- 102["Block 102:\n br label %158\n"]
- 102 --> 158
- 103["Block 103:\n %104 = load [100 x i32]*, [100 x i32]** %7, align 8\n %105 = load i32, i32* %10, align 4\n %106 = sext i32 %105 to i64\n %107 = getelementptr inbounds [100 x i32], [100 x i32]* %104, i64 %106\n %108 = load i32, i32* %11, align 4\n %109 = sext i32 %108 to i64\n %110 = getelementptr inbounds [100 x i32], [100 x i32]* %107, i64 0, i64 %109\n %111 = load i32, i32* %110, align 4\n %112 = srem i32 %111, 2\n %113 = icmp eq i32 %112, 0\n br i1 %113, label %118, label %129\n"]
- 103 -->|true| 118
- 103 -->|false| 129
- 114["Block 114:\n %115 = load i32, i32* %10, align 4\n %116 = load i32, i32* %11, align 4\n %117 = icmp slt i32 %115, %116\n br i1 %117, label %142, label %154\n"]
- 114 -->|true| 142
- 114 -->|false| 154
- 118["Block 118:\n %119 = load [100 x i32]*, [100 x i32]** %7, align 8\n %120 = load i32, i32* %10, align 4\n %121 = sext i32 %120 to i64\n %122 = getelementptr inbounds [100 x i32], [100 x i32]* %119, i64 %121\n %123 = load i32, i32* %11, align 4\n %124 = sext i32 %123 to i64\n %125 = getelementptr inbounds [100 x i32], [100 x i32]* %122, i64 0, i64 %124\n %126 = load i32, i32* %125, align 4\n %127 = load i32, i32* %9, align 4\n %128 = add nsw i32 %127, %126\n store i32 %128, i32* %9, align 4\n br label %140\n"]
- 118 --> 140
- 129["Block 129:\n %130 = load [100 x i32]*, [100 x i32]** %7, align 8\n %131 = load i32, i32* %10, align 4\n %132 = sext i32 %131 to i64\n %133 = getelementptr inbounds [100 x i32], [100 x i32]* %130, i64 %132\n %134 = load i32, i32* %11, align 4\n %135 = sext i32 %134 to i64\n %136 = getelementptr inbounds [100 x i32], [100 x i32]* %133, i64 0, i64 %135\n %137 = load i32, i32* %136, align 4\n %138 = load i32, i32* %9, align 4\n %139 = sub nsw i32 %138, %137\n store i32 %139, i32* %9, align 4\n br label %140\n"]
- 129 --> 140
- 140["Block 140:\n br label %141\n"]
- 140 --> 141
- 141["Block 141:\n br label %155\n"]
- 141 --> 155
- 142["Block 142:\n %143 = load [100 x i32]*, [100 x i32]** %7, align 8\n %144 = load i32, i32* %10, align 4\n %145 = sext i32 %144 to i64\n %146 = getelementptr inbounds [100 x i32], [100 x i32]* %143, i64 %145\n %147 = load i32, i32* %11, align 4\n %148 = sext i32 %147 to i64\n %149 = getelementptr inbounds [100 x i32], [100 x i32]* %146, i64 0, i64 %148\n %150 = load i32, i32* %149, align 4\n %151 = call i32 @fused_performSimpleCalculations(i1 true, i32 %150)\n %152 = load i32, i32* %9, align 4\n %153 = add nsw i32 %152, %151\n store i32 %153, i32* %9, align 4\n br label %154\n"]
- 142 --> 154
- 154["Block 154:\n br label %141\n"]
- 154 --> 141
- 155["Block 155:\n %156 = load i32, i32* %11, align 4\n %157 = add nsw i32 %156, 1\n store i32 %157, i32* %11, align 4\n br label %94\n"]
- 155 --> 94
- 158["Block 158:\n %159 = load i32, i32* %10, align 4\n %160 = add nsw i32 %159, 1\n store i32 %160, i32* %10, align 4\n br label %target_phi_1\n"]
- 158 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing blocks without terminators...
- [INFO][performCodeFusion] Added return with default value to block: target_phi_1
- [INFO][performCodeFusion] Starting PHI node repair
- [INFO][performCodeFusion] [After fix PHI]Generated control flow graph for fused function:
- ```mermaid: fused_validateMatrix
- graph TD
- entry["Block entry:\n %4 = alloca i32\n %5 = alloca %struct.Matrix*\n %6 = alloca i32\n %7 = alloca [100 x i32]*\n %8 = alloca i32\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store [100 x i32]* %2, [100 x i32]** %7, align 8\n store i32 %3, i32* %8, align 4\n store i32 0, i32* %9, align 4\n store i32 0, i32* %10, align 4\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %14, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 14
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 14["Block 14:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %16 = icmp ne %struct.Matrix* %15, null\n br i1 %16, label %18, label %17\n"]
- 14 -->|true| 18
- 14 -->|false| 17
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 17 --> 82
- 18["Block 18:\n %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %19, i32 0, i32 0\n %21 = load i32**, i32*** %20, align 8\n %22 = icmp ne i32** %21, null\n br i1 %22, label %24, label %23\n"]
- 18 -->|true| 24
- 18 -->|false| 23
- 23["Block 23:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 23 --> 82
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %25, i32 0, i32 1\n %27 = load i32, i32* %26, align 8\n %28 = icmp slt i32 %27, 1\n br i1 %28, label %34, label %29\n"]
- 24 -->|true| 34
- 24 -->|false| 29
- 29["Block 29:\n %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2\n %32 = load i32, i32* %31, align 4\n %33 = icmp slt i32 %32, 1\n br i1 %33, label %34, label %35\n"]
- 29 -->|true| 34
- 29 -->|false| 35
- 34["Block 34:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 34 --> 82
- 35["Block 35:\n %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1\n %38 = load i32, i32* %37, align 8\n %39 = icmp sgt i32 %38, 100\n br i1 %39, label %45, label %40\n"]
- 35 -->|true| 45
- 35 -->|false| 40
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2\n %43 = load i32, i32* %42, align 4\n %44 = icmp sgt i32 %43, 100\n br i1 %44, label %45, label %46\n"]
- 40 -->|true| 45
- 40 -->|false| 46
- 45["Block 45:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %4, align 4\n br label %82\n"]
- 45 --> 82
- 46["Block 46:\n store i32 0, i32* %6, align 4\n br label %47\n"]
- 46 --> 47
- 47["Block 47:\n %48 = load i32, i32* %6, align 4\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 1\n %51 = load i32, i32* %50, align 8\n %52 = icmp slt i32 %48, %51\n br i1 %52, label %53, label %67\n"]
- 47 -->|true| 53
- 47 -->|false| 67
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 0\n %56 = load i32**, i32*** %55, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %57 to i64\n %59 = getelementptr inbounds i32*, i32** %56, i64 %58\n %60 = load i32*, i32** %59, align 8\n %61 = icmp ne i32* %60, null\n br i1 %61, label %63, label %62\n"]
- 53 -->|true| 63
- 53 -->|false| 62
- 62["Block 62:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 62 --> 82
- 63["Block 63:\n br label %64\n"]
- 63 --> 64
- 64["Block 64:\n %65 = load i32, i32* %6, align 4\n %66 = add nsw i32 %65, 1\n store i32 %66, i32* %6, align 4\n br label %47\n"]
- 64 --> 47
- 67["Block 67:\n %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 1\n %70 = load i32, i32* %69, align 8\n %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %71, i32 0, i32 2\n %73 = load i32, i32* %72, align 4\n %74 = icmp eq i32 %70, %73\n %75 = zext i1 %74 to i32\n %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %76, i32 0, i32 3\n %78 = load i32, i32* %77, align 8\n %79 = icmp ne i32 %75, %78\n br i1 %79, label %80, label %81\n"]
- 67 -->|true| 80
- 67 -->|false| 81
- 80["Block 80:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 80 --> 82
- 81["Block 81:\n store i32 0, i32* %4, align 4\n br label %82\n"]
- 81 --> 82
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n %84 = insertvalue %fused_return_validateMatrix_processMatrix { i32 0, i32 undef }, i32 %83, 1\n ret %fused_return_validateMatrix_processMatrix %84\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %85, label %target_skip_1\n"]
- target_cond_1 -->|true| 85
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret %fused_return_validateMatrix_processMatrix zeroinitializer\n"]
- 85["Block 85:\n store i32 0, i32* %11, align 4\n br label %94\n"]
- 85 --> 94
- 86["Block 86:\n %87 = load i32, i32* %10, align 4\n %88 = load i32, i32* %8, align 4\n %89 = icmp slt i32 %87, %88\n br i1 %89, label %85, label %90\n"]
- 86 -->|true| 85
- 86 -->|false| 90
- 90["Block 90:\n %91 = load i32, i32* %9, align 4\n %92 = insertvalue %fused_return_validateMatrix_processMatrix undef, i32 %91, 0\n %93 = insertvalue %fused_return_validateMatrix_processMatrix %92, i32 0, 1\n ret %fused_return_validateMatrix_processMatrix %93\n"]
- 94["Block 94:\n %95 = load i32, i32* %11, align 4\n %96 = load i32, i32* %8, align 4\n %97 = icmp slt i32 %95, %96\n br i1 %97, label %98, label %102\n"]
- 94 -->|true| 98
- 94 -->|false| 102
- 98["Block 98:\n %99 = load i32, i32* %10, align 4\n %100 = load i32, i32* %11, align 4\n %101 = icmp eq i32 %99, %100\n br i1 %101, label %103, label %114\n"]
- 98 -->|true| 103
- 98 -->|false| 114
- 102["Block 102:\n br label %158\n"]
- 102 --> 158
- 103["Block 103:\n %104 = load [100 x i32]*, [100 x i32]** %7, align 8\n %105 = load i32, i32* %10, align 4\n %106 = sext i32 %105 to i64\n %107 = getelementptr inbounds [100 x i32], [100 x i32]* %104, i64 %106\n %108 = load i32, i32* %11, align 4\n %109 = sext i32 %108 to i64\n %110 = getelementptr inbounds [100 x i32], [100 x i32]* %107, i64 0, i64 %109\n %111 = load i32, i32* %110, align 4\n %112 = srem i32 %111, 2\n %113 = icmp eq i32 %112, 0\n br i1 %113, label %118, label %129\n"]
- 103 -->|true| 118
- 103 -->|false| 129
- 114["Block 114:\n %115 = load i32, i32* %10, align 4\n %116 = load i32, i32* %11, align 4\n %117 = icmp slt i32 %115, %116\n br i1 %117, label %142, label %154\n"]
- 114 -->|true| 142
- 114 -->|false| 154
- 118["Block 118:\n %119 = load [100 x i32]*, [100 x i32]** %7, align 8\n %120 = load i32, i32* %10, align 4\n %121 = sext i32 %120 to i64\n %122 = getelementptr inbounds [100 x i32], [100 x i32]* %119, i64 %121\n %123 = load i32, i32* %11, align 4\n %124 = sext i32 %123 to i64\n %125 = getelementptr inbounds [100 x i32], [100 x i32]* %122, i64 0, i64 %124\n %126 = load i32, i32* %125, align 4\n %127 = load i32, i32* %9, align 4\n %128 = add nsw i32 %127, %126\n store i32 %128, i32* %9, align 4\n br label %140\n"]
- 118 --> 140
- 129["Block 129:\n %130 = load [100 x i32]*, [100 x i32]** %7, align 8\n %131 = load i32, i32* %10, align 4\n %132 = sext i32 %131 to i64\n %133 = getelementptr inbounds [100 x i32], [100 x i32]* %130, i64 %132\n %134 = load i32, i32* %11, align 4\n %135 = sext i32 %134 to i64\n %136 = getelementptr inbounds [100 x i32], [100 x i32]* %133, i64 0, i64 %135\n %137 = load i32, i32* %136, align 4\n %138 = load i32, i32* %9, align 4\n %139 = sub nsw i32 %138, %137\n store i32 %139, i32* %9, align 4\n br label %140\n"]
- 129 --> 140
- 140["Block 140:\n br label %141\n"]
- 140 --> 141
- 141["Block 141:\n br label %155\n"]
- 141 --> 155
- 142["Block 142:\n %143 = load [100 x i32]*, [100 x i32]** %7, align 8\n %144 = load i32, i32* %10, align 4\n %145 = sext i32 %144 to i64\n %146 = getelementptr inbounds [100 x i32], [100 x i32]* %143, i64 %145\n %147 = load i32, i32* %11, align 4\n %148 = sext i32 %147 to i64\n %149 = getelementptr inbounds [100 x i32], [100 x i32]* %146, i64 0, i64 %148\n %150 = load i32, i32* %149, align 4\n %151 = call i32 @fused_performSimpleCalculations(i1 true, i32 %150)\n %152 = load i32, i32* %9, align 4\n %153 = add nsw i32 %152, %151\n store i32 %153, i32* %9, align 4\n br label %154\n"]
- 142 --> 154
- 154["Block 154:\n br label %141\n"]
- 154 --> 141
- 155["Block 155:\n %156 = load i32, i32* %11, align 4\n %157 = add nsw i32 %156, 1\n store i32 %157, i32* %11, align 4\n br label %94\n"]
- 155 --> 94
- 158["Block 158:\n %159 = load i32, i32* %10, align 4\n %160 = add nsw i32 %159, 1\n store i32 %160, i32* %10, align 4\n br label %target_phi_1\n"]
- 158 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Attempting to delete original functions...
- [INFO][performCodeFusion] [After erase]Generated control flow graph for fused function:
- ```mermaid: fused_validateMatrix
- graph TD
- entry["Block entry:\n %4 = alloca i32\n %5 = alloca %struct.Matrix*\n %6 = alloca i32\n %7 = alloca [100 x i32]*\n %8 = alloca i32\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i32\n %12 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %13, label %target_skip_0\n"]
- target_cond_0 -->|true| 13
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 13["Block 13:\n store [100 x i32]* %2, [100 x i32]** %7, align 8\n store i32 %3, i32* %8, align 4\n store i32 0, i32* %9, align 4\n store i32 0, i32* %10, align 4\n br label %target_phi_0\n"]
- 13 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %12, label %14, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 14
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 14["Block 14:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n %15 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %16 = icmp ne %struct.Matrix* %15, null\n br i1 %16, label %18, label %17\n"]
- 14 -->|true| 18
- 14 -->|false| 17
- 17["Block 17:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 17 --> 82
- 18["Block 18:\n %19 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %20 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %19, i32 0, i32 0\n %21 = load i32**, i32*** %20, align 8\n %22 = icmp ne i32** %21, null\n br i1 %22, label %24, label %23\n"]
- 18 -->|true| 24
- 18 -->|false| 23
- 23["Block 23:\n call void @setErrorMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.45, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 23 --> 82
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %26 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %25, i32 0, i32 1\n %27 = load i32, i32* %26, align 8\n %28 = icmp slt i32 %27, 1\n br i1 %28, label %34, label %29\n"]
- 24 -->|true| 34
- 24 -->|false| 29
- 29["Block 29:\n %30 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %31 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2\n %32 = load i32, i32* %31, align 4\n %33 = icmp slt i32 %32, 1\n br i1 %33, label %34, label %35\n"]
- 29 -->|true| 34
- 29 -->|false| 35
- 34["Block 34:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 34 --> 82
- 35["Block 35:\n %36 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %37 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %36, i32 0, i32 1\n %38 = load i32, i32* %37, align 8\n %39 = icmp sgt i32 %38, 100\n br i1 %39, label %45, label %40\n"]
- 35 -->|true| 45
- 35 -->|false| 40
- 40["Block 40:\n %41 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %42 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 2\n %43 = load i32, i32* %42, align 4\n %44 = icmp sgt i32 %43, 100\n br i1 %44, label %45, label %46\n"]
- 40 -->|true| 45
- 40 -->|false| 46
- 45["Block 45:\n call void @setErrorMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.46, i64 0, i64 0))\n store i32 3, i32* %4, align 4\n br label %82\n"]
- 45 --> 82
- 46["Block 46:\n store i32 0, i32* %6, align 4\n br label %47\n"]
- 46 --> 47
- 47["Block 47:\n %48 = load i32, i32* %6, align 4\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 1\n %51 = load i32, i32* %50, align 8\n %52 = icmp slt i32 %48, %51\n br i1 %52, label %53, label %67\n"]
- 47 -->|true| 53
- 47 -->|false| 67
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 0\n %56 = load i32**, i32*** %55, align 8\n %57 = load i32, i32* %6, align 4\n %58 = sext i32 %57 to i64\n %59 = getelementptr inbounds i32*, i32** %56, i64 %58\n %60 = load i32*, i32** %59, align 8\n %61 = icmp ne i32* %60, null\n br i1 %61, label %63, label %62\n"]
- 53 -->|true| 63
- 53 -->|false| 62
- 62["Block 62:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.47, i64 0, i64 0))\n store i32 7, i32* %4, align 4\n br label %82\n"]
- 62 --> 82
- 63["Block 63:\n br label %64\n"]
- 63 --> 64
- 64["Block 64:\n %65 = load i32, i32* %6, align 4\n %66 = add nsw i32 %65, 1\n store i32 %66, i32* %6, align 4\n br label %47\n"]
- 64 --> 47
- 67["Block 67:\n %68 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %69 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 1\n %70 = load i32, i32* %69, align 8\n %71 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %72 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %71, i32 0, i32 2\n %73 = load i32, i32* %72, align 4\n %74 = icmp eq i32 %70, %73\n %75 = zext i1 %74 to i32\n %76 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %77 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %76, i32 0, i32 3\n %78 = load i32, i32* %77, align 8\n %79 = icmp ne i32 %75, %78\n br i1 %79, label %80, label %81\n"]
- 67 -->|true| 80
- 67 -->|false| 81
- 80["Block 80:\n call void @setErrorMessage(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.48, i64 0, i64 0))\n store i32 1, i32* %4, align 4\n br label %82\n"]
- 80 --> 82
- 81["Block 81:\n store i32 0, i32* %4, align 4\n br label %82\n"]
- 81 --> 82
- 82["Block 82:\n %83 = load i32, i32* %4, align 4\n %84 = insertvalue %fused_return_validateMatrix_processMatrix { i32 0, i32 undef }, i32 %83, 1\n ret %fused_return_validateMatrix_processMatrix %84\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %85, label %target_skip_1\n"]
- target_cond_1 -->|true| 85
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret %fused_return_validateMatrix_processMatrix zeroinitializer\n"]
- 85["Block 85:\n store i32 0, i32* %11, align 4\n br label %94\n"]
- 85 --> 94
- 86["Block 86:\n %87 = load i32, i32* %10, align 4\n %88 = load i32, i32* %8, align 4\n %89 = icmp slt i32 %87, %88\n br i1 %89, label %85, label %90\n"]
- 86 -->|true| 85
- 86 -->|false| 90
- 90["Block 90:\n %91 = load i32, i32* %9, align 4\n %92 = insertvalue %fused_return_validateMatrix_processMatrix undef, i32 %91, 0\n %93 = insertvalue %fused_return_validateMatrix_processMatrix %92, i32 0, 1\n ret %fused_return_validateMatrix_processMatrix %93\n"]
- 94["Block 94:\n %95 = load i32, i32* %11, align 4\n %96 = load i32, i32* %8, align 4\n %97 = icmp slt i32 %95, %96\n br i1 %97, label %98, label %102\n"]
- 94 -->|true| 98
- 94 -->|false| 102
- 98["Block 98:\n %99 = load i32, i32* %10, align 4\n %100 = load i32, i32* %11, align 4\n %101 = icmp eq i32 %99, %100\n br i1 %101, label %103, label %114\n"]
- 98 -->|true| 103
- 98 -->|false| 114
- 102["Block 102:\n br label %158\n"]
- 102 --> 158
- 103["Block 103:\n %104 = load [100 x i32]*, [100 x i32]** %7, align 8\n %105 = load i32, i32* %10, align 4\n %106 = sext i32 %105 to i64\n %107 = getelementptr inbounds [100 x i32], [100 x i32]* %104, i64 %106\n %108 = load i32, i32* %11, align 4\n %109 = sext i32 %108 to i64\n %110 = getelementptr inbounds [100 x i32], [100 x i32]* %107, i64 0, i64 %109\n %111 = load i32, i32* %110, align 4\n %112 = srem i32 %111, 2\n %113 = icmp eq i32 %112, 0\n br i1 %113, label %118, label %129\n"]
- 103 -->|true| 118
- 103 -->|false| 129
- 114["Block 114:\n %115 = load i32, i32* %10, align 4\n %116 = load i32, i32* %11, align 4\n %117 = icmp slt i32 %115, %116\n br i1 %117, label %142, label %154\n"]
- 114 -->|true| 142
- 114 -->|false| 154
- 118["Block 118:\n %119 = load [100 x i32]*, [100 x i32]** %7, align 8\n %120 = load i32, i32* %10, align 4\n %121 = sext i32 %120 to i64\n %122 = getelementptr inbounds [100 x i32], [100 x i32]* %119, i64 %121\n %123 = load i32, i32* %11, align 4\n %124 = sext i32 %123 to i64\n %125 = getelementptr inbounds [100 x i32], [100 x i32]* %122, i64 0, i64 %124\n %126 = load i32, i32* %125, align 4\n %127 = load i32, i32* %9, align 4\n %128 = add nsw i32 %127, %126\n store i32 %128, i32* %9, align 4\n br label %140\n"]
- 118 --> 140
- 129["Block 129:\n %130 = load [100 x i32]*, [100 x i32]** %7, align 8\n %131 = load i32, i32* %10, align 4\n %132 = sext i32 %131 to i64\n %133 = getelementptr inbounds [100 x i32], [100 x i32]* %130, i64 %132\n %134 = load i32, i32* %11, align 4\n %135 = sext i32 %134 to i64\n %136 = getelementptr inbounds [100 x i32], [100 x i32]* %133, i64 0, i64 %135\n %137 = load i32, i32* %136, align 4\n %138 = load i32, i32* %9, align 4\n %139 = sub nsw i32 %138, %137\n store i32 %139, i32* %9, align 4\n br label %140\n"]
- 129 --> 140
- 140["Block 140:\n br label %141\n"]
- 140 --> 141
- 141["Block 141:\n br label %155\n"]
- 141 --> 155
- 142["Block 142:\n %143 = load [100 x i32]*, [100 x i32]** %7, align 8\n %144 = load i32, i32* %10, align 4\n %145 = sext i32 %144 to i64\n %146 = getelementptr inbounds [100 x i32], [100 x i32]* %143, i64 %145\n %147 = load i32, i32* %11, align 4\n %148 = sext i32 %147 to i64\n %149 = getelementptr inbounds [100 x i32], [100 x i32]* %146, i64 0, i64 %148\n %150 = load i32, i32* %149, align 4\n %151 = call i32 @fused_performSimpleCalculations(i1 true, i32 %150)\n %152 = load i32, i32* %9, align 4\n %153 = add nsw i32 %152, %151\n store i32 %153, i32* %9, align 4\n br label %154\n"]
- 142 --> 154
- 154["Block 154:\n br label %141\n"]
- 154 --> 141
- 155["Block 155:\n %156 = load i32, i32* %11, align 4\n %157 = add nsw i32 %156, 1\n store i32 %157, i32* %11, align 4\n br label %94\n"]
- 155 --> 94
- 158["Block 158:\n %159 = load i32, i32* %10, align 4\n %160 = add nsw i32 %159, 1\n store i32 %160, i32* %10, align 4\n br label %target_phi_1\n"]
- 158 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Completed function fusion: fused_validateMatrix
- [INFO][performCodeFusion] Processing function pair: target=projectB_main, bunker=pushBack
- [INFO][performCodeFusion] [After clone]Generated control flow graph for fused function:
- ```mermaid: fused_pushBack
- graph TD
- entry["Block entry:\n %3 = alloca %struct.DynamicArray*\n %4 = alloca i32\n %5 = alloca i32\n %6 = alloca i32*\n %7 = alloca [14 x i8]\n %8 = alloca [8 x i32]\n %9 = alloca i32\n %10 = alloca [100 x [100 x i32]]\n %11 = alloca i32\n %12 = alloca i32\n %13 = alloca i32\n %14 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %15, label %target_skip_0\n"]
- target_cond_0 -->|true| 15
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 15["Block 15:\n %16 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %17 = bitcast [14 x i8]* %7 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0\n call void @reverseString(i8* %3)\n %19 = bitcast [8 x i32]* %8 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %4, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %9, align 4\n %20 = bitcast [100 x [100 x i32]]* %10 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %5, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %21 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0\n %22 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %6, i32 3)\n %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %7, 0\n store i32 %extracted_target_return2, i32* %11, align 4\n store i32 0, i32* %12, align 4\n br label %target_phi_0\n"]
- 15 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %14, label %23, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 23
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 23["Block 23:\n store %struct.DynamicArray* %0, %struct.DynamicArray** %3, align 8\n store i32 %1, i32* %4, align 4\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %25 = icmp ne %struct.DynamicArray* %3, null\n br i1 %4, label %6, label %5\n"]
- 23 -->|true| 6
- 23 -->|false| 5
- 26["Block 26:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %87\n"]
- 26 --> 87
- 27["Block 27:\n %28 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %29 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %7, i32 0, i32 1\n %30 = load i32, i32* %8, align 8\n %31 = icmp sge i32 %9, 1000\n br i1 %10, label %11, label %12\n"]
- 27 -->|true| 11
- 27 -->|false| 12
- 32["Block 32:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %87\n"]
- 32 --> 87
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %13, i32 0, i32 1\n %36 = load i32, i32* %14, align 8\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %16, i32 0, i32 2\n %39 = load i32, i32* %17, align 4\n %40 = icmp sge i32 %15, %18\n br i1 %19, label %20, label %48\n"]
- 33 -->|true| 20
- 33 -->|false| 48
- 41["Block 41:\n %42 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %43 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %21, i32 0, i32 2\n %44 = load i32, i32* %22, align 4\n %45 = mul nsw i32 %23, 2\n store i32 %24, i32* %5, align 4\n %46 = load i32, i32* %5, align 4\n %47 = icmp sgt i32 %25, 1000\n br i1 %26, label %27, label %28\n"]
- 41 -->|true| 27
- 41 -->|false| 28
- 48["Block 48:\n store i32 1000, i32* %5, align 4\n br label %28\n"]
- 48 --> 28
- 49["Block 49:\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %29, i32 0, i32 0\n %52 = load i32*, i32** %30, align 8\n %53 = bitcast i32* %31 to i8*\n %54 = load i32, i32* %5, align 4\n %55 = sext i32 %33 to i64\n %56 = mul i64 4, %34\n %57 = call i8* @realloc(i8* %32, i64 %35) #7\n %58 = bitcast i8* %36 to i32*\n store i32* %37, i32** %6, align 8\n %59 = load i32*, i32** %6, align 8\n %60 = icmp ne i32* %38, null\n br i1 %39, label %41, label %40\n"]
- 49 -->|true| 41
- 49 -->|false| 40
- 61["Block 61:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %87\n"]
- 61 --> 87
- 62["Block 62:\n %63 = load i32*, i32** %6, align 8\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %43, i32 0, i32 0\n store i32* %42, i32** %44, align 8\n %66 = load i32, i32* %5, align 4\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %46, i32 0, i32 2\n store i32 %45, i32* %47, align 4\n br label %48\n"]
- 62 --> 48
- 69["Block 69:\n %70 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %71 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %49, i32 0, i32 3\n %72 = load i32, i32* %50, align 8\n %73 = icmp ne i32 %51, 0\n br i1 %52, label %53, label %74\n"]
- 69 -->|true| 53
- 69 -->|false| 74
- 74["Block 74:\n %75 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %76 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %54, i32 0, i32 1\n %77 = load i32, i32* %55, align 8\n %78 = icmp sgt i32 %56, 0\n br i1 %57, label %58, label %74\n"]
- 74 -->|true| 58
- 74 -->|false| 74
- 79["Block 79:\n %80 = load i32, i32* %4, align 4\n %81 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %82 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %60, i32 0, i32 0\n %83 = load i32*, i32** %61, align 8\n %84 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %85 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %63, i32 0, i32 1\n %86 = load i32, i32* %64, align 8\n %87 = sub nsw i32 %65, 1\n %88 = sext i32 %66 to i64\n %89 = getelementptr inbounds i32, i32* %62, i64 %67\n %90 = load i32, i32* %68, align 4\n %91 = icmp slt i32 %59, %69\n br i1 %70, label %71, label %74\n"]
- 79 -->|true| 71
- 79 -->|false| 74
- 92["Block 92:\n %93 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %94 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %72, i32 0, i32 3\n store i32 0, i32* %73, align 8\n br label %74\n"]
- 92 --> 74
- 95["Block 95:\n %96 = load i32, i32* %4, align 4\n %97 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %98 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %76, i32 0, i32 0\n %99 = load i32*, i32** %77, align 8\n %100 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %101 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %79, i32 0, i32 1\n %102 = load i32, i32* %80, align 8\n %103 = add nsw i32 %81, 1\n store i32 %82, i32* %80, align 8\n %104 = sext i32 %81 to i64\n %105 = getelementptr inbounds i32, i32* %78, i64 %83\n store i32 %75, i32* %84, align 4\n %106 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %107 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %85, i32 0, i32 4\n store i32 1, i32* %86, align 4\n br label %87\n"]
- 95 --> 87
- 108["Block 108:\n ret void\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %109, label %target_skip_1\n"]
- target_cond_1 -->|true| 109
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 109["Block 109:\n %110 = load i32, i32* %12, align 4\n %111 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %9)\n %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %10, 0\n %112 = load i32, i32* %12, align 4\n %113 = add nsw i32 %11, 1\n store i32 %12, i32* %12, align 4\n br label %13\n"]
- 109 --> 13
- 114["Block 114:\n %115 = load i32, i32* %12, align 4\n %116 = icmp slt i32 %14, 10\n br i1 %15, label %8, label %16\n"]
- 114 -->|true| 8
- 114 -->|false| 16
- 117["Block 117:\n %118 = load i32, i32* %11, align 4\n %119 = icmp sgt i32 %17, 0\n br i1 %18, label %19, label %21\n"]
- 117 -->|true| 19
- 117 -->|false| 21
- 120["Block 120:\n %121 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)\n %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %20, 0\n store i32 %extracted_target_return, i32* %13, align 4\n br label %24\n"]
- 120 --> 24
- 122["Block 122:\n %123 = load i32, i32* %11, align 4\n %124 = call i32 @fused_performSimpleCalculations(i1 true, i32 %22)\n store i32 %23, i32* %13, align 4\n br label %24\n"]
- 122 --> 24
- 125["Block 125:\n %126 = load i32, i32* %13, align 4\n ret i32 %25\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing return instruction in block %108
- [INFO][performCodeFusion] Fixing return instruction in block %125
- [WARNING][performCodeFusion] No terminator found in block: target_phi_1
- [INFO][performCodeFusion] [After fix]Generated control flow graph for fused function:
- ```mermaid: fused_pushBack
- graph TD
- entry["Block entry:\n %3 = alloca %struct.DynamicArray*\n %4 = alloca i32\n %5 = alloca i32\n %6 = alloca i32*\n %7 = alloca [14 x i8]\n %8 = alloca [8 x i32]\n %9 = alloca i32\n %10 = alloca [100 x [100 x i32]]\n %11 = alloca i32\n %12 = alloca i32\n %13 = alloca i32\n %14 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %15, label %target_skip_0\n"]
- target_cond_0 -->|true| 15
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 15["Block 15:\n %16 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %17 = bitcast [14 x i8]* %7 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %17, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0\n call void @reverseString(i8* %18)\n %19 = bitcast [8 x i32]* %8 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %19, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %9, align 4\n %20 = bitcast [100 x [100 x i32]]* %10 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %20, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %21 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0\n %22 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %21, i32 3)\n %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %22, 0\n store i32 %extracted_target_return2target_, i32* %11, align 4\n store i32 0, i32* %12, align 4\n br label %target_phi_0\n"]
- 15 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %14, label %23, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 23
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 23["Block 23:\n store %struct.DynamicArray* %1, %struct.DynamicArray** %3, align 8\n store i32 %2, i32* %4, align 4\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %25 = icmp ne %struct.DynamicArray* %24, null\n br i1 %25, label %27, label %26\n"]
- 23 -->|true| 27
- 23 -->|false| 26
- 26["Block 26:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %108\n"]
- 26 --> 108
- 27["Block 27:\n %28 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %29 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %28, i32 0, i32 1\n %30 = load i32, i32* %29, align 8\n %31 = icmp sge i32 %30, 1000\n br i1 %31, label %32, label %33\n"]
- 27 -->|true| 32
- 27 -->|false| 33
- 32["Block 32:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %108\n"]
- 32 --> 108
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n %36 = load i32, i32* %35, align 8\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2\n %39 = load i32, i32* %38, align 4\n %40 = icmp sge i32 %36, %39\n br i1 %40, label %41, label %69\n"]
- 33 -->|true| 41
- 33 -->|false| 69
- 41["Block 41:\n %42 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %43 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %42, i32 0, i32 2\n %44 = load i32, i32* %43, align 4\n %45 = mul nsw i32 %44, 2\n store i32 %45, i32* %5, align 4\n %46 = load i32, i32* %5, align 4\n %47 = icmp sgt i32 %46, 1000\n br i1 %47, label %48, label %49\n"]
- 41 -->|true| 48
- 41 -->|false| 49
- 48["Block 48:\n store i32 1000, i32* %5, align 4\n br label %49\n"]
- 48 --> 49
- 49["Block 49:\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %50, i32 0, i32 0\n %52 = load i32*, i32** %51, align 8\n %53 = bitcast i32* %52 to i8*\n %54 = load i32, i32* %5, align 4\n %55 = sext i32 %54 to i64\n %56 = mul i64 4, %55\n %57 = call i8* @realloc(i8* %53, i64 %56) #7\n %58 = bitcast i8* %57 to i32*\n store i32* %58, i32** %6, align 8\n %59 = load i32*, i32** %6, align 8\n %60 = icmp ne i32* %59, null\n br i1 %60, label %62, label %61\n"]
- 49 -->|true| 62
- 49 -->|false| 61
- 61["Block 61:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %108\n"]
- 61 --> 108
- 62["Block 62:\n %63 = load i32*, i32** %6, align 8\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %64, i32 0, i32 0\n store i32* %63, i32** %65, align 8\n %66 = load i32, i32* %5, align 4\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %67, i32 0, i32 2\n store i32 %66, i32* %68, align 4\n br label %69\n"]
- 62 --> 69
- 69["Block 69:\n %70 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %71 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %70, i32 0, i32 3\n %72 = load i32, i32* %71, align 8\n %73 = icmp ne i32 %72, 0\n br i1 %73, label %74, label %95\n"]
- 69 -->|true| 74
- 69 -->|false| 95
- 74["Block 74:\n %75 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %76 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %75, i32 0, i32 1\n %77 = load i32, i32* %76, align 8\n %78 = icmp sgt i32 %77, 0\n br i1 %78, label %79, label %95\n"]
- 74 -->|true| 79
- 74 -->|false| 95
- 79["Block 79:\n %80 = load i32, i32* %4, align 4\n %81 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %82 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %81, i32 0, i32 0\n %83 = load i32*, i32** %82, align 8\n %84 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %85 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %84, i32 0, i32 1\n %86 = load i32, i32* %85, align 8\n %87 = sub nsw i32 %86, 1\n %88 = sext i32 %87 to i64\n %89 = getelementptr inbounds i32, i32* %83, i64 %88\n %90 = load i32, i32* %89, align 4\n %91 = icmp slt i32 %80, %90\n br i1 %91, label %92, label %95\n"]
- 79 -->|true| 92
- 79 -->|false| 95
- 92["Block 92:\n %93 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %94 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %93, i32 0, i32 3\n store i32 0, i32* %94, align 8\n br label %95\n"]
- 92 --> 95
- 95["Block 95:\n %96 = load i32, i32* %4, align 4\n %97 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %98 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %97, i32 0, i32 0\n %99 = load i32*, i32** %98, align 8\n %100 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %101 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %100, i32 0, i32 1\n %102 = load i32, i32* %101, align 8\n %103 = add nsw i32 %102, 1\n store i32 %103, i32* %101, align 8\n %104 = sext i32 %102 to i64\n %105 = getelementptr inbounds i32, i32* %99, i64 %104\n store i32 %96, i32* %105, align 4\n %106 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %107 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %106, i32 0, i32 4\n store i32 1, i32* %107, align 4\n br label %108\n"]
- 95 --> 108
- 108["Block 108:\n ret void\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %109, label %target_skip_1\n"]
- target_cond_1 -->|true| 109
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 109["Block 109:\n %110 = load i32, i32* %12, align 4\n %111 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %110)\n %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %111, 0\n %112 = load i32, i32* %12, align 4\n %113 = add nsw i32 %112, 1\n store i32 %113, i32* %12, align 4\n br label %114\n"]
- 109 --> 114
- 114["Block 114:\n %115 = load i32, i32* %12, align 4\n %116 = icmp slt i32 %115, 10\n br i1 %116, label %109, label %117\n"]
- 114 -->|true| 109
- 114 -->|false| 117
- 117["Block 117:\n %118 = load i32, i32* %11, align 4\n %119 = icmp sgt i32 %118, 0\n br i1 %119, label %120, label %122\n"]
- 117 -->|true| 120
- 117 -->|false| 122
- 120["Block 120:\n %121 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)\n %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %121, 0\n store i32 %extracted_target_returntarget_, i32* %13, align 4\n br label %125\n"]
- 120 --> 125
- 122["Block 122:\n %123 = load i32, i32* %11, align 4\n %124 = call i32 @fused_performSimpleCalculations(i1 true, i32 %123)\n store i32 %124, i32* %13, align 4\n br label %125\n"]
- 122 --> 125
- 125["Block 125:\n %126 = load i32, i32* %13, align 4\n ret i32 %126\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Processing non-struct return type: i32
- [INFO][performCodeFusion] Processing bunker block: %32
- [INFO][performCodeFusion] Processing bunker block: %61
- [INFO][performCodeFusion] Processing bunker block: %23
- [INFO][performCodeFusion] Processing bunker block: %27
- [INFO][performCodeFusion] Processing bunker block: %26
- [INFO][performCodeFusion] Processing bunker block: %108
- [INFO][performCodeFusion] Found void return instruction in bunker block %108
- [INFO][performCodeFusion] Return type mismatch in bunker block %108. Expected: i32, Found: void
- [INFO][performCodeFusion] Created new return instruction with default value in block %108
- [INFO][performCodeFusion] Processing bunker block: %33
- [INFO][performCodeFusion] Processing bunker block: %41
- [INFO][performCodeFusion] Processing bunker block: %62
- [INFO][performCodeFusion] Processing bunker block: %69
- [INFO][performCodeFusion] Processing bunker block: %74
- [INFO][performCodeFusion] Processing bunker block: %79
- [INFO][performCodeFusion] Processing bunker block: %92
- [INFO][performCodeFusion] Processing bunker block: %95
- [INFO][performCodeFusion] Processing bunker block: %48
- [INFO][performCodeFusion] Processing bunker block: %49
- [INFO][performCodeFusion] Processing target block: %109
- [INFO][performCodeFusion] Processing target block: %114
- [INFO][performCodeFusion] Processing target block: %117
- [INFO][performCodeFusion] Processing target block: %120
- [INFO][performCodeFusion] Processing target block: %122
- [INFO][performCodeFusion] Processing target block: %125
- [INFO][performCodeFusion] Found return instruction in target block %125. Return value type: i32
- [INFO][performCodeFusion] Processing target block: %15
- [INFO][performCodeFusion] [After fix return]Generated control flow graph for fused function:
- ```mermaid: fused_pushBack
- graph TD
- entry["Block entry:\n %3 = alloca %struct.DynamicArray*\n %4 = alloca i32\n %5 = alloca i32\n %6 = alloca i32*\n %7 = alloca [14 x i8]\n %8 = alloca [8 x i32]\n %9 = alloca i32\n %10 = alloca [100 x [100 x i32]]\n %11 = alloca i32\n %12 = alloca i32\n %13 = alloca i32\n %14 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %15, label %target_skip_0\n"]
- target_cond_0 -->|true| 15
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 15["Block 15:\n %16 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %17 = bitcast [14 x i8]* %7 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %17, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0\n call void @reverseString(i8* %18)\n %19 = bitcast [8 x i32]* %8 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %19, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %9, align 4\n %20 = bitcast [100 x [100 x i32]]* %10 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %20, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %21 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0\n %22 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %21, i32 3)\n %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %22, 0\n store i32 %extracted_target_return2target_, i32* %11, align 4\n store i32 0, i32* %12, align 4\n br label %target_phi_0\n"]
- 15 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %14, label %23, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 23
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 23["Block 23:\n store %struct.DynamicArray* %1, %struct.DynamicArray** %3, align 8\n store i32 %2, i32* %4, align 4\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %25 = icmp ne %struct.DynamicArray* %24, null\n br i1 %25, label %27, label %26\n"]
- 23 -->|true| 27
- 23 -->|false| 26
- 26["Block 26:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %108\n"]
- 26 --> 108
- 27["Block 27:\n %28 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %29 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %28, i32 0, i32 1\n %30 = load i32, i32* %29, align 8\n %31 = icmp sge i32 %30, 1000\n br i1 %31, label %32, label %33\n"]
- 27 -->|true| 32
- 27 -->|false| 33
- 32["Block 32:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %108\n"]
- 32 --> 108
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n %36 = load i32, i32* %35, align 8\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2\n %39 = load i32, i32* %38, align 4\n %40 = icmp sge i32 %36, %39\n br i1 %40, label %41, label %69\n"]
- 33 -->|true| 41
- 33 -->|false| 69
- 41["Block 41:\n %42 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %43 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %42, i32 0, i32 2\n %44 = load i32, i32* %43, align 4\n %45 = mul nsw i32 %44, 2\n store i32 %45, i32* %5, align 4\n %46 = load i32, i32* %5, align 4\n %47 = icmp sgt i32 %46, 1000\n br i1 %47, label %48, label %49\n"]
- 41 -->|true| 48
- 41 -->|false| 49
- 48["Block 48:\n store i32 1000, i32* %5, align 4\n br label %49\n"]
- 48 --> 49
- 49["Block 49:\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %50, i32 0, i32 0\n %52 = load i32*, i32** %51, align 8\n %53 = bitcast i32* %52 to i8*\n %54 = load i32, i32* %5, align 4\n %55 = sext i32 %54 to i64\n %56 = mul i64 4, %55\n %57 = call i8* @realloc(i8* %53, i64 %56) #7\n %58 = bitcast i8* %57 to i32*\n store i32* %58, i32** %6, align 8\n %59 = load i32*, i32** %6, align 8\n %60 = icmp ne i32* %59, null\n br i1 %60, label %62, label %61\n"]
- 49 -->|true| 62
- 49 -->|false| 61
- 61["Block 61:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %108\n"]
- 61 --> 108
- 62["Block 62:\n %63 = load i32*, i32** %6, align 8\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %64, i32 0, i32 0\n store i32* %63, i32** %65, align 8\n %66 = load i32, i32* %5, align 4\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %67, i32 0, i32 2\n store i32 %66, i32* %68, align 4\n br label %69\n"]
- 62 --> 69
- 69["Block 69:\n %70 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %71 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %70, i32 0, i32 3\n %72 = load i32, i32* %71, align 8\n %73 = icmp ne i32 %72, 0\n br i1 %73, label %74, label %95\n"]
- 69 -->|true| 74
- 69 -->|false| 95
- 74["Block 74:\n %75 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %76 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %75, i32 0, i32 1\n %77 = load i32, i32* %76, align 8\n %78 = icmp sgt i32 %77, 0\n br i1 %78, label %79, label %95\n"]
- 74 -->|true| 79
- 74 -->|false| 95
- 79["Block 79:\n %80 = load i32, i32* %4, align 4\n %81 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %82 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %81, i32 0, i32 0\n %83 = load i32*, i32** %82, align 8\n %84 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %85 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %84, i32 0, i32 1\n %86 = load i32, i32* %85, align 8\n %87 = sub nsw i32 %86, 1\n %88 = sext i32 %87 to i64\n %89 = getelementptr inbounds i32, i32* %83, i64 %88\n %90 = load i32, i32* %89, align 4\n %91 = icmp slt i32 %80, %90\n br i1 %91, label %92, label %95\n"]
- 79 -->|true| 92
- 79 -->|false| 95
- 92["Block 92:\n %93 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %94 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %93, i32 0, i32 3\n store i32 0, i32* %94, align 8\n br label %95\n"]
- 92 --> 95
- 95["Block 95:\n %96 = load i32, i32* %4, align 4\n %97 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %98 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %97, i32 0, i32 0\n %99 = load i32*, i32** %98, align 8\n %100 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %101 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %100, i32 0, i32 1\n %102 = load i32, i32* %101, align 8\n %103 = add nsw i32 %102, 1\n store i32 %103, i32* %101, align 8\n %104 = sext i32 %102 to i64\n %105 = getelementptr inbounds i32, i32* %99, i64 %104\n store i32 %96, i32* %105, align 4\n %106 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %107 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %106, i32 0, i32 4\n store i32 1, i32* %107, align 4\n br label %108\n"]
- 95 --> 108
- 108["Block 108:\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %109, label %target_skip_1\n"]
- target_cond_1 -->|true| 109
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 109["Block 109:\n %110 = load i32, i32* %12, align 4\n %111 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %110)\n %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %111, 0\n %112 = load i32, i32* %12, align 4\n %113 = add nsw i32 %112, 1\n store i32 %113, i32* %12, align 4\n br label %114\n"]
- 109 --> 114
- 114["Block 114:\n %115 = load i32, i32* %12, align 4\n %116 = icmp slt i32 %115, 10\n br i1 %116, label %109, label %117\n"]
- 114 -->|true| 109
- 114 -->|false| 117
- 117["Block 117:\n %118 = load i32, i32* %11, align 4\n %119 = icmp sgt i32 %118, 0\n br i1 %119, label %120, label %122\n"]
- 117 -->|true| 120
- 117 -->|false| 122
- 120["Block 120:\n %121 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)\n %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %121, 0\n store i32 %extracted_target_returntarget_, i32* %13, align 4\n br label %125\n"]
- 120 --> 125
- 122["Block 122:\n %123 = load i32, i32* %11, align 4\n %124 = call i32 @fused_performSimpleCalculations(i1 true, i32 %123)\n store i32 %124, i32* %13, align 4\n br label %125\n"]
- 122 --> 125
- 125["Block 125:\n %126 = load i32, i32* %13, align 4\n ret i32 %126\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [DEBUG][updateCallSite] Original call instruction:
- call void @pushBack(%struct.DynamicArray* %33, i32 %35)
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=struct.struct.DynamicArray*
- [DEBUG][updateCallSite] Argument 1: type=i32
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] New call instruction:
- %36 = call i32 @fused_pushBack(i1 false, %struct.DynamicArray* %33, i32 %35)
- [DEBUG][updateCallSite] Void return type, no value processing needed
- [INFO][updateCallSite] Successfully updated call site from call void @pushBack(%struct.DynamicArray* %33, i32 %35) to %36 = call i32 @fused_pushBack(i1 false, %struct.DynamicArray* %33, i32 %35)
- [INFO][performCodeFusion] [After update call site]Generated control flow graph for fused function:
- ```mermaid: fused_pushBack
- graph TD
- entry["Block entry:\n %3 = alloca %struct.DynamicArray*\n %4 = alloca i32\n %5 = alloca i32\n %6 = alloca i32*\n %7 = alloca [14 x i8]\n %8 = alloca [8 x i32]\n %9 = alloca i32\n %10 = alloca [100 x [100 x i32]]\n %11 = alloca i32\n %12 = alloca i32\n %13 = alloca i32\n %14 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %15, label %target_skip_0\n"]
- target_cond_0 -->|true| 15
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 15["Block 15:\n %16 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %17 = bitcast [14 x i8]* %7 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %17, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0\n call void @reverseString(i8* %18)\n %19 = bitcast [8 x i32]* %8 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %19, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %9, align 4\n %20 = bitcast [100 x [100 x i32]]* %10 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %20, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %21 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0\n %22 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %21, i32 3)\n %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %22, 0\n store i32 %extracted_target_return2target_, i32* %11, align 4\n store i32 0, i32* %12, align 4\n br label %target_phi_0\n"]
- 15 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %14, label %23, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 23
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 23["Block 23:\n store %struct.DynamicArray* %1, %struct.DynamicArray** %3, align 8\n store i32 %2, i32* %4, align 4\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %25 = icmp ne %struct.DynamicArray* %24, null\n br i1 %25, label %27, label %26\n"]
- 23 -->|true| 27
- 23 -->|false| 26
- 26["Block 26:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %108\n"]
- 26 --> 108
- 27["Block 27:\n %28 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %29 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %28, i32 0, i32 1\n %30 = load i32, i32* %29, align 8\n %31 = icmp sge i32 %30, 1000\n br i1 %31, label %32, label %33\n"]
- 27 -->|true| 32
- 27 -->|false| 33
- 32["Block 32:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %108\n"]
- 32 --> 108
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n %36 = load i32, i32* %35, align 8\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2\n %39 = load i32, i32* %38, align 4\n %40 = icmp sge i32 %36, %39\n br i1 %40, label %41, label %69\n"]
- 33 -->|true| 41
- 33 -->|false| 69
- 41["Block 41:\n %42 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %43 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %42, i32 0, i32 2\n %44 = load i32, i32* %43, align 4\n %45 = mul nsw i32 %44, 2\n store i32 %45, i32* %5, align 4\n %46 = load i32, i32* %5, align 4\n %47 = icmp sgt i32 %46, 1000\n br i1 %47, label %48, label %49\n"]
- 41 -->|true| 48
- 41 -->|false| 49
- 48["Block 48:\n store i32 1000, i32* %5, align 4\n br label %49\n"]
- 48 --> 49
- 49["Block 49:\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %50, i32 0, i32 0\n %52 = load i32*, i32** %51, align 8\n %53 = bitcast i32* %52 to i8*\n %54 = load i32, i32* %5, align 4\n %55 = sext i32 %54 to i64\n %56 = mul i64 4, %55\n %57 = call i8* @realloc(i8* %53, i64 %56) #7\n %58 = bitcast i8* %57 to i32*\n store i32* %58, i32** %6, align 8\n %59 = load i32*, i32** %6, align 8\n %60 = icmp ne i32* %59, null\n br i1 %60, label %62, label %61\n"]
- 49 -->|true| 62
- 49 -->|false| 61
- 61["Block 61:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %108\n"]
- 61 --> 108
- 62["Block 62:\n %63 = load i32*, i32** %6, align 8\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %64, i32 0, i32 0\n store i32* %63, i32** %65, align 8\n %66 = load i32, i32* %5, align 4\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %67, i32 0, i32 2\n store i32 %66, i32* %68, align 4\n br label %69\n"]
- 62 --> 69
- 69["Block 69:\n %70 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %71 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %70, i32 0, i32 3\n %72 = load i32, i32* %71, align 8\n %73 = icmp ne i32 %72, 0\n br i1 %73, label %74, label %95\n"]
- 69 -->|true| 74
- 69 -->|false| 95
- 74["Block 74:\n %75 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %76 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %75, i32 0, i32 1\n %77 = load i32, i32* %76, align 8\n %78 = icmp sgt i32 %77, 0\n br i1 %78, label %79, label %95\n"]
- 74 -->|true| 79
- 74 -->|false| 95
- 79["Block 79:\n %80 = load i32, i32* %4, align 4\n %81 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %82 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %81, i32 0, i32 0\n %83 = load i32*, i32** %82, align 8\n %84 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %85 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %84, i32 0, i32 1\n %86 = load i32, i32* %85, align 8\n %87 = sub nsw i32 %86, 1\n %88 = sext i32 %87 to i64\n %89 = getelementptr inbounds i32, i32* %83, i64 %88\n %90 = load i32, i32* %89, align 4\n %91 = icmp slt i32 %80, %90\n br i1 %91, label %92, label %95\n"]
- 79 -->|true| 92
- 79 -->|false| 95
- 92["Block 92:\n %93 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %94 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %93, i32 0, i32 3\n store i32 0, i32* %94, align 8\n br label %95\n"]
- 92 --> 95
- 95["Block 95:\n %96 = load i32, i32* %4, align 4\n %97 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %98 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %97, i32 0, i32 0\n %99 = load i32*, i32** %98, align 8\n %100 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %101 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %100, i32 0, i32 1\n %102 = load i32, i32* %101, align 8\n %103 = add nsw i32 %102, 1\n store i32 %103, i32* %101, align 8\n %104 = sext i32 %102 to i64\n %105 = getelementptr inbounds i32, i32* %99, i64 %104\n store i32 %96, i32* %105, align 4\n %106 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %107 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %106, i32 0, i32 4\n store i32 1, i32* %107, align 4\n br label %108\n"]
- 95 --> 108
- 108["Block 108:\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %109, label %target_skip_1\n"]
- target_cond_1 -->|true| 109
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 109["Block 109:\n %110 = load i32, i32* %12, align 4\n %111 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %110)\n %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %111, 0\n %112 = load i32, i32* %12, align 4\n %113 = add nsw i32 %112, 1\n store i32 %113, i32* %12, align 4\n br label %114\n"]
- 109 --> 114
- 114["Block 114:\n %115 = load i32, i32* %12, align 4\n %116 = icmp slt i32 %115, 10\n br i1 %116, label %109, label %117\n"]
- 114 -->|true| 109
- 114 -->|false| 117
- 117["Block 117:\n %118 = load i32, i32* %11, align 4\n %119 = icmp sgt i32 %118, 0\n br i1 %119, label %120, label %122\n"]
- 117 -->|true| 120
- 117 -->|false| 122
- 120["Block 120:\n %121 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)\n %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %121, 0\n store i32 %extracted_target_returntarget_, i32* %13, align 4\n br label %125\n"]
- 120 --> 125
- 122["Block 122:\n %123 = load i32, i32* %11, align 4\n %124 = call i32 @fused_performSimpleCalculations(i1 true, i32 %123)\n store i32 %124, i32* %13, align 4\n br label %125\n"]
- 122 --> 125
- 125["Block 125:\n %126 = load i32, i32* %13, align 4\n ret i32 %126\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing blocks without terminators...
- [INFO][performCodeFusion] Added return with default value to block: target_phi_1
- [INFO][performCodeFusion] Starting PHI node repair
- [INFO][performCodeFusion] [After fix PHI]Generated control flow graph for fused function:
- ```mermaid: fused_pushBack
- graph TD
- entry["Block entry:\n %3 = alloca %struct.DynamicArray*\n %4 = alloca i32\n %5 = alloca i32\n %6 = alloca i32*\n %7 = alloca [14 x i8]\n %8 = alloca [8 x i32]\n %9 = alloca i32\n %10 = alloca [100 x [100 x i32]]\n %11 = alloca i32\n %12 = alloca i32\n %13 = alloca i32\n %14 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %15, label %target_skip_0\n"]
- target_cond_0 -->|true| 15
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 15["Block 15:\n %16 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %17 = bitcast [14 x i8]* %7 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %17, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0\n call void @reverseString(i8* %18)\n %19 = bitcast [8 x i32]* %8 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %19, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %9, align 4\n %20 = bitcast [100 x [100 x i32]]* %10 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %20, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %21 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0\n %22 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %21, i32 3)\n %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %22, 0\n store i32 %extracted_target_return2target_, i32* %11, align 4\n store i32 0, i32* %12, align 4\n br label %target_phi_0\n"]
- 15 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %14, label %23, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 23
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 23["Block 23:\n store %struct.DynamicArray* %1, %struct.DynamicArray** %3, align 8\n store i32 %2, i32* %4, align 4\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %25 = icmp ne %struct.DynamicArray* %24, null\n br i1 %25, label %27, label %26\n"]
- 23 -->|true| 27
- 23 -->|false| 26
- 26["Block 26:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %108\n"]
- 26 --> 108
- 27["Block 27:\n %28 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %29 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %28, i32 0, i32 1\n %30 = load i32, i32* %29, align 8\n %31 = icmp sge i32 %30, 1000\n br i1 %31, label %32, label %33\n"]
- 27 -->|true| 32
- 27 -->|false| 33
- 32["Block 32:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %108\n"]
- 32 --> 108
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n %36 = load i32, i32* %35, align 8\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2\n %39 = load i32, i32* %38, align 4\n %40 = icmp sge i32 %36, %39\n br i1 %40, label %41, label %69\n"]
- 33 -->|true| 41
- 33 -->|false| 69
- 41["Block 41:\n %42 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %43 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %42, i32 0, i32 2\n %44 = load i32, i32* %43, align 4\n %45 = mul nsw i32 %44, 2\n store i32 %45, i32* %5, align 4\n %46 = load i32, i32* %5, align 4\n %47 = icmp sgt i32 %46, 1000\n br i1 %47, label %48, label %49\n"]
- 41 -->|true| 48
- 41 -->|false| 49
- 48["Block 48:\n store i32 1000, i32* %5, align 4\n br label %49\n"]
- 48 --> 49
- 49["Block 49:\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %50, i32 0, i32 0\n %52 = load i32*, i32** %51, align 8\n %53 = bitcast i32* %52 to i8*\n %54 = load i32, i32* %5, align 4\n %55 = sext i32 %54 to i64\n %56 = mul i64 4, %55\n %57 = call i8* @realloc(i8* %53, i64 %56) #7\n %58 = bitcast i8* %57 to i32*\n store i32* %58, i32** %6, align 8\n %59 = load i32*, i32** %6, align 8\n %60 = icmp ne i32* %59, null\n br i1 %60, label %62, label %61\n"]
- 49 -->|true| 62
- 49 -->|false| 61
- 61["Block 61:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %108\n"]
- 61 --> 108
- 62["Block 62:\n %63 = load i32*, i32** %6, align 8\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %64, i32 0, i32 0\n store i32* %63, i32** %65, align 8\n %66 = load i32, i32* %5, align 4\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %67, i32 0, i32 2\n store i32 %66, i32* %68, align 4\n br label %69\n"]
- 62 --> 69
- 69["Block 69:\n %70 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %71 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %70, i32 0, i32 3\n %72 = load i32, i32* %71, align 8\n %73 = icmp ne i32 %72, 0\n br i1 %73, label %74, label %95\n"]
- 69 -->|true| 74
- 69 -->|false| 95
- 74["Block 74:\n %75 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %76 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %75, i32 0, i32 1\n %77 = load i32, i32* %76, align 8\n %78 = icmp sgt i32 %77, 0\n br i1 %78, label %79, label %95\n"]
- 74 -->|true| 79
- 74 -->|false| 95
- 79["Block 79:\n %80 = load i32, i32* %4, align 4\n %81 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %82 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %81, i32 0, i32 0\n %83 = load i32*, i32** %82, align 8\n %84 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %85 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %84, i32 0, i32 1\n %86 = load i32, i32* %85, align 8\n %87 = sub nsw i32 %86, 1\n %88 = sext i32 %87 to i64\n %89 = getelementptr inbounds i32, i32* %83, i64 %88\n %90 = load i32, i32* %89, align 4\n %91 = icmp slt i32 %80, %90\n br i1 %91, label %92, label %95\n"]
- 79 -->|true| 92
- 79 -->|false| 95
- 92["Block 92:\n %93 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %94 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %93, i32 0, i32 3\n store i32 0, i32* %94, align 8\n br label %95\n"]
- 92 --> 95
- 95["Block 95:\n %96 = load i32, i32* %4, align 4\n %97 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %98 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %97, i32 0, i32 0\n %99 = load i32*, i32** %98, align 8\n %100 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %101 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %100, i32 0, i32 1\n %102 = load i32, i32* %101, align 8\n %103 = add nsw i32 %102, 1\n store i32 %103, i32* %101, align 8\n %104 = sext i32 %102 to i64\n %105 = getelementptr inbounds i32, i32* %99, i64 %104\n store i32 %96, i32* %105, align 4\n %106 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %107 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %106, i32 0, i32 4\n store i32 1, i32* %107, align 4\n br label %108\n"]
- 95 --> 108
- 108["Block 108:\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %109, label %target_skip_1\n"]
- target_cond_1 -->|true| 109
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret i32 0\n"]
- 109["Block 109:\n %110 = load i32, i32* %12, align 4\n %111 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %110)\n %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %111, 0\n %112 = load i32, i32* %12, align 4\n %113 = add nsw i32 %112, 1\n store i32 %113, i32* %12, align 4\n br label %114\n"]
- 109 --> 114
- 114["Block 114:\n %115 = load i32, i32* %12, align 4\n %116 = icmp slt i32 %115, 10\n br i1 %116, label %109, label %117\n"]
- 114 -->|true| 109
- 114 -->|false| 117
- 117["Block 117:\n %118 = load i32, i32* %11, align 4\n %119 = icmp sgt i32 %118, 0\n br i1 %119, label %120, label %122\n"]
- 117 -->|true| 120
- 117 -->|false| 122
- 120["Block 120:\n %121 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)\n %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %121, 0\n store i32 %extracted_target_returntarget_, i32* %13, align 4\n br label %125\n"]
- 120 --> 125
- 122["Block 122:\n %123 = load i32, i32* %11, align 4\n %124 = call i32 @fused_performSimpleCalculations(i1 true, i32 %123)\n store i32 %124, i32* %13, align 4\n br label %125\n"]
- 122 --> 125
- 125["Block 125:\n %126 = load i32, i32* %13, align 4\n ret i32 %126\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Attempting to delete original functions...
- [INFO][performCodeFusion] [After erase]Generated control flow graph for fused function:
- ```mermaid: fused_pushBack
- graph TD
- entry["Block entry:\n %3 = alloca %struct.DynamicArray*\n %4 = alloca i32\n %5 = alloca i32\n %6 = alloca i32*\n %7 = alloca [14 x i8]\n %8 = alloca [8 x i32]\n %9 = alloca i32\n %10 = alloca [100 x [100 x i32]]\n %11 = alloca i32\n %12 = alloca i32\n %13 = alloca i32\n %14 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %15, label %target_skip_0\n"]
- target_cond_0 -->|true| 15
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 15["Block 15:\n %16 = call i32 @testPoints(i32 5)\n call void @llvm.memset.p0i8.i64(i8* align 16 bitcast ([100 x i32]* @cache to i8*), i8 -1, i64 400, i1 false)\n %17 = bitcast [14 x i8]* %7 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %17, i8* align 1 getelementptr inbounds ([14 x i8], [14 x i8]* @__const.projectB_main.str, i32 0, i32 0), i64 14, i1 false)\n %18 = getelementptr inbounds [14 x i8], [14 x i8]* %7, i64 0, i64 0\n call void @reverseString(i8* %18)\n %19 = bitcast [8 x i32]* %8 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %19, i8* align 16 bitcast ([8 x i32]* @__const.projectB_main.arr to i8*), i64 32, i1 false)\n store i32 8, i32* %9, align 4\n %20 = bitcast [100 x [100 x i32]]* %10 to i8*\n call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %20, i8* align 16 bitcast (<{ <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, <{ i32, i32, i32, [97 x i32] }>, [97 x <{ i32, i32, i32, [97 x i32] }>] }>* @__const.projectB_main.matrix to i8*), i64 40000, i1 false)\n %21 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %10, i64 0, i64 0\n %22 = call %fused_return_validateMatrix_processMatrix @fused_validateMatrix(i1 true, %struct.Matrix* null, [100 x i32]* %21, i32 3)\n %extracted_target_return2target_ = extractvalue %fused_return_validateMatrix_processMatrix %22, 0\n store i32 %extracted_target_return2target_, i32* %11, align 4\n store i32 0, i32* %12, align 4\n br label %target_phi_0\n"]
- 15 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %14, label %23, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 23
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 23["Block 23:\n store %struct.DynamicArray* %1, %struct.DynamicArray** %3, align 8\n store i32 %2, i32* %4, align 4\n %24 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %25 = icmp ne %struct.DynamicArray* %24, null\n br i1 %25, label %27, label %26\n"]
- 23 -->|true| 27
- 23 -->|false| 26
- 26["Block 26:\n call void @setErrorMessage(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))\n br label %108\n"]
- 26 --> 108
- 27["Block 27:\n %28 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %29 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %28, i32 0, i32 1\n %30 = load i32, i32* %29, align 8\n %31 = icmp sge i32 %30, 1000\n br i1 %31, label %32, label %33\n"]
- 27 -->|true| 32
- 27 -->|false| 33
- 32["Block 32:\n call void @setErrorMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))\n br label %108\n"]
- 32 --> 108
- 33["Block 33:\n %34 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %35 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %34, i32 0, i32 1\n %36 = load i32, i32* %35, align 8\n %37 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %38 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %37, i32 0, i32 2\n %39 = load i32, i32* %38, align 4\n %40 = icmp sge i32 %36, %39\n br i1 %40, label %41, label %69\n"]
- 33 -->|true| 41
- 33 -->|false| 69
- 41["Block 41:\n %42 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %43 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %42, i32 0, i32 2\n %44 = load i32, i32* %43, align 4\n %45 = mul nsw i32 %44, 2\n store i32 %45, i32* %5, align 4\n %46 = load i32, i32* %5, align 4\n %47 = icmp sgt i32 %46, 1000\n br i1 %47, label %48, label %49\n"]
- 41 -->|true| 48
- 41 -->|false| 49
- 48["Block 48:\n store i32 1000, i32* %5, align 4\n br label %49\n"]
- 48 --> 49
- 49["Block 49:\n %50 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %51 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %50, i32 0, i32 0\n %52 = load i32*, i32** %51, align 8\n %53 = bitcast i32* %52 to i8*\n %54 = load i32, i32* %5, align 4\n %55 = sext i32 %54 to i64\n %56 = mul i64 4, %55\n %57 = call i8* @realloc(i8* %53, i64 %56) #7\n %58 = bitcast i8* %57 to i32*\n store i32* %58, i32** %6, align 8\n %59 = load i32*, i32** %6, align 8\n %60 = icmp ne i32* %59, null\n br i1 %60, label %62, label %61\n"]
- 49 -->|true| 62
- 49 -->|false| 61
- 61["Block 61:\n call void @setErrorMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))\n br label %108\n"]
- 61 --> 108
- 62["Block 62:\n %63 = load i32*, i32** %6, align 8\n %64 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %65 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %64, i32 0, i32 0\n store i32* %63, i32** %65, align 8\n %66 = load i32, i32* %5, align 4\n %67 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %68 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %67, i32 0, i32 2\n store i32 %66, i32* %68, align 4\n br label %69\n"]
- 62 --> 69
- 69["Block 69:\n %70 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %71 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %70, i32 0, i32 3\n %72 = load i32, i32* %71, align 8\n %73 = icmp ne i32 %72, 0\n br i1 %73, label %74, label %95\n"]
- 69 -->|true| 74
- 69 -->|false| 95
- 74["Block 74:\n %75 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %76 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %75, i32 0, i32 1\n %77 = load i32, i32* %76, align 8\n %78 = icmp sgt i32 %77, 0\n br i1 %78, label %79, label %95\n"]
- 74 -->|true| 79
- 74 -->|false| 95
- 79["Block 79:\n %80 = load i32, i32* %4, align 4\n %81 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %82 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %81, i32 0, i32 0\n %83 = load i32*, i32** %82, align 8\n %84 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %85 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %84, i32 0, i32 1\n %86 = load i32, i32* %85, align 8\n %87 = sub nsw i32 %86, 1\n %88 = sext i32 %87 to i64\n %89 = getelementptr inbounds i32, i32* %83, i64 %88\n %90 = load i32, i32* %89, align 4\n %91 = icmp slt i32 %80, %90\n br i1 %91, label %92, label %95\n"]
- 79 -->|true| 92
- 79 -->|false| 95
- 92["Block 92:\n %93 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %94 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %93, i32 0, i32 3\n store i32 0, i32* %94, align 8\n br label %95\n"]
- 92 --> 95
- 95["Block 95:\n %96 = load i32, i32* %4, align 4\n %97 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %98 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %97, i32 0, i32 0\n %99 = load i32*, i32** %98, align 8\n %100 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %101 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %100, i32 0, i32 1\n %102 = load i32, i32* %101, align 8\n %103 = add nsw i32 %102, 1\n store i32 %103, i32* %101, align 8\n %104 = sext i32 %102 to i64\n %105 = getelementptr inbounds i32, i32* %99, i64 %104\n store i32 %96, i32* %105, align 4\n %106 = load %struct.DynamicArray*, %struct.DynamicArray** %3, align 8\n %107 = getelementptr inbounds %struct.DynamicArray, %struct.DynamicArray* %106, i32 0, i32 4\n store i32 1, i32* %107, align 4\n br label %108\n"]
- 95 --> 108
- 108["Block 108:\n ret i32 0\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %109, label %target_skip_1\n"]
- target_cond_1 -->|true| 109
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret i32 0\n"]
- 109["Block 109:\n %110 = load i32, i32* %12, align 4\n %111 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 %110)\n %extracted_target_return1target_ = extractvalue %fused_return_calculateDistance_memoizedFib %111, 0\n %112 = load i32, i32* %12, align 4\n %113 = add nsw i32 %112, 1\n store i32 %113, i32* %12, align 4\n br label %114\n"]
- 109 --> 114
- 114["Block 114:\n %115 = load i32, i32* %12, align 4\n %116 = icmp slt i32 %115, 10\n br i1 %116, label %109, label %117\n"]
- 114 -->|true| 109
- 114 -->|false| 117
- 117["Block 117:\n %118 = load i32, i32* %11, align 4\n %119 = icmp sgt i32 %118, 0\n br i1 %119, label %120, label %122\n"]
- 117 -->|true| 120
- 117 -->|false| 122
- 120["Block 120:\n %121 = call %fused_return_calculateDistance_memoizedFib @fused_calculateDistance(i1 true, %struct.Point* null, %struct.Point* null, i32* null, i32 7)\n %extracted_target_returntarget_ = extractvalue %fused_return_calculateDistance_memoizedFib %121, 0\n store i32 %extracted_target_returntarget_, i32* %13, align 4\n br label %125\n"]
- 120 --> 125
- 122["Block 122:\n %123 = load i32, i32* %11, align 4\n %124 = call i32 @fused_performSimpleCalculations(i1 true, i32 %123)\n store i32 %124, i32* %13, align 4\n br label %125\n"]
- 122 --> 125
- 125["Block 125:\n %126 = load i32, i32* %13, align 4\n ret i32 %126\n"]
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Completed function fusion: fused_pushBack
- [INFO][performCodeFusion] Processing function pair: target=reverseString, bunker=getErrorMessage
- [INFO][performCodeFusion] [After clone]Generated control flow graph for fused function:
- ```mermaid: fused_getErrorMessage
- graph TD
- entry["Block entry:\n %2 = alloca i8*\n %3 = alloca i32\n %4 = alloca i32\n %5 = alloca i8\n %6 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %7, label %target_skip_0\n"]
- target_cond_0 -->|true| 7
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 7["Block 7:\n store i8* %0, i8** %2, align 8\n %8 = load i8*, i8** %2, align 8\n %9 = call i64 @strlen(i8* %2) #7\n %10 = trunc i64 %3 to i32\n store i32 %4, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 7 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %6, label %11, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 11
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 11["Block 11:\n %12 = load i8*, i8** @globalErrorMessage, align 8\n %13 = icmp ne i8* %1, null\n br i1 %2, label %3, label %5\n"]
- 11 -->|true| 3
- 11 -->|false| 5
- 14["Block 14:\n %15 = load i8*, i8** @globalErrorMessage, align 8\n br label %6\n"]
- 14 --> 6
- 16["Block 16:\n br label %6\n"]
- 16 --> 6
- 17["Block 17:\n %18 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %5 ]\n ret i8* %7\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %19, label %target_skip_1\n"]
- target_cond_1 -->|true| 19
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n %21 = load i32, i32* %3, align 4\n %22 = sdiv i32 %7, 2\n %23 = icmp slt i32 %6, %8\n br i1 %9, label %10, label %39\n"]
- 19 -->|true| 10
- 19 -->|false| 39
- 24["Block 24:\n %25 = load i8*, i8** %2, align 8\n %26 = load i32, i32* %4, align 4\n %27 = sext i32 %12 to i64\n %28 = getelementptr inbounds i8, i8* %11, i64 %13\n %29 = load i8, i8* %14, align 1\n store i8 %15, i8* %5, align 1\n %30 = load i8*, i8** %2, align 8\n %31 = load i32, i32* %3, align 4\n %32 = sub nsw i32 %17, 1\n %33 = load i32, i32* %4, align 4\n %34 = sub nsw i32 %18, %19\n %35 = sext i32 %20 to i64\n %36 = getelementptr inbounds i8, i8* %16, i64 %21\n %37 = load i8, i8* %22, align 1\n %38 = load i8*, i8** %2, align 8\n %39 = load i32, i32* %4, align 4\n %40 = sext i32 %25 to i64\n %41 = getelementptr inbounds i8, i8* %24, i64 %26\n store i8 %23, i8* %27, align 1\n %42 = load i8, i8* %5, align 1\n %43 = load i8*, i8** %2, align 8\n %44 = load i32, i32* %3, align 4\n %45 = sub nsw i32 %30, 1\n %46 = load i32, i32* %4, align 4\n %47 = sub nsw i32 %31, %32\n %48 = sext i32 %33 to i64\n %49 = getelementptr inbounds i8, i8* %29, i64 %34\n store i8 %28, i8* %35, align 1\n br label %36\n"]
- 24 --> 36
- 50["Block 50:\n ret void\n"]
- 51["Block 51:\n %52 = load i32, i32* %4, align 4\n %53 = add nsw i32 %37, 1\n store i32 %38, i32* %4, align 4\n br label %target_phi_1\n"]
- 51 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing return instruction in block %17
- [INFO][performCodeFusion] Fixing return instruction in block %50
- [WARNING][performCodeFusion] No terminator found in block: target_phi_1
- [INFO][performCodeFusion] [After fix]Generated control flow graph for fused function:
- ```mermaid: fused_getErrorMessage
- graph TD
- entry["Block entry:\n %2 = alloca i8*\n %3 = alloca i32\n %4 = alloca i32\n %5 = alloca i8\n %6 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %7, label %target_skip_0\n"]
- target_cond_0 -->|true| 7
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 7["Block 7:\n store i8* %1, i8** %2, align 8\n %8 = load i8*, i8** %2, align 8\n %9 = call i64 @strlen(i8* %8) #7\n %10 = trunc i64 %9 to i32\n store i32 %10, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 7 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %6, label %11, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 11
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 11["Block 11:\n %12 = load i8*, i8** @globalErrorMessage, align 8\n %13 = icmp ne i8* %12, null\n br i1 %13, label %14, label %16\n"]
- 11 -->|true| 14
- 11 -->|false| 16
- 14["Block 14:\n %15 = load i8*, i8** @globalErrorMessage, align 8\n br label %17\n"]
- 14 --> 17
- 16["Block 16:\n br label %17\n"]
- 16 --> 17
- 17["Block 17:\n %18 = phi i8* [ %15, %3 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %5 ]\n ret i8* %18\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %19, label %target_skip_1\n"]
- target_cond_1 -->|true| 19
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n %21 = load i32, i32* %3, align 4\n %22 = sdiv i32 %21, 2\n %23 = icmp slt i32 %20, %22\n br i1 %23, label %24, label %50\n"]
- 19 -->|true| 24
- 19 -->|false| 50
- 24["Block 24:\n %25 = load i8*, i8** %2, align 8\n %26 = load i32, i32* %4, align 4\n %27 = sext i32 %26 to i64\n %28 = getelementptr inbounds i8, i8* %25, i64 %27\n %29 = load i8, i8* %28, align 1\n store i8 %29, i8* %5, align 1\n %30 = load i8*, i8** %2, align 8\n %31 = load i32, i32* %3, align 4\n %32 = sub nsw i32 %31, 1\n %33 = load i32, i32* %4, align 4\n %34 = sub nsw i32 %32, %33\n %35 = sext i32 %34 to i64\n %36 = getelementptr inbounds i8, i8* %30, i64 %35\n %37 = load i8, i8* %36, align 1\n %38 = load i8*, i8** %2, align 8\n %39 = load i32, i32* %4, align 4\n %40 = sext i32 %39 to i64\n %41 = getelementptr inbounds i8, i8* %38, i64 %40\n store i8 %37, i8* %41, align 1\n %42 = load i8, i8* %5, align 1\n %43 = load i8*, i8** %2, align 8\n %44 = load i32, i32* %3, align 4\n %45 = sub nsw i32 %44, 1\n %46 = load i32, i32* %4, align 4\n %47 = sub nsw i32 %45, %46\n %48 = sext i32 %47 to i64\n %49 = getelementptr inbounds i8, i8* %43, i64 %48\n store i8 %42, i8* %49, align 1\n br label %51\n"]
- 24 --> 51
- 50["Block 50:\n ret void\n"]
- 51["Block 51:\n %52 = load i32, i32* %4, align 4\n %53 = add nsw i32 %52, 1\n store i32 %53, i32* %4, align 4\n br label %target_phi_1\n"]
- 51 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Processing non-struct return type: i8*
- [INFO][performCodeFusion] Processing bunker block: %11
- [INFO][performCodeFusion] Processing bunker block: %17
- [INFO][performCodeFusion] Found return instruction in bunker block %17. Return value type: i8*
- [INFO][performCodeFusion] Processing bunker block: %16
- [INFO][performCodeFusion] Processing bunker block: %14
- [INFO][performCodeFusion] Processing target block: %51
- [INFO][performCodeFusion] Processing target block: %24
- [INFO][performCodeFusion] Processing target block: %19
- [INFO][performCodeFusion] Processing target block: %7
- [INFO][performCodeFusion] Processing target block: %50
- [INFO][performCodeFusion] Found void return instruction in target block %50
- [INFO][performCodeFusion] Return type mismatch in target block %50. Expected: i8*, Found: void
- [INFO][performCodeFusion] Created new return instruction with default value in block %50
- [INFO][performCodeFusion] [After fix return]Generated control flow graph for fused function:
- ```mermaid: fused_getErrorMessage
- graph TD
- entry["Block entry:\n %2 = alloca i8*\n %3 = alloca i32\n %4 = alloca i32\n %5 = alloca i8\n %6 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %7, label %target_skip_0\n"]
- target_cond_0 -->|true| 7
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 7["Block 7:\n store i8* %1, i8** %2, align 8\n %8 = load i8*, i8** %2, align 8\n %9 = call i64 @strlen(i8* %8) #7\n %10 = trunc i64 %9 to i32\n store i32 %10, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 7 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %6, label %11, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 11
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 11["Block 11:\n %12 = load i8*, i8** @globalErrorMessage, align 8\n %13 = icmp ne i8* %12, null\n br i1 %13, label %14, label %16\n"]
- 11 -->|true| 14
- 11 -->|false| 16
- 14["Block 14:\n %15 = load i8*, i8** @globalErrorMessage, align 8\n br label %17\n"]
- 14 --> 17
- 16["Block 16:\n br label %17\n"]
- 16 --> 17
- 17["Block 17:\n %18 = phi i8* [ %15, %3 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %5 ]\n ret i8* %18\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %19, label %target_skip_1\n"]
- target_cond_1 -->|true| 19
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n %21 = load i32, i32* %3, align 4\n %22 = sdiv i32 %21, 2\n %23 = icmp slt i32 %20, %22\n br i1 %23, label %24, label %50\n"]
- 19 -->|true| 24
- 19 -->|false| 50
- 24["Block 24:\n %25 = load i8*, i8** %2, align 8\n %26 = load i32, i32* %4, align 4\n %27 = sext i32 %26 to i64\n %28 = getelementptr inbounds i8, i8* %25, i64 %27\n %29 = load i8, i8* %28, align 1\n store i8 %29, i8* %5, align 1\n %30 = load i8*, i8** %2, align 8\n %31 = load i32, i32* %3, align 4\n %32 = sub nsw i32 %31, 1\n %33 = load i32, i32* %4, align 4\n %34 = sub nsw i32 %32, %33\n %35 = sext i32 %34 to i64\n %36 = getelementptr inbounds i8, i8* %30, i64 %35\n %37 = load i8, i8* %36, align 1\n %38 = load i8*, i8** %2, align 8\n %39 = load i32, i32* %4, align 4\n %40 = sext i32 %39 to i64\n %41 = getelementptr inbounds i8, i8* %38, i64 %40\n store i8 %37, i8* %41, align 1\n %42 = load i8, i8* %5, align 1\n %43 = load i8*, i8** %2, align 8\n %44 = load i32, i32* %3, align 4\n %45 = sub nsw i32 %44, 1\n %46 = load i32, i32* %4, align 4\n %47 = sub nsw i32 %45, %46\n %48 = sext i32 %47 to i64\n %49 = getelementptr inbounds i8, i8* %43, i64 %48\n store i8 %42, i8* %49, align 1\n br label %51\n"]
- 24 --> 51
- 50["Block 50:\n ret i8* null\n"]
- 51["Block 51:\n %52 = load i32, i32* %4, align 4\n %53 = add nsw i32 %52, 1\n store i32 %53, i32* %4, align 4\n br label %target_phi_1\n"]
- 51 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [DEBUG][updateCallSite] Original call instruction:
- %181 = call i8* @getErrorMessage()
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i8*
- [DEBUG][updateCallSite] New call instruction:
- %181 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Processing non-void return value of type: i8*
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %181 = call i8* @getErrorMessage() to %181 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Original call instruction:
- %122 = call i8* @getErrorMessage()
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i8*
- [DEBUG][updateCallSite] New call instruction:
- %122 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Processing non-void return value of type: i8*
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %122 = call i8* @getErrorMessage() to %122 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Original call instruction:
- %55 = call i8* @getErrorMessage()
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i8*
- [DEBUG][updateCallSite] New call instruction:
- %55 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Processing non-void return value of type: i8*
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %55 = call i8* @getErrorMessage() to %55 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Original call instruction:
- %40 = call i8* @getErrorMessage()
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i8*
- [DEBUG][updateCallSite] New call instruction:
- %40 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Processing non-void return value of type: i8*
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %40 = call i8* @getErrorMessage() to %40 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Original call instruction:
- %26 = call i8* @getErrorMessage()
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i8*
- [DEBUG][updateCallSite] New call instruction:
- %26 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Processing non-void return value of type: i8*
- [DEBUG][updateCallSite] Using direct return value
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %26 = call i8* @getErrorMessage() to %26 = call i8* @fused_getErrorMessage(i1 false, i8* null)
- [DEBUG][updateCallSite] Original call instruction:
- call void @reverseString(i8* %18)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i8*
- [DEBUG][updateCallSite] New call instruction:
- %19 = call i8* @fused_getErrorMessage(i1 true, i8* %18)
- [DEBUG][updateCallSite] Void return type, no value processing needed
- [INFO][updateCallSite] Successfully updated call site from call void @reverseString(i8* %18) to %19 = call i8* @fused_getErrorMessage(i1 true, i8* %18)
- [INFO][performCodeFusion] [After update call site]Generated control flow graph for fused function:
- ```mermaid: fused_getErrorMessage
- graph TD
- entry["Block entry:\n %2 = alloca i8*\n %3 = alloca i32\n %4 = alloca i32\n %5 = alloca i8\n %6 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %7, label %target_skip_0\n"]
- target_cond_0 -->|true| 7
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 7["Block 7:\n store i8* %1, i8** %2, align 8\n %8 = load i8*, i8** %2, align 8\n %9 = call i64 @strlen(i8* %8) #7\n %10 = trunc i64 %9 to i32\n store i32 %10, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 7 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %6, label %11, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 11
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 11["Block 11:\n %12 = load i8*, i8** @globalErrorMessage, align 8\n %13 = icmp ne i8* %12, null\n br i1 %13, label %14, label %16\n"]
- 11 -->|true| 14
- 11 -->|false| 16
- 14["Block 14:\n %15 = load i8*, i8** @globalErrorMessage, align 8\n br label %17\n"]
- 14 --> 17
- 16["Block 16:\n br label %17\n"]
- 16 --> 17
- 17["Block 17:\n %18 = phi i8* [ %15, %3 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %5 ]\n ret i8* %18\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %19, label %target_skip_1\n"]
- target_cond_1 -->|true| 19
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n %21 = load i32, i32* %3, align 4\n %22 = sdiv i32 %21, 2\n %23 = icmp slt i32 %20, %22\n br i1 %23, label %24, label %50\n"]
- 19 -->|true| 24
- 19 -->|false| 50
- 24["Block 24:\n %25 = load i8*, i8** %2, align 8\n %26 = load i32, i32* %4, align 4\n %27 = sext i32 %26 to i64\n %28 = getelementptr inbounds i8, i8* %25, i64 %27\n %29 = load i8, i8* %28, align 1\n store i8 %29, i8* %5, align 1\n %30 = load i8*, i8** %2, align 8\n %31 = load i32, i32* %3, align 4\n %32 = sub nsw i32 %31, 1\n %33 = load i32, i32* %4, align 4\n %34 = sub nsw i32 %32, %33\n %35 = sext i32 %34 to i64\n %36 = getelementptr inbounds i8, i8* %30, i64 %35\n %37 = load i8, i8* %36, align 1\n %38 = load i8*, i8** %2, align 8\n %39 = load i32, i32* %4, align 4\n %40 = sext i32 %39 to i64\n %41 = getelementptr inbounds i8, i8* %38, i64 %40\n store i8 %37, i8* %41, align 1\n %42 = load i8, i8* %5, align 1\n %43 = load i8*, i8** %2, align 8\n %44 = load i32, i32* %3, align 4\n %45 = sub nsw i32 %44, 1\n %46 = load i32, i32* %4, align 4\n %47 = sub nsw i32 %45, %46\n %48 = sext i32 %47 to i64\n %49 = getelementptr inbounds i8, i8* %43, i64 %48\n store i8 %42, i8* %49, align 1\n br label %51\n"]
- 24 --> 51
- 50["Block 50:\n ret i8* null\n"]
- 51["Block 51:\n %52 = load i32, i32* %4, align 4\n %53 = add nsw i32 %52, 1\n store i32 %53, i32* %4, align 4\n br label %target_phi_1\n"]
- 51 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing blocks without terminators...
- [INFO][performCodeFusion] Added return with default value to block: target_phi_1
- [INFO][performCodeFusion] Starting PHI node repair
- [DEBUG][performCodeFusion] Updating PHI node in %17: mapped predecessor %3 to %14
- [DEBUG][performCodeFusion] Updating PHI node in %17: mapped predecessor %5 to %16
- [INFO][performCodeFusion] [After fix PHI]Generated control flow graph for fused function:
- ```mermaid: fused_getErrorMessage
- graph TD
- entry["Block entry:\n %2 = alloca i8*\n %3 = alloca i32\n %4 = alloca i32\n %5 = alloca i8\n %6 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %7, label %target_skip_0\n"]
- target_cond_0 -->|true| 7
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 7["Block 7:\n store i8* %1, i8** %2, align 8\n %8 = load i8*, i8** %2, align 8\n %9 = call i64 @strlen(i8* %8) #7\n %10 = trunc i64 %9 to i32\n store i32 %10, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 7 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %6, label %11, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 11
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 11["Block 11:\n %12 = load i8*, i8** @globalErrorMessage, align 8\n %13 = icmp ne i8* %12, null\n br i1 %13, label %14, label %16\n"]
- 11 -->|true| 14
- 11 -->|false| 16
- 14["Block 14:\n %15 = load i8*, i8** @globalErrorMessage, align 8\n br label %17\n"]
- 14 --> 17
- 16["Block 16:\n br label %17\n"]
- 16 --> 17
- 17["Block 17:\n %18 = phi i8* [ %15, %14 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %16 ]\n ret i8* %18\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %19, label %target_skip_1\n"]
- target_cond_1 -->|true| 19
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret i8* null\n"]
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n %21 = load i32, i32* %3, align 4\n %22 = sdiv i32 %21, 2\n %23 = icmp slt i32 %20, %22\n br i1 %23, label %24, label %50\n"]
- 19 -->|true| 24
- 19 -->|false| 50
- 24["Block 24:\n %25 = load i8*, i8** %2, align 8\n %26 = load i32, i32* %4, align 4\n %27 = sext i32 %26 to i64\n %28 = getelementptr inbounds i8, i8* %25, i64 %27\n %29 = load i8, i8* %28, align 1\n store i8 %29, i8* %5, align 1\n %30 = load i8*, i8** %2, align 8\n %31 = load i32, i32* %3, align 4\n %32 = sub nsw i32 %31, 1\n %33 = load i32, i32* %4, align 4\n %34 = sub nsw i32 %32, %33\n %35 = sext i32 %34 to i64\n %36 = getelementptr inbounds i8, i8* %30, i64 %35\n %37 = load i8, i8* %36, align 1\n %38 = load i8*, i8** %2, align 8\n %39 = load i32, i32* %4, align 4\n %40 = sext i32 %39 to i64\n %41 = getelementptr inbounds i8, i8* %38, i64 %40\n store i8 %37, i8* %41, align 1\n %42 = load i8, i8* %5, align 1\n %43 = load i8*, i8** %2, align 8\n %44 = load i32, i32* %3, align 4\n %45 = sub nsw i32 %44, 1\n %46 = load i32, i32* %4, align 4\n %47 = sub nsw i32 %45, %46\n %48 = sext i32 %47 to i64\n %49 = getelementptr inbounds i8, i8* %43, i64 %48\n store i8 %42, i8* %49, align 1\n br label %51\n"]
- 24 --> 51
- 50["Block 50:\n ret i8* null\n"]
- 51["Block 51:\n %52 = load i32, i32* %4, align 4\n %53 = add nsw i32 %52, 1\n store i32 %53, i32* %4, align 4\n br label %target_phi_1\n"]
- 51 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Attempting to delete original functions...
- [INFO][performCodeFusion] [After erase]Generated control flow graph for fused function:
- ```mermaid: fused_getErrorMessage
- graph TD
- entry["Block entry:\n %2 = alloca i8*\n %3 = alloca i32\n %4 = alloca i32\n %5 = alloca i8\n %6 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %7, label %target_skip_0\n"]
- target_cond_0 -->|true| 7
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 7["Block 7:\n store i8* %1, i8** %2, align 8\n %8 = load i8*, i8** %2, align 8\n %9 = call i64 @strlen(i8* %8) #7\n %10 = trunc i64 %9 to i32\n store i32 %10, i32* %3, align 4\n store i32 0, i32* %4, align 4\n br label %target_phi_0\n"]
- 7 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %6, label %11, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 11
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 11["Block 11:\n %12 = load i8*, i8** @globalErrorMessage, align 8\n %13 = icmp ne i8* %12, null\n br i1 %13, label %14, label %16\n"]
- 11 -->|true| 14
- 11 -->|false| 16
- 14["Block 14:\n %15 = load i8*, i8** @globalErrorMessage, align 8\n br label %17\n"]
- 14 --> 17
- 16["Block 16:\n br label %17\n"]
- 16 --> 17
- 17["Block 17:\n %18 = phi i8* [ %15, %14 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %16 ]\n ret i8* %18\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %19, label %target_skip_1\n"]
- target_cond_1 -->|true| 19
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret i8* null\n"]
- 19["Block 19:\n %20 = load i32, i32* %4, align 4\n %21 = load i32, i32* %3, align 4\n %22 = sdiv i32 %21, 2\n %23 = icmp slt i32 %20, %22\n br i1 %23, label %24, label %50\n"]
- 19 -->|true| 24
- 19 -->|false| 50
- 24["Block 24:\n %25 = load i8*, i8** %2, align 8\n %26 = load i32, i32* %4, align 4\n %27 = sext i32 %26 to i64\n %28 = getelementptr inbounds i8, i8* %25, i64 %27\n %29 = load i8, i8* %28, align 1\n store i8 %29, i8* %5, align 1\n %30 = load i8*, i8** %2, align 8\n %31 = load i32, i32* %3, align 4\n %32 = sub nsw i32 %31, 1\n %33 = load i32, i32* %4, align 4\n %34 = sub nsw i32 %32, %33\n %35 = sext i32 %34 to i64\n %36 = getelementptr inbounds i8, i8* %30, i64 %35\n %37 = load i8, i8* %36, align 1\n %38 = load i8*, i8** %2, align 8\n %39 = load i32, i32* %4, align 4\n %40 = sext i32 %39 to i64\n %41 = getelementptr inbounds i8, i8* %38, i64 %40\n store i8 %37, i8* %41, align 1\n %42 = load i8, i8* %5, align 1\n %43 = load i8*, i8** %2, align 8\n %44 = load i32, i32* %3, align 4\n %45 = sub nsw i32 %44, 1\n %46 = load i32, i32* %4, align 4\n %47 = sub nsw i32 %45, %46\n %48 = sext i32 %47 to i64\n %49 = getelementptr inbounds i8, i8* %43, i64 %48\n store i8 %42, i8* %49, align 1\n br label %51\n"]
- 24 --> 51
- 50["Block 50:\n ret i8* null\n"]
- 51["Block 51:\n %52 = load i32, i32* %4, align 4\n %53 = add nsw i32 %52, 1\n store i32 %53, i32* %4, align 4\n br label %target_phi_1\n"]
- 51 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Completed function fusion: fused_getErrorMessage
- [INFO][performCodeFusion] Processing function pair: target=testPoints, bunker=multiplyMatrices
- [INFO][performCodeFusion] [After clone]Generated control flow graph for fused function:
- ```mermaid: fused_multiplyMatrices
- graph TD
- entry["Block entry:\n %4 = alloca %struct.Matrix*\n %5 = alloca %struct.Matrix*\n %6 = alloca %struct.Matrix*\n %7 = alloca %struct.Matrix*\n %8 = alloca i64\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i64\n %12 = alloca i32\n %13 = alloca i64\n %14 = alloca i32\n %15 = alloca i32\n %16 = alloca i32\n %17 = alloca i32\n %18 = alloca i32\n %19 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %20, label %target_skip_0\n"]
- target_cond_0 -->|true| 20
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 20["Block 20:\n store i32 %0, i32* %16, align 4\n store i32 0, i32* %17, align 4\n store i32 1, i32* %18, align 4\n br label %target_phi_0\n"]
- 20 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %19, label %21, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 21
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 21["Block 21:\n store %struct.Matrix* %0, %struct.Matrix** %5, align 8\n store %struct.Matrix* %1, %struct.Matrix** %6, align 8\n %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %23 = icmp ne %struct.Matrix* %3, null\n br i1 %4, label %5, label %8\n"]
- 21 -->|true| 5
- 21 -->|false| 8
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %6, null\n br i1 %7, label %9, label %8\n"]
- 24 -->|true| 9
- 24 -->|false| 8
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %198\n"]
- 27 --> 198
- 28["Block 28:\n %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %10, i32 0, i32 0\n %31 = load i32**, i32*** %11, align 8\n %32 = icmp ne i32** %12, null\n br i1 %13, label %14, label %19\n"]
- 28 -->|true| 14
- 28 -->|false| 19
- 33["Block 33:\n %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %15, i32 0, i32 0\n %36 = load i32**, i32*** %16, align 8\n %37 = icmp ne i32** %17, null\n br i1 %18, label %20, label %19\n"]
- 33 -->|true| 20
- 33 -->|false| 19
- 38["Block 38:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %198\n"]
- 38 --> 198
- 39["Block 39:\n %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %21, i32 0, i32 2\n %42 = load i32, i32* %22, align 4\n %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %24, i32 0, i32 1\n %45 = load i32, i32* %25, align 8\n %46 = icmp ne i32 %23, %26\n br i1 %27, label %28, label %29\n"]
- 39 -->|true| 28
- 39 -->|false| 29
- 47["Block 47:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %198\n"]
- 47 --> 198
- 48["Block 48:\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %30, i32 0, i32 2\n %51 = load i32, i32* %31, align 4\n %52 = icmp sgt i32 %32, 100\n br i1 %33, label %39, label %34\n"]
- 48 -->|true| 39
- 48 -->|false| 34
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %35, i32 0, i32 1\n %56 = load i32, i32* %36, align 8\n %57 = icmp sgt i32 %37, 100\n br i1 %38, label %39, label %40\n"]
- 53 -->|true| 39
- 53 -->|false| 40
- 58["Block 58:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %198\n"]
- 58 --> 198
- 59["Block 59:\n %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %41, i32 0, i32 1\n %62 = load i32, i32* %42, align 8\n %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %44, i32 0, i32 2\n %65 = load i32, i32* %45, align 4\n %66 = call %struct.Matrix* @createMatrix(i32 %43, i32 %46)\n store %struct.Matrix* %47, %struct.Matrix** %7, align 8\n %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %68 = icmp ne %struct.Matrix* %48, null\n br i1 %49, label %51, label %50\n"]
- 59 -->|true| 51
- 59 -->|false| 50
- 69["Block 69:\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %198\n"]
- 69 --> 198
- 70["Block 70:\n store i64 0, i64* %8, align 8\n store i32 0, i32* %9, align 4\n br label %52\n"]
- 70 --> 52
- 71["Block 71:\n %72 = load i32, i32* %9, align 4\n %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1\n %75 = load i32, i32* %55, align 8\n %76 = icmp slt i32 %53, %56\n br i1 %57, label %58, label %186\n"]
- 71 -->|true| 58
- 71 -->|false| 186
- 77["Block 77:\n store i32 0, i32* %10, align 4\n br label %59\n"]
- 77 --> 59
- 78["Block 78:\n %79 = load i32, i32* %10, align 4\n %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %61, i32 0, i32 2\n %82 = load i32, i32* %62, align 4\n %83 = icmp slt i32 %60, %63\n br i1 %64, label %65, label %182\n"]
- 78 -->|true| 65
- 78 -->|false| 182
- 84["Block 84:\n store i64 0, i64* %11, align 8\n store i32 0, i32* %12, align 4\n br label %66\n"]
- 84 --> 66
- 85["Block 85:\n %86 = load i32, i32* %12, align 4\n %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %68, i32 0, i32 2\n %89 = load i32, i32* %69, align 4\n %90 = icmp slt i32 %67, %70\n br i1 %71, label %72, label %136\n"]
- 85 -->|true| 72
- 85 -->|false| 136
- 91["Block 91:\n %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 0\n %94 = load i32**, i32*** %74, align 8\n %95 = load i32, i32* %9, align 4\n %96 = sext i32 %76 to i64\n %97 = getelementptr inbounds i32*, i32** %75, i64 %77\n %98 = load i32*, i32** %78, align 8\n %99 = load i32, i32* %12, align 4\n %100 = sext i32 %80 to i64\n %101 = getelementptr inbounds i32, i32* %79, i64 %81\n %102 = load i32, i32* %82, align 4\n %103 = sext i32 %83 to i64\n %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %85, i32 0, i32 0\n %106 = load i32**, i32*** %86, align 8\n %107 = load i32, i32* %12, align 4\n %108 = sext i32 %88 to i64\n %109 = getelementptr inbounds i32*, i32** %87, i64 %89\n %110 = load i32*, i32** %90, align 8\n %111 = load i32, i32* %10, align 4\n %112 = sext i32 %92 to i64\n %113 = getelementptr inbounds i32, i32* %91, i64 %93\n %114 = load i32, i32* %94, align 4\n %115 = sext i32 %95 to i64\n %116 = mul nsw i64 %84, %96\n store i64 %97, i64* %13, align 8\n %117 = load i64, i64* %13, align 8\n %118 = load i64, i64* %11, align 8\n %119 = add nsw i64 %99, %98\n store i64 %100, i64* %11, align 8\n %120 = load i64, i64* %11, align 8\n %121 = icmp sgt i64 %101, 2147483647\n br i1 %102, label %106, label %103\n"]
- 91 -->|true| 106
- 91 -->|false| 103
- 122["Block 122:\n %123 = load i64, i64* %11, align 8\n %124 = icmp slt i64 %104, -2147483648\n br i1 %105, label %106, label %132\n"]
- 122 -->|true| 106
- 122 -->|false| 132
- 125["Block 125:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %14, align 4\n br label %107\n"]
- 125 --> 107
- 126["Block 126:\n %127 = load i32, i32* %14, align 4\n %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %109, i32 0, i32 1\n %130 = load i32, i32* %110, align 8\n %131 = icmp slt i32 %108, %111\n br i1 %112, label %113, label %125\n"]
- 126 -->|true| 113
- 126 -->|false| 125
- 132["Block 132:\n %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %114, i32 0, i32 0\n %135 = load i32**, i32*** %115, align 8\n %136 = load i32, i32* %14, align 4\n %137 = sext i32 %117 to i64\n %138 = getelementptr inbounds i32*, i32** %116, i64 %118\n %139 = load i32*, i32** %119, align 8\n %140 = bitcast i32* %120 to i8*\n call void @free(i8* %121) #7\n br label %122\n"]
- 132 --> 122
- 141["Block 141:\n %142 = load i32, i32* %14, align 4\n %143 = add nsw i32 %123, 1\n store i32 %124, i32* %14, align 4\n br label %107\n"]
- 141 --> 107
- 144["Block 144:\n %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %126, i32 0, i32 0\n %147 = load i32**, i32*** %127, align 8\n %148 = bitcast i32** %128 to i8*\n call void @free(i8* %129) #7\n %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %150 = bitcast %struct.Matrix* %130 to i8*\n call void @free(i8* %131) #7\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %198\n"]
- 144 --> 198
- 151["Block 151:\n br label %133\n"]
- 151 --> 133
- 152["Block 152:\n %153 = load i32, i32* %12, align 4\n %154 = add nsw i32 %134, 1\n store i32 %135, i32* %12, align 4\n br label %66\n"]
- 152 --> 66
- 155["Block 155:\n %156 = load i64, i64* %11, align 8\n %157 = trunc i64 %137 to i32\n %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %139, i32 0, i32 0\n %160 = load i32**, i32*** %140, align 8\n %161 = load i32, i32* %9, align 4\n %162 = sext i32 %142 to i64\n %163 = getelementptr inbounds i32*, i32** %141, i64 %143\n %164 = load i32*, i32** %144, align 8\n %165 = load i32, i32* %10, align 4\n %166 = sext i32 %146 to i64\n %167 = getelementptr inbounds i32, i32* %145, i64 %147\n store i32 %138, i32* %148, align 4\n %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %149, i32 0, i32 0\n %170 = load i32**, i32*** %150, align 8\n %171 = load i32, i32* %9, align 4\n %172 = sext i32 %152 to i64\n %173 = getelementptr inbounds i32*, i32** %151, i64 %153\n %174 = load i32*, i32** %154, align 8\n %175 = load i32, i32* %10, align 4\n %176 = sext i32 %156 to i64\n %177 = getelementptr inbounds i32, i32* %155, i64 %157\n %178 = load i32, i32* %158, align 4\n %179 = call i32 @abs(i32 %159) #8\n %180 = sext i32 %160 to i64\n %181 = load i64, i64* %8, align 8\n %182 = icmp sgt i64 %161, %162\n br i1 %163, label %164, label %178\n"]
- 155 -->|true| 164
- 155 -->|false| 178
- 183["Block 183:\n %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %165, i32 0, i32 0\n %186 = load i32**, i32*** %166, align 8\n %187 = load i32, i32* %9, align 4\n %188 = sext i32 %168 to i64\n %189 = getelementptr inbounds i32*, i32** %167, i64 %169\n %190 = load i32*, i32** %170, align 8\n %191 = load i32, i32* %10, align 4\n %192 = sext i32 %172 to i64\n %193 = getelementptr inbounds i32, i32* %171, i64 %173\n %194 = load i32, i32* %174, align 4\n %195 = call i32 @abs(i32 %175) #8\n %196 = sext i32 %176 to i64\n store i64 %177, i64* %8, align 8\n br label %178\n"]
- 183 --> 178
- 197["Block 197:\n br label %179\n"]
- 197 --> 179
- 198["Block 198:\n %199 = load i32, i32* %10, align 4\n %200 = add nsw i32 %180, 1\n store i32 %181, i32* %10, align 4\n br label %59\n"]
- 198 --> 59
- 201["Block 201:\n br label %183\n"]
- 201 --> 183
- 202["Block 202:\n %203 = load i32, i32* %9, align 4\n %204 = add nsw i32 %184, 1\n store i32 %185, i32* %9, align 4\n br label %52\n"]
- 202 --> 52
- 205["Block 205:\n %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %187, i32 0, i32 1\n %208 = load i32, i32* %188, align 8\n %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %190, i32 0, i32 2\n %211 = load i32, i32* %191, align 4\n %212 = icmp eq i32 %189, %192\n %213 = zext i1 %193 to i32\n %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %195, i32 0, i32 3\n store i32 %194, i32* %196, align 8\n %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n store %struct.Matrix* %197, %struct.Matrix** %4, align 8\n br label %198\n"]
- 205 --> 198
- 217["Block 217:\n %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n ret %struct.Matrix* %199\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %219, label %target_skip_1\n"]
- target_cond_1 -->|true| 219
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 219["Block 219:\n %220 = load i32, i32* %17, align 4\n %221 = add nsw i32 %6, 1\n store i32 %7, i32* %17, align 4\n %222 = load i32, i32* %16, align 4\n %223 = icmp sgt i32 %8, 2\n br i1 %9, label %10, label %11\n"]
- 219 -->|true| 10
- 219 -->|false| 11
- 224["Block 224:\n %225 = load i32, i32* %18, align 4\n %226 = icmp slt i32 %3, 5\n br i1 %4, label %5, label %15\n"]
- 224 -->|true| 5
- 224 -->|false| 15
- 227["Block 227:\n %228 = load i32, i32* %17, align 4\n store i32 %16, i32* %15, align 4\n br label %17\n"]
- 227 --> 17
- 229["Block 229:\n store i32 23, i32* %15, align 4\n br label %17\n"]
- 229 --> 17
- 230["Block 230:\n br label %12\n"]
- 230 --> 12
- 231["Block 231:\n %232 = load i32, i32* %15, align 4\n ret i32 %18\n"]
- 233["Block 233:\n %234 = load i32, i32* %18, align 4\n %235 = add nsw i32 %13, 1\n store i32 %14, i32* %18, align 4\n br label %target_phi_1\n"]
- 233 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing return instruction in block %217
- [INFO][performCodeFusion] Fixing return instruction in block %231
- [WARNING][performCodeFusion] No terminator found in block: target_phi_1
- [INFO][performCodeFusion] [After fix]Generated control flow graph for fused function:
- ```mermaid: fused_multiplyMatrices
- graph TD
- entry["Block entry:\n %4 = alloca %struct.Matrix*\n %5 = alloca %struct.Matrix*\n %6 = alloca %struct.Matrix*\n %7 = alloca %struct.Matrix*\n %8 = alloca i64\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i64\n %12 = alloca i32\n %13 = alloca i64\n %14 = alloca i32\n %15 = alloca i32\n %16 = alloca i32\n %17 = alloca i32\n %18 = alloca i32\n %19 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %20, label %target_skip_0\n"]
- target_cond_0 -->|true| 20
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 20["Block 20:\n store i32 %3, i32* %16, align 4\n store i32 0, i32* %17, align 4\n store i32 1, i32* %18, align 4\n br label %target_phi_0\n"]
- 20 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %19, label %21, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 21
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 21["Block 21:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n store %struct.Matrix* %2, %struct.Matrix** %6, align 8\n %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %23 = icmp ne %struct.Matrix* %22, null\n br i1 %23, label %24, label %27\n"]
- 21 -->|true| 24
- 21 -->|false| 27
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %25, null\n br i1 %26, label %28, label %27\n"]
- 24 -->|true| 28
- 24 -->|false| 27
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 27 --> 217
- 28["Block 28:\n %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %29, i32 0, i32 0\n %31 = load i32**, i32*** %30, align 8\n %32 = icmp ne i32** %31, null\n br i1 %32, label %33, label %38\n"]
- 28 -->|true| 33
- 28 -->|false| 38
- 33["Block 33:\n %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %34, i32 0, i32 0\n %36 = load i32**, i32*** %35, align 8\n %37 = icmp ne i32** %36, null\n br i1 %37, label %39, label %38\n"]
- 33 -->|true| 39
- 33 -->|false| 38
- 38["Block 38:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 38 --> 217
- 39["Block 39:\n %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %40, i32 0, i32 2\n %42 = load i32, i32* %41, align 4\n %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %43, i32 0, i32 1\n %45 = load i32, i32* %44, align 8\n %46 = icmp ne i32 %42, %45\n br i1 %46, label %47, label %48\n"]
- 39 -->|true| 47
- 39 -->|false| 48
- 47["Block 47:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 47 --> 217
- 48["Block 48:\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 2\n %51 = load i32, i32* %50, align 4\n %52 = icmp sgt i32 %51, 100\n br i1 %52, label %58, label %53\n"]
- 48 -->|true| 58
- 48 -->|false| 53
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1\n %56 = load i32, i32* %55, align 8\n %57 = icmp sgt i32 %56, 100\n br i1 %57, label %58, label %59\n"]
- 53 -->|true| 58
- 53 -->|false| 59
- 58["Block 58:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 58 --> 217
- 59["Block 59:\n %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %60, i32 0, i32 1\n %62 = load i32, i32* %61, align 8\n %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 2\n %65 = load i32, i32* %64, align 4\n %66 = call %struct.Matrix* @createMatrix(i32 %62, i32 %65)\n store %struct.Matrix* %66, %struct.Matrix** %7, align 8\n %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %68 = icmp ne %struct.Matrix* %67, null\n br i1 %68, label %70, label %69\n"]
- 59 -->|true| 70
- 59 -->|false| 69
- 69["Block 69:\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 69 --> 217
- 70["Block 70:\n store i64 0, i64* %8, align 8\n store i32 0, i32* %9, align 4\n br label %71\n"]
- 70 --> 71
- 71["Block 71:\n %72 = load i32, i32* %9, align 4\n %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 1\n %75 = load i32, i32* %74, align 8\n %76 = icmp slt i32 %72, %75\n br i1 %76, label %77, label %205\n"]
- 71 -->|true| 77
- 71 -->|false| 205
- 77["Block 77:\n store i32 0, i32* %10, align 4\n br label %78\n"]
- 77 --> 78
- 78["Block 78:\n %79 = load i32, i32* %10, align 4\n %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %80, i32 0, i32 2\n %82 = load i32, i32* %81, align 4\n %83 = icmp slt i32 %79, %82\n br i1 %83, label %84, label %201\n"]
- 78 -->|true| 84
- 78 -->|false| 201
- 84["Block 84:\n store i64 0, i64* %11, align 8\n store i32 0, i32* %12, align 4\n br label %85\n"]
- 84 --> 85
- 85["Block 85:\n %86 = load i32, i32* %12, align 4\n %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 2\n %89 = load i32, i32* %88, align 4\n %90 = icmp slt i32 %86, %89\n br i1 %90, label %91, label %155\n"]
- 85 -->|true| 91
- 85 -->|false| 155
- 91["Block 91:\n %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %92, i32 0, i32 0\n %94 = load i32**, i32*** %93, align 8\n %95 = load i32, i32* %9, align 4\n %96 = sext i32 %95 to i64\n %97 = getelementptr inbounds i32*, i32** %94, i64 %96\n %98 = load i32*, i32** %97, align 8\n %99 = load i32, i32* %12, align 4\n %100 = sext i32 %99 to i64\n %101 = getelementptr inbounds i32, i32* %98, i64 %100\n %102 = load i32, i32* %101, align 4\n %103 = sext i32 %102 to i64\n %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %104, i32 0, i32 0\n %106 = load i32**, i32*** %105, align 8\n %107 = load i32, i32* %12, align 4\n %108 = sext i32 %107 to i64\n %109 = getelementptr inbounds i32*, i32** %106, i64 %108\n %110 = load i32*, i32** %109, align 8\n %111 = load i32, i32* %10, align 4\n %112 = sext i32 %111 to i64\n %113 = getelementptr inbounds i32, i32* %110, i64 %112\n %114 = load i32, i32* %113, align 4\n %115 = sext i32 %114 to i64\n %116 = mul nsw i64 %103, %115\n store i64 %116, i64* %13, align 8\n %117 = load i64, i64* %13, align 8\n %118 = load i64, i64* %11, align 8\n %119 = add nsw i64 %118, %117\n store i64 %119, i64* %11, align 8\n %120 = load i64, i64* %11, align 8\n %121 = icmp sgt i64 %120, 2147483647\n br i1 %121, label %125, label %122\n"]
- 91 -->|true| 125
- 91 -->|false| 122
- 122["Block 122:\n %123 = load i64, i64* %11, align 8\n %124 = icmp slt i64 %123, -2147483648\n br i1 %124, label %125, label %151\n"]
- 122 -->|true| 125
- 122 -->|false| 151
- 125["Block 125:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %14, align 4\n br label %126\n"]
- 125 --> 126
- 126["Block 126:\n %127 = load i32, i32* %14, align 4\n %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %128, i32 0, i32 1\n %130 = load i32, i32* %129, align 8\n %131 = icmp slt i32 %127, %130\n br i1 %131, label %132, label %144\n"]
- 126 -->|true| 132
- 126 -->|false| 144
- 132["Block 132:\n %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %133, i32 0, i32 0\n %135 = load i32**, i32*** %134, align 8\n %136 = load i32, i32* %14, align 4\n %137 = sext i32 %136 to i64\n %138 = getelementptr inbounds i32*, i32** %135, i64 %137\n %139 = load i32*, i32** %138, align 8\n %140 = bitcast i32* %139 to i8*\n call void @free(i8* %140) #7\n br label %141\n"]
- 132 --> 141
- 141["Block 141:\n %142 = load i32, i32* %14, align 4\n %143 = add nsw i32 %142, 1\n store i32 %143, i32* %14, align 4\n br label %126\n"]
- 141 --> 126
- 144["Block 144:\n %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %145, i32 0, i32 0\n %147 = load i32**, i32*** %146, align 8\n %148 = bitcast i32** %147 to i8*\n call void @free(i8* %148) #7\n %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %150 = bitcast %struct.Matrix* %149 to i8*\n call void @free(i8* %150) #7\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 144 --> 217
- 151["Block 151:\n br label %152\n"]
- 151 --> 152
- 152["Block 152:\n %153 = load i32, i32* %12, align 4\n %154 = add nsw i32 %153, 1\n store i32 %154, i32* %12, align 4\n br label %85\n"]
- 152 --> 85
- 155["Block 155:\n %156 = load i64, i64* %11, align 8\n %157 = trunc i64 %156 to i32\n %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %158, i32 0, i32 0\n %160 = load i32**, i32*** %159, align 8\n %161 = load i32, i32* %9, align 4\n %162 = sext i32 %161 to i64\n %163 = getelementptr inbounds i32*, i32** %160, i64 %162\n %164 = load i32*, i32** %163, align 8\n %165 = load i32, i32* %10, align 4\n %166 = sext i32 %165 to i64\n %167 = getelementptr inbounds i32, i32* %164, i64 %166\n store i32 %157, i32* %167, align 4\n %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %168, i32 0, i32 0\n %170 = load i32**, i32*** %169, align 8\n %171 = load i32, i32* %9, align 4\n %172 = sext i32 %171 to i64\n %173 = getelementptr inbounds i32*, i32** %170, i64 %172\n %174 = load i32*, i32** %173, align 8\n %175 = load i32, i32* %10, align 4\n %176 = sext i32 %175 to i64\n %177 = getelementptr inbounds i32, i32* %174, i64 %176\n %178 = load i32, i32* %177, align 4\n %179 = call i32 @abs(i32 %178) #8\n %180 = sext i32 %179 to i64\n %181 = load i64, i64* %8, align 8\n %182 = icmp sgt i64 %180, %181\n br i1 %182, label %183, label %197\n"]
- 155 -->|true| 183
- 155 -->|false| 197
- 183["Block 183:\n %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %184, i32 0, i32 0\n %186 = load i32**, i32*** %185, align 8\n %187 = load i32, i32* %9, align 4\n %188 = sext i32 %187 to i64\n %189 = getelementptr inbounds i32*, i32** %186, i64 %188\n %190 = load i32*, i32** %189, align 8\n %191 = load i32, i32* %10, align 4\n %192 = sext i32 %191 to i64\n %193 = getelementptr inbounds i32, i32* %190, i64 %192\n %194 = load i32, i32* %193, align 4\n %195 = call i32 @abs(i32 %194) #8\n %196 = sext i32 %195 to i64\n store i64 %196, i64* %8, align 8\n br label %197\n"]
- 183 --> 197
- 197["Block 197:\n br label %198\n"]
- 197 --> 198
- 198["Block 198:\n %199 = load i32, i32* %10, align 4\n %200 = add nsw i32 %199, 1\n store i32 %200, i32* %10, align 4\n br label %78\n"]
- 198 --> 78
- 201["Block 201:\n br label %202\n"]
- 201 --> 202
- 202["Block 202:\n %203 = load i32, i32* %9, align 4\n %204 = add nsw i32 %203, 1\n store i32 %204, i32* %9, align 4\n br label %71\n"]
- 202 --> 71
- 205["Block 205:\n %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 1\n %208 = load i32, i32* %207, align 8\n %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 2\n %211 = load i32, i32* %210, align 4\n %212 = icmp eq i32 %208, %211\n %213 = zext i1 %212 to i32\n %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %214, i32 0, i32 3\n store i32 %213, i32* %215, align 8\n %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n store %struct.Matrix* %216, %struct.Matrix** %4, align 8\n br label %217\n"]
- 205 --> 217
- 217["Block 217:\n %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n ret %struct.Matrix* %218\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %219, label %target_skip_1\n"]
- target_cond_1 -->|true| 219
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 219["Block 219:\n %220 = load i32, i32* %17, align 4\n %221 = add nsw i32 %220, 1\n store i32 %221, i32* %17, align 4\n %222 = load i32, i32* %16, align 4\n %223 = icmp sgt i32 %222, 2\n br i1 %223, label %229, label %230\n"]
- 219 -->|true| 229
- 219 -->|false| 230
- 224["Block 224:\n %225 = load i32, i32* %18, align 4\n %226 = icmp slt i32 %225, 5\n br i1 %226, label %219, label %227\n"]
- 224 -->|true| 219
- 224 -->|false| 227
- 227["Block 227:\n %228 = load i32, i32* %17, align 4\n store i32 %228, i32* %15, align 4\n br label %231\n"]
- 227 --> 231
- 229["Block 229:\n store i32 23, i32* %15, align 4\n br label %231\n"]
- 229 --> 231
- 230["Block 230:\n br label %233\n"]
- 230 --> 233
- 231["Block 231:\n %232 = load i32, i32* %15, align 4\n ret i32 %232\n"]
- 233["Block 233:\n %234 = load i32, i32* %18, align 4\n %235 = add nsw i32 %234, 1\n store i32 %235, i32* %18, align 4\n br label %target_phi_1\n"]
- 233 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Processing struct return type
- [INFO][performCodeFusion] [After fix return]Generated control flow graph for fused function:
- ```mermaid: fused_multiplyMatrices
- graph TD
- entry["Block entry:\n %4 = alloca %struct.Matrix*\n %5 = alloca %struct.Matrix*\n %6 = alloca %struct.Matrix*\n %7 = alloca %struct.Matrix*\n %8 = alloca i64\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i64\n %12 = alloca i32\n %13 = alloca i64\n %14 = alloca i32\n %15 = alloca i32\n %16 = alloca i32\n %17 = alloca i32\n %18 = alloca i32\n %19 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %20, label %target_skip_0\n"]
- target_cond_0 -->|true| 20
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 20["Block 20:\n store i32 %3, i32* %16, align 4\n store i32 0, i32* %17, align 4\n store i32 1, i32* %18, align 4\n br label %target_phi_0\n"]
- 20 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %19, label %21, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 21
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 21["Block 21:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n store %struct.Matrix* %2, %struct.Matrix** %6, align 8\n %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %23 = icmp ne %struct.Matrix* %22, null\n br i1 %23, label %24, label %27\n"]
- 21 -->|true| 24
- 21 -->|false| 27
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %25, null\n br i1 %26, label %28, label %27\n"]
- 24 -->|true| 28
- 24 -->|false| 27
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 27 --> 217
- 28["Block 28:\n %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %29, i32 0, i32 0\n %31 = load i32**, i32*** %30, align 8\n %32 = icmp ne i32** %31, null\n br i1 %32, label %33, label %38\n"]
- 28 -->|true| 33
- 28 -->|false| 38
- 33["Block 33:\n %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %34, i32 0, i32 0\n %36 = load i32**, i32*** %35, align 8\n %37 = icmp ne i32** %36, null\n br i1 %37, label %39, label %38\n"]
- 33 -->|true| 39
- 33 -->|false| 38
- 38["Block 38:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 38 --> 217
- 39["Block 39:\n %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %40, i32 0, i32 2\n %42 = load i32, i32* %41, align 4\n %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %43, i32 0, i32 1\n %45 = load i32, i32* %44, align 8\n %46 = icmp ne i32 %42, %45\n br i1 %46, label %47, label %48\n"]
- 39 -->|true| 47
- 39 -->|false| 48
- 47["Block 47:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 47 --> 217
- 48["Block 48:\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 2\n %51 = load i32, i32* %50, align 4\n %52 = icmp sgt i32 %51, 100\n br i1 %52, label %58, label %53\n"]
- 48 -->|true| 58
- 48 -->|false| 53
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1\n %56 = load i32, i32* %55, align 8\n %57 = icmp sgt i32 %56, 100\n br i1 %57, label %58, label %59\n"]
- 53 -->|true| 58
- 53 -->|false| 59
- 58["Block 58:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 58 --> 217
- 59["Block 59:\n %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %60, i32 0, i32 1\n %62 = load i32, i32* %61, align 8\n %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 2\n %65 = load i32, i32* %64, align 4\n %66 = call %struct.Matrix* @createMatrix(i32 %62, i32 %65)\n store %struct.Matrix* %66, %struct.Matrix** %7, align 8\n %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %68 = icmp ne %struct.Matrix* %67, null\n br i1 %68, label %70, label %69\n"]
- 59 -->|true| 70
- 59 -->|false| 69
- 69["Block 69:\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 69 --> 217
- 70["Block 70:\n store i64 0, i64* %8, align 8\n store i32 0, i32* %9, align 4\n br label %71\n"]
- 70 --> 71
- 71["Block 71:\n %72 = load i32, i32* %9, align 4\n %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 1\n %75 = load i32, i32* %74, align 8\n %76 = icmp slt i32 %72, %75\n br i1 %76, label %77, label %205\n"]
- 71 -->|true| 77
- 71 -->|false| 205
- 77["Block 77:\n store i32 0, i32* %10, align 4\n br label %78\n"]
- 77 --> 78
- 78["Block 78:\n %79 = load i32, i32* %10, align 4\n %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %80, i32 0, i32 2\n %82 = load i32, i32* %81, align 4\n %83 = icmp slt i32 %79, %82\n br i1 %83, label %84, label %201\n"]
- 78 -->|true| 84
- 78 -->|false| 201
- 84["Block 84:\n store i64 0, i64* %11, align 8\n store i32 0, i32* %12, align 4\n br label %85\n"]
- 84 --> 85
- 85["Block 85:\n %86 = load i32, i32* %12, align 4\n %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 2\n %89 = load i32, i32* %88, align 4\n %90 = icmp slt i32 %86, %89\n br i1 %90, label %91, label %155\n"]
- 85 -->|true| 91
- 85 -->|false| 155
- 91["Block 91:\n %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %92, i32 0, i32 0\n %94 = load i32**, i32*** %93, align 8\n %95 = load i32, i32* %9, align 4\n %96 = sext i32 %95 to i64\n %97 = getelementptr inbounds i32*, i32** %94, i64 %96\n %98 = load i32*, i32** %97, align 8\n %99 = load i32, i32* %12, align 4\n %100 = sext i32 %99 to i64\n %101 = getelementptr inbounds i32, i32* %98, i64 %100\n %102 = load i32, i32* %101, align 4\n %103 = sext i32 %102 to i64\n %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %104, i32 0, i32 0\n %106 = load i32**, i32*** %105, align 8\n %107 = load i32, i32* %12, align 4\n %108 = sext i32 %107 to i64\n %109 = getelementptr inbounds i32*, i32** %106, i64 %108\n %110 = load i32*, i32** %109, align 8\n %111 = load i32, i32* %10, align 4\n %112 = sext i32 %111 to i64\n %113 = getelementptr inbounds i32, i32* %110, i64 %112\n %114 = load i32, i32* %113, align 4\n %115 = sext i32 %114 to i64\n %116 = mul nsw i64 %103, %115\n store i64 %116, i64* %13, align 8\n %117 = load i64, i64* %13, align 8\n %118 = load i64, i64* %11, align 8\n %119 = add nsw i64 %118, %117\n store i64 %119, i64* %11, align 8\n %120 = load i64, i64* %11, align 8\n %121 = icmp sgt i64 %120, 2147483647\n br i1 %121, label %125, label %122\n"]
- 91 -->|true| 125
- 91 -->|false| 122
- 122["Block 122:\n %123 = load i64, i64* %11, align 8\n %124 = icmp slt i64 %123, -2147483648\n br i1 %124, label %125, label %151\n"]
- 122 -->|true| 125
- 122 -->|false| 151
- 125["Block 125:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %14, align 4\n br label %126\n"]
- 125 --> 126
- 126["Block 126:\n %127 = load i32, i32* %14, align 4\n %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %128, i32 0, i32 1\n %130 = load i32, i32* %129, align 8\n %131 = icmp slt i32 %127, %130\n br i1 %131, label %132, label %144\n"]
- 126 -->|true| 132
- 126 -->|false| 144
- 132["Block 132:\n %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %133, i32 0, i32 0\n %135 = load i32**, i32*** %134, align 8\n %136 = load i32, i32* %14, align 4\n %137 = sext i32 %136 to i64\n %138 = getelementptr inbounds i32*, i32** %135, i64 %137\n %139 = load i32*, i32** %138, align 8\n %140 = bitcast i32* %139 to i8*\n call void @free(i8* %140) #7\n br label %141\n"]
- 132 --> 141
- 141["Block 141:\n %142 = load i32, i32* %14, align 4\n %143 = add nsw i32 %142, 1\n store i32 %143, i32* %14, align 4\n br label %126\n"]
- 141 --> 126
- 144["Block 144:\n %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %145, i32 0, i32 0\n %147 = load i32**, i32*** %146, align 8\n %148 = bitcast i32** %147 to i8*\n call void @free(i8* %148) #7\n %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %150 = bitcast %struct.Matrix* %149 to i8*\n call void @free(i8* %150) #7\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 144 --> 217
- 151["Block 151:\n br label %152\n"]
- 151 --> 152
- 152["Block 152:\n %153 = load i32, i32* %12, align 4\n %154 = add nsw i32 %153, 1\n store i32 %154, i32* %12, align 4\n br label %85\n"]
- 152 --> 85
- 155["Block 155:\n %156 = load i64, i64* %11, align 8\n %157 = trunc i64 %156 to i32\n %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %158, i32 0, i32 0\n %160 = load i32**, i32*** %159, align 8\n %161 = load i32, i32* %9, align 4\n %162 = sext i32 %161 to i64\n %163 = getelementptr inbounds i32*, i32** %160, i64 %162\n %164 = load i32*, i32** %163, align 8\n %165 = load i32, i32* %10, align 4\n %166 = sext i32 %165 to i64\n %167 = getelementptr inbounds i32, i32* %164, i64 %166\n store i32 %157, i32* %167, align 4\n %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %168, i32 0, i32 0\n %170 = load i32**, i32*** %169, align 8\n %171 = load i32, i32* %9, align 4\n %172 = sext i32 %171 to i64\n %173 = getelementptr inbounds i32*, i32** %170, i64 %172\n %174 = load i32*, i32** %173, align 8\n %175 = load i32, i32* %10, align 4\n %176 = sext i32 %175 to i64\n %177 = getelementptr inbounds i32, i32* %174, i64 %176\n %178 = load i32, i32* %177, align 4\n %179 = call i32 @abs(i32 %178) #8\n %180 = sext i32 %179 to i64\n %181 = load i64, i64* %8, align 8\n %182 = icmp sgt i64 %180, %181\n br i1 %182, label %183, label %197\n"]
- 155 -->|true| 183
- 155 -->|false| 197
- 183["Block 183:\n %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %184, i32 0, i32 0\n %186 = load i32**, i32*** %185, align 8\n %187 = load i32, i32* %9, align 4\n %188 = sext i32 %187 to i64\n %189 = getelementptr inbounds i32*, i32** %186, i64 %188\n %190 = load i32*, i32** %189, align 8\n %191 = load i32, i32* %10, align 4\n %192 = sext i32 %191 to i64\n %193 = getelementptr inbounds i32, i32* %190, i64 %192\n %194 = load i32, i32* %193, align 4\n %195 = call i32 @abs(i32 %194) #8\n %196 = sext i32 %195 to i64\n store i64 %196, i64* %8, align 8\n br label %197\n"]
- 183 --> 197
- 197["Block 197:\n br label %198\n"]
- 197 --> 198
- 198["Block 198:\n %199 = load i32, i32* %10, align 4\n %200 = add nsw i32 %199, 1\n store i32 %200, i32* %10, align 4\n br label %78\n"]
- 198 --> 78
- 201["Block 201:\n br label %202\n"]
- 201 --> 202
- 202["Block 202:\n %203 = load i32, i32* %9, align 4\n %204 = add nsw i32 %203, 1\n store i32 %204, i32* %9, align 4\n br label %71\n"]
- 202 --> 71
- 205["Block 205:\n %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 1\n %208 = load i32, i32* %207, align 8\n %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 2\n %211 = load i32, i32* %210, align 4\n %212 = icmp eq i32 %208, %211\n %213 = zext i1 %212 to i32\n %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %214, i32 0, i32 3\n store i32 %213, i32* %215, align 8\n %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n store %struct.Matrix* %216, %struct.Matrix** %4, align 8\n br label %217\n"]
- 205 --> 217
- 217["Block 217:\n %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %219 = insertvalue %fused_return_multiplyMatrices_testPoints { i32 0, %struct.Matrix* undef }, %struct.Matrix* %218, 1\n ret %fused_return_multiplyMatrices_testPoints %219\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %220, label %target_skip_1\n"]
- target_cond_1 -->|true| 220
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 220["Block 220:\n %221 = load i32, i32* %17, align 4\n %222 = add nsw i32 %221, 1\n store i32 %222, i32* %17, align 4\n %223 = load i32, i32* %16, align 4\n %224 = icmp sgt i32 %223, 2\n br i1 %224, label %230, label %231\n"]
- 220 -->|true| 230
- 220 -->|false| 231
- 225["Block 225:\n %226 = load i32, i32* %18, align 4\n %227 = icmp slt i32 %226, 5\n br i1 %227, label %220, label %228\n"]
- 225 -->|true| 220
- 225 -->|false| 228
- 228["Block 228:\n %229 = load i32, i32* %17, align 4\n store i32 %229, i32* %15, align 4\n br label %232\n"]
- 228 --> 232
- 230["Block 230:\n store i32 23, i32* %15, align 4\n br label %232\n"]
- 230 --> 232
- 231["Block 231:\n br label %236\n"]
- 231 --> 236
- 232["Block 232:\n %233 = load i32, i32* %15, align 4\n %234 = insertvalue %fused_return_multiplyMatrices_testPoints undef, i32 %233, 0\n %235 = insertvalue %fused_return_multiplyMatrices_testPoints %234, %struct.Matrix* null, 1\n ret %fused_return_multiplyMatrices_testPoints %235\n"]
- 236["Block 236:\n %237 = load i32, i32* %18, align 4\n %238 = add nsw i32 %237, 1\n store i32 %238, i32* %18, align 4\n br label %target_phi_1\n"]
- 236 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [DEBUG][updateCallSite] Original call instruction:
- %118 = call %struct.Matrix* @multiplyMatrices(%struct.Matrix* %116, %struct.Matrix* %117)
- [DEBUG][updateCallSite] Adding bunker control parameter
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=struct.struct.Matrix*
- [DEBUG][updateCallSite] Argument 1: type=struct.struct.Matrix*
- [DEBUG][updateCallSite] Adding default target parameters:
- [DEBUG][updateCallSite] Parameter type: i32
- [DEBUG][updateCallSite] New call instruction:
- %118 = call %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 false, %struct.Matrix* %116, %struct.Matrix* %117, i32 0)
- [DEBUG][updateCallSite] Processing non-void return value of type: struct.struct.Matrix*
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: struct.struct.Matrix*
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %118 = call %struct.Matrix* @multiplyMatrices(%struct.Matrix* %116, %struct.Matrix* %117) to %118 = call %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 false, %struct.Matrix* %116, %struct.Matrix* %117, i32 0)
- [DEBUG][updateCallSite] Original call instruction:
- %16 = call i32 @testPoints(i32 5)
- [DEBUG][updateCallSite] Adding target control parameter
- [DEBUG][updateCallSite] Adding default bunker parameters:
- [DEBUG][updateCallSite] Parameter type: struct.struct.Matrix*
- [DEBUG][updateCallSite] Parameter type: struct.struct.Matrix*
- [DEBUG][updateCallSite] Adding original call parameters:
- [DEBUG][updateCallSite] Argument 0: type=i32
- [DEBUG][updateCallSite] New call instruction:
- %16 = call %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 true, %struct.Matrix* null, %struct.Matrix* null, i32 5)
- [DEBUG][updateCallSite] Processing non-void return value of type: i32
- [DEBUG][updateCallSite] Extracting value from struct return type
- [DEBUG][updateCallSite] Extracted value type: i32
- [DEBUG][updateCallSite] Successfully replaced all uses of original call
- [INFO][updateCallSite] Successfully updated call site from %16 = call i32 @testPoints(i32 5) to %16 = call %fused_return_multiplyMatrices_testPoints @fused_multiplyMatrices(i1 true, %struct.Matrix* null, %struct.Matrix* null, i32 5)
- [INFO][performCodeFusion] [After update call site]Generated control flow graph for fused function:
- ```mermaid: fused_multiplyMatrices
- graph TD
- entry["Block entry:\n %4 = alloca %struct.Matrix*\n %5 = alloca %struct.Matrix*\n %6 = alloca %struct.Matrix*\n %7 = alloca %struct.Matrix*\n %8 = alloca i64\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i64\n %12 = alloca i32\n %13 = alloca i64\n %14 = alloca i32\n %15 = alloca i32\n %16 = alloca i32\n %17 = alloca i32\n %18 = alloca i32\n %19 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %20, label %target_skip_0\n"]
- target_cond_0 -->|true| 20
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 20["Block 20:\n store i32 %3, i32* %16, align 4\n store i32 0, i32* %17, align 4\n store i32 1, i32* %18, align 4\n br label %target_phi_0\n"]
- 20 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %19, label %21, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 21
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 21["Block 21:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n store %struct.Matrix* %2, %struct.Matrix** %6, align 8\n %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %23 = icmp ne %struct.Matrix* %22, null\n br i1 %23, label %24, label %27\n"]
- 21 -->|true| 24
- 21 -->|false| 27
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %25, null\n br i1 %26, label %28, label %27\n"]
- 24 -->|true| 28
- 24 -->|false| 27
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 27 --> 217
- 28["Block 28:\n %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %29, i32 0, i32 0\n %31 = load i32**, i32*** %30, align 8\n %32 = icmp ne i32** %31, null\n br i1 %32, label %33, label %38\n"]
- 28 -->|true| 33
- 28 -->|false| 38
- 33["Block 33:\n %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %34, i32 0, i32 0\n %36 = load i32**, i32*** %35, align 8\n %37 = icmp ne i32** %36, null\n br i1 %37, label %39, label %38\n"]
- 33 -->|true| 39
- 33 -->|false| 38
- 38["Block 38:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 38 --> 217
- 39["Block 39:\n %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %40, i32 0, i32 2\n %42 = load i32, i32* %41, align 4\n %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %43, i32 0, i32 1\n %45 = load i32, i32* %44, align 8\n %46 = icmp ne i32 %42, %45\n br i1 %46, label %47, label %48\n"]
- 39 -->|true| 47
- 39 -->|false| 48
- 47["Block 47:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 47 --> 217
- 48["Block 48:\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 2\n %51 = load i32, i32* %50, align 4\n %52 = icmp sgt i32 %51, 100\n br i1 %52, label %58, label %53\n"]
- 48 -->|true| 58
- 48 -->|false| 53
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1\n %56 = load i32, i32* %55, align 8\n %57 = icmp sgt i32 %56, 100\n br i1 %57, label %58, label %59\n"]
- 53 -->|true| 58
- 53 -->|false| 59
- 58["Block 58:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 58 --> 217
- 59["Block 59:\n %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %60, i32 0, i32 1\n %62 = load i32, i32* %61, align 8\n %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 2\n %65 = load i32, i32* %64, align 4\n %66 = call %struct.Matrix* @createMatrix(i32 %62, i32 %65)\n store %struct.Matrix* %66, %struct.Matrix** %7, align 8\n %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %68 = icmp ne %struct.Matrix* %67, null\n br i1 %68, label %70, label %69\n"]
- 59 -->|true| 70
- 59 -->|false| 69
- 69["Block 69:\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 69 --> 217
- 70["Block 70:\n store i64 0, i64* %8, align 8\n store i32 0, i32* %9, align 4\n br label %71\n"]
- 70 --> 71
- 71["Block 71:\n %72 = load i32, i32* %9, align 4\n %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 1\n %75 = load i32, i32* %74, align 8\n %76 = icmp slt i32 %72, %75\n br i1 %76, label %77, label %205\n"]
- 71 -->|true| 77
- 71 -->|false| 205
- 77["Block 77:\n store i32 0, i32* %10, align 4\n br label %78\n"]
- 77 --> 78
- 78["Block 78:\n %79 = load i32, i32* %10, align 4\n %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %80, i32 0, i32 2\n %82 = load i32, i32* %81, align 4\n %83 = icmp slt i32 %79, %82\n br i1 %83, label %84, label %201\n"]
- 78 -->|true| 84
- 78 -->|false| 201
- 84["Block 84:\n store i64 0, i64* %11, align 8\n store i32 0, i32* %12, align 4\n br label %85\n"]
- 84 --> 85
- 85["Block 85:\n %86 = load i32, i32* %12, align 4\n %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 2\n %89 = load i32, i32* %88, align 4\n %90 = icmp slt i32 %86, %89\n br i1 %90, label %91, label %155\n"]
- 85 -->|true| 91
- 85 -->|false| 155
- 91["Block 91:\n %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %92, i32 0, i32 0\n %94 = load i32**, i32*** %93, align 8\n %95 = load i32, i32* %9, align 4\n %96 = sext i32 %95 to i64\n %97 = getelementptr inbounds i32*, i32** %94, i64 %96\n %98 = load i32*, i32** %97, align 8\n %99 = load i32, i32* %12, align 4\n %100 = sext i32 %99 to i64\n %101 = getelementptr inbounds i32, i32* %98, i64 %100\n %102 = load i32, i32* %101, align 4\n %103 = sext i32 %102 to i64\n %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %104, i32 0, i32 0\n %106 = load i32**, i32*** %105, align 8\n %107 = load i32, i32* %12, align 4\n %108 = sext i32 %107 to i64\n %109 = getelementptr inbounds i32*, i32** %106, i64 %108\n %110 = load i32*, i32** %109, align 8\n %111 = load i32, i32* %10, align 4\n %112 = sext i32 %111 to i64\n %113 = getelementptr inbounds i32, i32* %110, i64 %112\n %114 = load i32, i32* %113, align 4\n %115 = sext i32 %114 to i64\n %116 = mul nsw i64 %103, %115\n store i64 %116, i64* %13, align 8\n %117 = load i64, i64* %13, align 8\n %118 = load i64, i64* %11, align 8\n %119 = add nsw i64 %118, %117\n store i64 %119, i64* %11, align 8\n %120 = load i64, i64* %11, align 8\n %121 = icmp sgt i64 %120, 2147483647\n br i1 %121, label %125, label %122\n"]
- 91 -->|true| 125
- 91 -->|false| 122
- 122["Block 122:\n %123 = load i64, i64* %11, align 8\n %124 = icmp slt i64 %123, -2147483648\n br i1 %124, label %125, label %151\n"]
- 122 -->|true| 125
- 122 -->|false| 151
- 125["Block 125:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %14, align 4\n br label %126\n"]
- 125 --> 126
- 126["Block 126:\n %127 = load i32, i32* %14, align 4\n %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %128, i32 0, i32 1\n %130 = load i32, i32* %129, align 8\n %131 = icmp slt i32 %127, %130\n br i1 %131, label %132, label %144\n"]
- 126 -->|true| 132
- 126 -->|false| 144
- 132["Block 132:\n %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %133, i32 0, i32 0\n %135 = load i32**, i32*** %134, align 8\n %136 = load i32, i32* %14, align 4\n %137 = sext i32 %136 to i64\n %138 = getelementptr inbounds i32*, i32** %135, i64 %137\n %139 = load i32*, i32** %138, align 8\n %140 = bitcast i32* %139 to i8*\n call void @free(i8* %140) #7\n br label %141\n"]
- 132 --> 141
- 141["Block 141:\n %142 = load i32, i32* %14, align 4\n %143 = add nsw i32 %142, 1\n store i32 %143, i32* %14, align 4\n br label %126\n"]
- 141 --> 126
- 144["Block 144:\n %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %145, i32 0, i32 0\n %147 = load i32**, i32*** %146, align 8\n %148 = bitcast i32** %147 to i8*\n call void @free(i8* %148) #7\n %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %150 = bitcast %struct.Matrix* %149 to i8*\n call void @free(i8* %150) #7\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 144 --> 217
- 151["Block 151:\n br label %152\n"]
- 151 --> 152
- 152["Block 152:\n %153 = load i32, i32* %12, align 4\n %154 = add nsw i32 %153, 1\n store i32 %154, i32* %12, align 4\n br label %85\n"]
- 152 --> 85
- 155["Block 155:\n %156 = load i64, i64* %11, align 8\n %157 = trunc i64 %156 to i32\n %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %158, i32 0, i32 0\n %160 = load i32**, i32*** %159, align 8\n %161 = load i32, i32* %9, align 4\n %162 = sext i32 %161 to i64\n %163 = getelementptr inbounds i32*, i32** %160, i64 %162\n %164 = load i32*, i32** %163, align 8\n %165 = load i32, i32* %10, align 4\n %166 = sext i32 %165 to i64\n %167 = getelementptr inbounds i32, i32* %164, i64 %166\n store i32 %157, i32* %167, align 4\n %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %168, i32 0, i32 0\n %170 = load i32**, i32*** %169, align 8\n %171 = load i32, i32* %9, align 4\n %172 = sext i32 %171 to i64\n %173 = getelementptr inbounds i32*, i32** %170, i64 %172\n %174 = load i32*, i32** %173, align 8\n %175 = load i32, i32* %10, align 4\n %176 = sext i32 %175 to i64\n %177 = getelementptr inbounds i32, i32* %174, i64 %176\n %178 = load i32, i32* %177, align 4\n %179 = call i32 @abs(i32 %178) #8\n %180 = sext i32 %179 to i64\n %181 = load i64, i64* %8, align 8\n %182 = icmp sgt i64 %180, %181\n br i1 %182, label %183, label %197\n"]
- 155 -->|true| 183
- 155 -->|false| 197
- 183["Block 183:\n %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %184, i32 0, i32 0\n %186 = load i32**, i32*** %185, align 8\n %187 = load i32, i32* %9, align 4\n %188 = sext i32 %187 to i64\n %189 = getelementptr inbounds i32*, i32** %186, i64 %188\n %190 = load i32*, i32** %189, align 8\n %191 = load i32, i32* %10, align 4\n %192 = sext i32 %191 to i64\n %193 = getelementptr inbounds i32, i32* %190, i64 %192\n %194 = load i32, i32* %193, align 4\n %195 = call i32 @abs(i32 %194) #8\n %196 = sext i32 %195 to i64\n store i64 %196, i64* %8, align 8\n br label %197\n"]
- 183 --> 197
- 197["Block 197:\n br label %198\n"]
- 197 --> 198
- 198["Block 198:\n %199 = load i32, i32* %10, align 4\n %200 = add nsw i32 %199, 1\n store i32 %200, i32* %10, align 4\n br label %78\n"]
- 198 --> 78
- 201["Block 201:\n br label %202\n"]
- 201 --> 202
- 202["Block 202:\n %203 = load i32, i32* %9, align 4\n %204 = add nsw i32 %203, 1\n store i32 %204, i32* %9, align 4\n br label %71\n"]
- 202 --> 71
- 205["Block 205:\n %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 1\n %208 = load i32, i32* %207, align 8\n %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 2\n %211 = load i32, i32* %210, align 4\n %212 = icmp eq i32 %208, %211\n %213 = zext i1 %212 to i32\n %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %214, i32 0, i32 3\n store i32 %213, i32* %215, align 8\n %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n store %struct.Matrix* %216, %struct.Matrix** %4, align 8\n br label %217\n"]
- 205 --> 217
- 217["Block 217:\n %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %219 = insertvalue %fused_return_multiplyMatrices_testPoints { i32 0, %struct.Matrix* undef }, %struct.Matrix* %218, 1\n ret %fused_return_multiplyMatrices_testPoints %219\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %220, label %target_skip_1\n"]
- target_cond_1 -->|true| 220
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n"]
- 220["Block 220:\n %221 = load i32, i32* %17, align 4\n %222 = add nsw i32 %221, 1\n store i32 %222, i32* %17, align 4\n %223 = load i32, i32* %16, align 4\n %224 = icmp sgt i32 %223, 2\n br i1 %224, label %230, label %231\n"]
- 220 -->|true| 230
- 220 -->|false| 231
- 225["Block 225:\n %226 = load i32, i32* %18, align 4\n %227 = icmp slt i32 %226, 5\n br i1 %227, label %220, label %228\n"]
- 225 -->|true| 220
- 225 -->|false| 228
- 228["Block 228:\n %229 = load i32, i32* %17, align 4\n store i32 %229, i32* %15, align 4\n br label %232\n"]
- 228 --> 232
- 230["Block 230:\n store i32 23, i32* %15, align 4\n br label %232\n"]
- 230 --> 232
- 231["Block 231:\n br label %236\n"]
- 231 --> 236
- 232["Block 232:\n %233 = load i32, i32* %15, align 4\n %234 = insertvalue %fused_return_multiplyMatrices_testPoints undef, i32 %233, 0\n %235 = insertvalue %fused_return_multiplyMatrices_testPoints %234, %struct.Matrix* null, 1\n ret %fused_return_multiplyMatrices_testPoints %235\n"]
- 236["Block 236:\n %237 = load i32, i32* %18, align 4\n %238 = add nsw i32 %237, 1\n store i32 %238, i32* %18, align 4\n br label %target_phi_1\n"]
- 236 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Fixing blocks without terminators...
- [INFO][performCodeFusion] Added return with default value to block: target_phi_1
- [INFO][performCodeFusion] Starting PHI node repair
- [INFO][performCodeFusion] [After fix PHI]Generated control flow graph for fused function:
- ```mermaid: fused_multiplyMatrices
- graph TD
- entry["Block entry:\n %4 = alloca %struct.Matrix*\n %5 = alloca %struct.Matrix*\n %6 = alloca %struct.Matrix*\n %7 = alloca %struct.Matrix*\n %8 = alloca i64\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i64\n %12 = alloca i32\n %13 = alloca i64\n %14 = alloca i32\n %15 = alloca i32\n %16 = alloca i32\n %17 = alloca i32\n %18 = alloca i32\n %19 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %20, label %target_skip_0\n"]
- target_cond_0 -->|true| 20
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 20["Block 20:\n store i32 %3, i32* %16, align 4\n store i32 0, i32* %17, align 4\n store i32 1, i32* %18, align 4\n br label %target_phi_0\n"]
- 20 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %19, label %21, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 21
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 21["Block 21:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n store %struct.Matrix* %2, %struct.Matrix** %6, align 8\n %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %23 = icmp ne %struct.Matrix* %22, null\n br i1 %23, label %24, label %27\n"]
- 21 -->|true| 24
- 21 -->|false| 27
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %25, null\n br i1 %26, label %28, label %27\n"]
- 24 -->|true| 28
- 24 -->|false| 27
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 27 --> 217
- 28["Block 28:\n %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %29, i32 0, i32 0\n %31 = load i32**, i32*** %30, align 8\n %32 = icmp ne i32** %31, null\n br i1 %32, label %33, label %38\n"]
- 28 -->|true| 33
- 28 -->|false| 38
- 33["Block 33:\n %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %34, i32 0, i32 0\n %36 = load i32**, i32*** %35, align 8\n %37 = icmp ne i32** %36, null\n br i1 %37, label %39, label %38\n"]
- 33 -->|true| 39
- 33 -->|false| 38
- 38["Block 38:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 38 --> 217
- 39["Block 39:\n %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %40, i32 0, i32 2\n %42 = load i32, i32* %41, align 4\n %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %43, i32 0, i32 1\n %45 = load i32, i32* %44, align 8\n %46 = icmp ne i32 %42, %45\n br i1 %46, label %47, label %48\n"]
- 39 -->|true| 47
- 39 -->|false| 48
- 47["Block 47:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 47 --> 217
- 48["Block 48:\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 2\n %51 = load i32, i32* %50, align 4\n %52 = icmp sgt i32 %51, 100\n br i1 %52, label %58, label %53\n"]
- 48 -->|true| 58
- 48 -->|false| 53
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1\n %56 = load i32, i32* %55, align 8\n %57 = icmp sgt i32 %56, 100\n br i1 %57, label %58, label %59\n"]
- 53 -->|true| 58
- 53 -->|false| 59
- 58["Block 58:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 58 --> 217
- 59["Block 59:\n %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %60, i32 0, i32 1\n %62 = load i32, i32* %61, align 8\n %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 2\n %65 = load i32, i32* %64, align 4\n %66 = call %struct.Matrix* @createMatrix(i32 %62, i32 %65)\n store %struct.Matrix* %66, %struct.Matrix** %7, align 8\n %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %68 = icmp ne %struct.Matrix* %67, null\n br i1 %68, label %70, label %69\n"]
- 59 -->|true| 70
- 59 -->|false| 69
- 69["Block 69:\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 69 --> 217
- 70["Block 70:\n store i64 0, i64* %8, align 8\n store i32 0, i32* %9, align 4\n br label %71\n"]
- 70 --> 71
- 71["Block 71:\n %72 = load i32, i32* %9, align 4\n %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 1\n %75 = load i32, i32* %74, align 8\n %76 = icmp slt i32 %72, %75\n br i1 %76, label %77, label %205\n"]
- 71 -->|true| 77
- 71 -->|false| 205
- 77["Block 77:\n store i32 0, i32* %10, align 4\n br label %78\n"]
- 77 --> 78
- 78["Block 78:\n %79 = load i32, i32* %10, align 4\n %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %80, i32 0, i32 2\n %82 = load i32, i32* %81, align 4\n %83 = icmp slt i32 %79, %82\n br i1 %83, label %84, label %201\n"]
- 78 -->|true| 84
- 78 -->|false| 201
- 84["Block 84:\n store i64 0, i64* %11, align 8\n store i32 0, i32* %12, align 4\n br label %85\n"]
- 84 --> 85
- 85["Block 85:\n %86 = load i32, i32* %12, align 4\n %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 2\n %89 = load i32, i32* %88, align 4\n %90 = icmp slt i32 %86, %89\n br i1 %90, label %91, label %155\n"]
- 85 -->|true| 91
- 85 -->|false| 155
- 91["Block 91:\n %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %92, i32 0, i32 0\n %94 = load i32**, i32*** %93, align 8\n %95 = load i32, i32* %9, align 4\n %96 = sext i32 %95 to i64\n %97 = getelementptr inbounds i32*, i32** %94, i64 %96\n %98 = load i32*, i32** %97, align 8\n %99 = load i32, i32* %12, align 4\n %100 = sext i32 %99 to i64\n %101 = getelementptr inbounds i32, i32* %98, i64 %100\n %102 = load i32, i32* %101, align 4\n %103 = sext i32 %102 to i64\n %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %104, i32 0, i32 0\n %106 = load i32**, i32*** %105, align 8\n %107 = load i32, i32* %12, align 4\n %108 = sext i32 %107 to i64\n %109 = getelementptr inbounds i32*, i32** %106, i64 %108\n %110 = load i32*, i32** %109, align 8\n %111 = load i32, i32* %10, align 4\n %112 = sext i32 %111 to i64\n %113 = getelementptr inbounds i32, i32* %110, i64 %112\n %114 = load i32, i32* %113, align 4\n %115 = sext i32 %114 to i64\n %116 = mul nsw i64 %103, %115\n store i64 %116, i64* %13, align 8\n %117 = load i64, i64* %13, align 8\n %118 = load i64, i64* %11, align 8\n %119 = add nsw i64 %118, %117\n store i64 %119, i64* %11, align 8\n %120 = load i64, i64* %11, align 8\n %121 = icmp sgt i64 %120, 2147483647\n br i1 %121, label %125, label %122\n"]
- 91 -->|true| 125
- 91 -->|false| 122
- 122["Block 122:\n %123 = load i64, i64* %11, align 8\n %124 = icmp slt i64 %123, -2147483648\n br i1 %124, label %125, label %151\n"]
- 122 -->|true| 125
- 122 -->|false| 151
- 125["Block 125:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %14, align 4\n br label %126\n"]
- 125 --> 126
- 126["Block 126:\n %127 = load i32, i32* %14, align 4\n %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %128, i32 0, i32 1\n %130 = load i32, i32* %129, align 8\n %131 = icmp slt i32 %127, %130\n br i1 %131, label %132, label %144\n"]
- 126 -->|true| 132
- 126 -->|false| 144
- 132["Block 132:\n %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %133, i32 0, i32 0\n %135 = load i32**, i32*** %134, align 8\n %136 = load i32, i32* %14, align 4\n %137 = sext i32 %136 to i64\n %138 = getelementptr inbounds i32*, i32** %135, i64 %137\n %139 = load i32*, i32** %138, align 8\n %140 = bitcast i32* %139 to i8*\n call void @free(i8* %140) #7\n br label %141\n"]
- 132 --> 141
- 141["Block 141:\n %142 = load i32, i32* %14, align 4\n %143 = add nsw i32 %142, 1\n store i32 %143, i32* %14, align 4\n br label %126\n"]
- 141 --> 126
- 144["Block 144:\n %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %145, i32 0, i32 0\n %147 = load i32**, i32*** %146, align 8\n %148 = bitcast i32** %147 to i8*\n call void @free(i8* %148) #7\n %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %150 = bitcast %struct.Matrix* %149 to i8*\n call void @free(i8* %150) #7\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 144 --> 217
- 151["Block 151:\n br label %152\n"]
- 151 --> 152
- 152["Block 152:\n %153 = load i32, i32* %12, align 4\n %154 = add nsw i32 %153, 1\n store i32 %154, i32* %12, align 4\n br label %85\n"]
- 152 --> 85
- 155["Block 155:\n %156 = load i64, i64* %11, align 8\n %157 = trunc i64 %156 to i32\n %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %158, i32 0, i32 0\n %160 = load i32**, i32*** %159, align 8\n %161 = load i32, i32* %9, align 4\n %162 = sext i32 %161 to i64\n %163 = getelementptr inbounds i32*, i32** %160, i64 %162\n %164 = load i32*, i32** %163, align 8\n %165 = load i32, i32* %10, align 4\n %166 = sext i32 %165 to i64\n %167 = getelementptr inbounds i32, i32* %164, i64 %166\n store i32 %157, i32* %167, align 4\n %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %168, i32 0, i32 0\n %170 = load i32**, i32*** %169, align 8\n %171 = load i32, i32* %9, align 4\n %172 = sext i32 %171 to i64\n %173 = getelementptr inbounds i32*, i32** %170, i64 %172\n %174 = load i32*, i32** %173, align 8\n %175 = load i32, i32* %10, align 4\n %176 = sext i32 %175 to i64\n %177 = getelementptr inbounds i32, i32* %174, i64 %176\n %178 = load i32, i32* %177, align 4\n %179 = call i32 @abs(i32 %178) #8\n %180 = sext i32 %179 to i64\n %181 = load i64, i64* %8, align 8\n %182 = icmp sgt i64 %180, %181\n br i1 %182, label %183, label %197\n"]
- 155 -->|true| 183
- 155 -->|false| 197
- 183["Block 183:\n %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %184, i32 0, i32 0\n %186 = load i32**, i32*** %185, align 8\n %187 = load i32, i32* %9, align 4\n %188 = sext i32 %187 to i64\n %189 = getelementptr inbounds i32*, i32** %186, i64 %188\n %190 = load i32*, i32** %189, align 8\n %191 = load i32, i32* %10, align 4\n %192 = sext i32 %191 to i64\n %193 = getelementptr inbounds i32, i32* %190, i64 %192\n %194 = load i32, i32* %193, align 4\n %195 = call i32 @abs(i32 %194) #8\n %196 = sext i32 %195 to i64\n store i64 %196, i64* %8, align 8\n br label %197\n"]
- 183 --> 197
- 197["Block 197:\n br label %198\n"]
- 197 --> 198
- 198["Block 198:\n %199 = load i32, i32* %10, align 4\n %200 = add nsw i32 %199, 1\n store i32 %200, i32* %10, align 4\n br label %78\n"]
- 198 --> 78
- 201["Block 201:\n br label %202\n"]
- 201 --> 202
- 202["Block 202:\n %203 = load i32, i32* %9, align 4\n %204 = add nsw i32 %203, 1\n store i32 %204, i32* %9, align 4\n br label %71\n"]
- 202 --> 71
- 205["Block 205:\n %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 1\n %208 = load i32, i32* %207, align 8\n %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 2\n %211 = load i32, i32* %210, align 4\n %212 = icmp eq i32 %208, %211\n %213 = zext i1 %212 to i32\n %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %214, i32 0, i32 3\n store i32 %213, i32* %215, align 8\n %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n store %struct.Matrix* %216, %struct.Matrix** %4, align 8\n br label %217\n"]
- 205 --> 217
- 217["Block 217:\n %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %219 = insertvalue %fused_return_multiplyMatrices_testPoints { i32 0, %struct.Matrix* undef }, %struct.Matrix* %218, 1\n ret %fused_return_multiplyMatrices_testPoints %219\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %220, label %target_skip_1\n"]
- target_cond_1 -->|true| 220
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret %fused_return_multiplyMatrices_testPoints zeroinitializer\n"]
- 220["Block 220:\n %221 = load i32, i32* %17, align 4\n %222 = add nsw i32 %221, 1\n store i32 %222, i32* %17, align 4\n %223 = load i32, i32* %16, align 4\n %224 = icmp sgt i32 %223, 2\n br i1 %224, label %230, label %231\n"]
- 220 -->|true| 230
- 220 -->|false| 231
- 225["Block 225:\n %226 = load i32, i32* %18, align 4\n %227 = icmp slt i32 %226, 5\n br i1 %227, label %220, label %228\n"]
- 225 -->|true| 220
- 225 -->|false| 228
- 228["Block 228:\n %229 = load i32, i32* %17, align 4\n store i32 %229, i32* %15, align 4\n br label %232\n"]
- 228 --> 232
- 230["Block 230:\n store i32 23, i32* %15, align 4\n br label %232\n"]
- 230 --> 232
- 231["Block 231:\n br label %236\n"]
- 231 --> 236
- 232["Block 232:\n %233 = load i32, i32* %15, align 4\n %234 = insertvalue %fused_return_multiplyMatrices_testPoints undef, i32 %233, 0\n %235 = insertvalue %fused_return_multiplyMatrices_testPoints %234, %struct.Matrix* null, 1\n ret %fused_return_multiplyMatrices_testPoints %235\n"]
- 236["Block 236:\n %237 = load i32, i32* %18, align 4\n %238 = add nsw i32 %237, 1\n store i32 %238, i32* %18, align 4\n br label %target_phi_1\n"]
- 236 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Attempting to delete original functions...
- [INFO][performCodeFusion] [After erase]Generated control flow graph for fused function:
- ```mermaid: fused_multiplyMatrices
- graph TD
- entry["Block entry:\n %4 = alloca %struct.Matrix*\n %5 = alloca %struct.Matrix*\n %6 = alloca %struct.Matrix*\n %7 = alloca %struct.Matrix*\n %8 = alloca i64\n %9 = alloca i32\n %10 = alloca i32\n %11 = alloca i64\n %12 = alloca i32\n %13 = alloca i64\n %14 = alloca i32\n %15 = alloca i32\n %16 = alloca i32\n %17 = alloca i32\n %18 = alloca i32\n %19 = xor i1 %0, true\n br label %target_cond_0\n"]
- entry --> target_cond_0
- target_cond_0["Block target_cond_0:\n br i1 %0, label %20, label %target_skip_0\n"]
- target_cond_0 -->|true| 20
- target_cond_0 -->|false| target_skip_0
- target_skip_0["Block target_skip_0:\n br label %target_phi_0\n"]
- target_skip_0 --> target_phi_0
- target_phi_0["Block target_phi_0:\n br label %bunker_cond_0\n"]
- target_phi_0 --> bunker_cond_0
- 20["Block 20:\n store i32 %3, i32* %16, align 4\n store i32 0, i32* %17, align 4\n store i32 1, i32* %18, align 4\n br label %target_phi_0\n"]
- 20 --> target_phi_0
- bunker_cond_0["Block bunker_cond_0:\n br i1 %19, label %21, label %bunker_skip_0\n"]
- bunker_cond_0 -->|true| 21
- bunker_cond_0 -->|false| bunker_skip_0
- bunker_skip_0["Block bunker_skip_0:\n br label %bunker_phi_0\n"]
- bunker_skip_0 --> bunker_phi_0
- bunker_phi_0["Block bunker_phi_0:\n br label %target_cond_1\n"]
- bunker_phi_0 --> target_cond_1
- 21["Block 21:\n store %struct.Matrix* %1, %struct.Matrix** %5, align 8\n store %struct.Matrix* %2, %struct.Matrix** %6, align 8\n %22 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %23 = icmp ne %struct.Matrix* %22, null\n br i1 %23, label %24, label %27\n"]
- 21 -->|true| 24
- 21 -->|false| 27
- 24["Block 24:\n %25 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %26 = icmp ne %struct.Matrix* %25, null\n br i1 %26, label %28, label %27\n"]
- 24 -->|true| 28
- 24 -->|false| 27
- 27["Block 27:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 27 --> 217
- 28["Block 28:\n %29 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %30 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %29, i32 0, i32 0\n %31 = load i32**, i32*** %30, align 8\n %32 = icmp ne i32** %31, null\n br i1 %32, label %33, label %38\n"]
- 28 -->|true| 33
- 28 -->|false| 38
- 33["Block 33:\n %34 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %35 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %34, i32 0, i32 0\n %36 = load i32**, i32*** %35, align 8\n %37 = icmp ne i32** %36, null\n br i1 %37, label %39, label %38\n"]
- 33 -->|true| 39
- 33 -->|false| 38
- 38["Block 38:\n call void @setErrorMessage(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 38 --> 217
- 39["Block 39:\n %40 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %41 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %40, i32 0, i32 2\n %42 = load i32, i32* %41, align 4\n %43 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %44 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %43, i32 0, i32 1\n %45 = load i32, i32* %44, align 8\n %46 = icmp ne i32 %42, %45\n br i1 %46, label %47, label %48\n"]
- 39 -->|true| 47
- 39 -->|false| 48
- 47["Block 47:\n call void @setErrorMessage(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 47 --> 217
- 48["Block 48:\n %49 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %50 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %49, i32 0, i32 2\n %51 = load i32, i32* %50, align 4\n %52 = icmp sgt i32 %51, 100\n br i1 %52, label %58, label %53\n"]
- 48 -->|true| 58
- 48 -->|false| 53
- 53["Block 53:\n %54 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %55 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %54, i32 0, i32 1\n %56 = load i32, i32* %55, align 8\n %57 = icmp sgt i32 %56, 100\n br i1 %57, label %58, label %59\n"]
- 53 -->|true| 58
- 53 -->|false| 59
- 58["Block 58:\n call void @setErrorMessage(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 58 --> 217
- 59["Block 59:\n %60 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %61 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %60, i32 0, i32 1\n %62 = load i32, i32* %61, align 8\n %63 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %64 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %63, i32 0, i32 2\n %65 = load i32, i32* %64, align 4\n %66 = call %struct.Matrix* @createMatrix(i32 %62, i32 %65)\n store %struct.Matrix* %66, %struct.Matrix** %7, align 8\n %67 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %68 = icmp ne %struct.Matrix* %67, null\n br i1 %68, label %70, label %69\n"]
- 59 -->|true| 70
- 59 -->|false| 69
- 69["Block 69:\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 69 --> 217
- 70["Block 70:\n store i64 0, i64* %8, align 8\n store i32 0, i32* %9, align 4\n br label %71\n"]
- 70 --> 71
- 71["Block 71:\n %72 = load i32, i32* %9, align 4\n %73 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %74 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %73, i32 0, i32 1\n %75 = load i32, i32* %74, align 8\n %76 = icmp slt i32 %72, %75\n br i1 %76, label %77, label %205\n"]
- 71 -->|true| 77
- 71 -->|false| 205
- 77["Block 77:\n store i32 0, i32* %10, align 4\n br label %78\n"]
- 77 --> 78
- 78["Block 78:\n %79 = load i32, i32* %10, align 4\n %80 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %81 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %80, i32 0, i32 2\n %82 = load i32, i32* %81, align 4\n %83 = icmp slt i32 %79, %82\n br i1 %83, label %84, label %201\n"]
- 78 -->|true| 84
- 78 -->|false| 201
- 84["Block 84:\n store i64 0, i64* %11, align 8\n store i32 0, i32* %12, align 4\n br label %85\n"]
- 84 --> 85
- 85["Block 85:\n %86 = load i32, i32* %12, align 4\n %87 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %88 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %87, i32 0, i32 2\n %89 = load i32, i32* %88, align 4\n %90 = icmp slt i32 %86, %89\n br i1 %90, label %91, label %155\n"]
- 85 -->|true| 91
- 85 -->|false| 155
- 91["Block 91:\n %92 = load %struct.Matrix*, %struct.Matrix** %5, align 8\n %93 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %92, i32 0, i32 0\n %94 = load i32**, i32*** %93, align 8\n %95 = load i32, i32* %9, align 4\n %96 = sext i32 %95 to i64\n %97 = getelementptr inbounds i32*, i32** %94, i64 %96\n %98 = load i32*, i32** %97, align 8\n %99 = load i32, i32* %12, align 4\n %100 = sext i32 %99 to i64\n %101 = getelementptr inbounds i32, i32* %98, i64 %100\n %102 = load i32, i32* %101, align 4\n %103 = sext i32 %102 to i64\n %104 = load %struct.Matrix*, %struct.Matrix** %6, align 8\n %105 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %104, i32 0, i32 0\n %106 = load i32**, i32*** %105, align 8\n %107 = load i32, i32* %12, align 4\n %108 = sext i32 %107 to i64\n %109 = getelementptr inbounds i32*, i32** %106, i64 %108\n %110 = load i32*, i32** %109, align 8\n %111 = load i32, i32* %10, align 4\n %112 = sext i32 %111 to i64\n %113 = getelementptr inbounds i32, i32* %110, i64 %112\n %114 = load i32, i32* %113, align 4\n %115 = sext i32 %114 to i64\n %116 = mul nsw i64 %103, %115\n store i64 %116, i64* %13, align 8\n %117 = load i64, i64* %13, align 8\n %118 = load i64, i64* %11, align 8\n %119 = add nsw i64 %118, %117\n store i64 %119, i64* %11, align 8\n %120 = load i64, i64* %11, align 8\n %121 = icmp sgt i64 %120, 2147483647\n br i1 %121, label %125, label %122\n"]
- 91 -->|true| 125
- 91 -->|false| 122
- 122["Block 122:\n %123 = load i64, i64* %11, align 8\n %124 = icmp slt i64 %123, -2147483648\n br i1 %124, label %125, label %151\n"]
- 122 -->|true| 125
- 122 -->|false| 151
- 125["Block 125:\n call void @setErrorMessage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))\n store i32 0, i32* %14, align 4\n br label %126\n"]
- 125 --> 126
- 126["Block 126:\n %127 = load i32, i32* %14, align 4\n %128 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %129 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %128, i32 0, i32 1\n %130 = load i32, i32* %129, align 8\n %131 = icmp slt i32 %127, %130\n br i1 %131, label %132, label %144\n"]
- 126 -->|true| 132
- 126 -->|false| 144
- 132["Block 132:\n %133 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %134 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %133, i32 0, i32 0\n %135 = load i32**, i32*** %134, align 8\n %136 = load i32, i32* %14, align 4\n %137 = sext i32 %136 to i64\n %138 = getelementptr inbounds i32*, i32** %135, i64 %137\n %139 = load i32*, i32** %138, align 8\n %140 = bitcast i32* %139 to i8*\n call void @free(i8* %140) #7\n br label %141\n"]
- 132 --> 141
- 141["Block 141:\n %142 = load i32, i32* %14, align 4\n %143 = add nsw i32 %142, 1\n store i32 %143, i32* %14, align 4\n br label %126\n"]
- 141 --> 126
- 144["Block 144:\n %145 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %146 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %145, i32 0, i32 0\n %147 = load i32**, i32*** %146, align 8\n %148 = bitcast i32** %147 to i8*\n call void @free(i8* %148) #7\n %149 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %150 = bitcast %struct.Matrix* %149 to i8*\n call void @free(i8* %150) #7\n store %struct.Matrix* null, %struct.Matrix** %4, align 8\n br label %217\n"]
- 144 --> 217
- 151["Block 151:\n br label %152\n"]
- 151 --> 152
- 152["Block 152:\n %153 = load i32, i32* %12, align 4\n %154 = add nsw i32 %153, 1\n store i32 %154, i32* %12, align 4\n br label %85\n"]
- 152 --> 85
- 155["Block 155:\n %156 = load i64, i64* %11, align 8\n %157 = trunc i64 %156 to i32\n %158 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %159 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %158, i32 0, i32 0\n %160 = load i32**, i32*** %159, align 8\n %161 = load i32, i32* %9, align 4\n %162 = sext i32 %161 to i64\n %163 = getelementptr inbounds i32*, i32** %160, i64 %162\n %164 = load i32*, i32** %163, align 8\n %165 = load i32, i32* %10, align 4\n %166 = sext i32 %165 to i64\n %167 = getelementptr inbounds i32, i32* %164, i64 %166\n store i32 %157, i32* %167, align 4\n %168 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %169 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %168, i32 0, i32 0\n %170 = load i32**, i32*** %169, align 8\n %171 = load i32, i32* %9, align 4\n %172 = sext i32 %171 to i64\n %173 = getelementptr inbounds i32*, i32** %170, i64 %172\n %174 = load i32*, i32** %173, align 8\n %175 = load i32, i32* %10, align 4\n %176 = sext i32 %175 to i64\n %177 = getelementptr inbounds i32, i32* %174, i64 %176\n %178 = load i32, i32* %177, align 4\n %179 = call i32 @abs(i32 %178) #8\n %180 = sext i32 %179 to i64\n %181 = load i64, i64* %8, align 8\n %182 = icmp sgt i64 %180, %181\n br i1 %182, label %183, label %197\n"]
- 155 -->|true| 183
- 155 -->|false| 197
- 183["Block 183:\n %184 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %185 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %184, i32 0, i32 0\n %186 = load i32**, i32*** %185, align 8\n %187 = load i32, i32* %9, align 4\n %188 = sext i32 %187 to i64\n %189 = getelementptr inbounds i32*, i32** %186, i64 %188\n %190 = load i32*, i32** %189, align 8\n %191 = load i32, i32* %10, align 4\n %192 = sext i32 %191 to i64\n %193 = getelementptr inbounds i32, i32* %190, i64 %192\n %194 = load i32, i32* %193, align 4\n %195 = call i32 @abs(i32 %194) #8\n %196 = sext i32 %195 to i64\n store i64 %196, i64* %8, align 8\n br label %197\n"]
- 183 --> 197
- 197["Block 197:\n br label %198\n"]
- 197 --> 198
- 198["Block 198:\n %199 = load i32, i32* %10, align 4\n %200 = add nsw i32 %199, 1\n store i32 %200, i32* %10, align 4\n br label %78\n"]
- 198 --> 78
- 201["Block 201:\n br label %202\n"]
- 201 --> 202
- 202["Block 202:\n %203 = load i32, i32* %9, align 4\n %204 = add nsw i32 %203, 1\n store i32 %204, i32* %9, align 4\n br label %71\n"]
- 202 --> 71
- 205["Block 205:\n %206 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %207 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %206, i32 0, i32 1\n %208 = load i32, i32* %207, align 8\n %209 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %210 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %209, i32 0, i32 2\n %211 = load i32, i32* %210, align 4\n %212 = icmp eq i32 %208, %211\n %213 = zext i1 %212 to i32\n %214 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n %215 = getelementptr inbounds %struct.Matrix, %struct.Matrix* %214, i32 0, i32 3\n store i32 %213, i32* %215, align 8\n %216 = load %struct.Matrix*, %struct.Matrix** %7, align 8\n store %struct.Matrix* %216, %struct.Matrix** %4, align 8\n br label %217\n"]
- 205 --> 217
- 217["Block 217:\n %218 = load %struct.Matrix*, %struct.Matrix** %4, align 8\n %219 = insertvalue %fused_return_multiplyMatrices_testPoints { i32 0, %struct.Matrix* undef }, %struct.Matrix* %218, 1\n ret %fused_return_multiplyMatrices_testPoints %219\n"]
- target_cond_1["Block target_cond_1:\n br i1 %0, label %220, label %target_skip_1\n"]
- target_cond_1 -->|true| 220
- target_cond_1 -->|false| target_skip_1
- target_skip_1["Block target_skip_1:\n br label %target_phi_1\n"]
- target_skip_1 --> target_phi_1
- target_phi_1["Block target_phi_1:\n ret %fused_return_multiplyMatrices_testPoints zeroinitializer\n"]
- 220["Block 220:\n %221 = load i32, i32* %17, align 4\n %222 = add nsw i32 %221, 1\n store i32 %222, i32* %17, align 4\n %223 = load i32, i32* %16, align 4\n %224 = icmp sgt i32 %223, 2\n br i1 %224, label %230, label %231\n"]
- 220 -->|true| 230
- 220 -->|false| 231
- 225["Block 225:\n %226 = load i32, i32* %18, align 4\n %227 = icmp slt i32 %226, 5\n br i1 %227, label %220, label %228\n"]
- 225 -->|true| 220
- 225 -->|false| 228
- 228["Block 228:\n %229 = load i32, i32* %17, align 4\n store i32 %229, i32* %15, align 4\n br label %232\n"]
- 228 --> 232
- 230["Block 230:\n store i32 23, i32* %15, align 4\n br label %232\n"]
- 230 --> 232
- 231["Block 231:\n br label %236\n"]
- 231 --> 236
- 232["Block 232:\n %233 = load i32, i32* %15, align 4\n %234 = insertvalue %fused_return_multiplyMatrices_testPoints undef, i32 %233, 0\n %235 = insertvalue %fused_return_multiplyMatrices_testPoints %234, %struct.Matrix* null, 1\n ret %fused_return_multiplyMatrices_testPoints %235\n"]
- 236["Block 236:\n %237 = load i32, i32* %18, align 4\n %238 = add nsw i32 %237, 1\n store i32 %238, i32* %18, align 4\n br label %target_phi_1\n"]
- 236 --> target_phi_1
- classDef critical fill:#f96,stroke:#333,stroke-width:4px
- ```
- [INFO][performCodeFusion] Completed function fusion: fused_multiplyMatrices
- [INFO][performCodeFusion] Code fusion completed, processed 6 function pairs
|