mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 08:45:45 +00:00
glasm: Rework control flow introducing a syntax list
This commit regresses VertexA shaders, their transformation pass has to be adapted to the new control flow.
This commit is contained in:
parent
8a556b49cf
commit
03f6d424ce
33 changed files with 437 additions and 505 deletions
|
@ -37,7 +37,6 @@ class Value {
|
|||
public:
|
||||
Value() noexcept = default;
|
||||
explicit Value(IR::Inst* value) noexcept;
|
||||
explicit Value(IR::Block* value) noexcept;
|
||||
explicit Value(IR::Reg value) noexcept;
|
||||
explicit Value(IR::Pred value) noexcept;
|
||||
explicit Value(IR::Attribute value) noexcept;
|
||||
|
@ -54,11 +53,9 @@ public:
|
|||
[[nodiscard]] bool IsPhi() const noexcept;
|
||||
[[nodiscard]] bool IsEmpty() const noexcept;
|
||||
[[nodiscard]] bool IsImmediate() const noexcept;
|
||||
[[nodiscard]] bool IsLabel() const noexcept;
|
||||
[[nodiscard]] IR::Type Type() const noexcept;
|
||||
|
||||
[[nodiscard]] IR::Inst* Inst() const;
|
||||
[[nodiscard]] IR::Block* Label() const;
|
||||
[[nodiscard]] IR::Inst* InstRecursive() const;
|
||||
[[nodiscard]] IR::Value Resolve() const;
|
||||
[[nodiscard]] IR::Reg Reg() const;
|
||||
|
@ -80,7 +77,6 @@ private:
|
|||
IR::Type type{};
|
||||
union {
|
||||
IR::Inst* inst{};
|
||||
IR::Block* label;
|
||||
IR::Reg reg;
|
||||
IR::Pred pred;
|
||||
IR::Attribute attribute;
|
||||
|
@ -304,11 +300,6 @@ inline IR::Inst* Value::Inst() const {
|
|||
return inst;
|
||||
}
|
||||
|
||||
inline IR::Block* Value::Label() const {
|
||||
DEBUG_ASSERT(type == Type::Label);
|
||||
return label;
|
||||
}
|
||||
|
||||
inline IR::Inst* Value::InstRecursive() const {
|
||||
DEBUG_ASSERT(type == Type::Opaque);
|
||||
if (IsIdentity()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue