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

Cbieneman/rewrite out params new #4

Closed
wants to merge 99 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
58d706a
Experimental reimplementation of `out` and `inout`
llvm-beanz Mar 8, 2023
dff5116
Catch one more place we used non-LValues for UDTs
llvm-beanz Mar 8, 2023
d9f680b
Add LValueToRvalue cast on HLSL Conversions if required
llvm-beanz Mar 8, 2023
b514bef
Derived to base cast is a bitcast since HLSL is single inheritance...
llvm-beanz Mar 8, 2023
a230109
Code cleanup. Delete dead code and format some other code.
llvm-beanz Mar 9, 2023
2b6924f
Simplify derived to base c cast
llvm-beanz Mar 9, 2023
97a25ed
make writeback provably non-null for hlsl
llvm-beanz Mar 9, 2023
2b8573b
Delete old copy-in/copy-out code
llvm-beanz Mar 9, 2023
ecfa3f6
Emit conversion sequence in OutParamBuilder
llvm-beanz Mar 9, 2023
146a6b2
WIP
llvm-beanz Mar 9, 2023
c9a8299
Working with writeback casting
llvm-beanz Mar 13, 2023
7d9296a
Use the Base if SrcLV is not set
llvm-beanz Mar 13, 2023
5d88781
Revive pointer array decay... yolo!
llvm-beanz Mar 13, 2023
73d731e
Initialize all fields to nullptr
llvm-beanz Mar 14, 2023
4ac79e7
SrcLV isn't always simple
llvm-beanz Mar 14, 2023
57d35ea
Look through HLSLOutParamExpr in SemaDXR
llvm-beanz Mar 14, 2023
194cca7
Look through reference type
llvm-beanz Mar 14, 2023
a3d55fc
Cannot convert RValue to LValue...
llvm-beanz Mar 14, 2023
e00e98c
Another non-reference type lookup
llvm-beanz Mar 14, 2023
09a14f0
Short cut NoOp cast to be LValue
llvm-beanz Mar 14, 2023
7fdd412
More non-resource
llvm-beanz Mar 14, 2023
fcba139
Simplify c-style casting expressions
llvm-beanz Mar 14, 2023
33c929b
Rewriting teh HLSL resource parameter annotation
llvm-beanz Mar 15, 2023
9660c22
rename temporary parameters to be more HLSL-specific
llvm-beanz Mar 15, 2023
b747fff
Update test error message
llvm-beanz Mar 15, 2023
0524822
Update copy-in/copy-out test
llvm-beanz Mar 15, 2023
8c4e545
Updating test with dereferenceable
llvm-beanz Mar 15, 2023
d21defa
Add a new AST node to represent array temporaries
llvm-beanz Mar 15, 2023
9968839
Fix copy-in/copy-out for member operators
llvm-beanz Mar 16, 2023
f6d5fc4
Don't run the parameter legalizaiton pass
llvm-beanz Mar 16, 2023
770bf5c
One more non-reference type
llvm-beanz Mar 16, 2023
b04ab01
WIP
llvm-beanz Mar 17, 2023
941f482
Generate input argument temporaries
llvm-beanz Mar 17, 2023
64df9ed
Add `ref` qualifier for hct intrinsics
llvm-beanz Mar 17, 2023
ab7408a
Delete hl-legalize test
llvm-beanz Mar 17, 2023
c5548a0
Handle matrix load and store for outparamexpr
llvm-beanz Mar 17, 2023
f0aabc2
Another LValueToRValue cast cleanup
llvm-beanz Mar 17, 2023
ecf3227
Don't elide copies of non-local storage
llvm-beanz Mar 20, 2023
b1dc1bd
Remove an incorrect assert and cleanup lifetime users
llvm-beanz Mar 20, 2023
cd59b36
Force implicit types used as paramters to be complete
llvm-beanz Mar 20, 2023
0713424
Simplify looking through reference type
llvm-beanz Mar 20, 2023
16dc538
Fix braces :facepalm:
llvm-beanz Mar 20, 2023
84fc43b
Allow eliding copies for static globals
llvm-beanz Mar 20, 2023
63a4aaf
Don't rewrite non-constant globals
llvm-beanz Mar 20, 2023
142b57b
HLSLVector truncation produces rvalue
llvm-beanz Mar 21, 2023
34bacb5
Remove error about truncating matrix lvalue
llvm-beanz Mar 22, 2023
9c055b9
Generate HLSLOutExpr _or_ copy-initialize not both
llvm-beanz Mar 23, 2023
3fdcff8
If we need LValue to RValue, we should always need it...
llvm-beanz Mar 23, 2023
fdcc9d7
No extra lvalue to rvalue
llvm-beanz Mar 23, 2023
7ea6586
Deleting test that verifies a behavior I removed
llvm-beanz Mar 23, 2023
f76c1f6
Properly look through typedef without stripping attributes
llvm-beanz Mar 24, 2023
53f36f3
Function arguments get converted for memory
llvm-beanz Mar 24, 2023
b71d815
Updating test
llvm-beanz Mar 24, 2023
302de41
Diagnose vector/matrix cast lvalue truncation to scalar
llvm-beanz Mar 24, 2023
af27585
Fix DXR payload diagnostics
llvm-beanz Mar 24, 2023
b783212
Handle flat conversion early
llvm-beanz Mar 27, 2023
a253b4d
look through reference type
llvm-beanz Mar 27, 2023
ad2caf3
Generate lifetime markers for parameter temporaries
llvm-beanz Mar 28, 2023
f31d608
Fixing tests where ordering changed
llvm-beanz Mar 30, 2023
8b88531
Fixing tests where dereferencable signatures updated
llvm-beanz Mar 30, 2023
9c6f6a2
Updating tests where instruction order shifted
llvm-beanz Apr 3, 2023
7067650
Fixes eliding copies for aggregates
llvm-beanz Apr 3, 2023
4fe1edd
Fix vector argument generation
llvm-beanz Apr 3, 2023
0c923a9
Don't elide non-local storage
llvm-beanz Apr 5, 2023
5dd8a84
Don't just assume that GEPs can only be used by specific instructions
llvm-beanz Apr 5, 2023
df068bd
Rework writeback generation
llvm-beanz Apr 5, 2023
238b352
don't elide vectors :(
llvm-beanz Apr 5, 2023
af3c6f5
Deleting test verifying incorrect behavior
llvm-beanz Apr 6, 2023
62464a0
Fix test
llvm-beanz Apr 17, 2023
376ddce
Support flat-conversion of l-values in out parameters
llvm-beanz Apr 18, 2023
279b2a6
Update test based on new codegen
llvm-beanz Apr 19, 2023
3cbabea
Rewrite test
llvm-beanz Apr 19, 2023
d8d0b1a
Update test case
llvm-beanz Apr 21, 2023
e21e46c
Reverse writeback order
llvm-beanz Apr 21, 2023
d4d0048
Update test regex
llvm-beanz Apr 21, 2023
a7bd5c7
rewrite vector truncation warning
llvm-beanz Apr 21, 2023
627a54d
Rewrite truncation diagnostics part 2...
llvm-beanz Apr 21, 2023
0239197
rewrite test
llvm-beanz Apr 21, 2023
9069939
Update diagnosic locations
llvm-beanz Apr 21, 2023
b2110b1
Updating AST matching
llvm-beanz Apr 25, 2023
1120640
don't generate lifetime markers for writeback if disabled
llvm-beanz Apr 25, 2023
6d7b784
rewrite test checks
llvm-beanz Apr 26, 2023
48c0af7
Initial SPIR-V support for HLSLOutParamExpr
llvm-beanz May 2, 2023
9bd9e73
Add support for Array temporaries in SPIR-V
llvm-beanz May 15, 2023
83705ae
Only generate array temporaries for sized arrays
llvm-beanz May 23, 2023
c0197f7
[SPIR-V] Look through references for stage variables
llvm-beanz May 25, 2023
c0a8895
[SPIRV] Enable eliding of `out` parameters
llvm-beanz May 25, 2023
caf4981
[SPIRV] Look through reference type
llvm-beanz May 26, 2023
d0a99e0
Look through reference types
llvm-beanz May 30, 2023
16f5b8f
Update fixfuncall SPIR-V tests
llvm-beanz Jun 14, 2023
d5076fc
[SPIR-V] Fix pointer array decay
llvm-beanz Jun 16, 2023
c0437c5
Revert "Update fixfuncall SPIR-V tests"
llvm-beanz Jun 16, 2023
1483ab3
Need to get non-reference types
llvm-beanz Jun 16, 2023
0c17f61
Fixing failing test case
llvm-beanz Jul 5, 2023
2a0995a
Revert "Updating test"
llvm-beanz Jul 5, 2023
336ac33
Fixing failing test
llvm-beanz Jul 5, 2023
1d26d6e
[nfc] clang-format sroa
llvm-beanz Sep 19, 2023
2431497
Fix dropped function decl
llvm-beanz Oct 20, 2023
8918c0e
Merge branch 'main' into cbieneman/rewrite-out-params-new
llvm-beanz Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions include/dxc/HLSL/DxilGenerationPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ void initializeCleanupDxBreakPass(llvm::PassRegistry &);
FunctionPass *createDxilLoopDeletionPass(bool NoSink);
void initializeDxilLoopDeletionPass(llvm::PassRegistry &);

ModulePass *createHLLegalizeParameter();
void initializeHLLegalizeParameterPass(llvm::PassRegistry &);

bool AreDxilResourcesDense(llvm::Module *M,
hlsl::DxilResourceBase **ppNonDense);

Expand Down
1 change: 0 additions & 1 deletion lib/HLSL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ add_llvm_library(LLVMHLSL
DxcOptimizer.cpp
HLDeadFunctionElimination.cpp
HLExpandStoreIntrinsics.cpp
HLLegalizeParameter.cpp
HLLowerUDT.cpp
HLMatrixBitcastLowerPass.cpp
HLMatrixLowerPass.cpp
Expand Down
330 changes: 0 additions & 330 deletions lib/HLSL/HLLegalizeParameter.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions lib/Transforms/IPO/PassManagerBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ void PassManagerBuilder::populateModulePassManager(
if (HLSLEnableDebugNops) MPM.add(createDxilInsertPreservesPass(HLSLAllowPreserveValues)); // HLSL Change - insert preserve instructions

if (Inliner) {
MPM.add(createHLLegalizeParameter()); // HLSL Change - legalize parameters
// before inline.
MPM.add(Inliner);
Inliner = nullptr;
}
Expand Down Expand Up @@ -406,7 +404,6 @@ void PassManagerBuilder::populateModulePassManager(

MPM.add(createDxilRewriteOutputArgDebugInfoPass()); // Fix output argument types.

MPM.add(createHLLegalizeParameter()); // legalize parameters before inline.
if (HLSLEarlyInlining && Inliner) {
MPM.add(Inliner);
Inliner = nullptr;
Expand Down
Loading
Loading