Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor common compiler phases among different backends to drivers.common.compiler.phases package and restructure compiler utilities #304

Commits on Jan 8, 2024

  1. Refactor BoundCheckEliminationPhase to common module

    Deleted duplicate BoundCheckEliminationPhase code in OpenCL, PTX, and SPIR-V modules, and created a single version in common module. This reduces redundancy and simplifies future maintenance. Updated related import statements in MidTier files accordingly.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    05a39f6 View commit details
    Browse the repository at this point in the history
  2. Add copyright notice to BoundCheckEliminationPhase.java

    A copyright notice has been added to the top of the BoundCheckEliminationPhase.java file. This is to establish the rights to the file, which is free software and can be modified under the terms of the GNU General Public License version 2.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    80bc445 View commit details
    Browse the repository at this point in the history
  3. Refactor TornadoPartialLoopUnroll to common package

    Deleted TornadoPartialLoopUnroll from OpenCL and SPIRV drivers, and created a similar file under common driver. Reduced code duplication by relocating the common implementations into a shared module (drivers common). This improves maintainability and code reuse. Also updated OCLMidTier and SPIRVMidTier to include the common TornadoPartialLoopUnroll.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    6ccce94 View commit details
    Browse the repository at this point in the history
  4. Refactor exception message and node checking in OCLFP64SupportPhase

    Simplified throwing of TornadoDeviceFP64NotSupported exception using a string literal to output device name. The refactoring also includes concise rewriting of node checking within the run function - for WriteNode, ReadNode, OCLFPUnaryIntrinsicNode, OCLFPBinaryIntrinsicNode, and SqrtNode classes.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    88f40c9 View commit details
    Browse the repository at this point in the history
  5. Refactor InverseSquareRootPhase code for clarity

    Code inside InverseSquareRootPhase.java has been refactored to improve readability and compactness. The conditional logic checking for a ConstantNode and SqrtNode has been streamlined, resulting in cleaner, less cluttered code.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    8db59ed View commit details
    Browse the repository at this point in the history
  6. Refactor TornadoPartialLoopUnroll class

    Removed unnecessary dependencies and methods in the TornadoPartialLoopUnroll class. The createLoopPolicies method and DefaultLoopPolicies import were deleted as they were surplus to requirements. Simplified the getUpperGraphLimit method by removing the unused 'graph' parameter.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    de1ccaa View commit details
    Browse the repository at this point in the history
  7. Refactor PrimitiveSerialiser to use switch expression

    The conditional structure within the put method in the PrimitiveSerialiser class was updated to a more efficient switch expression. The switch expression directly correlates buffer types with their appropriate actions, while also handling the default case of null or unsupported type.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    1e3475d View commit details
    Browse the repository at this point in the history
  8. Refactor instance type casting in TornadoFieldAccessFixup

    Updated the type casting operations in the 'TornadoFieldAccessFixup.java' file to use Java's improved instance pattern matching for more straightforward and concise code. Now, each instance type check is performed simultaneously with corresponding type cast, enhancing readability and maintainability of the code.
    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    55d92c2 View commit details
    Browse the repository at this point in the history
  9. Minor fixes in comments

    mikepapadim committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    15b11a3 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Refactor TornadoTaskSpecialisation with Java's pattern matching

    In the TornadoTaskSpecialisation class, instance type checks and casts were restructured to use Java's pattern matching for efficiency and cleaner code. This change results to inline assignments, replacing multiple lines of code. Also, switch expressions are used to simplify conditional logic, optimizing code readability and maintainability.
    mikepapadim committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    d73c1bf View commit details
    Browse the repository at this point in the history
  2. Refactor TornadoNewArrayDevirtualizationReplacement to common location

    The TornadoNewArrayDevirtualizationReplacement.java file was repeatedly used in multiple packages. This change removes the duplicates across tornado-drivers {opencl, ptx, spirv} packages and places a single copy in the drivers-common package. The import statements referencing this file have been appropriately updated in respective packages. This eliminates redundancy and centralizes the crucial code to enhance maintainability.
    mikepapadim committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    60224db View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2024

  1. Move compiler classes into 'phases' subpackage

    All relevant compiler classes have been moved from 'graal.compiler' to 'compiler.phases'. Changes were necessary across several files and driver types, and have been adjusted accordingly. Import statements and package declarations have been updated to reflect the package location changes.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    a79c63b View commit details
    Browse the repository at this point in the history
  2. Change module to open; add exports in common-exports

    Changed module in module-info.java from module to open. This adjustment provides necessary permissions for handling reflections. Additional exports were also added in the common-exports file for the purpose of extension and API visibility.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    2fb079d View commit details
    Browse the repository at this point in the history
  3. Refactor Tornado array replacement and type elimination

    The codebase has been refactored, particularly in 'TornadoNewArrayDevirtualizationReplacement' and 'TornadoNativeTypeElimination' class files. The refactoring involves a slight alteration in a conditional check in the type elimination process, providing improved efficiency. A missing newline character was also added at the end of the Array replacement class file.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    752b897 View commit details
    Browse the repository at this point in the history
  4. Reorder methods in TornadoPanamaPrivateMemory class

    The methods 'notApplicableTo' and 'run' in the TornadoPanamaPrivateMemory class have been reordered. This modification does not alter the program's functionality. It was done to bring the code more in line with the agreed codebase structure and improve readability.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    143caea View commit details
    Browse the repository at this point in the history
  5. Refactor error handling and string formatting in TornadoSketcher class

    The changes update error handling by leveraging Java's instanceof pattern matching and improve string concatenations using string templates for better readability and performance in the TornadoSketcher class. The modifications made have no functional impact on the code, but they enhance code readability and maintainability.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    6e950ac View commit details
    Browse the repository at this point in the history
  6. Refactor LoopCanonicalizer and TornadoCodeGenerator classes

    Removed an unnecessary variable re-initialization in the LoopCanonicalizer class. Similarly, updated the debug method in the TornadoCodeGenerator class to use TornadoLogger's static debug method, simplifying the code and potentially improving performance.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    31b9369 View commit details
    Browse the repository at this point in the history
  7. Refactor object type casting in TornadoTaskSpecialisation

    Updated TornadoTaskSpecialisation class for more readable code and potentially improved performance. The changes involve direct casting of object types in the switch-case structure instead of re-casting them again while creating constant nodes. Code readability is enhanced by clarifying variable names.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    ed5554a View commit details
    Browse the repository at this point in the history
  8. Refactor package path for Tornado drivers

    Refactored the package path for various Tornado drivers from "uk.ac.manchester.tornado.drivers.graal" to "uk.ac.manchester.tornado.drivers.providers". This includes updates to file imports across multiple classes. Moreover, syntax and spacing in some files have been altered for consistency.
    mikepapadim committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    9da764d View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Relocate TornadoFieldAccessFixup and refactor its usage

    The TornadoFieldAccessFixup class is moved from the 'tornado-runtime' to the shared 'drivers-common' package. Additionally, import changes were made in associated classes (SPIRVHighTier and OCLHighTier). This relocation enhances code organization and reuse. Also, minor code optimizations were implemented within the TornadoFieldAccessFixup class.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    f3dd890 View commit details
    Browse the repository at this point in the history
  2. Relocate TornadoShapeAnalysis class to common compiler phases

    TornadoShapeAnalysis class has been moved from the `tornado.runtime.graal.phases` package to the `tornado.drivers.common.compiler.phases`. This refactoring improves the code organization by gathering all phases under the same package. Import statements and build configs were updated accordingly.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    2ba45ad View commit details
    Browse the repository at this point in the history
  3. Refactor TornadoOpenCLIntrinsicsReplacements for better readability a…

    …nd performance
    
    The commit reorganizes import statements and replaces traditional if-else blocks with switch-case statements. This reduces complexity and contributes to overall code clarity. For instance, an instance check is simplified to directly assign a variable -- 'ConstantNode lengthNode' -- in a single line.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    887410c View commit details
    Browse the repository at this point in the history
  4. Refactor all common compiler phases from runtime to driver.common and…

    … update usages
    
    Several files have been moved across directories and package structures have been updated in order to improve code organization. Also, multiple import statements in various files have been updated to correspond with the new location of classes and interfaces. Adjustments are made to facilitate future code maintenance and extensibility.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    9f4c6be View commit details
    Browse the repository at this point in the history
  5. Refactor several compiler phases and update their usages

    Removed unnecessary files, relocated some others, and adjusted the package structures to improve code organization. Updated numerous import statements to match up with the new locations of classes and interfaces. These changes will aid future maintenance and extendibility.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    fcb5c0a View commit details
    Browse the repository at this point in the history
  6. Optimize several methods in TornadoApiReplacement

    This commit replaces "get" methods with "getFirst" for efficiency in TornadoApiReplacement class. Strides have been replaced only in the loop condition to enhance performance. These changes potentially prevent possible runtime exceptions and ensure the smooth execution of parallelized tasks.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    3d20bb0 View commit details
    Browse the repository at this point in the history
  7. Refactor code and relocate classes in driver.common package

    Removed specific exports in module info and relocated several classes in the Graal module. LoopCanonicalizer and Floatable classes along with LogicalCompareNode interface have been moved to more appropriate directories, improving code organization and hence readability. Corrections have been made to the respective import statements.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    76fe75b View commit details
    Browse the repository at this point in the history
  8. Refactor code for setting dependencies in IntermediateTornadoGraph

    This commit refactors the way dependencies are set in IntermediateTornadoGraph. It utilizes the newly introduced pattern matching for instanceof in Java to simplify and clarify the code, particularly in handling DependentReadNode.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    f1d33cb View commit details
    Browse the repository at this point in the history
  9. Refactor package name from 'sketch.tier' to 'sketcher'

    The 'sketch.tier' package name has been renamed to 'sketcher'.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    70e9868 View commit details
    Browse the repository at this point in the history
  10. Address PR comments and refactor switch-case statements to pattern ma…

    …tching
    
    The code is refactored to replace traditional switch-case statements with the enhanced pattern matching provided in later versions of Java. This change extends across multiple files and functions, providing more concise and readable code. Additionally, the GRAPH_NODES_UPPER_LIMIT value is now a constant, improving the code maintainability.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    af90555 View commit details
    Browse the repository at this point in the history
  11. Refactor switch-cases to pattern matching in OCLWriteAtomicNode

    Switch-case statements in OCLWriteAtomicNode have been refactored to use pattern matching. This change provides the dual benefits of making the code more readable and concise. Additionally, it addresses PR comments and increases maintainability by defining the GRAPH_NODES_UPPER_LIMIT as a constant value.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    90277ab View commit details
    Browse the repository at this point in the history
  12. Refactor switch statements in SPIRVFPBinaryIntrinsicNode.java

    This commit simplifies the switch statements in the SPIRVFPBinaryIntrinsicNode class.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    86559de View commit details
    Browse the repository at this point in the history
  13. Refactor switch-case statements to new switch expressions

    The code has been refactored to use the new, more concise style of Java switch expressions, improving readability. This refactoring affects the 'doCompute' and 'generate' methods in the SPIRVIntrinsicNode classes. The use of explicit break statements has been phased out, making the code cleaner and easier to understand.
    mikepapadim committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    27aa7ec View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2024

  1. Update copyright years in various files

    The copyright years in various files in drivers-common were updated to include 2024. This includes files in the compiler, memalloc, analysis, loops, and guards subdirectories. Always remember to update copyright notices at the start of each new year for accurate documentation.
    mikepapadim committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    07254d4 View commit details
    Browse the repository at this point in the history
  2. Update copyright dates in Tornado runtime

    The copyright dates in Tornado runtime have been updated across various files. This covers
    mikepapadim committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    c45bfe8 View commit details
    Browse the repository at this point in the history
  3. Update copyright year in tornado runtime interfaces

    The copyright year has been updated from 2020 and 2021 to 2024 in numerous files within the Tornado runtime. This change ensures that the copyright information accurately reflects the current year.
    mikepapadim committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    d6fcfb7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d0ef84a View commit details
    Browse the repository at this point in the history