184 Commits

Author SHA1 Message Date
Vasileios Porpodas
504585d7d8 [SandboxIR][NFC] Move isMemDepCandidate() and isStackSaveOrRestoreIntrinsic() to Utils 2024-10-02 09:03:52 -07:00
Sterling-Augustine
2f4327294d
[SandboxIR] Implement getNumBits for Instructions (#110748)
This also moves the other getNumbits test into UtilsTest.cc where it
belongs.
2024-10-01 15:48:41 -07:00
vporpo
9e85937b83
[SandboxIR][NFC] Rename SandboxIRValues.def to Values.def (#110538) 2024-09-30 11:24:55 -07:00
vporpo
e22b07e766
[SandboxIR][NFC] Move Function class to a separate file (#110526) 2024-09-30 10:12:47 -07:00
Sterling-Augustine
df4d7d3b29
[SandboxIR] Add pointer-diff utility function (#110343)
This will be used when gathering seeds to calculate the lane an
instruction in the bundle uses.

This is a retry of PR 110176, which somehow got messed up while
resolving a merge conflict.
2024-09-27 17:27:50 -07:00
Vasileios Porpodas
2018f4ccf2 Reapply "[SandboxIR][NFC] Delete SandboxIR.h (#110309)"
This reverts commit 8dfeb4ef5d60a5c764f0ce249cc4ec69e012ff93.
2024-09-27 13:18:44 -07:00
Vasileios Porpodas
8dfeb4ef5d Revert "[SandboxIR][NFC] Delete SandboxIR.h (#110309)"
This reverts commit ca47f48a5c9e81ef8b5c4a5b1fbc473ea5d5497c.
2024-09-27 12:53:25 -07:00
vporpo
ca47f48a5c
[SandboxIR][NFC] Delete SandboxIR.h (#110309) 2024-09-27 12:20:08 -07:00
vporpo
eba106d461
[SandboxIR][NFC] Move Instruction classes into a separate file (#110294) 2024-09-27 10:54:11 -07:00
Jorge Gorbe Moya
9efc761d42
Reapply "[SandboxIR][NFC] Move Region from SandboxVectorizer to SandboxIR." (#110173) (#110181)
Re-applies llvm/llvm-project#110173 after fixing build break.
2024-09-26 18:12:31 -07:00
Jorge Gorbe Moya
74f276dd0f
Revert "[SandboxIR][NFC] Move Region from SandboxVectorizer to SandboxIR." (#110177)
Reverts llvm/llvm-project#110173. Missed an #include with the old path.
2024-09-26 14:56:19 -07:00
Jorge Gorbe Moya
3d9ed92630
[SandboxIR][NFC] Move Region from SandboxVectorizer to SandboxIR. (#110173)
I'm planning to add RegionPass and RegionPassManager next to the
equivalent FunctionPass and FunctionPassManager in SandboxIR, which
means that SandboxIR has to know about Regions.

There's nothing vectorizer-specific about the Region class, and the only
thing using Regions at this moment is the unit test, so this is a
straightforward file move.
2024-09-26 14:48:28 -07:00
Vasileios Porpodas
13809b3d95 [SandboxIR] Fix failing unittest introduced by 51039101cf32 2024-09-25 16:38:46 -07:00
Sriraman Tallam
51039101cf
[SandboxIR] Add more functions to sandboxir:Instruction class. (#110050)
The getter functions simply turn around and call the LLVM
counterparts.  This is fine until we don't add new sandbox IR
opcodes.  At that point, we may have to explicitly check if
the behavior is different.
2024-09-25 16:09:13 -07:00
vporpo
7e5df5bcc3
[SandboxIR] Implement Module (#109716)
This patch implements sandboxir::Module.
It provides access to globals.
2024-09-25 14:02:52 -07:00
vporpo
eba21accf2
[SandboxIR][Utils] Implement getMemoryLocation() (#109724)
This patch implements sandboxir::Utils::memoryLocationGetOrNone() that calls
MemoryLocation::getOrNone() internally.
Ideally this would require a sandboxir::MemoryLocation, but this should
be good enough for now.
2024-09-25 10:43:36 -07:00
vporpo
f4042077e2
[SandboxIR] Implement a few Instruction member functions (#109820)
This patch implements a few sandboxir::Instruction predicate functions.
2024-09-24 10:12:12 -07:00
vporpo
74405b9d74
[SandboxIR] Implement a few Instruction member functions (#109709)
This patch implements some of the missing member functions of
sandboxir::Instruction.
2024-09-23 13:46:28 -07:00
vporpo
416c3ce013
[SandboxIR] Implement ConstantExpr (#109491)
This patch implements an empty sandboxir::ConstantExpr class, mirroring
llvm::ConstantExpr.
2024-09-23 11:45:20 -07:00
Sterling-Augustine
d1edef56e8
[SandboxIR] Functions to find vectorizor-relevant properties (#109221)
When vectorizing, the destination type and value of stores is more
relevant than the type of the instruction itself. Similarly for return
instructions. These functions provide a convenient way to do that
without special-casing them everywhere, and avoids the need for
friending any class that needs access to Value::LLVMTy to calculate it.

Open to better naming.
2024-09-23 11:05:23 -07:00
vporpo
c0b1c623be
[SandboxIR] Implement ConstantPtrAuth (#109315)
This patch implements sandboxir::ConstantPtrAuth mirroring
llvm::ConstantPtrAuth
2024-09-20 15:43:54 -07:00
vporpo
74c0ab6f39
[SandboxIR] Implement NoCFIValue (#109046)
This patch implements sandboxir::NoCFIValue mirroring llvm::NoCFIValue.
2024-09-19 10:12:28 -07:00
Vasileios Porpodas
9f5139ccee [SandboxIR] Fix unused variable build error 2024-09-18 17:58:23 -07:00
vporpo
1bda7ba12e
[SandboxIR] Add Instruction::isStackSaveRestoreIntrinsic() and isMemDepCandidate() (#109212)
These are helper functions to be used by the vectorizer's dependency
graph.
2024-09-18 17:29:59 -07:00
vporpo
b846638548
[SanbdoxIR] Implement BBIterator::getNodeParent() (#109039)
This patch implements sandboxir::BasicBlock::iterator::getNodeParent()
which returns the parent basic block of an iterator.
2024-09-17 15:20:09 -07:00
vporpo
9a312d47f3
[SandboxIR] Implement GlobalAlias (#109019)
This patch implements sandboxir::GlobalAlias, mirroring
llvm::GlobalAlias.
2024-09-17 13:45:36 -07:00
Vasileios Porpodas
c8fcfe1980 [SandboxIR][NFC] Fix unittest build warning in release 2024-09-17 13:13:16 -07:00
vporpo
b9bf831e8d
[SandboxIR] Implement GlobalVariable (#108642)
This patch implements sandboxir::GlobalVariable mirroring
llvm::GlobalVariable.
2024-09-17 10:26:34 -07:00
vporpo
6cbb2455ae
[SandboxIR] Implement missng Instruction::comesBefore() (#108635) 2024-09-13 14:25:18 -07:00
vporpo
ae3e82585e
[SandboxIR] Implement GlobalIFunc (#108622)
This patch implements sandboxir::GlobalIFunc mirroring
llvm::GlobalIFunc.
2024-09-13 13:03:10 -07:00
vporpo
9f738c84f0
[SandboxIR] Implement GlobalObject (#108604)
This patch implements sandboxir::GlobalObject mirroring
llvm::GlobalObject.
2024-09-13 11:18:42 -07:00
vporpo
fffc7fb7ad
[SandboxIR] Implement DSOLocalEquivalent (#108473)
This patch implements sandboxir::DSOLocalEquivalent mirroring
llvm::DSOLocalEquivalent.
2024-09-13 09:40:37 -07:00
vporpo
f0f1b706e2
[SandboxIR][PassRegistry] Parse pipeline string (#108103)
This patch implements a simple version of the pipeline parsing function.
It currently only handles a single FPM and adds function passes to it.
2024-09-13 09:28:49 -07:00
vporpo
6d859c1712
[SandboxIR] Implement GlobalValue (#108317)
This patch implements sandboxir::GlobalValue mirroring
llvm::GlobalValue. Please note that the implementation is incomplete as
it's missing several member functions.
2024-09-12 16:16:48 -07:00
vporpo
c9ab69798f
[SandboxIR] Implement ConstantTokenNone (#108106)
This patch implements sandboxir::ConstantTokenNone mirroring
llvm::ConstantTokenNone.
2024-09-11 18:55:08 -07:00
Jorge Gorbe Moya
956591bec5
[SandboxIR] Add remaining SelectInst methods and track swapValues() (#108114) 2024-09-11 13:08:48 -07:00
Sterling-Augustine
3b4e7c9c45
[SandboxIR] Implement ScalableVectorType (#108124)
As in the heading.
2024-09-10 19:11:14 -07:00
Sterling-Augustine
bb7286515c
[SandboxIR] Implement FixedVectorType (#107930) 2024-09-10 15:44:30 -07:00
vporpo
d14a600b1e
[SandboxIR] Implement BlockAddress (#107940)
This patch implements sandboxir::BlockAddress mirroring
llvm:BlockAddress.
2024-09-10 15:28:21 -07:00
vporpo
2ddf21bc70
[SandboxIR] Pass registry (#108084)
This patch implements a simple Pass Registry class, which takes
ownership of the passes registered with it and provides an interface to
get the pass pointer by its name.
2024-09-10 14:42:09 -07:00
vporpo
3363760f9a
[SandboxIR] PassManager (#107932)
This patch implements a simple pass manager for Sandbox IR.
2024-09-10 13:17:26 -07:00
vporpo
ae02211eae
[SandboxIR] Implement UndefValue (#107628)
This patch implements sandboxir::UndefValue mirroring llvm::UndefValue.
2024-09-09 16:52:54 -07:00
vporpo
f12e10b513
[SandboxVec] Implement Pass class (#107617)
This patch implements the Pass base class and the FunctionPass sub-class
that operate on Sandbox IR.
2024-09-09 15:41:30 -07:00
Sterling-Augustine
6f8d2781f6
[SandboxIR] Add missing VectorType functions (#107650)
Fills in many missing functions from VectorType
2024-09-09 13:49:49 -07:00
vporpo
fd2da9e581
[SandboxIR] Implement PoisonValue (#107324)
This patch implements sandboxir::PoisonValue mirroring
llvm::PoisonValue.
2024-09-06 11:26:20 -07:00
vporpo
950bb68516
[SandboxIR] Implement ConstantPointerNull (#107320)
This patch implements sandboxir::ConstantPointerNull mirroring
llvm::ConstantPointerNull.
2024-09-04 15:55:08 -07:00
vporpo
df50751d24
[SandboxIR] Implement ConstantAggregateZero (#107172)
This patch implements sandboxir::ConstantAggregateZero mirroring
llvm::ConstantAggregateZero.
2024-09-04 15:12:58 -07:00
Sterling-Augustine
840da2e8ba
[SandboxIR] Implement CmpInst, FCmpInst, and ICmpInst (#106301)
As in the description.

Not sure the macros for "WRAP_XXX" add value or not, but do save some
boiler plate. Maybe there is a better way.
2024-09-04 10:54:17 -07:00
vporpo
814aa432ab
[SandboxIR] Implement ConstantAggregate (#107136)
This patch implements sandboxir:: ConstantAggregate, ConstantStruct,
ConstantArray and ConstantVector, mirroring LLVM IR.
2024-09-03 17:15:24 -07:00
vporpo
b91b1f0bd3
[SandboxIR] Implement remaining ConstantInt functions (#106775)
This patch adds the remaining ConstantInt:: functions and it also
implements the IntegerType class.
2024-09-03 10:31:32 -07:00