Refactor bisector logic, update CLI options, and enhance transforms#1293
Merged
Conversation
Add CurrentDisabledTransforms property to BisectorState to record the list of currently disabled transforms. Update ExecuteIteration to set this property before saving state, ensuring the state file accurately reflects the active transform configuration for each iteration.
Eliminated duplicate registration of block transforms with compiler hooks in Initialize(). Also removed per-transform disabled checks in ApplyBlockTransforms() for a more streamlined and consistent transform application process.
Introduced a new "FilePostfix" setting and command-line argument ("-postfix") to allow users to append a custom postfix to the base output filename. Updated the argument map, MOSASettings, and filename resolution logic to support this feature. Added a corresponding constant in the Name class.
Removed legacy NuGet env var and consolidated Mosa.Templates build and packaging into a single dotnet pack step. This modernizes the CI process and simplifies package output management.
Introduce `-postfix` and `-path` command-line arguments for customizing output file names and search paths. Update documentation to describe these options and add `FilePostfix` to the settings table. Add related constants in `Name.cs` and clarify platform argument documentation. Also, append new unit test-related constants.
Update double zero/sign-extend IR transforms to emit the correct extend instruction instead of Move, ensuring proper extension semantics. Comment out certain "useless" ZeroExtend compare transforms in ManualTransforms.cs.
Refactored IntegerOperation1 and IntegerOperation to handle 32-bit and 64-bit instructions in separate branches. Ensured proper casting and masking for 32-bit results and applied correct shift masks. Improves correctness and clarity, especially for edge cases and overflows.
Replaced 'random-combo' with 'random' in bisector docs, CLI, and code. Clarified comments for managed pointer memory transforms. Enabled additional 'Useless' transforms. Fixed Add32 manual transform to check next.Result register for ESP.
Corrected a typo in the batch script by changing `del /S /Q qemu\share\u-boot-sam460.binS` to the correct file name `del /S /Q qemu\share\u-boot-sam460.bin`, ensuring the intended file is deleted. No other changes were made. Update CLI docs formatting; fix typo in reduce-qemu.bat Reordered and clarified command-line argument documentation, including a new "Compiler - Platform" section. Fixed a minor typo in reduce-qemu.bat affecting the u-boot-sam460.bin deletion command.
Only iterate transforms when AllowTransformHooks is true, avoiding unnecessary iteration and improving efficiency. Logic for null-checking and hook registration is unchanged.
Renamed the variable resultOperand to result for improved clarity and consistency within the Transform method. Updated all references accordingly.
Refactored bisector-related settings in MOSASettings, removing unused constants and updating defaults. ProcessSupervisor now manages its own MosaSettings instance, with redundant options and methods removed. StateSnapshot struct moved to its own file. Updated UnitTestBisectorSystem and related logic to use new settings consistently. Simplified main entry points and improved code style and naming throughout.
Renamed and improved disabled transform tracking in MainForm for clarity and input sanitization. Standardized default base filename to "MOSA". In UnitTestBisectorSystem, introduced local fields for bisector stage and unit test filter, updated all references for consistency, and centralized UnitTestFailFast setting. Output and state file logic now consistently use the new stageName field.
Replaces the VariableState inner class in SparseConditionalConstantPropagation with a new internal sealed LatticeValue class in its own file. Updates all SCCP logic to use LatticeValue for variable state tracking, improving modularity and code organization. This change separates lattice value logic from analysis, making the codebase more maintainable and reusable.
Moved Bisector from Framework to Common for broader reuse and restored its implementation. Updated all references to use the new namespace. Refactored Frame.MethodName to an expression-bodied property.
Main now returns void and uses Environment.Exit to set the process exit code. Also updated variable naming for consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.