Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Required updates for porting to LLVM 11 #34

Merged
merged 14 commits into from
May 12, 2021
Merged

Required updates for porting to LLVM 11 #34

merged 14 commits into from
May 12, 2021

Conversation

Emoun
Copy link
Member

@Emoun Emoun commented May 11, 2021

These changes have all been made as part of updating to LLVM 11.
However, they are self-contained and still work on the current LLVM version.

Many of the changes remove customization to LLVM code in favor of implementations that don't need to touch LLVM code.

Fixes #30
Fixes #33

Emoun added 14 commits November 30, 2020 18:03
Moved the '%test_no_runtime_execution' llvm-lit command
to the root Patmos test folder to make it usable by all other
folders.

Added the '%XFAIL-filecheck' llvm-lit command that makes it
easy to test failures and their messages at the same time.
This is a more robust way to test, as checking the error
message ensures the correct error is caught.
With XFAIL, if something changes that invalidates a test
but happens to also issue a failure, this would not be caught
as the test is reported as a success (XFAIL).
With %XFAIL-filecheck, if the error changes into something
unexpected, the test is reported as a failure.

Edited previous XFAIL tests to use %XFAIL-filecheck
Previously, if the inline assembly block is larger than allowed
by the 'mpatmos-max-subfunction-size' flag, it would still compile,
but having all the inline assembly in one block.
This would therefore produce code that doesn't adhere to the max
allowed size.
MCNullStreamer was not originally a public class and
is still not so in the latest LLVM release (11.0.0).

This commit removes the use of MCNullStreamer as a super
class of PatmosInstrAnalyzer in favor of simply implementing
MCStreamer directly.
These tests are very rudimentary and fragile.
A better test setup should be added in the future.
This allows tests to specify that they want to filechek the stdout
output instead of the stderr output, which is the defaul.
…lign flags.

Also corrected the help message for -mpatmos-subfunction-align.
This removes the need for using MCAsmInfo::{EmitFunctionAlignment, EmitBasicBlockAlignment}.
Instead, AsmPrinter::EmitBasicBlockStart is made virtual and reimplemented for the Patmos target.
This change is forward compatible with LLVM v11.
This fixes CI build fails because of lack of gcc-7
Replaced it with 'STT_FUNC', meaning subfunctions should be treated
like other functions.
@Emoun Emoun merged commit a5fb0ad into t-crest:master May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant