Christoph Bumiller
0bbf1659df
nv50: hook up to new shader code generator
2012-04-14 21:54:04 +02:00
Christoph Bumiller
322bc7ed68
nv50/ir: import nv50 target
2012-04-14 21:54:04 +02:00
Christoph Bumiller
15ce0f76e2
nv50/ir: fix off-by-ones in CSE and nvc0 insnCanLoad
2012-04-14 21:54:04 +02:00
Christoph Bumiller
ce04221081
nv50/ir/tgsi: generate UCPs with actual outputs instead of SVs
...
gl_ClipDistance is treated the same way, this is just nicer and
easier assign slots for them on nv50.
2012-04-14 21:54:04 +02:00
Francisco Jerez
d07e4421ab
nv50/ir: Fix type of the instruction created by mkCmp() for dst in FILE_FLAGS.
2012-04-14 21:54:04 +02:00
Christoph Bumiller
f8c3212cbb
nv50/ir: fix Instruction::isCommutationLegal for WAW
2012-04-14 21:54:03 +02:00
Francisco Jerez
93508b5b0d
nv50/ir/opt: Add isOptSupported() check in logical arith optimization.
2012-04-14 21:54:03 +02:00
Francisco Jerez
f4dbdcbfcf
nv50/ir/ra: Fix live set propagation in the secondary passes of buildLiveSets().
2012-04-14 21:54:03 +02:00
Christoph Bumiller
2fc014f8c0
nv50/ir/opt: don't regard OP_WRSV as dead code
2012-04-14 21:54:03 +02:00
Christoph Bumiller
a765d7880f
nv50/ir: add isUniform query to Values
2012-04-14 21:54:03 +02:00
Christoph Bumiller
e43a3a66a9
nv50/ir: rewrite the register allocator as GCRA, with spilling
...
This is more flexible than the linear scan, and we don't need the
separate allocation pass for constrained values anymore.
2012-04-14 21:54:03 +02:00
Christoph Bumiller
99319328d4
nv50/ir/tgsi: only export x-component of PSIZE
2012-04-14 21:54:03 +02:00
Christoph Bumiller
12a2f5121d
nvc0: fix emission of 3rd src in SET_AND,OR,XOR
2012-04-14 21:54:03 +02:00
Francisco Jerez
f01efba60a
nv50/ir: Fix BuildUtil::mkSelect and mkClobber
2012-04-14 21:54:03 +02:00
Christoph Bumiller
054fab5b48
nv50/ir: fix reg file conflicts with undefined-value placeholders
2012-04-14 21:54:03 +02:00
Christoph Bumiller
51327a2df2
nv50/ir/opt: silence warning (int < Elements() signedness)
2012-04-14 21:54:03 +02:00
Christoph Bumiller
ef7f9f68cf
nv50/ir/opt: fix combineSt access to wrong instruction
2012-04-14 21:54:03 +02:00
Christoph Bumiller
bb9c15bac4
nv50/ir/opt: another insn NULL check in phi elimination
2012-04-14 21:54:03 +02:00
Francisco Jerez
4ece0dbd2f
nv50/ir/ssa: Take into account function inputs and outputs.
2012-04-14 21:54:02 +02:00
Francisco Jerez
4a44f94caf
nv50/ir: Clean up before calculating instruction ordering for a new function.
2012-04-14 21:54:02 +02:00
Francisco Jerez
a539785187
nv50/ir/ra: Allocate registers for function arguments.
2012-04-14 21:54:02 +02:00
Francisco Jerez
530ff61ba7
nv50/ir: Take into account function args in the live range calculation code.
2012-04-14 21:54:02 +02:00
Francisco Jerez
ed255dbae2
nv50/ir/ra: Use matching physical regs for function args in caller and callee.
2012-04-14 21:54:02 +02:00
Francisco Jerez
a3dd45e1c2
nv50/ir/tgsi: Infer function inputs/outputs.
...
Edit: Don't do it for the main function of (graphics) shaders,
its inputs and outputs always go through TGSI_FILE_INPUT/OUTPUT.
This prevents all TEMPs from counting as live out and reduces
register pressure.
2012-04-14 21:54:02 +02:00
Francisco Jerez
9bb36d54a2
nv50/ir/tgsi: Replace the inlining logic with proper function calls.
2012-04-14 21:54:02 +02:00
Francisco Jerez
56d40aa51b
nv50/ir: Decouple DataArray from the dictionary that maps locations to values.
...
The point is to keep an independent dictionary for each function.
The array that was being used as dictionary has been converted into a
"bimap" for two different reasons: first, because having an almost
empty instance of an array with as many entries as registers there are
in the program, once for every function, would be wasteful, and
second, because we want to be able to map Value pointers back to
locations at some point.
2012-04-14 21:54:02 +02:00
Christoph Bumiller
d41f293bf0
nv50/ir/opt: don't delete instruction in removeFlow before its last use
2012-04-14 21:54:02 +02:00
Christoph Bumiller
be161e66d6
nv50/ir/opt: check BB equality before instruction ordering in CSE
2012-04-14 21:54:02 +02:00
Christoph Bumiller
44e84d6f16
nv50/ir/opt: don't copy-propagate cond MOVs or MOVs to other reg files
...
We've never encountered the latter on nvc0, but on nv50 we have moves
between GPRs and address regs.
2012-04-14 21:54:02 +02:00
Christoph Bumiller
ca1fc2b864
nv50/ir/opt: don't replace conditional definitions in CSE
2012-04-14 21:54:02 +02:00
Francisco Jerez
90f0fac655
nv50/ir/opt: Update the symbol size when combining loads and stores.
2012-04-14 21:54:02 +02:00
Christoph Bumiller
5df92c81c3
nv50/ir: initialize FlowInstruction::builtin
2012-04-14 21:54:01 +02:00
Francisco Jerez
1e95794173
nv50/ir/opt: Fix for function calls.
2012-04-14 21:54:01 +02:00
Francisco Jerez
98116cc3dc
nv50/ir: Build a "symbol" table with the binary offsets of each function.
2012-04-14 21:54:01 +02:00
Francisco Jerez
5e4b2a1a47
nv50/ir: Add support for removing functions from a program.
2012-04-14 21:54:01 +02:00
Francisco Jerez
d32ebb8c30
nv50/ir: Scan program functions in DFS-postorder.
...
The reason is that several passes (regalloc, function argument
binding, inlining) are going to require the callees of a function to
be processed before the caller.
2012-04-14 21:54:01 +02:00
Francisco Jerez
78de8c8ab5
nv50/ir: Deal with graph iterators using RAII.
2012-04-14 21:54:01 +02:00
Francisco Jerez
898b0981b6
nv50/ir: Add convenience method for calculating the live sets of a function.
2012-04-14 21:54:01 +02:00
Francisco Jerez
3e9150cd96
nv50/ir: Add support code for calculating the clobber set of a BB or function.
2012-04-14 21:54:01 +02:00
Francisco Jerez
d6d1f0e4a2
nv50/ir/opt: Don't lose modifiers during constant folding.
2012-04-14 21:54:01 +02:00
Francisco Jerez
14d5f975a6
nv50/ir/opt: Improve modifier handling.
2012-04-14 21:54:01 +02:00
Francisco Jerez
784848a94d
nv50/ir: Add support for cloning FlowInsns, ImmediateVals and BBs.
2012-04-14 21:54:01 +02:00
Francisco Jerez
a05e6a3fa2
nv50/ir: Decouple object cloning logic from the sub-object recursion policy.
2012-04-14 21:54:01 +02:00
Francisco Jerez
da28ba00d8
nv50/ir: Make sure that several IR objects are destroyed on takedown.
2012-04-14 21:54:01 +02:00
Christoph Bumiller
9362d4bc0a
nv50/ir: make Instruction::src/def container private
2012-04-14 21:54:00 +02:00
Francisco Jerez
8cc2eca5df
nv50/ir: Add support for unlimited instruction arguments.
2012-04-14 21:54:00 +02:00
Christoph Bumiller
15d224f7a7
nv50/ir: temporarily exclude nv50 code emitter from build
...
It's not used yet and shouldn't have been included in the first
place.
2012-04-14 21:54:00 +02:00
Christoph Bumiller
f113b6f959
nv50/ir: copy value size in SSA-rename pass
2012-04-14 21:54:00 +02:00
Christoph Bumiller
55f9bdb64e
nv50/ir/opt: improve post-multiply and check target for support
2012-04-14 21:54:00 +02:00
Christoph Bumiller
56cf2da022
nv50/ir: add setFlagsDef/Src helper
...
Will be used by nv50 target.
2012-04-14 21:54:00 +02:00